mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-17 07:01:23 +01:00
Add source filtering
This resolves #4 by excluding the git subdirectory when building as a flake. Test builds with `nix build path:.` before and after the change.
This commit is contained in:
parent
4013e8fca6
commit
8119738ddc
3 changed files with 36 additions and 4 deletions
|
|
@ -6,9 +6,12 @@
|
|||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
nix-filter = {
|
||||
url = "github:numtide/nix-filter";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { flake-parts, ... }:
|
||||
outputs = inputs @ { flake-parts, nix-filter, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; }
|
||||
({ lib, ... }: {
|
||||
systems = [
|
||||
|
|
@ -20,7 +23,7 @@
|
|||
];
|
||||
perSystem = { config, pkgs, self', ... }: {
|
||||
packages = {
|
||||
flake_env = pkgs.ocamlPackages.callPackage ./default.nix { };
|
||||
flake_env = pkgs.ocamlPackages.callPackage ./default.nix { inherit nix-filter; };
|
||||
default = config.packages.flake_env;
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue