Skip to content

Commit

Permalink
Merge branch 'staging' into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jan 6, 2025
2 parents 08dd896 + db08c8d commit f6e5aee
Show file tree
Hide file tree
Showing 480 changed files with 14,371 additions and 7,438 deletions.
5 changes: 5 additions & 0 deletions doc/interoperability/openxr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# OpenXR in NixOS

OpenXR is a standard for eXtended Reality (XR) applications and drivers (providers).

OpenXR runtime providers must ensure that the library path of the runtime's shared library can be loaded by Nix applications. If your OpenXR runtime provider runs in an FHSEnv, this means you may have to use `auto-patchelf` to link dependencies to the Nix store.
4 changes: 2 additions & 2 deletions doc/languages-frameworks/haskell.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Available compilers are collected under `haskell.compiler`.
Each of those compiler versions has a corresponding attribute set `packages` built with
it. However, the non-standard package sets are not tested regularly and, as a
result, contain fewer working packages. The corresponding package set for GHC
9.4.5 is `haskell.packages.ghc945`. In fact `haskellPackages` (at the time of writing) is just an alias
9.4.8 is `haskell.packages.ghc948`. In fact `haskellPackages` (at the time of writing) is just an alias
for `haskell.packages.ghc966`:

Every package set also re-exposes the GHC used to build its packages as `haskell.packages.*.ghc`.
Expand Down Expand Up @@ -764,7 +764,7 @@ that depend on that library, you may want to use:
```nix
haskellPackages.haskell-ci.overrideScope (self: super: {
Cabal = self.Cabal_3_14_0_0;
Cabal = self.Cabal_3_14_1_0;
})
```
Expand Down
2 changes: 1 addition & 1 deletion doc/stdenv/cross-compilation.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Many packages assume that an unprefixed binutils (`cc`/`ar`/`ld` etc.) is availa
```

#### How do I avoid compiling a GCC cross-compiler from source? {#cross-qa-avoid-compiling-gcc-cross-compiler}
On less powerful machines, it can be inconvenient to cross-compile a package only to find out that GCC has to be compiled from source, which could take up to several hours. Nixpkgs maintains a limited [cross-related jobset on Hydra](https://hydra.nixos.org/jobset/nixpkgs/cross-trunk), which tests cross-compilation to various platforms from build platforms "x86\_64-darwin", "x86\_64-linux", and "aarch64-linux". See `pkgs/top-level/release-cross.nix` for the full list of target platforms and packages. For instance, the following invocation fetches the pre-built cross-compiled GCC for `armv6l-unknown-linux-gnueabihf` and builds GNU Hello from source.
On less powerful machines, it can be inconvenient to cross-compile a package only to find out that GCC has to be compiled from source, which could take up to several hours. Nixpkgs maintains a limited [cross-related jobset on Hydra](https://hydra.nixos.org/jobset/nixpkgs/cross-trunk), which tests cross-compilation to various platforms from build platforms "x86\_64-linux", "aarch64-linux", and "aarch64-darwin". See `pkgs/top-level/release-cross.nix` for the full list of target platforms and packages. For instance, the following invocation fetches the pre-built cross-compiled GCC for `armv6l-unknown-linux-gnueabihf` and builds GNU Hello from source.

```ShellSession
$ nix-build '<nixpkgs>' -A pkgsCross.raspberryPi.hello
Expand Down
13 changes: 3 additions & 10 deletions doc/stdenv/stdenv.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,9 @@ stdenv.mkDerivation {
}
```

where the builder can do anything it wants, but typically starts with
where `stdenv` sets up the environment automatically (e.g. by resetting `PATH` and populating it from build inputs). If you want, you can use `stdenv`’s generic builder:

```bash
source $stdenv/setup
```

to let `stdenv` set up the environment (e.g. by resetting `PATH` and populating it from build inputs). If you want, you can still use `stdenv`’s generic builder:

```bash
source $stdenv/setup

buildPhase() {
echo "... this is my custom build phase ..."
gcc foo.c -o foo
Expand Down Expand Up @@ -1276,7 +1268,7 @@ addEnvHooks "$hostOffset" myBashFunction

The *existence* of setups hooks has long been documented and packages inside Nixpkgs are free to use this mechanism. Other packages, however, should not rely on these mechanisms not changing between Nixpkgs versions. Because of the existing issues with this system, there’s little benefit from mandating it be stable for any period of time.

First, let’s cover some setup hooks that are part of Nixpkgs default `stdenv`. This means that they are run for every package built using `stdenv.mkDerivation` or when using a custom builder that has `source $stdenv/setup`. Some of these are platform specific, so they may run on Linux but not Darwin or vice-versa.
First, let’s cover some setup hooks that are part of Nixpkgs default `stdenv`. This means that they are run for every package built using `stdenv.mkDerivation`, even with custom builders. Some of these are platform specific, so they may run on Linux but not Darwin or vice-versa.

### `move-docs.sh` {#move-docs.sh}

Expand Down Expand Up @@ -1411,6 +1403,7 @@ these in the [Hooks Reference](#chap-hooks).
### Compiler and Linker wrapper hooks {#compiler-linker-wrapper-hooks}

If the file `${cc}/nix-support/cc-wrapper-hook` exists, it will be run at the end of the [compiler wrapper](#cc-wrapper).
If the file `${binutils}/nix-support/ld-wrapper-hook` exists, it will be run at the end of the linker wrapper, before the linker runs.
If the file `${binutils}/nix-support/post-link-hook` exists, it will be run at the end of the linker wrapper.
These hooks allow a user to inject code into the wrappers.
As an example, these hooks can be used to extract `extraBefore`, `params` and `extraAfter` which store all the command line arguments passed to the compiler and linker respectively.
Expand Down
8 changes: 8 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17122,6 +17122,14 @@
githubId = 108072;
name = "Slawomir Gonet";
};
outfoxxed = {
name = "outfoxxed";
email = "[email protected]";
matrix = "@outfoxxed:outfoxxed.me";
github = "outfoxxed";
githubId = 83010835;
keys = [ { fingerprint = "0181 FF89 4F34 7FCC EB06 5710 4C88 A185 FB89 301E"; } ];
};
ovlach = {
email = "[email protected]";
name = "Ondrej Vlach";
Expand Down
8 changes: 5 additions & 3 deletions maintainers/scripts/haskell/update-cabal2nix-unstable.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable -I nixpkgs=.
#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable nixfmt-rfc-style -I nixpkgs=.

# Updates cabal2nix-unstable to the latest master of the nixos/cabal2nix repository.
# See regenerate-hackage-packages.sh for details on the purpose of this script.
Expand All @@ -13,5 +13,7 @@ commit="$(jq -r .commit.sha <<< "$head_info")"
# extract commit timestamp and convert to date
date="$(date "--date=$(jq -r .commit.commit.committer.date <<< "$head_info")" +%F)"
# generate nix expression from cabal file, replacing the version with the commit date
echo '# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > pkgs/development/haskell-modules/cabal2nix-unstable.nix
cabal2nix --subpath cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -e 's/version = ".*"/version = "'"unstable-$date"'"/' >> pkgs/development/haskell-modules/cabal2nix-unstable.nix
output=pkgs/development/haskell-modules/cabal2nix-unstable.nix
echo '# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.' > "$output"
cabal2nix --subpath cabal2nix "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -e 's/version = ".*"/version = "'"unstable-$date"'"/' >> "$output"
nixfmt "$output"
2 changes: 1 addition & 1 deletion maintainers/scripts/haskell/update-stackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -eu -o pipefail
# (should be capitalized like the display name)
SOLVER=LTS
# Stackage solver verson, if any. Use latest if empty
VERSION=
VERSION=22
TMP_TEMPLATE=update-stackage.XXXXXXX
readonly SOLVER
readonly VERSION
Expand Down
Loading

0 comments on commit f6e5aee

Please sign in to comment.