Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ See the [CONTRIBUTING.md](../CONTRIBUTING.md) document for more general informat
- [`pkgs-lib`](./pkgs-lib): Definitions for utilities that need packages but are not needed for packages
- [`test`](./test): Tests not directly associated with any specific packages
- [`by-name`](./by-name): Top-level packages organised by name ([docs](./by-name/README.md))
- [`sets`](./sets): Nested package sets ([docs](./sets/README.md)).
- All other directories loosely categorise top-level packages definitions, see [category hierarchy][categories]

## Quick Start to Adding a Package
Expand Down
5 changes: 5 additions & 0 deletions pkgs/sets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Package sets

All folders here containing a `packageset.nix` will be autocalled as a package set with `recurseIntoAttrs (callPackage sets/<name>/packageset.nix {})`, however since package sets often depend on some other package version, this directory stucture is relatively loose.

Calling package sets that cannot be autocalled should be done in [`pkgs/top-level/packagesets.nix`](../top-level/packagesets.nix).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions pkgs/sets/fishPlugins/packageset.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
lib,
newScope,
config,
}:

lib.makeScope newScope (
self:
(lib.pipe ./. [
builtins.readDir
(lib.filterAttrs (name: _: lib.pathIsRegularFile ./${name}/package.nix))
(builtins.mapAttrs (name: _: self.callPackage ./${name}/package.nix { }))
])
// lib.optionalAttrs config.allowAliases {
autopair-fish = self.autopair; # Added 2023-03-10
}
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pkg-config,
nix-update-script,
fetchFromGitHub,
dbus,
pkgs,
}:

rustPlatform.buildRustPackage (finalAttrs: {
Expand All @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-7pD5LA1ytO7VqFnHwgf7vW9eS3olnZBgdsj+rmcHkbU=";

nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ dbus ];
buildInputs = [ pkgs.dbus ];

passthru.updateScript = nix-update-script { };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
nushell,
runCommand,
}:

lib.makeScope newScope (
self:

Expand Down Expand Up @@ -43,23 +42,11 @@ lib.makeScope newScope (
withChecks
)
(
with self;
{
gstat = callPackage ./gstat.nix { };
formats = callPackage ./formats.nix { };
polars = callPackage ./polars.nix { };
query = callPackage ./query.nix { };
net = callPackage ./net.nix { };
units = callPackage ./units.nix { };
highlight = callPackage ./highlight.nix { };
dbus = callPackage ./dbus.nix {
inherit dbus;
};
skim = callPackage ./skim.nix { };
semver = callPackage ./semver.nix { };
hcl = callPackage ./hcl.nix { };
desktop_notifications = callPackage ./desktop_notifications.nix { };
}
(lib.pipe ./. [
builtins.readDir
(lib.filterAttrs (name: _: lib.pathIsRegularFile ./${name}/package.nix))
(builtins.mapAttrs (name: _: self.callPackage ./${name}/package.nix { }))
])
// lib.optionalAttrs config.allowAliases {
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
}
Expand Down
99 changes: 0 additions & 99 deletions pkgs/shells/fish/plugins/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4033,8 +4033,6 @@ with pkgs;

wrapFish = callPackage ../shells/fish/wrapper.nix { };

fishPlugins = recurseIntoAttrs (callPackage ../shells/fish/plugins { });

powerline = with python3Packages; toPythonApplication powerline;

### DEVELOPMENT / COMPILERS
Expand Down Expand Up @@ -9461,11 +9459,6 @@ with pkgs;

nushell = callPackage ../shells/nushell { };

nushellPlugins = recurseIntoAttrs (
callPackage ../shells/nushell/plugins {
}
);

net-tools =
# some platforms refer back to this from unixtools, so this is needed to
# break the cycle
Expand Down
12 changes: 12 additions & 0 deletions pkgs/top-level/packagesets.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
self: super:
let
# Because of Nix's import-value cache, importing lib is free
lib = import ../../lib;
in
(lib.pipe ../sets [
builtins.readDir
(lib.filterAttrs (name: _: lib.pathIsRegularFile ../sets/${name}/packageset.nix))
(builtins.mapAttrs (
name: _: lib.recurseIntoAttrs (self.callPackage ../sets/${name}/packageset.nix { })
))
])
4 changes: 4 additions & 0 deletions pkgs/top-level/stage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ let
# this value gets reused even if this file is imported multiple times,
# thanks to Nix's import-value cache.
autoCalledPackages = import ./by-name-overlay.nix ../by-name;

# An overlay to call package sets in ../sets.
packageSets = import ./packagesets.nix;
in

{
Expand Down Expand Up @@ -341,6 +344,7 @@ let
trivialBuilders
splice
autoCalledPackages
packageSets
allPackages
otherPackageSets
aliases
Expand Down
Loading