mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
2258b21e4b
Build-tested on x86_64 Linux and on Darwin.
20 lines
471 B
Nix
20 lines
471 B
Nix
{ stdenv, ghcWithPackages, xmessage, makeWrapper, packages ? (x: []) }:
|
|
|
|
let
|
|
taffybarEnv = ghcWithPackages (self: [ self.taffybar ] ++ packages self);
|
|
in stdenv.mkDerivation {
|
|
name = "taffybar-with-packages";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildCommand = ''
|
|
mkdir -p $out/bin
|
|
makeWrapper ${taffybarEnv}/bin/taffybar $out/bin/taffybar \
|
|
--set NIX_GHC "${taffybarEnv}/bin/ghc"
|
|
'';
|
|
|
|
meta = {
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|