Skip to content

Commit 0e6af0c

Browse files
committed
nix: Filter nix files from src
Don't rebuild if they changes Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 186e4e9 commit 0e6af0c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

flake.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
}:
2929
flake-utils.lib.eachDefaultSystem (system: let
3030
pkgs = import nixpkgs {inherit system;};
31+
lib = pkgs.lib;
3132

3233
zephyr-sdk = zephyr-nix.packages.${system}.sdk-0_16.override {targets = ["arm-zephyr-eabi"];};
3334

@@ -49,7 +50,12 @@
4950
sed -e 's/dynamic = "license"/dynamic = ["license"]/' -i pyproject.toml
5051
'';
5152

52-
ec = ./.;
53+
ec = lib.cleanSourceWith {
54+
src = ./.;
55+
filter = path: type:
56+
let name = baseNameOf (toString path);
57+
in !(lib.hasSuffix ".nix" name) && name != "flake.lock" && name != "result";
58+
};
5359

5460
build_version = "awawa";
5561

0 commit comments

Comments
 (0)