|
42 | 42 | }: |
43 | 43 |
|
44 | 44 | let |
45 | | - dev = stdenv.mkDerivation (finalAttrs: { |
46 | | - name = "nix-${nix-cli.version}-dev"; |
47 | | - pname = "nix"; |
48 | | - version = nix-cli.version; |
49 | | - dontUnpack = true; |
50 | | - dontBuild = true; |
51 | | - libs = map lib.getDev [ |
52 | | - nix-cmd |
| 45 | + libs = { |
| 46 | + inherit |
| 47 | + nix-util |
| 48 | + nix-util-c |
| 49 | + nix-store |
| 50 | + nix-store-c |
| 51 | + nix-fetchers |
53 | 52 | nix-expr |
54 | 53 | nix-expr-c |
55 | | - nix-fetchers |
56 | 54 | nix-flake |
57 | 55 | nix-flake-c |
58 | 56 | nix-main |
59 | 57 | nix-main-c |
60 | | - nix-store |
61 | | - nix-store-c |
62 | | - nix-util |
63 | | - nix-util-c |
64 | | - ] ++ lib.optionals (!stdenv.hostPlatform.isStatic) [ |
65 | | - # Currently fails in static build |
| 58 | + ; |
| 59 | + } // lib.optionalAttrs (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) { |
| 60 | + # Currently fails in static build |
| 61 | + inherit |
66 | 62 | nix-perl-bindings |
67 | | - ]; |
| 63 | + ; |
| 64 | + }; |
| 65 | + |
| 66 | + dev = stdenv.mkDerivation (finalAttrs: { |
| 67 | + name = "nix-${nix-cli.version}-dev"; |
| 68 | + pname = "nix"; |
| 69 | + version = nix-cli.version; |
| 70 | + dontUnpack = true; |
| 71 | + dontBuild = true; |
| 72 | + libs = map lib.getDev (lib.attrValues libs); |
68 | 73 | installPhase = '' |
69 | 74 | mkdir -p $out/nix-support |
70 | 75 | echo $libs >> $out/nix-support/propagated-build-inputs |
|
129 | 134 | nix-fetchers-tests.tests.run |
130 | 135 | nix-flake-tests.tests.run |
131 | 136 |
|
| 137 | + # Make sure the functional tests have passed |
| 138 | + nix-functional-tests |
| 139 | + |
132 | 140 | # dev bundle is ok |
133 | 141 | # (checkInputs must be empty paths??) |
134 | 142 | (runCommand "check-pkg-config" { checked = dev.tests.pkg-config; } "mkdir $out") |
135 | | - ] ++ |
136 | | - lib.optionals (!stdenv.hostPlatform.isStatic) ( |
| 143 | + ] ++ lib.optionals (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ |
137 | 144 | # Perl currently fails in static build |
138 | | - (if stdenv.buildPlatform.canExecute stdenv.hostPlatform |
139 | | - then [ |
140 | | - # TODO: add perl.tests |
141 | | - nix-perl-bindings |
142 | | - ] |
143 | | - else [ |
144 | | - nix-perl-bindings |
145 | | - ])); |
146 | | - installCheckInputs = [ |
147 | | - nix-functional-tests |
| 145 | + # TODO: Split out tests into a separate derivation? |
| 146 | + nix-perl-bindings |
148 | 147 | ]; |
149 | 148 | passthru = prevAttrs.passthru // { |
150 | 149 | inherit (nix-cli) version; |
|
166 | 165 | disallowedReferences = nix.all; |
167 | 166 | ``` |
168 | 167 | */ |
169 | | - libs = { |
170 | | - inherit |
171 | | - nix-util |
172 | | - nix-util-c |
173 | | - nix-store |
174 | | - nix-store-c |
175 | | - nix-fetchers |
176 | | - nix-expr |
177 | | - nix-expr-c |
178 | | - nix-flake |
179 | | - nix-flake-c |
180 | | - nix-main |
181 | | - nix-main-c |
182 | | - ; |
183 | | - }; |
| 168 | + inherit libs; |
184 | 169 |
|
185 | 170 | tests = prevAttrs.passthru.tests or {} // { |
186 | 171 | # TODO: create a proper fixpoint and: |
|
0 commit comments