forked from mirrors/nixpkgs
134c5cc8db
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.
16 lines
388 B
Nix
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;
|
|
}
|