2016-05-17 00:50:43 +01:00
|
|
|
{ stdenv, fetchgit, pkgconfig, vte, gtk3, ncurses, makeWrapper
|
|
|
|
, configFile ? null
|
|
|
|
}:
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
let
|
2016-02-25 21:53:40 +00:00
|
|
|
version = "11";
|
2016-05-17 00:50:43 +01:00
|
|
|
termite = stdenv.mkDerivation {
|
|
|
|
name = "termite-${version}";
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/thestinger/termite";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "1k91nw19c0p5ghqhs00mn9npa91idfkyiwik3ng6hb4jbnblp5ph";
|
|
|
|
};
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
buildInputs = [ pkgconfig vte gtk3 ncurses ];
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
outputs = [ "out" "terminfo" ];
|
2016-02-25 21:52:13 +00:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $terminfo/share
|
|
|
|
mv $out/share/terminfo $terminfo/share/terminfo
|
2016-02-25 21:52:13 +00:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
mkdir -p $out/nix-support
|
|
|
|
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
|
|
|
|
'';
|
2016-02-25 21:52:13 +00:00
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A simple VTE-based terminal";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
homepage = https://github.com/thestinger/termite/;
|
2016-05-17 07:08:32 +01:00
|
|
|
maintainers = with maintainers; [ koral garbas ];
|
2016-05-17 00:50:43 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2014-09-18 22:07:35 +01:00
|
|
|
};
|
2016-05-17 00:50:43 +01:00
|
|
|
in if configFile == null then termite else stdenv.mkDerivation {
|
|
|
|
name = "termite-with-config-${version}";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/etc/xdg/termite/ $out/bin
|
|
|
|
ln -s ${termite}/bin/termite $out/bin/termite
|
|
|
|
wrapProgram $out/bin/termite --add-flags "--config ${configFile}"
|
|
|
|
'';
|
|
|
|
passthru.terminfo = termite.terminfo;
|
2014-09-18 22:07:35 +01:00
|
|
|
}
|