Skip to content

Commit bed1d1e

Browse files
committed
rpm-sequoia: fixup darwin build
When building derivations that depends on rpm on darwin, we get the following error: ``` dyld[69225]: Library not loaded: /nix/store/cz9sppfrs9ag34lq2pq6wmhspwcnvbxq-rpm-sequoia-1.7.0/lib/librpm_sequoia.1.7.0.dylib Referenced from: <0EA94AC5-F54A-3791-9374-4092232F33A1> /nix/store/mak6qp2pvgz19dn0fb0pr2lksgca43qp-rpm-4.20.0/lib/librpmio.10.2.0.dylib Reason: tried: '/nix/store/cz9sppfrs9ag34lq2pq6wmhspwcnvbxq-rpm-sequoia-1.7.0/lib/librpm_sequoia.1.7.0.dylib' (no such file), '/System/Vol> cpio: premature end of archive ``` This commit adds the correct symlinks on darwin.
1 parent b7256c3 commit bed1d1e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkgs/by-name/rp/rpm-sequoia/package.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ rustPlatform.buildRustPackage rec {
5555
''
5656
+
5757
# Dependents will rely on the versioned symlinks
58-
''
58+
lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
5959
install -d $out/lib
6060
find target/release/ \
6161
-maxdepth 1 \
6262
-type l -name 'librpm_sequoia.*' \
6363
-exec cp --no-dereference {} $out/lib/ \;
64-
'';
64+
''
65+
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
66+
install -d $out/lib
67+
ln -s librpm_sequoia.dylib $out/lib/librpm_sequoia.${version}.dylib
68+
'';
6569

6670
passthru.updateScript = nix-update-script { };
6771

0 commit comments

Comments
 (0)