1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/pkgs/applications/window-managers/xmonad/wrapper.nix
2018-07-19 21:51:35 +02:00

22 lines
603 B
Nix

{ stdenv, ghcWithPackages, xmessage, makeWrapper, packages }:
let
xmonadEnv = ghcWithPackages (self: [ self.xmonad ] ++ packages self);
in stdenv.mkDerivation {
name = "xmonad-with-packages-${xmonadEnv.version}";
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/bin $out/share
ln -s ${xmonadEnv}/share/man $out/share/man
makeWrapper ${xmonadEnv}/bin/xmonad $out/bin/xmonad \
--set NIX_GHC "${xmonadEnv}/bin/ghc" \
--set XMONAD_XMESSAGE "${xmessage}/bin/xmessage"
'';
# trivial derivation
preferLocalBuild = true;
allowSubstitutes = false;
}