diff options
| author | Seth Flynn <[email protected]> | 2025-01-28 07:23:40 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-01-28 07:58:44 -0500 |
| commit | 943dc8b295ca1a333c15a5c0fe5bd90cb5a980af (patch) | |
| tree | a23ac93782732e4d239c2aa9c5b1539717e463cc /default.nix | |
| parent | 988962c3fda908905892ebd452f1b85680ed2b99 (diff) | |
treewide: simplify package calling logic
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/default.nix b/default.nix index 25178be..2aebc73 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,7 @@ let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + { pkgs ? import nixpkgs { config = { }; @@ -15,20 +16,14 @@ in ), system ? builtins.currentSystem, }: + let inherit (pkgs) lib; - packageDirectory = ./pkgs; - scope = lib.makeScope pkgs.newScope ( - final: - lib.packagesFromDirectoryRecursive { - inherit (final) callPackage; - directory = packageDirectory; - } - ); - - # Filter extraneous attributes from the scope, based on the files in our package directory - packageFileNames = builtins.attrNames (builtins.readDir packageDirectory); - packages = lib.getAttrs packageFileNames scope; + getchpkgs = lib.packagesFromDirectoryRecursive { + callPackage = lib.callPackageWith (pkgs // getchpkgs); + directory = ./pkgs; + }; in -packages + +getchpkgs |
