summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-25 02:32:19 +0100
committertv <tv@shackspace.de>2015-10-25 02:32:19 +0100
commite281271239289a266777d0b429e604ec9aeaed41 (patch)
tree3a5da690b66b34869b88a2f6de7bf4ee60c1b81c
parent6f470727a360bcf2f1c1f8a00c87e6bc4c775ba1 (diff)
{tv cfgs => krebs pkgs} writeNixFromCabal
-rw-r--r--krebs/5pkgs/default.nix4
-rw-r--r--tv/2configs/xserver/default.nix4
2 files changed, 5 insertions, 3 deletions
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index 0ec4b3ded..7df7b7d3c 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -54,4 +54,8 @@ subdirs // rec {
gcc -O -Wall -o "$exe" $src
strip --strip-unneeded "$exe"
'';
+
+ writeNixFromCabal = name: path: pkgs.runCommand name {} ''
+ ${pkgs.cabal2nix}/bin/cabal2nix ${path} > $out
+ '';
}
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index 9e20bda18..facdf6df2 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -73,9 +73,7 @@ let
};
xmonad-pkg = pkgs.haskellPackages.callPackage xmonad-src {};
- xmonad-src = pkgs.runCommand "xmonad-package" {} ''
- ${pkgs.cabal2nix}/bin/cabal2nix ${./xmonad} > $out
- '';
+ xmonad-src = pkgs.writeNixFromCabal "xmonad.nix" ./xmonad;
xmonad-environment = {
DISPLAY = ":${toString config.services.xserver.display}";