diff options
Diffstat (limited to 'ymir/mlmmj-expose.nix')
-rw-r--r-- | ymir/mlmmj-expose.nix | 25 |
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 | ||
13 | in rec { | 13 | in 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 |