-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
30 lines (28 loc) · 861 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ pkgs ? (import <nixpkgs> {})
}:
with pkgs.lib;
let
sourceFilter = path: type: (hasPrefix (toString ./src ) path || (baseNameOf path == "blog.cabal"));
in rec {
haskellPackages = pkgs.haskell.packages.ghc843;
math-kleen-org = pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./blog.nix {})
(attrs :
{ src = builtins.filterSource sourceFilter ./.;
shellHook = ''
export NIX_SHELL_ENV=${attrs.name}
'';
}
);
texEnv = with pkgs; texlive.combine {
inherit (texlive) scheme-full;
};
math-kleen-org-wrapper = pkgs.stdenv.mkDerivation rec {
name = "math-kleen-org-wrapper";
buildInputs = [ pkgs.makeWrapper ];
buildCommand = ''
mkdir -p $out/bin
makeWrapper ${math-kleen-org}/bin/site $out/bin/math-kleen-org \
--prefix PATH : ${texEnv}/bin
'';
};
}