flake.nix no longer discards templates folder

This commit is contained in:
Lewis Wynne 2026-04-10 03:32:41 +01:00
parent 39424b0ac5
commit 3ad9eec2f4

View file

@ -12,8 +12,14 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
craneLib = crane.mkLib pkgs; craneLib = crane.mkLib pkgs;
templateFilter = path: _type: builtins.match ".*templates/.*" path != null;
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
(templateFilter path type) || (craneLib.filterCargoSources path type);
};
guestbook = craneLib.buildPackage { guestbook = craneLib.buildPackage {
src = craneLib.cleanCargoSource ./.; inherit src;
buildInputs = with pkgs; [ openssl ]; buildInputs = with pkgs; [ openssl ];
nativeBuildInputs = with pkgs; [ pkg-config ]; nativeBuildInputs = with pkgs; [ pkg-config ];
}; };