pscand/nix/package.nix
NotAShelf 033e253259
initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib131388c1056b6708b730a35011811026a6a6964
2026-02-19 00:13:08 +03:00

29 lines
581 B
Nix

{
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "sample-rust";
version = "0.1.0";
src = let
fs = lib.fileset;
s = ../.;
in
fs.toSource {
root = s;
fileset = fs.unions [
(fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src))
(s + /Cargo.lock)
(s + /Cargo.toml)
];
};
cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock";
enableParallelBuilding = true;
meta = {
description = "Sample Rust project";
maintainers = with lib.maintainers; [NotAShelf];
};
})