nixpkgs/pkgs/applications/misc/termite/default.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

2017-09-24 15:47:14 +02:00
{ stdenv, fetchgit, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
, configFile ? null
}:
2017-09-24 15:47:14 +02:00
let
2016-10-03 08:19:57 +02:00
version = "12";
termite = stdenv.mkDerivation {
name = "termite-${version}";
src = fetchgit {
url = "https://github.com/thestinger/termite";
rev = "refs/tags/v${version}";
2016-10-03 08:19:57 +02:00
sha256 = "0s6dyg3vcqk5qcx90bs24wdnd3p56rdjdcanx4pcxvp6ksjl61jz";
};
postPatch = "sed '1i#include <math.h>' -i termite.cc";
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
2017-09-24 15:47:14 +02:00
buildInputs = [ vte gtk3 ncurses ];
2017-09-24 15:47:14 +02:00
nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
2017-09-22 21:55:44 +02:00
outputs = [ "out" "terminfo" ];
postInstall = ''
mkdir -p $terminfo/share
mv $out/share/terminfo $terminfo/share/terminfo
mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
'';
meta = with stdenv.lib; {
description = "A simple VTE-based terminal";
license = licenses.lgpl2Plus;
homepage = https://github.com/thestinger/termite/;
2016-05-17 08:08:32 +02:00
maintainers = with maintainers; [ koral garbas ];
platforms = platforms.all;
};
};
in if configFile == null then termite else symlinkJoin {
name = "termite-with-config-${version}";
paths = [ termite ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/termite \
--add-flags "--config ${configFile}"
'';
passthru.terminfo = termite.terminfo;
}