···
1
-
{ stdenv, fetchFromGitHub, lib, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
1
+
{ stdenv, fetchFromGitHub, pkgconfig, vte, gtk3, ncurses, wrapGAppsHook }:
3
+
stdenv.mkDerivation rec {
4
+
name = "termite-${version}";
7
-
termite = stdenv.mkDerivation {
8
-
name = "termite-${version}";
10
-
src = fetchFromGitHub {
11
-
owner = "thestinger";
13
-
rev = "v${version}";
14
-
sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
15
-
fetchSubmodules = true;
7
+
src = fetchFromGitHub {
8
+
owner = "thestinger";
10
+
rev = "v${version}";
11
+
sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
12
+
fetchSubmodules = true;
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;
22
-
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
19
+
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
24
-
buildInputs = [ vte gtk3 ncurses ];
21
+
buildInputs = [ vte gtk3 ncurses ];
26
-
nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
23
+
nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
28
-
outputs = [ "out" "terminfo" ];
25
+
outputs = [ "out" "terminfo" ];
31
-
mkdir -p $terminfo/share
32
-
mv $out/share/terminfo $terminfo/share/terminfo
28
+
mkdir -p $terminfo/share
29
+
mv $out/share/terminfo $terminfo/share/terminfo
34
-
mkdir -p $out/nix-support
35
-
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
31
+
mkdir -p $out/nix-support
32
+
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
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;
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;
46
-
in if configFile == null then termite else symlinkJoin {
47
-
name = "termite-with-config-${version}";
48
-
paths = [ termite ];
49
-
nativeBuildInputs = [ makeWrapper ];
51
-
wrapProgram $out/bin/termite \
52
-
--add-flags "--config ${configFile}"
54
-
passthru.terminfo = termite.terminfo;