From 64bcef4307398769a18a0904a8e278aa4d48d526 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sun, 20 Oct 2024 19:48:23 +0200 Subject: [PATCH] default.nix: filter source --- default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 03a14cb..d0dca1a 100644 --- a/default.nix +++ b/default.nix @@ -9,7 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "greg-ng"; version = "0.1.0"; - src = lib.cleanSource ./.; + src = builtins.filterSource (path: type: let + baseName = baseNameOf (toString path); + in !(lib.any (b: b) [ + (!(lib.cleanSourceFilter path type)) + (baseName == "target" && type == "directory") + (baseName == "nix" && type == "directory") + (baseName == "flake.nix" && type == "regular") + (baseName == "flake.lock" && type == "regular") + ])) ./.; + nativeBuildInputs = [ makeWrapper ];