This commit is contained in:
Robin Appelman 2025-08-06 21:29:39 +02:00
commit b241199af9
7 changed files with 84 additions and 77 deletions

View file

@ -1,34 +1,33 @@
{ stdenv
, rustPlatform
, libsodium
, pkg-config
, lib
, rust-bin
,
}:
let
{
stdenv,
rustPlatform,
libsodium,
pkg-config,
lib,
rust-bin,
}: let
inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. [ "Cargo.*" "(src)(/.*)?" ];
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
cargoPackage = (fromTOML (readFile ../Cargo.toml)).package;
in
rustPlatform.buildRustPackage rec {
pname = cargoPackage.name;
inherit (cargoPackage) version;
rustPlatform.buildRustPackage rec {
pname = cargoPackage.name;
inherit (cargoPackage) version;
inherit src;
inherit src;
buildInputs = [
libsodium
];
buildInputs = [
libsodium
];
nativeBuildInputs = [
pkg-config
];
nativeBuildInputs = [
pkg-config
];
doCheck = false;
doCheck = false;
cargoLock = {
lockFile = ../Cargo.lock;
};
}
cargoLock = {
lockFile = ../Cargo.lock;
};
}