fix(flake.nix): Don't remove the `.tri` api spec file when building

This commit is contained in:
Benedikt Peetz 2024-05-08 21:03:42 +02:00
parent f5c88077f8
commit 205cf5963c
1 changed files with 9 additions and 2 deletions

View File

@ -99,7 +99,6 @@
openssl openssl
lua54Packages.lua lua54Packages.lua
]; ];
cargo_toml = craneLib.cleanCargoToml {cargoToml = ./Cargo.toml;}; cargo_toml = craneLib.cleanCargoToml {cargoToml = ./Cargo.toml;};
pname = cargo_toml.package.name; pname = cargo_toml.package.name;
@ -107,7 +106,15 @@
craneBuild = craneLib.buildPackage { craneBuild = craneLib.buildPackage {
inherit nativeBuildInputs buildInputs; inherit nativeBuildInputs buildInputs;
src = craneLib.cleanCargoSource ./.; src = let
trixyFilter = path: _type: builtins.match ".*tri$" path != null;
markdownOrCargo = path: type:
(trixyFilter path type) || (craneLib.filterCargoSources path type);
in
pkgs.lib.cleanSourceWith {
src = craneLib.path ./.;
filter = markdownOrCargo;
};
doCheck = true; doCheck = true;
}; };