8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
29 lines
716 B
Nix
29 lines
716 B
Nix
{ lib, stdenv, ghcWithPackages, taffybar, makeWrapper, packages ? (x: []) }:
|
|
|
|
let
|
|
taffybarEnv = ghcWithPackages (self: [
|
|
self.taffybar
|
|
] ++ packages self);
|
|
in stdenv.mkDerivation {
|
|
pname = "taffybar-with-packages";
|
|
inherit (taffybarEnv) 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;
|
|
}
|