f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
29 lines
708 B
Nix
29 lines
708 B
Nix
{ stdenv, ghcWithPackages, taffybar, makeWrapper, packages ? (x: []) }:
|
|
|
|
let
|
|
taffybarEnv = ghcWithPackages (self: [
|
|
self.taffybar
|
|
] ++ packages self);
|
|
in stdenv.mkDerivation {
|
|
pname = "taffybar-with-packages";
|
|
inherit (taffybar) version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildCommand = ''
|
|
mkdir -p $out/bin
|
|
makeWrapper ${taffybarEnv}/bin/taffybar $out/bin/taffybar \
|
|
--set NIX_GHC "${taffybarEnv}/bin/ghc"
|
|
'';
|
|
|
|
# Trivial derivation
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
|
|
# For hacking purposes
|
|
passthru.env = taffybarEnv;
|
|
buildInputs = [ taffybarEnv ];
|
|
shellHook = "eval $(egrep ^export ${taffybarEnv}/bin/ghc)";
|
|
|
|
inherit (taffybar) meta;
|
|
}
|