summaryrefslogtreecommitdiff
path: root/ymir
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-21 16:32:38 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-21 16:32:38 +0200
commitf37ff63678f8b8d6f554bc694f5d8faf2fb9ee25 (patch)
tree79ed439845afbede5b1f48b21485726b9e14c8b6 /ymir
parentb78f03a5856068362bb0256e364edf74acbeeb75 (diff)
downloadnixos-f37ff63678f8b8d6f554bc694f5d8faf2fb9ee25.tar
nixos-f37ff63678f8b8d6f554bc694f5d8faf2fb9ee25.tar.gz
nixos-f37ff63678f8b8d6f554bc694f5d8faf2fb9ee25.tar.bz2
nixos-f37ff63678f8b8d6f554bc694f5d8faf2fb9ee25.tar.xz
nixos-f37ff63678f8b8d6f554bc694f5d8faf2fb9ee25.zip
Diffstat (limited to 'ymir')
-rw-r--r--ymir/mlmmj-expose.nix39
1 files changed, 20 insertions, 19 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index b3f7499c..40645b93 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -1,7 +1,6 @@
1{ config, pkgs, ... }: 1{ config, pkgs, ... }:
2 2
3let 3let
4 haskellEnv = pkgs.haskellPackages.ghcWithPackages dependencies;
5 dependencies = pkgs: with pkgs; [ filepath 4 dependencies = pkgs: with pkgs; [ filepath
6 directory 5 directory
7 cryptonite 6 cryptonite
@@ -10,24 +9,26 @@ let
10 aeson 9 aeson
11 aeson-pretty 10 aeson-pretty
12 ]; 11 ];
13 mlmmj-exposed = pkgs.stdenv.mkDerivation { 12
14 name = "mlmmj-expose";
15 src = pkgs.substituteAll {
16 src = ./mlmmj-expose.hs;
17 inherit (pkgs) mlmmj;
18 };
19 buildCommand = ''
20 mkdir -p $out/bin
21 #cp $src $out/bin/.mlmmj-exposed
22 ${haskellEnv}/bin/ghc -o $out/bin/.mlmmj-expose -odir . -hidir . $src
23 for f in mlmmj-exposed mlmmj-expose mlmmj-get-exposed mlmmj-serve-exposed; do
24 ln -s .mlmmj-expose $out/bin/$f
25 done
26 '';
27 };
28in rec { 13in rec {
29 nixpkgs.config.packageOverrides = pkgs: rec { 14 nixpkgs.config.overlays = [(self: super: {
30 inherit mlmmj-exposed; 15 mlmmj-exposed = super.stdenv.mkDerivation {
31 }; 16 name = "mlmmj-expose";
17 src = super.substituteAll {
18 src = ./mlmmj-expose.hs;
19 inherit (pkgs) mlmmj;
20 };
21 buildCommand = let
22 haskellEnv = self.haskellPackages.ghcWithPackages dependencies;
23 in ''
24 mkdir -p $out/bin
25 #cp $src $out/bin/.mlmmj-exposed
26 ${haskellEnv}/bin/ghc -o $out/bin/.mlmmj-expose -odir . -hidir . $src
27 for f in mlmmj-exposed mlmmj-expose mlmmj-get-exposed mlmmj-serve-exposed; do
28 ln -s .mlmmj-expose $out/bin/$f
29 done
30 '';
31 };
32 })];
32 environment.systemPackages = [ mlmmj-exposed ]; 33 environment.systemPackages = [ mlmmj-exposed ];
33} 34}