summaryrefslogtreecommitdiff
path: root/default.nix
blob: 8d0407652a7d013adf6877981016b02f93bca219 (plain)
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
{ pkgs ? (import <nixpkgs> {})
}:
    
rec {
  dirty-haskell = pkgs.stdenv.lib.overrideDerivation (pkgs.haskellPackages.callPackage ./blog.nix {})
    (attrs :
      { src = ./.;
	      shellHook = ''
	        export PROMPT_INFO=${attrs.name}
	      '';
	    }
    );
  texEnv = with pkgs; texlive.combine {
    inherit (texlive) scheme-small standalone dvisvgm amsmath tikz-cd;
  };
  dirty-haskell-wrapper = pkgs.stdenv.mkDerivation rec {
    name = "dirty-haskell-wrapper";
    buildInputs = [ pkgs.makeWrapper ];
    buildCommand = ''
      mkdir -p $out/bin
      makeWrapper ${dirty-haskell}/bin/site $out/bin/dirty-haskell \
        --suffix PATH : ${texEnv}/bin
    '';
  };
}