mafs-thingy/rust/default.nix

31 lines
659 B
Nix
Raw Normal View History

2025-01-23 23:12:18 +02:00
{
lib,
rustPlatform,
}: let
toml = (lib.importTOML ./Cargo.toml).package;
in
rustPlatform.buildRustPackage {
pname = "mafs-rust";
inherit (toml) version;
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ./.)) (
lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./src
]
);
};
cargoLock.lockFile = ./Cargo.lock;
meta = {
inherit (toml) homepage description;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [blahai];
mainPackage = "mafs";
};
}