forked from mirrors/nixpkgs
xmonad: cleanup wrapper
This commit is contained in:
parent
3d0a6819da
commit
9545c0b80e
|
@ -1,22 +1,16 @@
|
|||
{ stdenv, buildEnv, ghcWithPackages, xmessage, makeWrapper, packages }:
|
||||
{ stdenv, ghcWithPackages, xmessage, makeWrapper, packages }:
|
||||
|
||||
let
|
||||
xmonadEnv = ghcWithPackages (self: [ self.xmonad ] ++ packages self);
|
||||
drv = buildEnv {
|
||||
in stdenv.mkDerivation {
|
||||
name = "xmonad-with-packages";
|
||||
|
||||
paths = [ xmonadEnv ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
# TODO: This could be avoided if buildEnv could be forced to create all directories
|
||||
rm $out/bin
|
||||
mkdir $out/bin
|
||||
for i in ${xmonadEnv}/bin/*; do
|
||||
ln -s $i $out/bin
|
||||
done
|
||||
wrapProgram $out/bin/xmonad \
|
||||
--set XMONAD_GHC "${xmonadEnv}/bin/ghc" \
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${xmonadEnv}/bin/xmonad $out/bin/xmonad \
|
||||
--set NIX_GHC "${xmonadEnv}/bin/ghc" \
|
||||
--set XMONAD_XMESSAGE "${xmessage}/bin/xmessage"
|
||||
'';
|
||||
};
|
||||
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
err = base ++ ".errors"
|
||||
src = base ++ ".hs"
|
||||
lib = dir </> "lib"
|
||||
+ ghc <- fromMaybe "ghc" <$> liftIO (lookupEnv "XMONAD_GHC")
|
||||
+ ghc <- fromMaybe "ghc" <$> liftIO (lookupEnv "NIX_GHC")
|
||||
libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib
|
||||
srcT <- getModTime src
|
||||
binT <- getModTime bin
|
||||
|
|
Loading…
Reference in a new issue