nixos-config/templates/rust-app/default.nix

38 lines
552 B
Nix
Raw Normal View History

2024-03-16 07:12:59 +00:00
{ lib
, rustPlatform
, meson
, ninja
, pkg-config
}:
rustPlatform.buildRustPackage {
pname = "app";
version = "VERSION";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
2024-03-16 07:12:59 +00:00
./Cargo.lock
./Cargo.toml
./LICENSE
./meson.build
./meson_options.txt
./src
];
};
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [
meson
ninja
pkg-config
];
meta = with lib; {
description = "Rust app";
mainProgram = "app";
platforms = platforms.unix;
};
}