Skip to content

Commit adb851b

Browse files
authored
Merge pull request #1185 from saffr3n/fix-nix-flake-build
Fix nix flake build with current rust and openssl
2 parents 98c85ac + 533d515 commit adb851b

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/packages.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ let
33
mkPackage =
44
x:
55
{
6-
lib,
76
rustPlatform,
8-
stdenv,
97
pkg-config,
8+
openssl,
109
}:
1110
let
1211
cargoToml = builtins.fromTOML (builtins.readFile /${root}/crates/${x}/Cargo.toml);
@@ -15,17 +14,18 @@ let
1514
pname = cargoToml.package.name;
1615
version = cargoToml.package.version;
1716

17+
strictDeps = true;
18+
1819
src = root;
1920
cargoLock.lockFile = root + /Cargo.lock;
2021

2122
nativeBuildInputs = [ pkg-config ];
22-
buildInputs = [ stdenv.cc.cc.lib ];
23+
buildInputs = [ openssl ];
2324

24-
buildAndTestSubdir = "crates/${x}";
25+
# Needed to get openssl-sys to use pkg-config.
26+
env.OPENSSL_NO_VENDOR = 1;
2527

26-
postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
27-
patchelf --set-rpath "${stdenv.cc.cc.lib}/lib" $out/bin/${x}
28-
'';
28+
buildAndTestSubdir = "crates/${x}";
2929
};
3030
in
3131
(builtins.listToAttrs (

0 commit comments

Comments
 (0)