|
1 | | -pkgs: hlib: helf: huper: |
| 1 | +pkgs: compiler: hself: hsuper: |
2 | 2 | let |
3 | 3 | lib = pkgs.lib; |
| 4 | + haskellLib = pkgs.haskell.lib; |
| 5 | + |
| 6 | + fetchGitHubPR = { url, sha256 ? throw "sha256 required", ...}@x: |
| 7 | + let |
| 8 | + m = builtins.match "https://github.com/(.+)/(.+)/pull/([0-9]+)" url; |
| 9 | + parts = if m != null then m else throw "Failed to match PR URL"; |
| 10 | + in |
| 11 | + pkgs.fetchFromGitHub ({ |
| 12 | + owner = builtins.elemAt parts 0; |
| 13 | + repo = builtins.elemAt parts 1; |
| 14 | + rev = "refs/pull/${builtins.elemAt parts 2}/head"; |
| 15 | + } // (lib.filterAttrs (n: v: n != "url") x)); |
4 | 16 | in |
5 | 17 | { |
6 | 18 | # srk 2023-11-18: this is pinned in nixpkgs unstable to 1.0.5 |
7 | 19 | # causing trouble with ghc963 |
8 | | - some = helf.callHackageDirect |
| 20 | + some = hself.callHackageDirect |
9 | 21 | { pkg = "some"; |
10 | 22 | ver = "1.0.6"; |
11 | 23 | sha256 = "sha256-AnjaUzSlsLi3lIURrEfs92Jo5FzX49RyNdfDSfFV3Kk="; |
12 | 24 | } {}; |
13 | 25 |
|
| 26 | + # srk 2023-11-19: default in unstable is 0.1.1.1 which |
| 27 | + # fails to compile test on ghc8107 |
| 28 | + # but for for ghc963 we hit |
| 29 | + # https://github.com/obsidiansystems/dependent-sum-template/issues/10 |
| 30 | + # so we use 0.1.1.1 for ghc963 and 0.2.0.0 for the rest |
| 31 | + # - some weird interaction in unstable as this builds |
| 32 | + # with cabal and 0.2.0.0 |
| 33 | + dependent-sum-template = |
| 34 | + if compiler == "ghc963" |
| 35 | + then hsuper.dependent-sum-template |
| 36 | + else hsuper.dependent-sum-template_0_2_0_0; |
| 37 | + |
| 38 | + # srk 2023-11-19: wider unix bound via CPP |
| 39 | + # Required for ghc963 since linux-namespaces is pinned |
| 40 | + # in unstable to 0.1.3.0 |
| 41 | + linux-namespaces = hself.callCabal2nix "linux-namespaces" |
| 42 | + (fetchGitHubPR { |
| 43 | + url = "https://github.com/redneb/hs-linux-namespaces/pull/4"; |
| 44 | + sha256 = "sha256-R61OCu6b4YoDzIl0vg8cSoP7611TlEdWZfVDnZrJY+g="; |
| 45 | + }) {}; |
| 46 | + |
14 | 47 | hnix-store-core = |
15 | 48 | lib.pipe |
16 | | - (helf.callCabal2nix "hnix-store-core" ./hnix-store-core {}) |
| 49 | + (hself.callCabal2nix "hnix-store-core" ./hnix-store-core {}) |
17 | 50 | [ |
18 | | - hlib.compose.buildFromSdist |
| 51 | + haskellLib.compose.buildFromSdist |
19 | 52 | ]; |
20 | 53 | hnix-store-remote = |
21 | 54 | lib.pipe |
22 | 55 | # enable -fio-testsuite for Linux systems as |
23 | 56 | # it requires linux-namespaces |
24 | | - # NOTE: we cannot use hlib.compose.enableCabalFlag |
| 57 | + # NOTE: we cannot use haskellLib.compose.enableCabalFlag |
25 | 58 | # as the testsuite deps won't get picked up |
26 | 59 | # after cabal2nix step |
27 | 60 | ( |
28 | 61 | if pkgs.stdenv.isDarwin |
29 | | - then helf.callCabal2nix "hnix-store-remote" ./hnix-store-remote {} |
30 | | - else helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" {} |
| 62 | + then hself.callCabal2nix "hnix-store-remote" ./hnix-store-remote {} |
| 63 | + else hself.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" {} |
31 | 64 | ) |
32 | 65 | [ |
33 | | - hlib.compose.buildFromSdist |
| 66 | + haskellLib.compose.buildFromSdist |
34 | 67 | (pkg: pkg.overrideAttrs (attrs: { |
35 | 68 | buildInputs = attrs.buildInputs ++ [ |
36 | 69 | pkgs.nix |
|
0 commit comments