|
38 | 38 | cbor-diag = final.callPackage ./pkgs/cbor-diag { };
|
39 | 39 | cddl = final.callPackage ./pkgs/cddl { };
|
40 | 40 | });
|
| 41 | + |
| 42 | + musl = (final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl { |
| 43 | + # Fix the following Ruby cross build error: |
| 44 | + # |
| 45 | + # error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4' |
| 46 | + # is not allowed to refer to the following paths: |
| 47 | + # /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4 |
| 48 | + # |
| 49 | + # See https://github.com/NixOS/nixpkgs/issues/347758 |
| 50 | + ruby = prev.ruby.overrideAttrs (old: { |
| 51 | + postInstall = old.postInstall + '' |
| 52 | + find $out/${old.passthru.gemPath} -name exts.mk -delete |
| 53 | + ''; |
| 54 | + }); |
| 55 | + |
| 56 | + # Tests on static postgresql are failing with: |
| 57 | + # |
| 58 | + # FATAL: could not load library "/build/postgresql-16.4/.../lib/dict_snowball.so": |
| 59 | + # Error relocating /build/postgresql-16.4/tmp_install/nix/store/.../lib/dict_snowball.so: |
| 60 | + # pg_any_to_server: symbol not found |
| 61 | + postgresql = prev.postgresql.overrideAttrs (_: { |
| 62 | + doCheck = false; |
| 63 | + }); |
| 64 | + }); |
41 | 65 | };
|
42 | 66 | supportedSystems = [
|
43 | 67 | "x86_64-linux"
|
|
187 | 211 | } "touch $out";
|
188 | 212 | } // (pkgs.lib.mapAttrs' (name: drv:
|
189 | 213 | pkgs.lib.nameValuePair "${name}-env" (
|
| 214 | + # We need to use unsafeDiscardOutputDependency here, as it will otherwise |
| 215 | + # pull in a bunch of dependenceis we don't care about at all from the .drvPath |
| 216 | + # query. |
190 | 217 | let env = pkgs.runCommand "${name}-env.sh" {
|
191 | 218 | requiredSystemFeatures = [ "recursive-nix" ];
|
192 | 219 | nativeBuildInputs = [ pkgs.nix ];
|
193 | 220 | } ''
|
194 | 221 | nix --offline --extra-experimental-features "nix-command flakes" \
|
195 |
| - print-dev-env ${drv.drvPath} >> $out |
| 222 | + print-dev-env '${builtins.unsafeDiscardOutputDependency drv.drvPath}^*' >> $out |
196 | 223 | '';
|
197 | 224 | # this needs to be linux. It would be great if we could have this
|
198 | 225 | # eval platform agnostic, but flakes don't permit this. A the
|
|
221 | 248 | license = pkgs.lib.licenses.asl20;
|
222 | 249 | platforms = pkgs.lib.platforms.unix;
|
223 | 250 | };
|
224 |
| - })) devShellsWithEvalOnLinux) // { |
| 251 | + })) devShells) // { |
225 | 252 | };
|
226 | 253 | packages.cabalProjectLocal.static = (import ./quirks.nix { pkgs = static-pkgs; static = true; }).template;
|
227 | 254 | packages.cabalProjectLocal.cross-js = (import ./quirks.nix { pkgs = js-pkgs; }).template;
|
|
0 commit comments