mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 11:13:30 +00:00
71fd2482b4
This package should only install the xmonad manpage but not GHC's (it doesn't even install GHC in the path). Installing both manpages makes this package conflict with the GHC derivation. Fixes #60914
21 lines
609 B
Nix
21 lines
609 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 = ''
|
|
install -D ${xmonadEnv}/share/man/man1/xmonad.1.gz $out/share/man/man1/xmonad.1.gz
|
|
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;
|
|
}
|