|
17 | 17 | { |
18 | 18 | hnix-store-core = |
19 | 19 | lib.pipe |
20 | | - (hself.callCabal2nix "hnix-store-core" ./hnix-store-core {}) |
| 20 | + (hself.callCabal2nix "hnix-store-core" ./hnix-store-core/hnix-store-core.cabal {}) |
21 | 21 | [ |
| 22 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-core; })) |
22 | 23 | haskellLib.compose.buildFromSdist |
23 | 24 | ]; |
24 | 25 | hnix-store-db = |
25 | 26 | lib.pipe |
26 | | - (hself.callCabal2nix "hnix-store-db" ./hnix-store-db {}) |
| 27 | + (hself.callCabal2nix "hnix-store-db" ./hnix-store-db/hnix-store-db.cabal {}) |
27 | 28 | [ |
| 29 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-db; })) |
28 | 30 | haskellLib.compose.buildFromSdist |
29 | 31 | ]; |
30 | 32 | hnix-store-aterm = |
|
34 | 36 | haskellLib.compose.buildFromSdist |
35 | 37 | ]; |
36 | 38 | hnix-store-json = |
| 39 | + let |
| 40 | + # Include the JSON test data files from upstream Nix that we need |
| 41 | + # for testing. |
| 42 | + src = lib.fileset.toSource { |
| 43 | + root = ./.; |
| 44 | + fileset = lib.fileset.unions [ |
| 45 | + ./hnix-store-json |
| 46 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libstore-tests/data/content-address) |
| 47 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libstore-tests/data/derived-path) |
| 48 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libstore-tests/data/outputs-spec) |
| 49 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libstore-tests/data/realisation) |
| 50 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libstore-tests/data/store-path) |
| 51 | + (lib.fileset.fileFilter (file: file.hasExt "json") ./upstream-nix/src/libutil-tests/data/hash) |
| 52 | + ]; |
| 53 | + }; |
| 54 | + in |
37 | 55 | lib.pipe |
38 | | - (hself.callCabal2nix "hnix-store-json" ./hnix-store-json {}) |
| 56 | + (hself.callCabal2nix "hnix-store-json" ./hnix-store-json/hnix-store-json.cabal {}) |
39 | 57 | [ |
| 58 | + (drv: drv.overrideAttrs (old: { |
| 59 | + inherit src; |
| 60 | + # Set up symlinks to upstream data files |
| 61 | + postUnpack = '' |
| 62 | + sourceRoot+=/hnix-store-json |
| 63 | + ''; |
| 64 | + })) |
40 | 65 | haskellLib.compose.buildFromSdist |
41 | 66 | ]; |
42 | 67 | hnix-store-nar = |
43 | 68 | lib.pipe |
44 | | - (hself.callCabal2nix "hnix-store-nar" ./hnix-store-nar {}) |
| 69 | + (hself.callCabal2nix "hnix-store-nar" ./hnix-store-nar/hnix-store-nar.cabal {}) |
45 | 70 | [ |
| 71 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-nar; })) |
46 | 72 | haskellLib.compose.buildFromSdist |
47 | 73 | ]; |
48 | 74 | hnix-store-readonly = |
49 | 75 | lib.pipe |
50 | | - (hself.callCabal2nix "hnix-store-readonly" ./hnix-store-readonly {}) |
| 76 | + (hself.callCabal2nix "hnix-store-readonly" ./hnix-store-readonly/hnix-store-readonly.cabal {}) |
51 | 77 | [ |
| 78 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-readonly; })) |
52 | 79 | haskellLib.compose.buildFromSdist |
53 | 80 | ]; |
54 | 81 | hnix-store-remote = |
|
60 | 87 | # after cabal2nix step |
61 | 88 | ( |
62 | 89 | if pkgs.stdenv.isDarwin |
63 | | - then hself.callCabal2nix "hnix-store-remote" ./hnix-store-remote {} |
64 | | - else hself.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" {} |
| 90 | + then hself.callCabal2nix "hnix-store-remote" ./hnix-store-remote/hnix-store-remote.cabal {} |
| 91 | + else hself.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote/hnix-store-remote.cabal "-fio-testsuite" {} |
65 | 92 | ) |
66 | 93 | [ |
| 94 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-remote; })) |
67 | 95 | haskellLib.compose.buildFromSdist |
68 | 96 | (pkg: pkg.overrideAttrs (attrs: { |
69 | 97 | buildInputs = attrs.buildInputs ++ [ |
|
73 | 101 | ]; |
74 | 102 | hnix-store-tests = |
75 | 103 | lib.pipe |
76 | | - (hself.callCabal2nix "hnix-store-tests" ./hnix-store-tests {}) |
| 104 | + (hself.callCabal2nix "hnix-store-tests" ./hnix-store-tests/hnix-store-tests.cabal {}) |
77 | 105 | [ |
| 106 | + (drv: drv.overrideAttrs (old: { src = ./hnix-store-tests; })) |
78 | 107 | haskellLib.compose.buildFromSdist |
79 | 108 | ]; |
80 | 109 | } |
0 commit comments