pakker/nix/package.nix
NotAShelf 563ff2b187
nix: initial tooling setup
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia510d6575a3796118a14dbc834af1ba16a6a6964
2026-02-13 00:15:03 +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];
};
})