From 021564ffd40d54a59dd461b7d0d5e00a3c86ed0e Mon Sep 17 00:00:00 2001 From: Soispha Peetz Date: Thu, 29 Oct 2026 23:32:22 +0100 Subject: treewide: Rework entry points and attribute names That just makes a lot of stuff easier and more streamlined. Also, all choices between stable or unstable nixpkgs should now be explicit. --- pkgs/default.nix | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'pkgs') diff --git a/pkgs/default.nix b/pkgs/default.nix index 5456ad4..4fdb94f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,23 +1,21 @@ { - pkgs, - nixLib, - pkgsUnstable, + unstable_pkgs, + stable_pkgs, + extra_lib, }: let - inherit (pkgs) lib; + inherit (unstable_pkgs) lib; - warnMergeMessage = "the ./pkgs/by-name set"; - wMM = warnMergeMessage; - callPackage = - lib.callPackageWith - (nixLib.warnMerge - pkgs - (nixLib.warnMerge vhackPkgs {inherit nixLib pkgsUnstable;} wMM) - wMM); + mergePkgs = pkgs: lib.callPackageWith (extra_lib.warnMerge pkgs in_tree_pkgs "the ./pkgs/by-name set"); + callPackageStable = lib.callPackageWith (mergePkgs stable_pkgs); + callPackageUnstable = lib.callPackageWith (mergePkgs unstable_pkgs); - vhackPkgs = nixLib.mkByName { + in_tree_pkgs = extra_lib.mkByName { baseDirectory = ./by-name; fileName = "package.nix"; - finalizeFunction = name: value: callPackage value {}; + finalizeFunction = name: value: + if value.stable + then callPackageStable value.pkg {} + else callPackageUnstable value.pkg {}; }; in - vhackPkgs + in_tree_pkgs -- cgit v1.3.1