-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
34 lines (32 loc) · 1.12 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
let
nixpkgs = fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/800184df21cfe4924e1e901f387cda49a9a8269c.tar.gz";
sha256 = "0xwlbs3sffsjgbc00gadmyi14q1b7ww0fgj0nxa77dip27jzywn1";
};
in
{ pkgs ? import nixpkgs { overlays = []; config = {}; inherit system; }
, system ? builtins.currentSystem
}:
let
inherit (pkgs) lib;
hlib = pkgs.haskell.lib;
hpkgs = pkgs.haskellPackages.extend (self: super: {
soph = (self.callCabal2nix "soph" (lib.sourceByRegex ./. [
"^src.*$"
"^.*\\.cabal$"
"^LICENSE$"
]) {}).overrideAttrs (drv: {
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.makeWrapper ];
postInstall = drv.postInstall or "" + ''
wrapProgram $out/bin/soph \
--prefix PATH : "${pkgs.lib.makeBinPath [ pkgs.feh ]}"
'';
});
blockhash = hlib.doJailbreak super.blockhash;
tasty-travis = hlib.doJailbreak super.tasty-travis;
broadcast-chan = self.callHackage "broadcast-chan" "0.2.0.1" {};
broadcast-chan-tests = hlib.addBuildDepend super.broadcast-chan-tests self.broadcast-chan;
});
in hpkgs.soph // {
inherit pkgs hpkgs;
}