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:
@@ -241,9 +241,12 @@
|
|||||||
(! elem name [ "feeds" "pythonPackagesExtensions" ])
|
(! elem name [ "feeds" "pythonPackagesExtensions" ])
|
||||||
&& (allPkgs.lib.meta.availableOn allPkgs.stdenv.hostPlatform pkg)
|
&& (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;
|
# self.legacyPackages;
|
||||||
{ inherit (self.legacyPackages) x86_64-linux; }
|
{ inherit (self.legacyPackages) x86_64-linux; }
|
||||||
|
@@ -8,17 +8,15 @@
|
|||||||
# rather, this is the entrypoint through which NUR finds my packages, modules, overlays.
|
# rather, this is the entrypoint through which NUR finds my packages, modules, overlays.
|
||||||
# it's reachable only from those using this repo via NUR.
|
# 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 ./. {})'
|
# - nix eval --impure --expr 'builtins.attrNames (import ./. {})'
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
let
|
let
|
||||||
sanePkgs = import ../../pkgs/additional pkgs;
|
sanePkgs = import ../../pkgs { inherit pkgs; };
|
||||||
in
|
in
|
||||||
({
|
({
|
||||||
# contains both packages not in nixpkgs, and patched versions of those in nixpkgs
|
|
||||||
overlays.pkgs = import ../../overlays/pkgs.nix;
|
overlays.pkgs = import ../../overlays/pkgs.nix;
|
||||||
# contains only my packages which aren't in nixpkgs
|
|
||||||
pkgs = sanePkgs;
|
pkgs = sanePkgs;
|
||||||
|
|
||||||
modules = import ../../modules { inherit (pkgs) lib; };
|
modules = import ../../modules { inherit (pkgs) lib; };
|
||||||
|
@@ -1,18 +1,16 @@
|
|||||||
(next: prev:
|
(next: prev:
|
||||||
let
|
let
|
||||||
additional = import ../pkgs/additional
|
toplevel-pkgs = import ../pkgs
|
||||||
{ pkgs = next; lib = prev.lib; };
|
{ pkgs = next; lib = prev.lib; unpatched = prev; };
|
||||||
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; })
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
in
|
||||||
patched = import ../pkgs/patched
|
# expose all my packages into the root scope:
|
||||||
{ pkgs = next; lib = prev.lib; unpatched = prev; };
|
# - `additional` packages
|
||||||
|
# - `patched` versions of nixpkgs (which necessarily shadow their nixpkgs version)
|
||||||
sane = additional // python-packages // patched;
|
# - `pythonPackagesExtensions`
|
||||||
in sane // {
|
toplevel-pkgs
|
||||||
sane = next.recurseIntoAttrs sane;
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
@@ -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
|
{ lib
|
||||||
, callPackage
|
, callPackage
|
||||||
, python3
|
, python3
|
||||||
|
, sane-data
|
||||||
, static-nix-shell
|
, static-nix-shell
|
||||||
, writeShellScript
|
, writeShellScript
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# TODO: dependency-inject this.
|
# TODO: dependency-inject this.
|
||||||
sane-data = import ../../modules/data { inherit lib; };
|
|
||||||
template = callPackage ./template.nix;
|
template = callPackage ./template.nix;
|
||||||
feed-pkgs = lib.mapAttrs
|
feed-pkgs' = lib.mapAttrs
|
||||||
(name: feed-details: template {
|
(name: feed-details: template {
|
||||||
feedName = name;
|
feedName = name;
|
||||||
jsonPath = "modules/data/feeds/sources/${name}/default.json";
|
jsonPath = "modules/data/feeds/sources/${name}/default.json";
|
||||||
@@ -18,9 +18,9 @@ let
|
|||||||
sane-data.feeds;
|
sane-data.feeds;
|
||||||
update-scripts = lib.mapAttrsToList
|
update-scripts = lib.mapAttrsToList
|
||||||
(name: feed: builtins.concatStringsSep " " feed.passthru.updateScript)
|
(name: feed: builtins.concatStringsSep " " feed.passthru.updateScript)
|
||||||
feed-pkgs;
|
feed-pkgs';
|
||||||
in rec { # TODO: make this a scope
|
in rec { # TODO: make this a scope
|
||||||
inherit feed-pkgs;
|
feed-pkgs = lib.recurseIntoAttrs feed-pkgs';
|
||||||
update = static-nix-shell.mkPython3Bin {
|
update = static-nix-shell.mkPython3Bin {
|
||||||
pname = "update";
|
pname = "update";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
@@ -49,10 +49,9 @@ in rec { # TODO: make this a scope
|
|||||||
${update}/bin/update.py "$name" "$json_path"
|
${update}/bin/update.py "$name" "$json_path"
|
||||||
cat "$json_path"
|
cat "$json_path"
|
||||||
'';
|
'';
|
||||||
passthru = {
|
|
||||||
updateScript = writeShellScript
|
updateScript = writeShellScript
|
||||||
"feeds-update"
|
"feeds-update"
|
||||||
(builtins.concatStringsSep "\n" update-scripts);
|
(builtins.concatStringsSep "\n" update-scripts);
|
||||||
initFeedScript = init-feed;
|
initFeedScript = init-feed;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
66
pkgs/default.nix
Normal file
66
pkgs/default.nix
Normal file
@@ -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
|
|
Reference in New Issue
Block a user