summaryrefslogtreecommitdiff
path: root/ymir/mlmmj-expose.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-09-06 17:29:54 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-09-06 17:29:54 +0200
commite28b7def6cb2e4542c5fcbfc478dde85cd73ea3f (patch)
tree50891015f579511bdb4bc236562a6622d4e601b5 /ymir/mlmmj-expose.nix
parentbec99bf3ad9c1ab09ee08fade347d9191a986fe1 (diff)
downloadnixos-e28b7def6cb2e4542c5fcbfc478dde85cd73ea3f.tar
nixos-e28b7def6cb2e4542c5fcbfc478dde85cd73ea3f.tar.gz
nixos-e28b7def6cb2e4542c5fcbfc478dde85cd73ea3f.tar.bz2
nixos-e28b7def6cb2e4542c5fcbfc478dde85cd73ea3f.tar.xz
nixos-e28b7def6cb2e4542c5fcbfc478dde85cd73ea3f.zip
Better mlmmj-expose
Diffstat (limited to 'ymir/mlmmj-expose.nix')
-rw-r--r--ymir/mlmmj-expose.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index 2bb82013..f1cf4dcc 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -12,18 +12,23 @@ let
12 12
13in rec { 13in rec {
14 nixpkgs.overlays = [(self: super: { 14 nixpkgs.overlays = [(self: super: {
15 mlmmj-exposed = super.stdenv.mkDerivation { 15 mlmmj-exposed = super.stdenv.mkDerivation rec {
16 name = "mlmmj-expose"; 16 name = "mlmmj-expose";
17 src = super.substituteAll { 17
18 src = ./mlmmj-expose.hs; 18 src = ./mlmmj-expose;
19 inherit (pkgs) mlmmj; 19
20 }; 20 phases = [ "unpackPhase" "buildPhase" "installPhase" ];
21 buildCommand = let 21
22 haskellEnv = self.haskellPackages.ghcWithPackages dependencies; 22 env = self.haskellPackages.ghcWithPackages dependencies;
23 in '' 23
24 buildPhase = ''
25 ${env}/bin/ghc -o mlmmj-expose -odir . -hidir . mlmmj-expose.hs
26 '';
27
28 installPhase = ''
24 mkdir -p $out/bin 29 mkdir -p $out/bin
25 #cp $src $out/bin/.mlmmj-exposed 30 cp mlmmj-expose $out/bin/.mlmmj-expose
26 ${haskellEnv}/bin/ghc -o $out/bin/.mlmmj-expose -odir . -hidir . $src 31
27 for f in mlmmj-exposed mlmmj-expose mlmmj-get-exposed mlmmj-serve-exposed; do 32 for f in mlmmj-exposed mlmmj-expose mlmmj-get-exposed mlmmj-serve-exposed; do
28 ln -s .mlmmj-expose $out/bin/$f 33 ln -s .mlmmj-expose $out/bin/$f
29 done 34 done