-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
36 lines (30 loc) · 1.02 KB
/
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
31
32
33
34
35
36
{
nixpkgs ? import <nixpkgs>
}:
let
addRuntimeDependency = drv: dep: addRuntimeDependencies drv [ dep ];
addRuntimeDependencies = drv: deps: pkgs.haskell.lib.overrideCabal drv (drv: {
buildDepends = (drv.buildDepends or []) ++ [ pkgs.makeWrapper ];
postInstall = ''
${drv.postInstall or ""}
for exe in "$out/bin/"* ; do
wrapProgram "$exe" --prefix PATH ":" \
${pkgs.lib.makeBinPath deps}
done
'';
});
config = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
easy-invoice-maker =
haskellPackagesNew.callPackage ./easy-invoice-maker.nix {};
mustache =
haskellPackagesNew.callPackage ./nix/mustache.nix {};
};
};
};
permittedInsecurePackages = [ "qtwebkit-5.212.0-alpha4" ];
};
pkgs = nixpkgs { inherit config; };
in addRuntimeDependency pkgs.haskellPackages.easy-invoice-maker pkgs.wkhtmltopdf