From 6a10974efbbe48388cd91727a1d4c9b76cdc202c Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 8 May 2024 21:03:42 +0200 Subject: [PATCH] fix(flake.nix): Don't remove the `.tri` api spec file when building --- flake.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 2490b0a..fe582e4 100644 --- a/flake.nix +++ b/flake.nix @@ -107,7 +107,6 @@ openssl lua54Packages.lua ]; - cargo_toml = craneLib.cleanCargoToml {cargoToml = ./Cargo.toml;}; pname = cargo_toml.package.name; @@ -115,7 +114,15 @@ craneBuild = craneLib.buildPackage { 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; };