From 104a62d7816ad5e4b5ff05f3e08d20826b356f75 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 8 Aug 2023 23:23:24 +0200 Subject: [PATCH] flake.nix: filterSource --- flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index b4e4a5b..d6f8ecb 100644 --- a/flake.nix +++ b/flake.nix @@ -65,13 +65,17 @@ rustc = rust; }; + src = builtins.filterSource (path: type: + builtins.match ".*\.nix" path == null + ) ./.; + in rec { packages.default = self.packages.${system}.caveman-hunter; packages.caveman-hunter = naersk-lib.buildPackage rec { pname = "caveman-hunter"; version = self.lastModifiedDate; - src = ./.; + inherit src; targets = [ pname ]; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl systemd ]; @@ -79,7 +83,7 @@ packages.caveman-butcher = naersk-lib.buildPackage rec { pname = "caveman-butcher"; version = self.lastModifiedDate; - src = ./.; + inherit src; targets = [ pname ]; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl systemd ]; @@ -87,7 +91,7 @@ packages.caveman-gatherer = naersk-lib.buildPackage rec { pname = "caveman-gatherer"; version = self.lastModifiedDate; - src = ./.; + inherit src; targets = [ pname ]; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl systemd ]; @@ -99,7 +103,7 @@ packages.caveman-smokestack = naersk-lib.buildPackage rec { pname = "caveman-smokestack"; version = self.lastModifiedDate; - src = ./.; + inherit src; targets = [ pname ]; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl systemd ];