nixpkgs/pkgs/applications/window-managers/taffybar/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
713 B
Nix
Raw Normal View History

{ lib, stdenv, ghcWithPackages, taffybar, makeWrapper, packages ? (x: []) }:
let
taffybarEnv = ghcWithPackages (self: [
self.taffybar
] ++ packages self);
in stdenv.mkDerivation {
2022-03-07 11:37:20 +00:00
pname = "taffybar-with-packages";
2022-10-27 14:18:03 +00:00
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;
}