mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
26 lines
604 B
Nix
26 lines
604 B
Nix
{
|
|
makeRustPlatform,
|
|
rust-bin,
|
|
lib,
|
|
}: let
|
|
inherit (lib.sources) sourceByRegex;
|
|
inherit (builtins) fromTOML readFile;
|
|
src = sourceByRegex ../. ["Cargo.*" "(src|templates)(/.*)?"];
|
|
cargoPackage = (fromTOML (readFile ../Cargo.toml)).package;
|
|
rustPlatform = makeRustPlatform {
|
|
cargo = rust-bin.stable.latest.minimal;
|
|
rustc = rust-bin.stable.latest.minimal;
|
|
};
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = cargoPackage.name;
|
|
inherit (cargoPackage) version;
|
|
|
|
inherit src;
|
|
|
|
cargoLock = {
|
|
lockFile = ../Cargo.lock;
|
|
};
|
|
|
|
meta.mainProgram = "netnsd";
|
|
}
|