-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.nix
68 lines (62 loc) · 1.65 KB
/
release.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
let
sources = import ./nix/sources.nix;
in
{ pkgs ? import sources.nixpkgs { }
}:
let
inherit (pkgs.lib.trivial) flip pipe;
inherit (pkgs.haskell.lib) appendPatch appendConfigureFlags;
haskellPackages = pkgs.haskellPackages.override {
overrides = hpNew: hpOld: {
hakyll =
pipe
hpOld.hakyll
[ #(flip appendPatch ./hakyll.patch)
(flip appendConfigureFlags [ "-f" "watchServer" "-f" "previewServer" ])
];
#blog = hpNew.callCabal2nix "blog" ./. { };
blog = pkgs.haskellPackages.callPackage ({ mkDerivation, base, hakyll, hakyll-sass, stdenv }:
mkDerivation {
pname = "blog-hakyll";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base hakyll hakyll-sass ];
license = "unknown";
hydraPlatforms = stdenv.lib.platforms.none;
}
) {};
niv = import sources.niv { };
};
};
project = haskellPackages.blog;
in
{
project = project;
shell = haskellPackages.shellFor {
packages = p: with p; [
project
];
buildInputs = with haskellPackages; [
ghcid
hlint # or ormolu
pkgs.niv
pkgs.cacert # needed for niv
pkgs.nix # needed for niv
(
(pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-medium stackengine tikzmark;
}).overrideAttrs (oldAttrs: {
preferLocalBuild = false;
allowSubstitutes = true;
})
)
pkgs.imagemagick
pkgs.cabal-install
pkgs.exiftool
pkgs.rsync
];
withHoogle = true;
};
}