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