summaryrefslogtreecommitdiff
path: root/default.nix
blob: d9d3c52b3d51905bf7d31f21ffb213c96a04c2bc (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 rsfs;
  };
  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 \
        --prefix PATH : ${texEnv}/bin
    '';
  };
}