summaryrefslogtreecommitdiff
path: root/default.nix
blob: 629f1bb58e079535c5ad90fede3d3545e49dfc03 (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
26
27
28
29
30
31
32
{ pkgs ? (import <nixpkgs> {})
}:
    
rec {
  haskellPackages = pkgs.haskellPackages.override {
    overrides = self : super : {
      hakyll = pkgs.haskell.lib.overrideCabal super.hakyll (drv: {
        doCheck = false;
      });
    };
  };
  dirty-haskell = pkgs.stdenv.lib.overrideDerivation (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
    '';
  };
}