From 52d5e97de6a0616a6499ae2a5ee71b581f2be316 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Thu, 11 May 2023 15:37:56 +0100 Subject: [PATCH] flake: filter nix code and README out of src This means that changing the Nix code doesn't cause the Rust code to need to be recompiled when using nix build --- flake.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 43438b5..3fb9b46 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,19 @@ rustc = toolchain; }).buildRustPackage rec { pname = "stardust-xr-${name}"; - src = ./.; + src = builtins.path { + name = "stardust-xr-source"; + path = toString ./.; + filter = path: type: + nixpkgs.lib.all + (n: builtins.baseNameOf path != n) + [ + "flake.nix" + "flake.lock" + "nix" + "README.md" + ]; + }; # ---- START package specific settings ---- version = "0.10.2";