Files
chainexec/default.nix
2025-10-16 22:53:27 +09:00

40 lines
863 B
Nix

{
lib
, rustPlatform
}:
let
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in
rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = cargoToml.package.version;
src = builtins.filterSource (path: type: let
baseName = baseNameOf (toString path);
in !(lib.any (b: b) [
(!(lib.cleanSourceFilter path type))
(type == "directory" && lib.elem baseName [
".direnv"
".git"
"target"
"result"
])
(type == "regular" && lib.elem baseName [
"flake.nix"
"flake.lock"
"default.nix"
"module.nix"
".envrc"
])
])) ./.;
cargoLock.lockFile = ./Cargo.lock;
meta = with lib; {
license = licenses.mit;
maintainers = with maintainers; [ h7x4 ];
platforms = platforms.unix;
mainProgram = "chainexec";
};
}