cleanup: place packages into scopes
this helps for my own packages which depend on eachother: they should now evaluate without an overlay
This commit is contained in:
parent
9f21fbceda
commit
1b76f1d643
|
@ -1,24 +1,18 @@
|
||||||
(next: prev:
|
(next: prev:
|
||||||
let
|
let
|
||||||
additional = import ../pkgs/additional next;
|
additional = import ../pkgs/additional
|
||||||
|
{ pkgs = next; lib = prev.lib; };
|
||||||
python-packages = {
|
python-packages = {
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
(py-final: py-prev: import ../pkgs/python-packages { inherit (py-prev) callPackage; })
|
(py-final: py-prev: import ../pkgs/python-packages { inherit (py-prev) callPackage; })
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# to avoid infinite recursion, the patched packages require *unpatched* inputs,
|
patched = import ../pkgs/patched
|
||||||
# but we don't want to just send `prev` naively, else patched packages might
|
{ pkgs = next; lib = prev.lib; unpatched = prev; };
|
||||||
# take dependencies on unpatched versions of other packages we patch; or they
|
|
||||||
# won't be able to use inputs from `additional`, etc.
|
|
||||||
#
|
|
||||||
# so, call the patched packages using the `next` package set, except with
|
|
||||||
# they packages we're "about to" patch replaced with their versions from `prev`.
|
|
||||||
#
|
|
||||||
# we could alternatively pass `pkgs = prev // { inherit (next) callPackage; }`,
|
|
||||||
patched = import ../pkgs/patched (next // patchedInputs);
|
|
||||||
patchedInputs = builtins.mapAttrs (name: _patched: prev."${name}") patched;
|
|
||||||
|
|
||||||
sane = additional // python-packages // patched;
|
sane = additional // python-packages // patched;
|
||||||
in sane // { inherit sane; }
|
in sane // {
|
||||||
|
sane = next.recurseIntoAttrs sane;
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,35 +1,38 @@
|
||||||
# { callPackage, callPackages, libsForQt5, pkgs, recurseIntoAttrs }:
|
# { callPackage, callPackages, libsForQt5, pkgs, recurseIntoAttrs }:
|
||||||
pkgs:
|
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
|
||||||
let
|
let
|
||||||
inherit (pkgs) callPackage callPackages libsForQt5 recurseIntoAttrs;
|
me = lib.makeScope pkgs.newScope (self: with self; {
|
||||||
in {
|
sane-lib = import ../../modules/lib pkgs;
|
||||||
sane-lib = import ../../modules/lib pkgs;
|
|
||||||
|
|
||||||
bootpart-tow-boot-rpi-aarch64 = callPackage ./bootpart-tow-boot-rpi-aarch64 { };
|
bootpart-uefi-x86_64 = callPackage ./bootpart-uefi-x86_64 { };
|
||||||
bootpart-u-boot-rpi-aarch64 = callPackage ./bootpart-u-boot-rpi-aarch64 { };
|
browserpass-extension = callPackage ./browserpass-extension { };
|
||||||
bootpart-uefi-x86_64 = callPackage ./bootpart-uefi-x86_64 { };
|
cargo-docset = callPackage ./cargo-docset { };
|
||||||
browserpass-extension = callPackage ./browserpass-extension { };
|
feeds = recurseIntoAttrs (callPackage ./feeds { });
|
||||||
cargo-docset = callPackage ./cargo-docset { };
|
gopass-native-messaging-host = callPackage ./gopass-native-messaging-host { };
|
||||||
feeds = recurseIntoAttrs (callPackage ./feeds { });
|
gpodder-configured = callPackage ./gpodder-configured { };
|
||||||
fluffychat-moby = callPackage ./fluffychat-moby { };
|
lightdm-mobile-greeter = callPackage ./lightdm-mobile-greeter { };
|
||||||
fractal-latest = callPackage ./fractal-latest { };
|
linux-megous = callPackage ./linux-megous { };
|
||||||
gopass-native-messaging-host = callPackage ./gopass-native-messaging-host { };
|
mx-sanebot = callPackage ./mx-sanebot { };
|
||||||
gpodder-configured = callPackage ./gpodder-configured { };
|
rtl8723cs-firmware = callPackage ./rtl8723cs-firmware { };
|
||||||
kaiteki = callPackage ./kaiteki { };
|
sane-scripts = callPackage ./sane-scripts { };
|
||||||
lightdm-mobile-greeter = callPackage ./lightdm-mobile-greeter { };
|
static-nix-shell = callPackage ./static-nix-shell { };
|
||||||
linux-megous = callPackage ./linux-megous { };
|
sublime-music-mobile = callPackage ./sublime-music-mobile { };
|
||||||
mx-sanebot = callPackage ./mx-sanebot { };
|
tow-boot-pinephone = callPackage ./tow-boot-pinephone { };
|
||||||
rtl8723cs-firmware = callPackage ./rtl8723cs-firmware { };
|
|
||||||
sane-scripts = callPackage ./sane-scripts { };
|
|
||||||
static-nix-shell = callPackages ./static-nix-shell { };
|
|
||||||
sublime-music-mobile = callPackage ./sublime-music-mobile { };
|
|
||||||
tokodon = libsForQt5.callPackage ./tokodon { };
|
|
||||||
tow-boot-pinephone = callPackage ./tow-boot-pinephone { };
|
|
||||||
tow-boot-rpi4 = callPackage ./tow-boot-rpi4 { };
|
|
||||||
|
|
||||||
# patch rpi uboot with something that fixes USB HDD boot
|
# packages i haven't used for a while, may or may not still work
|
||||||
ubootRaspberryPi4_64bit = callPackage ./ubootRaspberryPi4_64bit { };
|
# fluffychat-moby = callPackage ./fluffychat-moby { };
|
||||||
|
# fractal-latest = callPackage ./fractal-latest { };
|
||||||
|
# kaiteki = callPackage ./kaiteki { };
|
||||||
|
# tokodon = libsForQt5.callPackage ./tokodon { };
|
||||||
|
|
||||||
# provided by nixpkgs patch or upstream PR
|
# old rpi packages that may or may not still work
|
||||||
# splatmoji = callPackage ./splatmoji { };
|
# bootpart-tow-boot-rpi-aarch64 = callPackage ./bootpart-tow-boot-rpi-aarch64 { };
|
||||||
}
|
# bootpart-u-boot-rpi-aarch64 = callPackage ./bootpart-u-boot-rpi-aarch64 { };
|
||||||
|
# tow-boot-rpi4 = callPackage ./tow-boot-rpi4 { };
|
||||||
|
# patch rpi uboot with something that fixes USB HDD boot
|
||||||
|
# ubootRaspberryPi4_64bit = callPackage ./ubootRaspberryPi4_64bit { };
|
||||||
|
|
||||||
|
# provided by nixpkgs patch or upstream PR
|
||||||
|
# splatmoji = callPackage ./splatmoji { };
|
||||||
|
});
|
||||||
|
in me.packages me
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
pkgs:
|
{ pkgs, lib ? pkgs.lib, unpatched ? pkgs }:
|
||||||
let
|
let
|
||||||
inherit (pkgs) callPackage;
|
me = lib.makeScope pkgs.newScope (self: with self; {
|
||||||
in {
|
# XXX: the `inherit`s here are because:
|
||||||
# XXX: the `inherit`s here are because:
|
# - pkgs.callPackage draws from the _final_ package set.
|
||||||
# - pkgs.callPackage draws from the _final_ package set.
|
# - unpatched.XYZ draws (selectively) from the _unpatched_ package set.
|
||||||
# - pkgs.XYZ draws (selectively) from the _previous_ package set.
|
# see <overlays/pkgs.nix>
|
||||||
# see <overlays/pkgs.nix>
|
browserpass = callPackage ./browserpass { inherit (unpatched) browserpass; };
|
||||||
browserpass = callPackage ./browserpass { inherit (pkgs) browserpass; };
|
|
||||||
|
|
||||||
# mozilla keeps nerfing itself and removing configuration options
|
# mozilla keeps nerfing itself and removing configuration options
|
||||||
firefox-unwrapped = callPackage ./firefox-unwrapped { inherit (pkgs) firefox-unwrapped; };
|
firefox-unwrapped = callPackage ./firefox-unwrapped { inherit (unpatched) firefox-unwrapped; };
|
||||||
|
|
||||||
gocryptfs = callPackage ./gocryptfs { inherit (pkgs) gocryptfs; };
|
gocryptfs = callPackage ./gocryptfs { inherit (unpatched) gocryptfs; };
|
||||||
|
|
||||||
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
||||||
jackett = callPackage ./jackett { inherit (pkgs) jackett; };
|
jackett = callPackage ./jackett { inherit (unpatched) jackett; };
|
||||||
}
|
});
|
||||||
|
in me.packages me
|
||||||
|
|
Loading…
Reference in New Issue
Block a user