refactor
This commit is contained in:
20
lib/build-rust-package.nix
Normal file
20
lib/build-rust-package.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
input,
|
||||
prev,
|
||||
}: let
|
||||
manifest = (prev.lib.importTOML "${input}/Cargo.toml").package;
|
||||
in
|
||||
prev.rustPlatform.buildRustPackage {
|
||||
pname = manifest.name;
|
||||
version = manifest.version;
|
||||
|
||||
cargoLock.lockFile = "${input}/Cargo.lock";
|
||||
|
||||
src = input;
|
||||
|
||||
nativeBuildInputs = [prev.pkg-config];
|
||||
buildInputs = [prev.openssl];
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
doCheck = false;
|
||||
}
|
||||
Reference in New Issue
Block a user