Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging-next' into staging
Browse files Browse the repository at this point in the history
Conflicts:
	pkgs/development/libraries/webkitgtk/default.nix
	pkgs/development/python-modules/pylast/default.nix
	pkgs/development/python-modules/pymavlink/default.nix
  • Loading branch information
Jonathan Ringer committed Dec 23, 2021
2 parents 88d66d4 + 5ed396a commit 182e07f
Show file tree
Hide file tree
Showing 602 changed files with 9,730 additions and 6,219 deletions.
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,3 @@ Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
```

Maintainer information:
```yaml
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
```
2 changes: 1 addition & 1 deletion doc/builders/packages/linux.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ How to add a new (major) version of the Linux kernel to Nixpkgs:
4. If needed you can also run `make menuconfig`:

```ShellSession
$ nix-env -i ncurses
$ nix-env -f "<nixpkgs>" -iA ncurses
$ export NIX_CFLAGS_LINK=-lncurses
$ make menuconfig ARCH=arch
```
Expand Down
8 changes: 4 additions & 4 deletions doc/contributing/submitting-changes.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
- nixpkgs:
- update pkg
- `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
- add pkg
- Make sure it’s in `pkgs/top-level/all-packages.nix`
- `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
- _If you don’t want to install pkg in you profile_.
- `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
- If you did `nix-env -i pkg-name` you can do `nix-env -e pkg-name` to uninstall it from your system.
- `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
- If you installed your package with `nix-env`, you can run `nix-env -e pkg-name` where `pkg-name` is as reported by `nix-env -q` to uninstall it from your system.
- NixOS and its modules:
- You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
Expand Down
2 changes: 1 addition & 1 deletion doc/languages-frameworks/dotnet.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ To package Dotnet applications, you can use `buildDotnetModule`. This has simila
* `dotnet-sdk` is useful in cases where you need to change what dotnet SDK is being used.
* `dotnet-runtime` is useful in cases where you need to change what dotnet runtime is being used. This can be either a regular dotnet runtime, or an aspnetcore.
* `dotnet-test-sdk` is useful in cases where unit tests expect a different dotnet SDK. By default, this is set to the `dotnet-sdk` attribute.
* `testProjectFile` is useful in cases where the regular project file does not contain the unit tests. By default, this is set to the `projectFile` attribute.
* `testProjectFile` is useful in cases where the regular project file does not contain the unit tests. It gets restored and build, but not installed. You may need to regenerate your nuget lockfile after setting this.
* `disabledTests` is used to disable running specific unit tests. This gets passed as: `dotnet test --filter "FullyQualifiedName!={}"`, to ensure compatibility with all unit test frameworks.
* `dotnetRestoreFlags` can be used to pass flags to `dotnet restore`.
* `dotnetBuildFlags` can be used to pass flags to `dotnet build`.
Expand Down
4 changes: 2 additions & 2 deletions doc/languages-frameworks/emscripten.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Modes of use of `emscripten`:

If you want to work with `emcc`, `emconfigure` and `emmake` as you are used to from Ubuntu and similar distributions you can use these commands:

* `nix-env -i emscripten`
* `nix-env -f "<nixpkgs>" -iA emscripten`
* `nix-shell -p emscripten`

* **Declarative usage**:

This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`.
This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`. From the root of the nixpkgs repository:
* build and install all packages:
* `nix-env -iA emscriptenPackages`

Expand Down
5 changes: 1 addition & 4 deletions doc/languages-frameworks/idris.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
The easiest way to get a working idris version is to install the `idris` attribute:

```ShellSession
$ # On NixOS
$ nix-env -i nixos.idris
$ # On non-NixOS
$ nix-env -i nixpkgs.idris
$ nix-env -f "<nixpkgs>" -iA idris
```

This however only provides the `prelude` and `base` libraries. To install idris with additional libraries, you can use the `idrisPackages.with-packages` function, e.g. in an overlay in `~/.config/nixpkgs/overlays/my-idris.nix`:
Expand Down
12 changes: 2 additions & 10 deletions doc/languages-frameworks/octave.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ You can test building an Octave package as follows:
$ nix-build -A octavePackages.symbolic
```

When building Octave packages with `nix-build`, the `buildOctavePackage` function adds `octave-octaveVersion` to; the start of the package's name attribute.

This can be required when installing the package using `nix-env`:

```ShellSession
$ nix-env -i octave-6.2.0-symbolic
```

Although, you can also install it using the attribute name:
To install it into your user profile, run this command from the root of the repository:

```ShellSession
$ nix-env -i -A octavePackages.symbolic
$ nix-env -f. -iA octavePackages.symbolic
```

You can build Octave with packages by using the `withPackages` passed-through function.
Expand Down
12 changes: 4 additions & 8 deletions doc/languages-frameworks/perl.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ in `all-packages.nix`. You can test building a Perl package as follows:
$ nix-build -A perlPackages.ClassC3
```

`buildPerlPackage` adds `perl-` to the start of the name attribute, so the package above is actually called `perl-Class-C3-0.21`. So to install it, you can say:

```ShellSession
$ nix-env -i perl-Class-C3
```

(Of course you can also install using the attribute name: `nix-env -i -A perlPackages.ClassC3`.)
To install it with `nix-env` instead: `nix-env -f. -iA perlPackages.ClassC3`.

So what does `buildPerlPackage` do? It does the following:

Expand Down Expand Up @@ -135,9 +129,11 @@ This will remove the `-I` flags from the shebang line, rewrite them in the `use
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program `nix-generate-from-cpan`, which can be installed as follows:

```ShellSession
$ nix-env -i nix-generate-from-cpan
$ nix-env -f "<nixpkgs>" -iA nix-generate-from-cpan
```

Substitute `<nixpkgs>` by the path of a nixpkgs clone to use the latest version.

This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:

```ShellSession
Expand Down
28 changes: 20 additions & 8 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3481,9 +3481,9 @@
githubId = 5493775;
name = "Ente";
};
enzime = {
Enzime = {
email = "[email protected]";
github = "enzime";
github = "Enzime";
githubId = 10492681;
name = "Michael Hoang";
};
Expand Down Expand Up @@ -6338,6 +6338,12 @@
githubId = 15692230;
name = "Muhammad Herdiansyah";
};
koozz = {
email = "[email protected]";
github = "koozz";
githubId = 264372;
name = "Jan van den Berg";
};
koral = {
email = "[email protected]";
github = "k0ral";
Expand Down Expand Up @@ -9184,12 +9190,6 @@
githubId = 301903;
name = "Chip Collier";
};
phreedom = {
email = "[email protected]";
github = "phreedom";
githubId = 62577;
name = "Evgeny Egorochkin";
};
phryneas = {
email = "[email protected]";
github = "phryneas";
Expand Down Expand Up @@ -9429,6 +9429,12 @@
fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0";
}];
};
ppom = {
name = "Paco Pompeani";
email = "[email protected]";
github = "aopom";
githubId = 38916722;
};
pradeepchhetri = {
email = "[email protected]";
github = "pradeepchhetri";
Expand Down Expand Up @@ -13432,4 +13438,10 @@
github = "jpagex";
githubId = 635768;
};
pwoelfel = {
name = "Philipp Woelfel";
email = "[email protected]";
github = "PhilippWoelfel";
githubId = 19400064;
};
}
136 changes: 136 additions & 0 deletions maintainers/scripts/haskell/test-configurations.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/* Nix expression to test for regressions in the Haskell configuration overlays.
test-configurations.nix determines all attributes touched by given Haskell
configuration overlays (i. e. pkgs/development/haskell-modules/configuration-*.nix)
and builds all derivations (or at least a reasonable subset) affected by
these overrides.
By default, it checks `configuration-{common,nix,ghc-8.10.x}.nix`. You can
invoke it like this:
nix-build maintainers/scripts/haskell/test-configurations.nix --keep-going
It is possible to specify other configurations:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--arg files '[ "configuration-ghc-9.0.x.nix" "configuration-ghc-9.2.x.nix" ]' \
--keep-going
You can also just supply a single string:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--argstr files "configuration-arm.nix" --keep-going
You can even supply full paths which is handy, as it allows for tab-completing
the configurations:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--argstr files pkgs/development/haskell-modules/configuration-arm.nix \
--keep-going
By default, derivation that fail to evaluate are skipped, unless they are
“just” marked as broken. You can check for other eval errors like this:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--arg skipEvalErrors false --keep-going
You can also disable checking broken packages by passing a nixpkgs config:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--arg config '{ allowBroken = false; }' --keep-going
By default the haskell.packages.ghc*Binary sets used for bootstrapping GHC
are _not_ tested. You can change this using:
nix-build maintainers/scripts/haskell/test-configurations.nix \
--arg skipBinaryGHCs false --keep-going
*/
{ files ? [
"configuration-common.nix"
"configuration-nix.nix"
"configuration-ghc-8.10.x.nix"
]
, nixpkgsPath ? ../../..
, config ? { allowBroken = true; }
, skipEvalErrors ? true
, skipBinaryGHCs ? true
}:

let
pkgs = import nixpkgsPath { inherit config; };
inherit (pkgs) lib;

# see usage explanation for the input format `files` allows
files' = builtins.map builtins.baseNameOf (
if !builtins.isList files then [ files ] else files
);

setsForFile = fileName:
let
# extract the unique part of the config's file name
configName = builtins.head (
builtins.match "configuration-(.+).nix" fileName
);
# match the major and minor version of the GHC the config is intended for, if any
configVersion = lib.concatStrings (
builtins.match "ghc-([0-9]+).([0-9]+).x" configName
);
# return all package sets under haskell.packages matching the version components
setsForVersion = builtins.map (name: pkgs.haskell.packages.${name}) (
builtins.filter (setName:
lib.hasPrefix "ghc${configVersion}" setName
&& (skipBinaryGHCs -> !(lib.hasInfix "Binary" setName))
) (
builtins.attrNames pkgs.haskell.packages
)
);

defaultSets = [ pkgs.haskellPackages ];
in {
# use plain haskellPackages for the version-agnostic files
# TODO(@sternenseemann): also consider currently selected versioned sets
"common" = defaultSets;
"nix" = defaultSets;
"arm" = defaultSets;
"darwin" = defaultSets;
}.${configName} or setsForVersion;

# attribute set that has all the attributes of haskellPackages set to null
availableHaskellPackages = builtins.listToAttrs (
builtins.map (attr: lib.nameValuePair attr null) (
builtins.attrNames pkgs.haskellPackages
)
);

# evaluate a configuration and only return the attributes changed by it,
# pass availableHaskellPackages as super in case intersectAttrs is used
overriddenAttrs = fileName: builtins.attrNames (
lib.fix (self:
import (nixpkgsPath + "/pkgs/development/haskell-modules/${fileName}") {
haskellLib = pkgs.haskell.lib.compose;
inherit pkgs;
} self availableHaskellPackages
)
);

# list of derivations that are affected by overrides in the given configuration
# overlays. For common, nix, darwin etc. only the derivation from the default
# package set will be emitted.
packages = builtins.filter (v:
lib.warnIf (v.meta.broken or false) "${v.pname} is marked as broken" (
v != null
&& (skipEvalErrors -> (builtins.tryEval (v.outPath or v)).success)
)
) (
lib.concatMap (fileName:
let
sets = setsForFile fileName;
attrs = overriddenAttrs fileName;
in
lib.concatMap (set: builtins.map (attr: set.${attr}) attrs) sets
) files'
);
in

packages
2 changes: 2 additions & 0 deletions maintainers/scripts/pluginupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ def load_plugin_spec(plugin_file: str) -> List[PluginDesc]:
plugins = []
with open(plugin_file) as f:
for line in f:
if line.startswith("#"):
continue
plugin = parse_plugin_line(line)
if not plugin.owner:
msg = f"Invalid repository {line}, must be in the format owner/repo[ as alias]"
Expand Down
17 changes: 15 additions & 2 deletions nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
</itemizedlist>
<section xml:id="sec-release-22.05-highlights">
<title>Highlights</title>
<para>
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
PHP 8.1 is now available
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-new-services">
<title>New Services</title>
Expand Down Expand Up @@ -109,6 +114,14 @@
<literal>writers.writePyPy2</literal> needs to be used.
</para>
</listitem>
<listitem>
<para>
If you previously used
<literal>/etc/docker/daemon.json</literal>, you need to
incorporate the changes into the new option
<literal>virtualisation.docker.daemon.settings</literal>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-notable-changes">
Expand Down
8 changes: 2 additions & 6 deletions nixos/doc/manual/man-nixos-rebuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,8 @@
</para>

<para>
If <option>--build-host</option> is not explicitly specified,
<option>--build-host</option> will implicitly be set to the same value as
<option>--target-host</option>. So, if you only specify
<option>--target-host</option> both building and activation will take
place remotely (and no build artifacts will be copied to the local
machine).
If <option>--build-host</option> is not explicitly specified, building
will take place locally.
</para>

<para>
Expand Down
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2205.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ In addition to numerous new and upgraded packages, this release has the followin

## Highlights {#sec-release-22.05-highlights}

- PHP 8.1 is now available

## New Services {#sec-release-22.05-new-services}

- [aesmd](https://github.com/intel/linux-sgx#install-the-intelr-sgx-psw), the Intel SGX Architectural Enclave Service Manager. Available as [services.aesmd](#opt-services.aesmd.enable).
Expand Down Expand Up @@ -41,6 +43,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- The `writers.writePython2` and corresponding `writers.writePython2Bin` convenience functions to create executable Python 2 scripts in the store were removed in preparation of removal of the Python 2 interpreter.
Scripts have to be converted to Python 3 for use with `writers.writePython3` or `writers.writePyPy2` needs to be used.

- If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`.

## Other Notable Changes {#sec-release-22.05-notable-changes}

- The option [services.redis.servers](#opt-services.redis.servers) was added
Expand Down
Loading

0 comments on commit 182e07f

Please sign in to comment.