3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/termite/wrapper.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

16 lines
388 B
Nix

{ makeWrapper, wrapGAppsHook, symlinkJoin, configFile ? null, termite }:
if configFile == null then termite else symlinkJoin {
name = "termite-with-config-${termite.version}";
paths = [ termite ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/termite \
--add-flags "--config ${configFile}"
'';
passthru.terminfo = termite.terminfo;
}