3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/termite/default.nix
Maximilian Bosch 134c5cc8db termite: factor wrapper out into its own file (#43691)
Until now it's impossible to override the attrs of the actual build
instruction for the `termite` package like this:

```
termite.overrideAttrs (_: {
  # ...
})
```

This issue occurs since the `termite/default.nix` expressions returns
the `symlinkJoin` expression when I override termite (e.g. to provide a
config file).

I recently patched termite and wanted to apply this patch to my local
termite installation in my system config which is impossible this, so
splitting the wrapper and the build instruction into their own files
makes this way easier to maintian.
2018-08-01 16:09:55 +02:00

43 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, pkgconfig, vte, gtk3, ncurses, wrapGAppsHook }:
stdenv.mkDerivation rec {
name = "termite-${version}";
version = "13";
src = fetchFromGitHub {
owner = "thestinger";
repo = "termite";
rev = "v${version}";
sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
fetchSubmodules = true;
};
# https://github.com/thestinger/termite/pull/516
patches = [ ./url_regexp_trailing.patch ./add_errno_header.patch
] ++ stdenv.lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
buildInputs = [ vte gtk3 ncurses ];
nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
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/;
maintainers = with maintainers; [ koral garbas ];
platforms = platforms.all;
};
}