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
This commit is contained in:
matthewcroughan
2023-05-11 15:37:56 +01:00
parent 84ba4b47ec
commit e606426730

View File

@@ -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";