From 40fff4b13a930560424b39a582f9a43ff102fb1e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 7 Mar 2023 10:53:47 +0000 Subject: [PATCH] flake: move 'packages' to 'flake/' --- flake.nix | 12 +----------- flake/packages.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 flake/packages.nix diff --git a/flake.nix b/flake.nix index 49d5583..fb2c6f4 100644 --- a/flake.nix +++ b/flake.nix @@ -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 = { diff --git a/flake/packages.nix b/flake/packages.nix new file mode 100644 index 0000000..1eccfa3 --- /dev/null +++ b/flake/packages.nix @@ -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