@@ -1,55 +1,42 @@
1−{ stdenv, fetchFromGitHub, lib, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
2−, configFile ? null
3−}:
1+{ stdenv, fetchFromGitHub, pkgconfig, vte, gtk3, ncurses, wrapGAppsHook }:
42
5−let
3+stdenv.mkDerivation rec {
4+ name = "termite-${version}";
65 version = "13";
7− termite = stdenv.mkDerivation {
8− name = "termite-${version}";
96
10− src = fetchFromGitHub {
11− owner = "thestinger";
12− repo = "termite";
13− rev = "v${version}";
14− sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
15− fetchSubmodules = true;
16− };
7+ src = fetchFromGitHub {
8+ owner = "thestinger";
9+ repo = "termite";
10+ rev = "v${version}";
11+ sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
12+ fetchSubmodules = true;
13+ };
1714
18− # https://github.com/thestinger/termite/pull/516
19− patches = [ ./url_regexp_trailing.patch ./add_errno_header.patch
20− ] ++ lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
15+ # https://github.com/thestinger/termite/pull/516
16+ patches = [ ./url_regexp_trailing.patch ./add_errno_header.patch
17+ ] ++ stdenv.lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
2118
22− makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
19+ makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
2320
24− buildInputs = [ vte gtk3 ncurses ];
21+ buildInputs = [ vte gtk3 ncurses ];
2522
26− nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
23+ nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
2724
28− outputs = [ "out" "terminfo" ];
25+ outputs = [ "out" "terminfo" ];
2926
30− postInstall = ''
31− mkdir -p $terminfo/share
32− mv $out/share/terminfo $terminfo/share/terminfo
27+ postInstall = ''
28+ mkdir -p $terminfo/share
29+ mv $out/share/terminfo $terminfo/share/terminfo
3330
34− mkdir -p $out/nix-support
35− echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
36− '';
31+ mkdir -p $out/nix-support
32+ echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
33+ '';
3734
38− meta = with stdenv.lib; {
39− description = "A simple VTE-based terminal";
40− license = licenses.lgpl2Plus;
41− homepage = https://github.com/thestinger/termite/;
42− maintainers = with maintainers; [ koral garbas ];
43− platforms = platforms.all;
44− };
35+ meta = with stdenv.lib; {
36+ description = "A simple VTE-based terminal";
37+ license = licenses.lgpl2Plus;
38+ homepage = https://github.com/thestinger/termite/;
39+ maintainers = with maintainers; [ koral garbas ];
40+ platforms = platforms.all;
4541 };
46−in if configFile == null then termite else symlinkJoin {
47− name = "termite-with-config-${version}";
48− paths = [ termite ];
49− nativeBuildInputs = [ makeWrapper ];
50− postBuild = ''
51− wrapProgram $out/bin/termite \
52− --add-flags "--config ${configFile}"
53− '';
54− passthru.terminfo = termite.terminfo;
5542}