flake: move 'packages' to 'flake/'

This commit is contained in:
Bruno BELANYI 2023-03-07 10:53:47 +00:00
parent 1ae2bca445
commit 40fff4b13a
2 changed files with 11 additions and 11 deletions

View file

@ -111,9 +111,6 @@
in
eachMySystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
apps = {
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
@ -124,14 +121,7 @@
devShells = import ./flake/dev-shells.nix inputs system;
packages =
let
inherit (futils.lib) filterPackages flattenTree;
packages = import ./pkgs { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages;
packages = import ./flake/packages.nix inputs system;
# Work-around for https://github.com/nix-community/home-manager/issues/3075
legacyPackages = {

10
flake/packages.nix Normal file
View file

@ -0,0 +1,10 @@
{ self, futils, nixpkgs, ... }:
system:
let
inherit (futils.lib) filterPackages flattenTree;
pkgs = nixpkgs.legacyPackages.${system};
packages = import "${self}/pkgs" { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages