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
4 changes: 2 additions & 2 deletions .mention-bot
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"shlevy"
],
"alwaysNotifyForPaths": [
{ "name": "FRidh", "files": ["pkgs/top-level/python-packages.nix", "pkgs/development/interpreters/python/*", "pkgs/development/python-modules/*" ] },
{ "name": "FRidh", "files": ["pkgs/indices/python-packages.nix", "pkgs/development/interpreters/python/*", "pkgs/development/python-modules/*" ] },
{ "name": "LnL7", "files": ["pkgs/stdenv/darwin/*", "pkgs/os-specific/darwin/*"] },
{ "name": "copumpkin", "files": ["pkgs/stdenv/darwin/*", "pkgs/os-specific/darwin/apple-source-releases/*"] }
],
"fileBlacklist": ["pkgs/top-level/all-packages.nix"]
"fileBlacklist": ["pkgs/indices/all-packages.nix"]
}
1 change: 1 addition & 0 deletions asdf.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion doc/coding-conventions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ evaluate correctly.</para>
</para>
<para>You can find many source fetch helpers in <literal>pkgs/build-support/fetch*</literal>.
</para>
<para>In the file <literal>pkgs/top-level/all-packages.nix</literal> you can
<para>In the file <literal>pkgs/indices/all-packages.nix</literal> you can
find fetch helpers, these have names on the form
<literal>fetchFrom*</literal>. The intention of these are to provide
snapshot fetches but using the same api as some of the version controlled
Expand Down
2 changes: 1 addition & 1 deletion doc/languages-frameworks/lua.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<para>
Lua packages are defined
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>.
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/indices/lua-packages.nix"><filename>pkgs/indices/lua-packages.nix</filename></link>.
Most of them are simple. For example:

<programlisting>
Expand Down
4 changes: 2 additions & 2 deletions doc/languages-frameworks/perl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ standard <varname>Makefile.PL</varname>. It’s implemented in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.</para>

<para>Perl packages from CPAN are defined in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>,
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/indices/perl-packages.nix"><filename>pkgs/indices/perl-packages.nix</filename></link>,
rather than <filename>pkgs/all-packages.nix</filename>. Most Perl
packages are so straight-forward to build that they are defined here
directly, rather than having a separate function for each package
Expand Down Expand Up @@ -172,7 +172,7 @@ $ nix-generate-from-cpan XML::Simple
</screen>

The output can be pasted into
<filename>pkgs/top-level/perl-packages.nix</filename> or wherever else
<filename>pkgs/indices/perl-packages.nix</filename> or wherever else
you need it.</para>

</section>
Expand Down
16 changes: 8 additions & 8 deletions doc/languages-frameworks/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ We will first have a look at how Python packages are packaged on Nix. Then, we w
#### Python packaging on Nix

On Nix all packages are built by functions. The main function in Nix for building Python packages is [`buildPythonPackage`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix).
Let's see how we would build the `toolz` package. According to [`python-packages.nix`](https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/python-packages.nix) `toolz` is build using
Let's see how we would build the `toolz` package. According to [`python-packages.nix`](https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/indices/python-packages.nix) `toolz` is build using

```nix
toolz = buildPythonPackage rec{
Expand Down Expand Up @@ -132,7 +132,7 @@ The output of the function is a derivation, which is an attribute with the name
so `python27Packages`, `python34Packages`, `python35Packages` and `pypyPackages`.

The above example works when you're directly working on
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
`pkgs/indices/python-packages.nix` in the Nixpkgs repository. Often though,
you will want to test a Nix expression outside of the Nixpkgs tree. If you
create a `shell.nix` file with the following contents

Expand Down Expand Up @@ -442,15 +442,15 @@ Python libraries and applications that use `setuptools` or
`distutils` are typically build with respectively the `buildPythonPackage` and
`buildPythonApplication` functions. These two functions also support installing a `wheel`.

All Python packages reside in `pkgs/top-level/python-packages.nix` and all
All Python packages reside in `pkgs/indices/python-packages.nix` and all
applications elsewhere. In case a package is used as both a library and an application,
then the package should be in `pkgs/top-level/python-packages.nix` since only those packages are made
then the package should be in `pkgs/indices/python-packages.nix` since only those packages are made
available for all interpreter versions. The preferred location for library expressions is in
`pkgs/development/python-modules`. It is important that these packages are
called from `pkgs/top-level/python-packages.nix` and not elsewhere, to guarantee
called from `pkgs/indices/python-packages.nix` and not elsewhere, to guarantee
the right version of the package is built.

Based on the packages defined in `pkgs/top-level/python-packages.nix` an
Based on the packages defined in `pkgs/indices/python-packages.nix` an
attribute set is created for each available Python interpreter. The available
sets are

Expand Down Expand Up @@ -516,7 +516,7 @@ as the interpreter unless overriden otherwise.
All parameters from `mkDerivation` function are still supported.

* `namePrefix`: Prepended text to `${name}` parameter. Defaults to `"python3.3-"` for Python 3.3, etc. Set it to `""` if you're packaging an application or a command line tool.
* `disabled`: If `true`, package is not build for particular python interpreter version. Grep around `pkgs/top-level/python-packages.nix` for examples.
* `disabled`: If `true`, package is not build for particular python interpreter version. Grep around `pkgs/indices/python-packages.nix` for examples.
* `setupPyBuildFlags`: List of flags passed to `setup.py build_ext` command.
* `pythonPath`: List of packages to be added into `$PYTHONPATH`. Packages in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`).
* `preShellHook`: Hook to execute commands before `shellHook`.
Expand Down Expand Up @@ -812,5 +812,5 @@ Following rules are desired to be respected:

* Make sure package builds for all python interpreters. Use `disabled` argument to `buildPythonPackage` to set unsupported interpreters.
* If tests need to be disabled for a package, make sure you leave a comment about reasoning.
* Packages in `pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid merge conflicts.
* Packages in `pkgs/indices/python-packages.nix` are sorted quasi-alphabetically to avoid merge conflicts.
* Python libraries are supposed to be in `python-packages.nix` and packaged with `buildPythonPackage`. Python applications live outside of `python-packages.nix` and are packaged with `buildPythonApplication`.
6 changes: 3 additions & 3 deletions doc/quick-start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $ git add pkgs/development/libraries/libfoo/default.nix</screen>

<listitem>
<para>XML::Simple, a Perl module: <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/indices/perl-packages.nix"><filename>pkgs/indices/perl-packages.nix</filename></link>
(search for the <varname>XMLSimple</varname> attribute).
Most Perl modules are so simple to build that they are
defined directly in <filename>perl-packages.nix</filename>;
Expand Down Expand Up @@ -171,12 +171,12 @@ $ git add pkgs/development/libraries/libfoo/default.nix</screen>
<listitem>
<para>Add a call to the function defined in the previous step to
<link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix"><filename>pkgs/top-level/all-packages.nix</filename></link>
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/indices/all-packages.nix"><filename>pkgs/indices/all-packages.nix</filename></link>
with some descriptive name for the variable,
e.g. <varname>libfoo</varname>.

<screen>
$ emacs pkgs/top-level/all-packages.nix</screen>
$ emacs pkgs/indices/all-packages.nix</screen>

</para>

Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix

<listitem><para><filename>pkgs/system/all-packages-generic.nix</filename>
is gone, we now just have
<filename>pkgs/top-level/all-packages.nix</filename> that contains
<filename>pkgs/indices/all-packages.nix</filename> that contains
all available packages. This should cause much less confusion with
users. <filename>all-packages.nix</filename> is a function that by
default returns packages for the current platform, but you can
Expand Down
2 changes: 1 addition & 1 deletion doc/submitting-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Additional information.

<itemizedlist>
<listitem>
<para>Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
<para>Make sure it's in <command>pkgs/indices/all-packages.nix</command>
</para>
</listitem>

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/groovebasin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with stdenv.lib;

let
nodePackages = callPackage (import ../../../top-level/node-packages.nix) {
nodePackages = callPackage (import ../../../indices/node-packages.nix) {
inherit nodejs;
neededNatives = [ libgroove python utillinux ];
self = nodePackages;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/zed/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
# fetch package.json from Zed's repository
# run `npm2nix package.json node.nix`
# and replace node.nix with new one
nodePackages = import ../../../../pkgs/top-level/node-packages.nix {
nodePackages = import ../../../../pkgs/indices/node-packages.nix {
inherit pkgs;
inherit (pkgs) stdenv nodejs fetchurl fetchgit;
neededNatives = [ pkgs.python ] ++ pkgs.lib.optional pkgs.stdenv.isLinux pkgs.utillinux;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with lib;

let
nodePackages = callPackage ../../../../top-level/node-packages.nix {
nodePackages = callPackage ../../../../indices/node-packages.nix {
neededNatives = [ python ];
self = nodePackages;
generated = ./quassel-webserver.nix;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/irc/shout/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with stdenv.lib;

let
nodePackages = callPackage (import ../../../../top-level/node-packages.nix) {
nodePackages = callPackage (import ../../../../indices/node-packages.nix) {
neededNatives = [ python ] ++ optional (stdenv.isLinux) utillinux;
self = nodePackages;
generated = ./package.nix;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghcjs/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ in mkDerivation (rec {
--with-gmp-libraries ${gmp.out}/lib
'';
passthru = let
ghcjsNodePkgs = callPackage ../../../top-level/node-packages.nix {
ghcjsNodePkgs = callPackage ../../../indices/node-packages.nix {
generated = ./node-packages-generated.nix;
self = ghcjsNodePkgs;
};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/uhc/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Note: The Haskell package set used for building UHC is
# determined in the file top-level/haskell-packages.nix.
# determined in the file indices/haskell-packages.nix.
{ stdenv, coreutils, m4, libtool, clang, ghcWithPackages, fetchFromGitHub }:

let wrappedGhc = ghcWithPackages (hpkgs: with hpkgs; [fgl vector syb uulib network binary hashable uhc-util mtl transformers directory containers array process filepath shuffle uuagc] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix;
inherit zlibSupport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ in stdenv.mkDerivation {
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
executable = libPrefix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ in stdenv.mkDerivation {
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ in stdenv.mkDerivation {
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ in stdenv.mkDerivation {
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ in stdenv.mkDerivation {
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/python/pypy/2.7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ let
'';

passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
pythonPackages = callPackage ../../../../../indices/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit zlibSupport libPrefix;
executable = "pypy";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/python/wrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ patchPythonScript() {

# The magicalSedExpression will invoke a "$(basename "$f")", so
# if you change $f to something else, be sure to also change it
# in pkgs/top-level/python-packages.nix!
# in pkgs/indices/python-packages.nix!
# It also uses $program_PYTHONPATH.
sed -i "$f" -re '@magicalSedExpression@'
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/5.6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Before a major version update, make a copy of this directory. (We like to
keep the old version around for a short time after major updates.) Add a
top-level attribute to `top-level/all-packages.nix`.
top-level attribute to `indices/all-packages.nix`.

1. Update the URL in `maintainers/scripts/generate-qt.sh`.
2. From the top of the Nixpkgs tree, run
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/5.7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Before a major version update, make a copy of this directory. (We like to
keep the old version around for a short time after major updates.) Add a
top-level attribute to `top-level/all-packages.nix`.
top-level attribute to `indices/all-packages.nix`.

1. Update the URL in `maintainers/scripts/generate-qt.sh`.
2. From the top of the Nixpkgs tree, run
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/subunit/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, check, cppunit, perl, pythonPackages }:

# NOTE: for subunit python library see pkgs/top-level/python-packages.nix
# NOTE: for subunit python library see pkgs/indices/python-packages.nix

stdenv.mkDerivation rec {
name = "subunit-${version}";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ in

composableDerivation = callPackage ../../lib/composable-derivation.nix { };

platforms = import ./platforms.nix;
platforms = import ../top-level/platforms.nix;

setJavaClassPath = makeSetupHook { } ../build-support/setup-hooks/set-java-classpath.sh;

Expand Down
21 changes: 12 additions & 9 deletions pkgs/top-level/stage.nix → pkgs/indices/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/* This file composes a single bootstrapping stage of the Nix Packages
collection. That is, it imports the functions that build the various
packages, and calls them with appropriate arguments. The result is a set of
all the packages in the Nix Packages collection for some particular platform
for some particular stage.

Default arguments are only provided for bootstrapping
arguments. Normal users should not import this directly but instead
import `pkgs/default.nix` or `default.nix`. */
/* This file composes all package indices into a single unified collection.
Each index, in turn, imports the functions that build the various packages,
and calls them with appropriate arguments. The result is a set of all the
packages in the Nix Packages collection given some arguments.

In practice, the aggregated index is used as a single stage when
bootstrapping. To see how the stages themselves are composed, took at
`pkgs/top-level` and `pkgs/stdenv`.

Default arguments are only provided for bootstrapping arguments. Normal users
should not import this directly but instead import `pkgs/default.nix` or
`default.nix`. */


{ # The system (e.g., `i686-linux') for which to build the packages.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkgs/tools/networking/airfield/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with stdenv.lib;

let
nodePackages = callPackage (import ../../../top-level/node-packages.nix) {
nodePackages = callPackage (import ../../../indices/node-packages.nix) {
neededNatives = [python] ++ optional (stdenv.isLinux) utillinux;
self = nodePackages;
generated = ./package.nix;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/networking/statsd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

let
self = recurseIntoAttrs (
callPackage ../../../top-level/node-packages.nix {
callPackage ../../../indices/node-packages.nix {
inherit nodejs self;
generated = callPackage ./node-packages.nix { inherit self; };
overrides = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ in let

# Partially apply some arguments for building bootstraping stage pkgs
# sets. Only apply arguments which no stdenv would want to override.
allPackages = newArgs: import ./stage.nix ({
allPackages = newArgs: import ../indices ({
inherit lib nixpkgsFun;
} // newArgs);

Expand Down
Loading