diff options
Diffstat (limited to 'templates/full/nix/packages.nix')
| -rw-r--r-- | templates/full/nix/packages.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/full/nix/packages.nix b/templates/full/nix/packages.nix new file mode 100644 index 0000000..8b23ea7 --- /dev/null +++ b/templates/full/nix/packages.nix @@ -0,0 +1,24 @@ +{self, ...}: { + flake.overlays.default = _: prev: { + foo = prev.callPackage ./derivation.nix {inherit self;}; + }; + + perSystem = { + lib, + pkgs, + ... + }: { + package = let + fixup = lib.filterAttrs ( + _: v: + builtins.elem (v.meta.platforms or []) && !(v.meta.broken or false) + ); + + unfiltered = lib.fix (final: self.overlays.default final pkgs); + pkgs' = fixup unfiltered; + in { + inherit (pkgs') foo; + default = pkgs'.foo; + }; + }; +} |
