flake.nix: create packaging, generate coverage

This commit is contained in:
2024-08-09 19:05:16 +02:00
parent e420c1f4d5
commit dc29dd274a
3 changed files with 139 additions and 1 deletions

22
nix/default.nix Normal file
View File

@@ -0,0 +1,22 @@
{
lib
, rustPlatform
, cargoToml
, cargoLock
, src
}:
let
in
rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = cargoToml.package.version;
inherit src;
cargoLock.lockFile = cargoLock;
meta = with lib; {
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
mainProgram = (lib.head cargoToml.bin).name;
};
}