2017-09-24 14:47:14 +01:00
|
|
|
{ stdenv, fetchgit, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
|
2016-05-17 00:50:43 +01:00
|
|
|
, configFile ? null
|
|
|
|
}:
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2017-09-24 14:47:14 +01:00
|
|
|
let
|
2017-12-19 20:12:11 +00:00
|
|
|
version = "13";
|
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}";
|
2017-12-19 20:12:11 +00:00
|
|
|
sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
|
2016-05-17 00:50:43 +01:00
|
|
|
};
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2017-12-19 20:19:46 +00:00
|
|
|
# https://github.com/thestinger/termite/pull/516
|
|
|
|
patches = [ ./url_regexp_trailing.patch ];
|
|
|
|
|
2016-06-19 09:18:30 +01:00
|
|
|
postPatch = "sed '1i#include <math.h>' -i termite.cc";
|
|
|
|
|
2016-05-17 00:50:43 +01:00
|
|
|
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2017-09-24 14:47:14 +01:00
|
|
|
buildInputs = [ vte gtk3 ncurses ];
|
2014-09-18 22:07:35 +01:00
|
|
|
|
2017-09-24 14:47:14 +01:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
|
2017-09-22 20:55:44 +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-09-28 11:11:50 +01:00
|
|
|
in if configFile == null then termite else symlinkJoin {
|
2016-05-17 00:50:43 +01:00
|
|
|
name = "termite-with-config-${version}";
|
2016-09-28 11:11:50 +01:00
|
|
|
paths = [ termite ];
|
2016-05-17 00:50:43 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2016-09-28 11:11:50 +01:00
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/termite \
|
|
|
|
--add-flags "--config ${configFile}"
|
2016-05-17 00:50:43 +01:00
|
|
|
'';
|
|
|
|
passthru.terminfo = termite.terminfo;
|
2014-09-18 22:07:35 +01:00
|
|
|
}
|