summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix21
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