cleanup: move my packages to just one toplevel scope
having multiple scopes -- particularly near the toplevel -- was actually just a complication
This commit is contained in:
parent
1b76f1d643
commit
89f81da134
|
@ -241,9 +241,12 @@
|
|||
(! elem name [ "feeds" "pythonPackagesExtensions" ])
|
||||
&& (allPkgs.lib.meta.availableOn allPkgs.stdenv.hostPlatform pkg)
|
||||
)
|
||||
(allPkgs.sane // {
|
||||
inherit (allPkgs) uninsane-dot-org;
|
||||
})
|
||||
(
|
||||
# expose sane packages and chosen inputs (uninsane.org)
|
||||
(import ./pkgs { pkgs = allPkgs; }) // {
|
||||
inherit (allPkgs) uninsane-dot-org;
|
||||
}
|
||||
)
|
||||
)
|
||||
# self.legacyPackages;
|
||||
{ inherit (self.legacyPackages) x86_64-linux; }
|
||||
|
|
|
@ -8,17 +8,15 @@
|
|||
# rather, this is the entrypoint through which NUR finds my packages, modules, overlays.
|
||||
# it's reachable only from those using this repo via NUR.
|
||||
#
|
||||
# to manually query available packages, modules, etc, true:
|
||||
# to manually query available packages, modules, etc, try:
|
||||
# - nix eval --impure --expr 'builtins.attrNames (import ./. {})'
|
||||
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
sanePkgs = import ../../pkgs/additional pkgs;
|
||||
sanePkgs = import ../../pkgs { inherit pkgs; };
|
||||
in
|
||||
({
|
||||
# contains both packages not in nixpkgs, and patched versions of those in nixpkgs
|
||||
overlays.pkgs = import ../../overlays/pkgs.nix;
|
||||
# contains only my packages which aren't in nixpkgs
|
||||
pkgs = sanePkgs;
|
||||
|
||||
modules = import ../../modules { inherit (pkgs) lib; };
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
(next: prev:
|
||||
let
|
||||
additional = import ../pkgs/additional
|
||||
{ pkgs = next; lib = prev.lib; };
|
||||
toplevel-pkgs = import ../pkgs
|
||||
{ pkgs = next; lib = prev.lib; unpatched = prev; };
|
||||
python-packages = {
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(py-final: py-prev: import ../pkgs/python-packages { inherit (py-prev) callPackage; })
|
||||
];
|
||||
};
|
||||
|
||||
patched = import ../pkgs/patched
|
||||
{ pkgs = next; lib = prev.lib; unpatched = prev; };
|
||||
|
||||
sane = additional // python-packages // patched;
|
||||
in sane // {
|
||||
sane = next.recurseIntoAttrs sane;
|
||||
}
|
||||
in
|
||||
# expose all my packages into the root scope:
|
||||
# - `additional` packages
|
||||
# - `patched` versions of nixpkgs (which necessarily shadow their nixpkgs version)
|
||||
# - `pythonPackagesExtensions`
|
||||
toplevel-pkgs
|
||||
)
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# { callPackage, callPackages, libsForQt5, pkgs, recurseIntoAttrs }:
|
||||
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
|
||||
let
|
||||
me = lib.makeScope pkgs.newScope (self: with self; {
|
||||
sane-lib = import ../../modules/lib pkgs;
|
||||
|
||||
bootpart-uefi-x86_64 = callPackage ./bootpart-uefi-x86_64 { };
|
||||
browserpass-extension = callPackage ./browserpass-extension { };
|
||||
cargo-docset = callPackage ./cargo-docset { };
|
||||
feeds = recurseIntoAttrs (callPackage ./feeds { });
|
||||
gopass-native-messaging-host = callPackage ./gopass-native-messaging-host { };
|
||||
gpodder-configured = callPackage ./gpodder-configured { };
|
||||
lightdm-mobile-greeter = callPackage ./lightdm-mobile-greeter { };
|
||||
linux-megous = callPackage ./linux-megous { };
|
||||
mx-sanebot = callPackage ./mx-sanebot { };
|
||||
rtl8723cs-firmware = callPackage ./rtl8723cs-firmware { };
|
||||
sane-scripts = callPackage ./sane-scripts { };
|
||||
static-nix-shell = callPackage ./static-nix-shell { };
|
||||
sublime-music-mobile = callPackage ./sublime-music-mobile { };
|
||||
tow-boot-pinephone = callPackage ./tow-boot-pinephone { };
|
||||
|
||||
# packages i haven't used for a while, may or may not still work
|
||||
# fluffychat-moby = callPackage ./fluffychat-moby { };
|
||||
# fractal-latest = callPackage ./fractal-latest { };
|
||||
# kaiteki = callPackage ./kaiteki { };
|
||||
# tokodon = libsForQt5.callPackage ./tokodon { };
|
||||
|
||||
# old rpi packages that may or may not still work
|
||||
# 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,15 +1,15 @@
|
|||
{ lib
|
||||
, callPackage
|
||||
, python3
|
||||
, sane-data
|
||||
, static-nix-shell
|
||||
, writeShellScript
|
||||
}:
|
||||
|
||||
let
|
||||
# TODO: dependency-inject this.
|
||||
sane-data = import ../../modules/data { inherit lib; };
|
||||
template = callPackage ./template.nix;
|
||||
feed-pkgs = lib.mapAttrs
|
||||
feed-pkgs' = lib.mapAttrs
|
||||
(name: feed-details: template {
|
||||
feedName = name;
|
||||
jsonPath = "modules/data/feeds/sources/${name}/default.json";
|
||||
|
@ -18,9 +18,9 @@ let
|
|||
sane-data.feeds;
|
||||
update-scripts = lib.mapAttrsToList
|
||||
(name: feed: builtins.concatStringsSep " " feed.passthru.updateScript)
|
||||
feed-pkgs;
|
||||
feed-pkgs';
|
||||
in rec { # TODO: make this a scope
|
||||
inherit feed-pkgs;
|
||||
feed-pkgs = lib.recurseIntoAttrs feed-pkgs';
|
||||
update = static-nix-shell.mkPython3Bin {
|
||||
pname = "update";
|
||||
src = ./.;
|
||||
|
@ -49,10 +49,9 @@ in rec { # TODO: make this a scope
|
|||
${update}/bin/update.py "$name" "$json_path"
|
||||
cat "$json_path"
|
||||
'';
|
||||
passthru = {
|
||||
updateScript = writeShellScript
|
||||
"feeds-update"
|
||||
(builtins.concatStringsSep "\n" update-scripts);
|
||||
initFeedScript = init-feed;
|
||||
};
|
||||
|
||||
updateScript = writeShellScript
|
||||
"feeds-update"
|
||||
(builtins.concatStringsSep "\n" update-scripts);
|
||||
initFeedScript = init-feed;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib, unpatched ? pkgs }:
|
||||
let
|
||||
# this scope ensures that my packages can all take each other as inputs,
|
||||
# even when evaluated bare (i.e. outside of an overlay)
|
||||
sane = lib.makeScope pkgs.newScope (self: with self; {
|
||||
sane-data = import ../modules/data { inherit lib; };
|
||||
sane-lib = import ../modules/lib pkgs;
|
||||
|
||||
### ADDITIONAL PACKAGES
|
||||
bootpart-uefi-x86_64 = callPackage ./additional/bootpart-uefi-x86_64 { };
|
||||
browserpass-extension = callPackage ./additional/browserpass-extension { };
|
||||
cargo-docset = callPackage ./additional/cargo-docset { };
|
||||
feeds = lib.recurseIntoAttrs (callPackage ./additional/feeds { });
|
||||
gopass-native-messaging-host = callPackage ./additional/gopass-native-messaging-host { };
|
||||
gpodder-configured = callPackage ./additional/gpodder-configured { };
|
||||
lightdm-mobile-greeter = callPackage ./additional/lightdm-mobile-greeter { };
|
||||
linux-megous = callPackage ./additional/linux-megous { };
|
||||
mx-sanebot = callPackage ./additional/mx-sanebot { };
|
||||
rtl8723cs-firmware = callPackage ./additional/rtl8723cs-firmware { };
|
||||
sane-scripts = callPackage ./additional/sane-scripts { };
|
||||
static-nix-shell = callPackage ./additional/static-nix-shell { };
|
||||
sublime-music-mobile = callPackage ./additional/sublime-music-mobile { };
|
||||
tow-boot-pinephone = callPackage ./additional/tow-boot-pinephone { };
|
||||
|
||||
# packages i haven't used for a while, may or may not still work
|
||||
# fluffychat-moby = callPackage ./additional/fluffychat-moby { };
|
||||
# fractal-latest = callPackage ./additional/fractal-latest { };
|
||||
# kaiteki = callPackage ./additional/kaiteki { };
|
||||
# tokodon = libsForQt5.callPackage ./additional/tokodon { };
|
||||
|
||||
# old rpi packages that may or may not still work
|
||||
# bootpart-tow-boot-rpi-aarch64 = callPackage ./additional/bootpart-tow-boot-rpi-aarch64 { };
|
||||
# bootpart-u-boot-rpi-aarch64 = callPackage ./additional/bootpart-u-boot-rpi-aarch64 { };
|
||||
# tow-boot-rpi4 = callPackage ./additional/tow-boot-rpi4 { };
|
||||
# patch rpi uboot with something that fixes USB HDD boot
|
||||
# ubootRaspberryPi4_64bit = callPackage ./additional/ubootRaspberryPi4_64bit { };
|
||||
|
||||
# provided by nixpkgs patch or upstream PR
|
||||
# splatmoji = callPackage ./additional/splatmoji { };
|
||||
|
||||
|
||||
### PATCHED PACKAGES
|
||||
|
||||
# XXX: the `inherit`s here are because:
|
||||
# - pkgs.callPackage draws from the _final_ package set.
|
||||
# - unpatched.XYZ draws (selectively) from the _unpatched_ package set.
|
||||
# see <overlays/pkgs.nix>
|
||||
browserpass = callPackage ./patched/browserpass { inherit (unpatched) browserpass; };
|
||||
|
||||
# mozilla keeps nerfing itself and removing configuration options
|
||||
firefox-unwrapped = callPackage ./patched/firefox-unwrapped { inherit (unpatched) firefox-unwrapped; };
|
||||
|
||||
gocryptfs = callPackage ./patched/gocryptfs { inherit (unpatched) gocryptfs; };
|
||||
|
||||
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
||||
jackett = callPackage ./patched/jackett { inherit (unpatched) jackett; };
|
||||
|
||||
|
||||
### PYTHON PACKAGES
|
||||
python-packages = {
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(py-final: py-prev: import ./python-packages { inherit (py-prev) callPackage; })
|
||||
];
|
||||
};
|
||||
});
|
||||
in sane.packages sane
|
|
@ -1,18 +0,0 @@
|
|||
{ pkgs, lib ? pkgs.lib, unpatched ? pkgs }:
|
||||
let
|
||||
me = lib.makeScope pkgs.newScope (self: with self; {
|
||||
# XXX: the `inherit`s here are because:
|
||||
# - pkgs.callPackage draws from the _final_ package set.
|
||||
# - unpatched.XYZ draws (selectively) from the _unpatched_ package set.
|
||||
# see <overlays/pkgs.nix>
|
||||
browserpass = callPackage ./browserpass { inherit (unpatched) browserpass; };
|
||||
|
||||
# mozilla keeps nerfing itself and removing configuration options
|
||||
firefox-unwrapped = callPackage ./firefox-unwrapped { inherit (unpatched) firefox-unwrapped; };
|
||||
|
||||
gocryptfs = callPackage ./gocryptfs { inherit (unpatched) gocryptfs; };
|
||||
|
||||
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
||||
jackett = callPackage ./jackett { inherit (unpatched) jackett; };
|
||||
});
|
||||
in me.packages me
|
Loading…
Reference in New Issue