···42{
43 nativeBuildInputs = [ installShellFiles ];
4445- # Sometimes the manpage file has an undesirable name; e.g., it conflicts with
46- # another software with an equal name. It should be renamed before being
47- # installed via installManPage
0000000000000000000000000000000048 postInstall = ''
49- mv fromsea.3 delmar.3
50- installManPage foobar.1 delmar.3
51 '';
52}
53```
···58completion files.
5960By default it will autodetect the shell type from the completion file extension,
61-but you may also specify it by passing one of `--bash`, `--fish`, or
62-`--zsh`. These flags apply to all paths listed after them (up until another
63shell flag is given). Each path may also have a custom installation name
64provided by providing a flag `--name NAME` before the path. If this flag is not
65provided, zsh completions will be renamed automatically such that `foobar.zsh`
···77 # explicit behavior
78 installShellCompletion --bash --name foobar.bash share/completions.bash
79 installShellCompletion --fish --name foobar.fish share/completions.fish
080 installShellCompletion --zsh --name _foobar share/completions.zsh
81 # implicit behavior
82- installShellCompletion share/completions/foobar.{bash,fish,zsh}
83 '';
84}
85```
···104 installShellCompletion --cmd foobar \
105 --bash <($out/bin/foobar --bash-completion) \
106 --fish <($out/bin/foobar --fish-completion) \
0107 --zsh <($out/bin/foobar --zsh-completion)
108 '';
109}
···42{
43 nativeBuildInputs = [ installShellFiles ];
4445+ # Sometimes the manpage file has an undersirable name; e.g., it conflicts with
46+ # another software with an equal name. To install it with a different name,
47+ # the installed name must be provided before the path to the file.
48+ #
49+ # Below install a manpage "foobar.1" from the source file "./foobar.1", and
50+ # also installs the manpage "fromsea.3" from the source file "./delmar.3".
51+ postInstall = ''
52+ installManPage \
53+ foobar.1 \
54+ --name fromsea.3 delmar.3
55+ '';
56+}
57+```
58+59+The manpage may be the result of a piped input (e.g. `<(cmd)`), in which
60+case the name must be provided before the pipe with the `--name` flag.
61+62+```nix
63+{
64+ nativeBuildInputs = [ installShellFiles ];
65+66+ postInstall = ''
67+ installManPage --name foobar.1 <($out/bin/foobar --manpage)
68+ '';
69+}
70+```
71+72+If no parsing of arguments is desired, pass `--` to opt-out of all subsequent
73+arguments.
74+75+```nix
76+{
77+ nativeBuildInputs = [ installShellFiles ];
78+79+ # Installs a manpage from a file called "--name"
80 postInstall = ''
81+ installManPage -- --name
082 '';
83}
84```
···89completion files.
9091By default it will autodetect the shell type from the completion file extension,
92+but you may also specify it by passing one of `--bash`, `--fish`, `--zsh`, or
93+`--nushell`. These flags apply to all paths listed after them (up until another
94shell flag is given). Each path may also have a custom installation name
95provided by providing a flag `--name NAME` before the path. If this flag is not
96provided, zsh completions will be renamed automatically such that `foobar.zsh`
···108 # explicit behavior
109 installShellCompletion --bash --name foobar.bash share/completions.bash
110 installShellCompletion --fish --name foobar.fish share/completions.fish
111+ installShellCompletion --nushell --name foobar share/completions.nu
112 installShellCompletion --zsh --name _foobar share/completions.zsh
113 # implicit behavior
114+ installShellCompletion share/completions/foobar.{bash,fish,zsh,nu}
115 '';
116}
117```
···136 installShellCompletion --cmd foobar \
137 --bash <($out/bin/foobar --bash-completion) \
138 --fish <($out/bin/foobar --fish-completion) \
139+ --nushell <($out/bin/foobar --nushell-completion) \
140 --zsh <($out/bin/foobar --zsh-completion)
141 '';
142}
+6
doc/languages-frameworks/go.section.md
···192193Defaults to `null`
194000000195196## Versioned toolchains and builders {#ssec-go-toolchain-versions}
197
···192193Defaults to `null`
194195+### `buildTestBinaries` {#var-go-buildTestBinaries}
196+197+This option allows to compile test binaries instead of the usual binaries produced by a package.
198+Go can [compile test into binaries](https://pkg.go.dev/cmd/go#hdr-Test_packages) using the `go test -c` command.
199+These binaries can then be executed at a later point (outside the Nix sandbox) to run the tests.
200+This is mostly useful for downstream consumers to run integration or end-to-end tests that won't work in the Nix sandbox, for example because they require network access.
201202## Versioned toolchains and builders {#ssec-go-toolchain-versions}
203
···2223- The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader
240025- GCC 9, 10, 11, and 12 have been removed, as they have reached end‐of‐life upstream and are no longer supported.
2627- GHCJS 8.10, exposed via `haskell.compiler.ghcjs` and `haskell.compiler.ghcjs810`, has been removed. Downstream users should migrate their projects to the new JavaScript backend of GHC proper which can be used via `pkgsCross.ghcjs` from Nixpkgs. Haskell packaging code, like `haskellPackages.mkDerivation`, `ghcWithPackages` and `hoogleWithPackages`, also no longer supports GHCJS.
···5051- `kbd` package's `outputs` now include a `man` and `scripts` outputs. The `unicode_start` and `unicode_stop` Bash scripts are now part of the `scripts` output, allowing most usages of the `kbd` package to not pull in `bash`.
520053- `cudaPackages.cudatoolkit-legacy-runfile` has been removed.
5455- `conduwuit` was removed due to upstream ceasing development and deleting their repository. For existing data, a migration to `matrix-conduit`, `matrix-continuwuity` or `matrix-tuwunel` may be possible.
···63 and the given `ghc` otherwise. This approach is not recommended since it results in mismatched GHC versions.
6465- `gnome-keyring` no longer ships with an SSH agent anymore because it has been deprecated upstream. You should use `gcr_4` instead, which provides the same features. More information on why this was done can be found on [the relevant GCR upstream PR](https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/67).
006667- `stdenv.mkDerivation` and other derivation builders that use it no longer allow the value of `env` to be anything but an attribute set, for the purpose of setting environment variables that are available to the [builder](https://nix.dev/manual/nix/latest/store/derivation/#builder) process. An environment variable called `env` can still be provided by means of `mkDerivation { env.env = ...; }`, though we recommend to use a more specific name than "env".
68···155156- [`homebox` 0.20.0](https://github.com/sysadminsmedia/homebox/releases/tag/v0.20.0) changed how assets are stored and hashed. It is recommended to back up your database before this update.
15700158- New hardening flags, `strictflexarrays1` and `strictflexarrays3` were made available, corresponding to the gcc/clang options `-fstrict-flex-arrays=1` and `-fstrict-flex-arrays=3` respectively.
159160- `gramps` has been updated to 6.0.0
···170171- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
172 If your previous configuration included a secret reference like `server.secret_key = "@SEARX_SECRET_KEY@"`, you must migrate to the new envsubst syntax: `server.secret_key = "$SEARX_SECRET_KEY"`.
00173174- `versionCheckHook`: Packages that previously relied solely on `pname` to locate the program used to version check, but have a differing `meta.mainProgram` entry, might now fail.
175
···2223- The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader
2425+- `installShellFiles`: Allow installManPage to take a piped input, add the `--name` flag for renaming the file when installed. Can also append `--` to opt-out of all subsequent parsing.
26+27- GCC 9, 10, 11, and 12 have been removed, as they have reached end‐of‐life upstream and are no longer supported.
2829- GHCJS 8.10, exposed via `haskell.compiler.ghcjs` and `haskell.compiler.ghcjs810`, has been removed. Downstream users should migrate their projects to the new JavaScript backend of GHC proper which can be used via `pkgsCross.ghcjs` from Nixpkgs. Haskell packaging code, like `haskellPackages.mkDerivation`, `ghcWithPackages` and `hoogleWithPackages`, also no longer supports GHCJS.
···5253- `kbd` package's `outputs` now include a `man` and `scripts` outputs. The `unicode_start` and `unicode_stop` Bash scripts are now part of the `scripts` output, allowing most usages of the `kbd` package to not pull in `bash`.
5455+- `spidermonkey_91` has been removed, as it has been EOL since September 2022.
56+57- `cudaPackages.cudatoolkit-legacy-runfile` has been removed.
5859- `conduwuit` was removed due to upstream ceasing development and deleting their repository. For existing data, a migration to `matrix-conduit`, `matrix-continuwuity` or `matrix-tuwunel` may be possible.
···67 and the given `ghc` otherwise. This approach is not recommended since it results in mismatched GHC versions.
6869- `gnome-keyring` no longer ships with an SSH agent anymore because it has been deprecated upstream. You should use `gcr_4` instead, which provides the same features. More information on why this was done can be found on [the relevant GCR upstream PR](https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/67).
70+71+- `python3Full` and its versioned attributes (python3xxFull) have been removed. Bluetooth support is now enabled in the default python3 attributes. The X11 support built the tkinter module, which is available as a dedicated attribute on the package set.
7273- `stdenv.mkDerivation` and other derivation builders that use it no longer allow the value of `env` to be anything but an attribute set, for the purpose of setting environment variables that are available to the [builder](https://nix.dev/manual/nix/latest/store/derivation/#builder) process. An environment variable called `env` can still be provided by means of `mkDerivation { env.env = ...; }`, though we recommend to use a more specific name than "env".
74···161162- [`homebox` 0.20.0](https://github.com/sysadminsmedia/homebox/releases/tag/v0.20.0) changed how assets are stored and hashed. It is recommended to back up your database before this update.
163164+- `installShellCompletion`: now supports Nushell completion files
165+166- New hardening flags, `strictflexarrays1` and `strictflexarrays3` were made available, corresponding to the gcc/clang options `-fstrict-flex-arrays=1` and `-fstrict-flex-arrays=3` respectively.
167168- `gramps` has been updated to 6.0.0
···178179- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
180 If your previous configuration included a secret reference like `server.secret_key = "@SEARX_SECRET_KEY@"`, you must migrate to the new envsubst syntax: `server.secret_key = "$SEARX_SECRET_KEY"`.
181+182+- A new hardening flag, `glibcxxassertions` was made available, corresponding to the glibc `_GLIBCXX_ASSERTIONS` option.
183184- `versionCheckHook`: Packages that previously relied solely on `pname` to locate the program used to version check, but have a differing `meta.mainProgram` entry, might now fail.
185
+6
doc/stdenv/stdenv.chapter.md
···1682sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
1683```
16840000001685#### `pacret` {#pacret}
16861687This flag adds the `-mbranch-protection=pac-ret` compiler option on aarch64-linux targets. This uses ARM v8.3's Pointer Authentication feature to sign function return pointers before adding them to the stack. The pointer's authenticity is then validated before returning to its destination. This dramatically increases the difficulty of ROP exploitation techniques.
···1682sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
1683```
16841685+#### `glibcxxassertions` {#glibcxxassertions}
1686+1687+Adds the `-D_GLIBCXX_ASSERTIONS` compiler flag. This flag only has an effect on libstdc++ targets, and when defined, enables extra error checking in the form of precondition assertions, such as bounds checking in c++ strings and null pointer checks when dereferencing c++ smart pointers.
1688+1689+These checks may have an impact on performance in some cases.
1690+1691#### `pacret` {#pacret}
16921693This flag adds the `-mbranch-protection=pac-ret` compiler option on aarch64-linux targets. This uses ARM v8.3's Pointer Authentication feature to sign function return pointers before adding them to the stack. The pointer's authenticity is then validated before returning to its destination. This dramatically increases the difficulty of ROP exploitation techniques.
···1diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
2-index 7f223db42d..7e46a07d31 100644
3--- a/Documentation/git-send-email.adoc
4+++ b/Documentation/git-send-email.adoc
5-@@ -177,7 +177,7 @@ Sending
6 The command will be executed in the shell if necessary. Default
7 is the value of `sendemail.sendmailCmd`. If unspecified, and if
8- --smtp-server is also unspecified, git-send-email will search
9-- for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
10-+ for `sendmail` in $PATH.
1112 --smtp-encryption=<encryption>::
13 Specify in what way encrypting begins for the SMTP connection.
14-@@ -233,9 +233,9 @@ a password is obtained using 'git-credential'.
15- --smtp-server=<host>::
16 If set, specifies the outgoing SMTP server to use (e.g.
17 `smtp.example.com` or a raw IP address). If unspecified, and if
18-- `--sendmail-cmd` is also unspecified, the default is to search
19-- for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a
20-- program is available, falling back to `localhost` otherwise.
21-+ `--sendmail-cmd` is also unspecified, the default is to search for
22-+ `sendmail` in $PATH if such a program is available, falling back to
23-+ `localhost` otherwise.
24 +
25 For backward compatibility, this option can also specify a full pathname
26- of a sendmail-like program instead; the program must support the `-i`
27diff --git a/git-send-email.perl b/git-send-email.perl
28index 798d59b84f..69c9cc2a7d 100755
29--- a/git-send-email.perl
···1diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
2+index 5d13a856a7..5c9978c1e4 100644
3--- a/Documentation/git-send-email.adoc
4+++ b/Documentation/git-send-email.adoc
5+@@ -190,7 +190,7 @@ Sending
6 The command will be executed in the shell if necessary. Default
7 is the value of `sendemail.sendmailCmd`. If unspecified, and if
8+ `--smtp-server` is also unspecified, `git send-email` will search
9+- for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH`.
10++ for `sendmail` in `$PATH`.
1112 --smtp-encryption=<encryption>::
13 Specify in what way encrypting begins for the SMTP connection.
14+@@ -247,7 +247,7 @@ a password is obtained using linkgit:git-credential[1].
015 If set, specifies the outgoing SMTP server to use (e.g.
16 `smtp.example.com` or a raw IP address). If unspecified, and if
17+ `--sendmail-cmd` is also unspecified, the default is to search
18+- for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a
19++ for `sendmail` in `$PATH` if such a
20+ program is available, falling back to `localhost` otherwise.
0021 +
22 For backward compatibility, this option can also specify a full pathname
023diff --git a/git-send-email.perl b/git-send-email.perl
24index 798d59b84f..69c9cc2a7d 100755
25--- a/git-send-email.perl
+2-2
pkgs/build-support/build-mozilla-mach/default.nix
···575 (
576 if (lib.versionAtLeast version "143") then
577 nss_latest
578- else if (lib.versionAtLeast version "129") then
579 nss_3_114
580 else
581- nss_esr # 3.90
582 )
583 ]
584 ++ lib.optional alsaSupport alsa-lib
···575 (
576 if (lib.versionAtLeast version "143") then
577 nss_latest
578+ else if (lib.versionAtLeast version "141") then
579 nss_3_114
580 else
581+ nss_esr
582 )
583 ]
584 ++ lib.optional alsaSupport alsa-lib
+5-1
pkgs/build-support/cc-wrapper/add-hardening.sh
···525354if (( "${NIX_DEBUG:-0}" >= 1 )); then
55- declare -a allHardeningFlags=(fortify fortify3 shadowstack stackprotector stackclashprotection nostrictaliasing pacret strictflexarrays1 strictflexarrays3 pie pic strictoverflow format trivialautovarinit zerocallusedregs)
56 declare -A hardeningDisableMap=()
5758 # Determine which flags were effectively disabled so we can report below.
···110 pacret)
111 if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling pacret >&2; fi
112 hardeningCFlagsBefore+=('-mbranch-protection=pac-ret')
0000113 ;;
114 stackprotector)
115 if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi
···525354if (( "${NIX_DEBUG:-0}" >= 1 )); then
55+ declare -a allHardeningFlags=(fortify fortify3 shadowstack stackprotector stackclashprotection nostrictaliasing pacret strictflexarrays1 strictflexarrays3 pie pic strictoverflow glibcxxassertions format trivialautovarinit zerocallusedregs)
56 declare -A hardeningDisableMap=()
5758 # Determine which flags were effectively disabled so we can report below.
···110 pacret)
111 if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling pacret >&2; fi
112 hardeningCFlagsBefore+=('-mbranch-protection=pac-ret')
113+ ;;
114+ glibcxxassertions)
115+ if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling glibcxxassertions >&2; fi
116+ hardeningCFlagsBefore+=('-D_GLIBCXX_ASSERTIONS')
117 ;;
118 stackprotector)
119 if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi
+19-3
pkgs/build-support/go/module.nix
···64 # Go build flags.
65 GOFLAGS ? [ ],
6600000067 ...
68 }@args:
69 {
···346 export NIX_BUILD_CORES=1
347 fi
348 for pkg in $(getGoDirs ""); do
349- echo "Building subPackage $pkg"
350- buildGoDir install "$pkg"
0000000000351 done
352 ''
353 + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
···367 ''
368 );
369370- doCheck = args.doCheck or true;
371 checkPhase =
372 args.checkPhase or ''
373 runHook preCheck
···64 # Go build flags.
65 GOFLAGS ? [ ],
6667+ # Instead of building binary targets with 'go install', build test binaries with 'go test'.
68+ # The binaries found in $out/bin can be executed as go tests outside of the sandbox.
69+ # This is mostly useful outside of nixpkgs, for example to build integration/e2e tests
70+ # that won't run within the sandbox.
71+ buildTestBinaries ? false,
72+73 ...
74 }@args:
75 {
···352 export NIX_BUILD_CORES=1
353 fi
354 for pkg in $(getGoDirs ""); do
355+ ${
356+ if buildTestBinaries then
357+ ''
358+ echo "Building test binary for $pkg"
359+ buildGoDir "test -c -o $GOPATH/bin/" "$pkg"
360+ ''
361+ else
362+ ''
363+ echo "Building subPackage $pkg"
364+ buildGoDir install "$pkg"
365+ ''
366+ }
367 done
368 ''
369 + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
···383 ''
384 );
385386+ doCheck = args.doCheck or (!buildTestBinaries);
387 checkPhase =
388 args.checkPhase or ''
389 runHook preCheck
···3233 `attrs`
3435- : An AttrSet with the following definitions. See https://specifications.freedesktop.org/desktop-entry-spec/1.4/recognized-keys.html#id-1.7.6 for definitions.
3637 - `name` (string): The name of the desktop file (excluding the .desktop or .directory file extensions)
38 - `destination` (string): The directory that will contain the desktop entry file (Default: "/share/applications")
···57 - `startupNotify` (bool): The `StartupNotify` of the desktop entry
58 - `startupWMClass` (string): The `StartupWMClass` of the desktop entry
59 - `url` (string): The `URL` of the Link-type desktop entry
60- - `prefersNonDefaultGPU` (bool): The `PrefersNonDefaultGPU` (non-standard) of the desktop entry
061 - `extraConfig` (AttrSet): Additional values to be added literally to the final item, e.g. vendor extensions
6263 # Output
···6667 # Developer Note
6869- All possible values are as defined by the spec, version 1.4.
70 Please keep in spec order for easier maintenance.
71 When adding a new value, don't forget to update the Version field below!
72 See https://specifications.freedesktop.org/desktop-entry-spec/latest
···99 startupWMClass ? null,
100 url ? null,
101 prefersNonDefaultGPU ? null,
102- # not supported until version 1.5, which is not supported by our desktop-file-utils as of 2022-02-23
103- # singleMainWindow ? null,
104 extraConfig ? { }, # Additional values to be added literally to the final item, e.g. vendor extensions
105 }:
106 let
···133 # Please keep in spec order.
134 mainSection = {
135 "Type" = type;
136- "Version" = "1.4";
137 "Name" = desktopName;
138 "GenericName" = genericName;
139 "NoDisplay" = boolOrNullToString noDisplay;
···155 "StartupWMClass" = startupWMClass;
156 "URL" = url;
157 "PrefersNonDefaultGPU" = boolOrNullToString prefersNonDefaultGPU;
158- # "SingleMainWindow" = boolOrNullToString singleMainWindow;
159 }
160 // extraConfig;
161
···3233 `attrs`
3435+ : An AttrSet with the following definitions. See https://specifications.freedesktop.org/desktop-entry-spec/1.5/recognized-keys.html#id-1.7.6 for definitions.
3637 - `name` (string): The name of the desktop file (excluding the .desktop or .directory file extensions)
38 - `destination` (string): The directory that will contain the desktop entry file (Default: "/share/applications")
···57 - `startupNotify` (bool): The `StartupNotify` of the desktop entry
58 - `startupWMClass` (string): The `StartupWMClass` of the desktop entry
59 - `url` (string): The `URL` of the Link-type desktop entry
60+ - `prefersNonDefaultGPU` (bool): The `PrefersNonDefaultGPU` of the desktop entry
61+ - `singleMainWindow` (bool): The `SingleMainWindow` of the desktop entry
62 - `extraConfig` (AttrSet): Additional values to be added literally to the final item, e.g. vendor extensions
6364 # Output
···6768 # Developer Note
6970+ All possible values are as defined by the spec, version 1.5.
71 Please keep in spec order for easier maintenance.
72 When adding a new value, don't forget to update the Version field below!
73 See https://specifications.freedesktop.org/desktop-entry-spec/latest
···100 startupWMClass ? null,
101 url ? null,
102 prefersNonDefaultGPU ? null,
103+ singleMainWindow ? null,
0104 extraConfig ? { }, # Additional values to be added literally to the final item, e.g. vendor extensions
105 }:
106 let
···133 # Please keep in spec order.
134 mainSection = {
135 "Type" = type;
136+ "Version" = "1.5";
137 "Name" = desktopName;
138 "GenericName" = genericName;
139 "NoDisplay" = boolOrNullToString noDisplay;
···155 "StartupWMClass" = startupWMClass;
156 "URL" = url;
157 "PrefersNonDefaultGPU" = boolOrNullToString prefersNonDefaultGPU;
158+ "SingleMainWindow" = boolOrNullToString singleMainWindow;
159 }
160 // extraConfig;
161
···11 # Compress all uncompressed manpages. Don't follow symlinks, etc.
12 # gzip -f is needed to not error out on hard links.
13 find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
14- | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -f
1516 # Point symlinks to compressed manpages.
17 find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
···11 # Compress all uncompressed manpages. Don't follow symlinks, etc.
12 # gzip -f is needed to not error out on hard links.
13 find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
14+ | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f
1516 # Point symlinks to compressed manpages.
17 find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
+1-1
pkgs/build-support/testers/expect-failure.sh
···41#
42# NOTE: This MUST be done after the original builder has finished!
43# Otherwise we could pollute its environment.
44-if [ -e "${NIX_ATTRS_SH_FILE:-}" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
4546# Variables injected by replaceVars
47#
···41#
42# NOTE: This MUST be done after the original builder has finished!
43# Otherwise we could pollute its environment.
44+if [ -e "${NIX_ATTRS_SH_FILE:-}" ]; then . "$NIX_ATTRS_SH_FILE"; fi
4546# Variables injected by replaceVars
47#
···53 kyua
54 ];
5556+ # Don’t install the test programs for ATF itself; they’re useless
57+ # other than as part of the `installCheckPhase`, and they contain
58+ # non‐reproducible references to the build directory.
59+ postInstall = ''
60+ rm -r $out/tests
61+ '';
62+63 installCheckPhase = ''
64 runHook preInstallCheck
65 HOME=$TMPDIR PATH=$out/bin:$PATH kyua test
···16#
17# See comments on each function for more details.
1819-# installManPage <path> [...<path>]
20#
21# Each argument is checked for its man section suffix and installed into the appropriate
22# share/man/man<n>/ directory. The function returns an error if any paths don't have the man
23# section suffix (with optional .gz compression).
0000024installManPage() {
25- local path
26- for path in "$@"; do
27- if test -z "$path"; then
00000000000000000000000028 nixErrorLog "${FUNCNAME[0]}: path cannot be empty"
29 return 1
30 fi
31- nixInfoLog "${FUNCNAME[0]}: installing $path"
32- local basename
33- basename=$(stripHash "$path") # use stripHash in case it's a nix store path
000000000034 local trimmed=${basename%.gz} # don't get fooled by compressed manpages
35 local suffix=${trimmed##*.}
36 if test -z "$suffix" -o "$suffix" = "$trimmed"; then
37- nixErrorLog "${FUNCNAME[0]}: path missing manpage section suffix: $path"
38 return 1
39 fi
0040 local outRoot
41 if test "$suffix" = 3; then
42 outRoot=${!outputDevman:?}
43 else
44 outRoot=${!outputMan:?}
45 fi
46- local outPath="${outRoot}/share/man/man$suffix/$basename"
47- install -D --mode=644 --no-target-directory "$path" "$outPath"
0000000000048 done
49}
5051# installShellCompletion [--cmd <name>] ([--bash|--fish|--zsh] [--name <name>] <path>)...
52#
53# Each path is installed into the appropriate directory for shell completions for the given shell.
54-# If one of `--bash`, `--fish`, or `--zsh` is given the path is assumed to belong to that shell.
55-# Otherwise the file extension will be examined to pick a shell. If the shell is unknown a warning
56-# will be logged and the command will return a non-zero status code after processing any remaining
57-# paths. Any of the shell flags will affect all subsequent paths (unless another shell flag is
58-# given).
59#
60# If the shell completion needs to be renamed before installing the optional `--name <name>` flag
61# may be given. Any name provided with this flag only applies to the next path.
···84#
85# installShellCompletion --bash --name foobar.bash share/completions.bash
86# installShellCompletion --fish --name foobar.fish share/completions.fish
087# installShellCompletion --zsh --name _foobar share/completions.zsh
88#
89# Or to use shell newline escaping to split a single invocation across multiple lines:
···91# installShellCompletion --cmd foobar \
92# --bash <($out/bin/foobar --bash-completion) \
93# --fish <($out/bin/foobar --fish-completion) \
094# --zsh <($out/bin/foobar --zsh-completion)
95#
96# If any argument is `--` the remaining arguments will be treated as paths.
···100 # Parse arguments
101 if (( parseArgs )); then
102 case "$arg" in
103- --bash|--fish|--zsh)
104 shell=${arg#--}
105 continue;;
106 --name)
···146 elif [[ -p "$arg" ]]; then
147 # this is a named fd or fifo
148 if [[ -z "$curShell" ]]; then
149- nixErrorLog "${FUNCNAME[0]}: named pipe requires one of --bash, --fish, or --zsh"
150 return 1
151 elif [[ -z "$name" && -z "$cmdname" ]]; then
152 nixErrorLog "${FUNCNAME[0]}: named pipe requires one of --cmd or --name"
···161 case "$argbase" in
162 ?*.bash) curShell=bash;;
163 ?*.fish) curShell=fish;;
0164 ?*.zsh) curShell=zsh;;
165 *)
166 if [[ "$argbase" = _* && "$argbase" != *.* ]]; then
···182 elif [[ -n "$cmdname" ]]; then
183 case "$curShell" in
184 bash|fish) outName=$cmdname.$curShell;;
0185 zsh) outName=_$cmdname;;
186 *)
187 # Our list of shells is out of sync with the flags we accept or extensions we detect.
···193 case "$curShell" in
194 bash) sharePath=bash-completion/completions;;
195 fish) sharePath=fish/vendor_completions.d;;
0196 zsh)
197 sharePath=zsh/site-functions
198 # only apply automatic renaming if we didn't have a manual rename
···16#
17# See comments on each function for more details.
1819+# installManPage [--name <path>] <path> [...<path>]
20#
21# Each argument is checked for its man section suffix and installed into the appropriate
22# share/man/man<n>/ directory. The function returns an error if any paths don't have the man
23# section suffix (with optional .gz compression).
24+#
25+# Optionally accepts pipes as input, which when provided require the `--name` argument to
26+# name the output file.
27+#
28+# installManPage --name foobar.1 <($out/bin/foobar --manpage)
29installManPage() {
30+ local arg name='' continueParsing=1
31+ while { arg=$1; shift; }; do
32+ if (( continueParsing )); then
33+ case "$arg" in
34+ --name)
35+ name=$1
36+ shift || {
37+ nixErrorLog "${FUNCNAME[0]}: --name flag expected an argument"
38+ return 1
39+ }
40+ continue;;
41+ --name=*)
42+ # Treat `--name=foo` that same as `--name foo`
43+ name=${arg#--name=}
44+ continue;;
45+ --)
46+ continueParsing=0
47+ continue;;
48+ esac
49+ fi
50+51+ nixInfoLog "${FUNCNAME[0]}: installing $arg${name:+ as $name}"
52+ local basename
53+54+ # Check if path is empty
55+ if test -z "$arg"; then
56+ # It is an empty string
57 nixErrorLog "${FUNCNAME[0]}: path cannot be empty"
58 return 1
59 fi
60+61+ if test -n "$name"; then
62+ # Provided name. Required for pipes, optional for paths
63+ basename=$name
64+ elif test -p "$arg"; then
65+ # Named pipe requires a file name
66+ nixErrorLog "${FUNCNAME[0]}: named pipe requires --name argument"
67+ else
68+ # Normal file without a name
69+ basename=$(stripHash "$arg") # use stripHash in case it's a nix store path
70+ fi
71+72+ # Check that it is well-formed
73 local trimmed=${basename%.gz} # don't get fooled by compressed manpages
74 local suffix=${trimmed##*.}
75 if test -z "$suffix" -o "$suffix" = "$trimmed"; then
76+ nixErrorLog "${FUNCNAME[0]}: path missing manpage section suffix: $arg"
77 return 1
78 fi
79+80+ # Create the out-path
81 local outRoot
82 if test "$suffix" = 3; then
83 outRoot=${!outputDevman:?}
84 else
85 outRoot=${!outputMan:?}
86 fi
87+ local outPath="${outRoot}/share/man/man$suffix/"
88+ nixInfoLog "${FUNCNAME[0]}: installing to $outPath"
89+90+ # Install
91+ if test -p "$arg"; then
92+ # install doesn't work with pipes on Darwin
93+ mkdir -p "$outPath" && cat "$arg" > "$outPath/$basename"
94+ else
95+ install -D --mode=644 --no-target-directory -- "$arg" "$outPath/$basename"
96+ fi
97+98+ # Reset the name for the next page
99+ name=
100 done
101}
102103# installShellCompletion [--cmd <name>] ([--bash|--fish|--zsh] [--name <name>] <path>)...
104#
105# Each path is installed into the appropriate directory for shell completions for the given shell.
106+# If one of `--bash`, `--fish`, `--zsh`, or `--nushell` is given the path is assumed to belong to
107+# that shell. Otherwise the file extension will be examined to pick a shell. If the shell is
108+# unknown a warning will be logged and the command will return a non-zero status code after
109+# processing any remaining paths. Any of the shell flags will affect all subsequent paths (unless
110+# another shell flag is given).
111#
112# If the shell completion needs to be renamed before installing the optional `--name <name>` flag
113# may be given. Any name provided with this flag only applies to the next path.
···136#
137# installShellCompletion --bash --name foobar.bash share/completions.bash
138# installShellCompletion --fish --name foobar.fish share/completions.fish
139+# installShellCompletion --nushell --name foobar share/completions.nu
140# installShellCompletion --zsh --name _foobar share/completions.zsh
141#
142# Or to use shell newline escaping to split a single invocation across multiple lines:
···144# installShellCompletion --cmd foobar \
145# --bash <($out/bin/foobar --bash-completion) \
146# --fish <($out/bin/foobar --fish-completion) \
147+# --nushell <($out/bin/foobar --nushell-completion)
148# --zsh <($out/bin/foobar --zsh-completion)
149#
150# If any argument is `--` the remaining arguments will be treated as paths.
···154 # Parse arguments
155 if (( parseArgs )); then
156 case "$arg" in
157+ --bash|--fish|--zsh|--nushell)
158 shell=${arg#--}
159 continue;;
160 --name)
···200 elif [[ -p "$arg" ]]; then
201 # this is a named fd or fifo
202 if [[ -z "$curShell" ]]; then
203+ nixErrorLog "${FUNCNAME[0]}: named pipe requires one of --bash, --fish, --zsh, or --nushell"
204 return 1
205 elif [[ -z "$name" && -z "$cmdname" ]]; then
206 nixErrorLog "${FUNCNAME[0]}: named pipe requires one of --cmd or --name"
···215 case "$argbase" in
216 ?*.bash) curShell=bash;;
217 ?*.fish) curShell=fish;;
218+ ?*.nu) curShell=nushell;;
219 ?*.zsh) curShell=zsh;;
220 *)
221 if [[ "$argbase" = _* && "$argbase" != *.* ]]; then
···237 elif [[ -n "$cmdname" ]]; then
238 case "$curShell" in
239 bash|fish) outName=$cmdname.$curShell;;
240+ nushell) outName=$cmdname.nu;;
241 zsh) outName=_$cmdname;;
242 *)
243 # Our list of shells is out of sync with the flags we accept or extensions we detect.
···249 case "$curShell" in
250 bash) sharePath=bash-completion/completions;;
251 fish) sharePath=fish/vendor_completions.d;;
252+ nushell) sharePath=nushell/vendor/autoload;;
253 zsh)
254 sharePath=zsh/site-functions
255 # only apply automatic renaming if we didn't have a manual rename
···1+{
2+ lib,
3+ stdenv,
4+ fetchFromGitLab,
5+ pkg-config,
6+ autoreconfHook,
7+ util-macros,
8+ xorgproto,
9+ libX11,
10+ libXext,
11+ testers,
12+}:
13+stdenv.mkDerivation (finalAttrs: {
14+ pname = "libapplewm";
15+ version = "1.4.1-unstable-2021-01-04";
16+17+ src = fetchFromGitLab {
18+ domain = "gitlab.freedesktop.org";
19+ owner = "xorg/lib";
20+ repo = "libapplewm";
21+ rev = "be972ebc3a97292e7d2b2350eff55ae12df99a42";
22+ hash = "sha256-NH9YeOEtnEupqpnsMLC21I+LmCOzT7KnfdzNNWqba/Y=";
23+ };
24+25+ strictDeps = true;
26+27+ nativeBuildInputs = [
28+ pkg-config
29+ autoreconfHook
30+ util-macros
31+ ];
32+33+ buildInputs = [
34+ xorgproto
35+ libX11
36+ libXext
37+ ];
38+39+ passthru = {
40+ # updateScript = # no updatescript since we don't use a tagged release (last one was 14 years ago)
41+ tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
42+ };
43+44+ meta = {
45+ description = "Xlib-based library for the Apple-WM extension";
46+ longDescription = ''
47+ AppleWM is a simple library designed to interface with the Apple-WM extension.
48+ This extension allows X window managers to better interact with the Mac OS X Aqua user
49+ interface when running X11 in a rootless mode.
50+ '';
51+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libapplewm";
52+ license = lib.licenses.mit;
53+ maintainers = [ ];
54+ pkgConfigModules = [ "applewm" ];
55+ platforms = lib.platforms.darwin;
56+ };
57+})
+3-3
pkgs/by-name/li/libarchive/package.nix
···74 "libarchive/test/test_read_disk_directory_traversals.c"
75 "cpio/test/test_option_a.c"
76 "cpio/test/test_option_t.c"
77- ]
78- ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
79- # only on some aarch64-linux systems?
80 "cpio/test/test_basic.c"
81 "cpio/test/test_format_newc.c"
82 ];
···74 "libarchive/test/test_read_disk_directory_traversals.c"
75 "cpio/test/test_option_a.c"
76 "cpio/test/test_option_t.c"
77+ # fails tests on filesystems with 64-bit inode values:
78+ # FAIL: bsdcpio_test
79+ # bsdcpio: linkfile: large inode number truncated: Numerical result out of range
80 "cpio/test/test_basic.c"
81 "cpio/test/test_format_newc.c"
82 ];
···1-From 904e9dee373eca499e976dce131f0baee06db2d6 Mon Sep 17 00:00:00 2001
2-From: Alyssa Ross <hi@alyssa.is>
3-Date: Thu, 13 Feb 2025 12:05:17 +0100
4-Subject: [PATCH] api: fix seccomp_export_bpf_mem out-of-bounds read
5-6-*len is the length of the destination buffer, but program->blks is
7-probably not anywhere near that long. It's already been checked above
8-that BPF_PGM_SIZE(program) is less than or equal to *len, so that's
9-the correct value to use here to avoid either reading or writing too
10-much.
11-12-I noticed this because tests/11-basic-basic_errors started failing on
13-musl after e797591 ("all: add seccomp_precompute() functionality").
14-15-Signed-off-by: Alyssa Ross <hi@alyssa.is>
16----
17-Link: https://github.com/seccomp/libseccomp/pull/458
18-19- src/api.c | 2 +-
20- 1 file changed, 1 insertion(+), 1 deletion(-)
21-22-diff --git a/src/api.c b/src/api.c
23-index adccef3..65a277a 100644
24---- a/src/api.c
25-+++ b/src/api.c
26-@@ -786,7 +786,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
27- if (BPF_PGM_SIZE(program) > *len)
28- rc = _rc_filter(-ERANGE);
29- else
30-- memcpy(buf, program->blks, *len);
31-+ memcpy(buf, program->blks, BPF_PGM_SIZE(program));
32- }
33- *len = BPF_PGM_SIZE(program);
34-35---
36-2.47.0
37-
···1---- a/mesonbuild/backend/backends.py
2-+++ b/mesonbuild/backend/backends.py
3-@@ -723,6 +723,21 @@
4- @staticmethod
5- def get_rpath_dirs_from_link_args(args: T.List[str]) -> T.Set[str]:
06 dirs: T.Set[str] = set()
7-+
8+ nix_ldflags = os.environ.get('NIX_LDFLAGS', '').split()
9+ next_is_path = False
10+ # Try to add rpaths set by user or ld-wrapper so that they are not removed.
···19+ dirs.add(flag)
20+ next_is_path = False
21+
22- # Match rpath formats:
23- # -Wl,-rpath=
24- # -Wl,-rpath,
···1+diff --git a/mesonbuild/build.py b/mesonbuild/build.py
2+index 9014d09fb..4dda63a96 100644
3+--- a/mesonbuild/build.py
4++++ b/mesonbuild/build.py
5+@@ -1888,6 +1888,20 @@ class BuildTarget(Target):
6+ def get_rpath_dirs_from_link_args(cls, args: T.List[str]) -> T.Set[str]:
7 dirs: T.Set[str] = set()
8+9+ nix_ldflags = os.environ.get('NIX_LDFLAGS', '').split()
10+ next_is_path = False
11+ # Try to add rpaths set by user or ld-wrapper so that they are not removed.
···20+ dirs.add(flag)
21+ next_is_path = False
22+
23+ for arg in args:
24+ if not arg.startswith('-Wl,'):
25+ continue
···3233stdenv.mkDerivation rec {
34 pname = "modemmanager";
35- version = "1.22.0";
3637 src = fetchFromGitLab {
38 domain = "gitlab.freedesktop.org";
39 owner = "mobile-broadband";
40 repo = "ModemManager";
41 rev = version;
42- hash = "sha256-/D9b2rCCUhpDCUfSNAWR65+3EyUywzFdH1R17eSKRDo=";
43 };
4445 patches = [
46 # Since /etc is the domain of NixOS, not Nix, we cannot install files there.
47 # But these are just placeholders so we do not need to install them at all.
48 ./no-dummy-dirs-in-sysconfdir.patch
49-50- (fetchpatch {
51- name = "GI_TYPELIB_PATH.patch";
52- url = "https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/daa829287894273879799a383ed4dc373c6111b0.patch";
53- hash = "sha256-tPQokiZO2SpTlX8xMlkWjP1AIXgoLHW3rJwnmG33z/k=";
54- })
55 ];
5657 strictDeps = true;
···3233stdenv.mkDerivation rec {
34 pname = "modemmanager";
35+ version = "1.24.0";
3637 src = fetchFromGitLab {
38 domain = "gitlab.freedesktop.org";
39 owner = "mobile-broadband";
40 repo = "ModemManager";
41 rev = version;
42+ hash = "sha256-3jI75aR2esmv5dkE4TrdCHIcCvtdOBKnBC5XLEKoVFs=";
43 };
4445 patches = [
46 # Since /etc is the domain of NixOS, not Nix, we cannot install files there.
47 # But these are just placeholders so we do not need to install them at all.
48 ./no-dummy-dirs-in-sysconfdir.patch
00000049 ];
5051 strictDeps = true;
+2-12
pkgs/by-name/mo/moltenvk/package.nix
···2 lib,
3 stdenv,
4 fetchFromGitHub,
5- fetchpatch2,
6 gitUpdater,
7 apple-sdk_15,
8 cereal,
···2223stdenv.mkDerivation (finalAttrs: {
24 pname = "MoltenVK";
25- version = "1.2.11";
2627 strictDeps = true;
28···48 owner = "KhronosGroup";
49 repo = "MoltenVK";
50 rev = "v${finalAttrs.version}";
51- hash = "sha256-24qQnJ0RnJP2M4zSlSlQ4c4dVZtHutNiCvjrsCDw6wY=";
52 };
53-54- patches = [
55- # Cherry-pick patch to fix build failure due to a hardcoded SPIRV-Cross namespace.
56- # This can be dropped for MoltenVK 1.2.12.
57- (fetchpatch2 {
58- url = "https://github.com/KhronosGroup/MoltenVK/commit/856c8237ac3b32178caae3408effc35bedfdffa1.patch?full_index=1";
59- hash = "sha256-dVTop8sU19Swdb3ajbI+6S715NaxTqd7d0yQ/FDqxqY=";
60- })
61- ];
6263 postPatch = ''
64 # Move `mvkGitRevDerived.h` to a stable location
···2 lib,
3 stdenv,
4 fetchFromGitHub,
5- runtimeShell,
6 nixosTests,
7 autoreconfHook,
8 bison,
···49 "man"
50 ];
5152- RUNTIME_SHELL = runtimeShell;
53-54 nativeBuildInputs = [
55 autoreconfHook
56 bison
···74 ./keep-path.patch
75 # Obtain XML resources from XML catalog (patch adapted from gtk-doc)
76 ./respect-xml-catalog-files-var.patch
77- ./runtime-shell.patch
78 ./fix-install-with-tcb.patch
79 ];
8081- # The nix daemon often forbids even creating set[ug]id files.
82 postPatch = ''
083 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am
0000084 '';
8586 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
···2 lib,
3 stdenv,
4 fetchFromGitHub,
05 nixosTests,
6 autoreconfHook,
7 bison,
···48 "man"
49 ];
500051 nativeBuildInputs = [
52 autoreconfHook
53 bison
···71 ./keep-path.patch
72 # Obtain XML resources from XML catalog (patch adapted from gtk-doc)
73 ./respect-xml-catalog-files-var.patch
074 ./fix-install-with-tcb.patch
75 ];
76077 postPatch = ''
78+ # The nix daemon often forbids even creating set[ug]id files
79 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am
80+81+ # The default shell is not defined at build time of the package. It is
82+ # decided at build time of the NixOS configration. Thus, don't decide this
83+ # here but just point to the location of the shell on the system.
84+ substituteInPlace configure.ac --replace-fail '$SHELL' /bin/sh
85 '';
8687 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
-13
pkgs/by-name/sh/shadow/runtime-shell.patch
···1-diff --git a/configure.ac b/configure.ac
2-index e4c6aaec..03883ad7 100644
3---- a/configure.ac
4-+++ b/configure.ac
5-@@ -682,7 +682,7 @@ if test "$enable_utmpx" = "yes"; then
6- [Define if utmpx should be used])
7- fi
8-9--AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.])
10-+AC_DEFINE_UNQUOTED(SHELL, ["$RUNTIME_SHELL"], [The runtime shell.])
11-12- AM_GNU_GETTEXT_VERSION(0.16)
13- AM_GNU_GETTEXT([external], [need-ngettext])
···29 "2.4.10".sha256 = "sha256-zus5a2nSkT7uBIQcKva+ylw0LOFGTD/j5FPy3hDF4vg=";
30 # By unofficial and very loose convention we keep the latest version of
31 # SBCL, and the previous one in case someone quickly needs to roll back.
32- "2.5.4".sha256 = "sha256-XxS07ZKUKp44dZT6wAC5bbdGfpzlYTBn/8CSPfPsIHI=";
33 "2.5.5".sha256 = "sha256-ZQJnCvs2G6m+RKL6/pr5tZ57JK5QmnkaZrVIHylVlQs=";
034 };
35 # Collection of pre-built SBCL binaries for platforms that need them for
36 # bootstrapping. Ideally these are to be avoided. If ECL (or any other
···29 "2.4.10".sha256 = "sha256-zus5a2nSkT7uBIQcKva+ylw0LOFGTD/j5FPy3hDF4vg=";
30 # By unofficial and very loose convention we keep the latest version of
31 # SBCL, and the previous one in case someone quickly needs to roll back.
032 "2.5.5".sha256 = "sha256-ZQJnCvs2G6m+RKL6/pr5tZ57JK5QmnkaZrVIHylVlQs=";
33+ "2.5.7".sha256 = "sha256-xPr+t5VpnVvP+QhQkazHYtz15V+FI1Yl89eu8SyJ0dM=";
34 };
35 # Collection of pre-built SBCL binaries for platforms that need them for
36 # bootstrapping. Ideally these are to be avoided. If ECL (or any other
···64 ];
6566 dontUseCmakeConfigure = true;
67- SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" (
68 # Set GGML_NATIVE=off. Otherwise, cmake attempts to build with
69 # -march=native* which is either a no-op (if cc-wrapper is able to ignore
70 # it), or an attempt to build a non-reproducible binary.
···73 # -mcpu, breaking linux build as follows:
74 #
75 # cc1: error: unknown value ‘native+nodotprod+noi8mm+nosve’ for ‘-mcpu’
76- [
77- "-DGGML_NATIVE=off"
78- "-DGGML_BUILD_NUMBER=1"
79- ]
80- ++ lib.optionals cudaSupport [
81- "-DGGML_CUDA=on"
82- "-DCUDAToolkit_ROOT=${lib.getDev cudaPackages.cuda_nvcc}"
83- "-DCMAKE_CUDA_COMPILER=${lib.getExe cudaPackages.cuda_nvcc}"
84- ]
85- );
8687 enableParallelBuilding = true;
88
···64 ];
6566 dontUseCmakeConfigure = true;
67+ cmakeFlags = [
68 # Set GGML_NATIVE=off. Otherwise, cmake attempts to build with
69 # -march=native* which is either a no-op (if cc-wrapper is able to ignore
70 # it), or an attempt to build a non-reproducible binary.
···73 # -mcpu, breaking linux build as follows:
74 #
75 # cc1: error: unknown value ‘native+nodotprod+noi8mm+nosve’ for ‘-mcpu’
76+ "-DGGML_NATIVE=off"
77+ "-DGGML_BUILD_NUMBER=1"
78+ ]
79+ ++ lib.optionals cudaSupport [
80+ "-DGGML_CUDA=on"
81+ "-DCUDAToolkit_ROOT=${lib.getDev cudaPackages.cuda_nvcc}"
82+ "-DCMAKE_CUDA_COMPILER=${lib.getExe cudaPackages.cuda_nvcc}"
83+ ];
008485 enableParallelBuilding = true;
86
···36 ninja
37 ];
38 dontUseCmakeConfigure = true;
39- env = {
40- SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" (
41- cmakeFlags
42- ++ [
43- (lib.cmakeBool "UNITS_BUILD_PYTHON_LIBRARY" true)
44- ]
45- );
46- };
4748 # Also upstream turns off testing for the python build so it seems, see:
49 # https://github.com/LLNL/units/blob/v0.13.1/pyproject.toml#L65-L66 However
···36 ninja
37 ];
38 dontUseCmakeConfigure = true;
39+ cmakeFlags = cmakeFlags ++ [
40+ (lib.cmakeBool "UNITS_BUILD_PYTHON_LIBRARY" true)
41+ ];
000004243 # Also upstream turns off testing for the python build so it seems, see:
44 # https://github.com/LLNL/units/blob/v0.13.1/pyproject.toml#L65-L66 However
+4-3
pkgs/development/python-modules/uv/default.nix
···17 build-system = [ hatchling ];
1819 postPatch =
20- # Do not rely on path lookup at runtime to find the uv binary.
21- # Use the propagated binary instead.
22 ''
23 substituteInPlace python/uv/_find_uv.py \
24- --replace-fail '"""Return the uv binary path."""' "return '${lib.getExe uv}'"
0025 ''
26 # Sidestep the maturin build system in favour of reusing the binary already built by nixpkgs,
27 # to avoid rebuilding the uv binary for every active python package set.
···17 build-system = [ hatchling ];
1819 postPatch =
20+ # Add the path to the uv binary as a fallback after other path search methods have been exhausted
021 ''
22 substituteInPlace python/uv/_find_uv.py \
23+ --replace-fail \
24+ 'sysconfig.get_path("scripts", scheme=_user_scheme()),' \
25+ 'sysconfig.get_path("scripts", scheme=_user_scheme()), "${builtins.baseNameOf (lib.getExe uv)}",'
26 ''
27 # Sidestep the maturin build system in favour of reusing the binary already built by nixpkgs,
28 # to avoid rebuilding the uv binary for every active python package set.
···1-Avoids needing xcrun or xcodebuild in PATH for native package builds
2-3---- a/tools/gyp/pylib/gyp/xcode_emulation.py
4-+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
5-@@ -522,7 +522,13 @@ class XcodeSettings:
6- # Since the CLT has no SDK paths anyway, returning None is the
7- # most sensible route and should still do the right thing.
8- try:
9-- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
10-+ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
11-+ return {
12-+ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform",
13-+ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
14-+ "--show-sdk-build-version": "19A547",
15-+ "--show-sdk-version": "10.15"
16-+ }[infoitem]
17- except GypError:
18- pass
19-20-@@ -1499,7 +1505,8 @@ def XcodeVersion():
21- version = ""
22- build = ""
23- try:
24-- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
25-+ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
26-+ version_list = []
27- # In some circumstances xcodebuild exits 0 but doesn't return
28- # the right results; for example, a user on 10.7 or 10.8 with
29- # a bogus path set via xcode-select
30-@@ -1510,7 +1517,8 @@ def XcodeVersion():
31- version = version_list[0].split()[-1] # Last word on first line
32- build = version_list[-1].split()[-1] # Last word on last line
33- except GypError: # Xcode not installed so look for XCode Command Line Tools
34-- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
35-+ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
36-+ version = "11.0.0.0.1.1567737322"
37- if not version:
38- raise GypError("No Xcode or CLT version detected!")
39- # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
40---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
41-+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
42-@@ -522,7 +522,13 @@ class XcodeSettings:
43- # Since the CLT has no SDK paths anyway, returning None is the
44- # most sensible route and should still do the right thing.
45- try:
46-- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
47-+ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
48-+ return {
49-+ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform",
50-+ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
51-+ "--show-sdk-build-version": "19A547",
52-+ "--show-sdk-version": "10.15"
53-+ }[infoitem]
54- except GypError:
55- pass
56-57-@@ -1499,7 +1505,8 @@ def XcodeVersion():
58- version = ""
59- build = ""
60- try:
61-- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
62-+ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
63-+ version_list = []
64- # In some circumstances xcodebuild exits 0 but doesn't return
65- # the right results; for example, a user on 10.7 or 10.8 with
66- # a bogus path set via xcode-select
67-@@ -1510,7 +1517,8 @@ def XcodeVersion():
68- version = version_list[0].split()[-1] # Last word on first line
69- build = version_list[-1].split()[-1] # Last word on last line
70- except GypError: # Xcode not installed so look for XCode Command Line Tools
71-- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
72-+ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
73-+ version = "11.0.0.0.1.1567737322"
74- if not version:
75- raise GypError("No Xcode or CLT version detected!")
76- # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
···1+Sandboxed builds need a fallback value for the version of the Command Line Tools
2+being used.
3+4+diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
5+index 508f6ccac3e..44bcd988c4c 100644
6+--- a/tools/gyp/pylib/gyp/xcode_emulation.py
7++++ b/tools/gyp/pylib/gyp/xcode_emulation.py
8+@@ -1495,24 +1495,8 @@ def XcodeVersion():
9+ global XCODE_VERSION_CACHE
10+ if XCODE_VERSION_CACHE:
11+ return XCODE_VERSION_CACHE
12+- version = ""
13++ version = "11.0.0.0.1.1567737322"
14+ build = ""
15+- try:
16+- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
17+- # In some circumstances xcodebuild exits 0 but doesn't return
18+- # the right results; for example, a user on 10.7 or 10.8 with
19+- # a bogus path set via xcode-select
20+- # In that case this may be a CLT-only install so fall back to
21+- # checking that version.
22+- if len(version_list) < 2:
23+- raise GypError("xcodebuild returned unexpected results")
24+- version = version_list[0].split()[-1] # Last word on first line
25+- build = version_list[-1].split()[-1] # Last word on last line
26+- except (GypError, OSError):
27+- # Xcode not installed so look for XCode Command Line Tools
28+- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
29+- if not version:
30+- raise GypError("No Xcode or CLT version detected!")
31+ # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
32+ version = version.split(".")[:3] # Just major, minor, micro
33+ version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
34+35+36+--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
37++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
38+@@ -1495,24 +1495,8 @@ def XcodeVersion():
39+ global XCODE_VERSION_CACHE
40+ if XCODE_VERSION_CACHE:
41+ return XCODE_VERSION_CACHE
42+- version = ""
43++ version = "11.0.0.0.1.1567737322"
44+ build = ""
45+- try:
46+- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
47+- # In some circumstances xcodebuild exits 0 but doesn't return
48+- # the right results; for example, a user on 10.7 or 10.8 with
49+- # a bogus path set via xcode-select
50+- # In that case this may be a CLT-only install so fall back to
51+- # checking that version.
52+- if len(version_list) < 2:
53+- raise GypError("xcodebuild returned unexpected results")
54+- version = version_list[0].split()[-1] # Last word on first line
55+- build = version_list[-1].split()[-1] # Last word on last line
56+- except (GypError, OSError):
57+- # Xcode not installed so look for XCode Command Line Tools
58+- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
59+- if not version:
60+- raise GypError("No Xcode or CLT version detected!")
61+ # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
62+ version = version.split(".")[:3] # Just major, minor, micro
63+ version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
···1+From 448f3f2e2065a5ef20010133dae58c5311ecc538 Mon Sep 17 00:00:00 2001
2+From: Yureka <yuka@yuka.dev>
3+Date: Sat, 23 Aug 2025 18:24:07 +0200
4+Subject: [PATCH] sync: uapi: move constants from <linux/kernel.h> to
5+ <linux/const.h>
6+7+This change was applied to the kernel tree in 2020 afaict, to fix redefinition issues with musl-libc.
8+9+I ran into this issue while building with the headers included with libbpf, since it seems they were not synced since then.
10+11+Signed-off-by: Yureka Lilian <yuka@yuka.dev>
12+---
13+ include/uapi/linux/netlink.h | 2 +-
14+ 1 file changed, 1 insertion(+), 1 deletion(-)
15+16+diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
17+index b857821e3..e900b1f88 100644
18+--- a/include/uapi/linux/netlink.h
19++++ b/include/uapi/linux/netlink.h
20+@@ -2,7 +2,7 @@
21+ #ifndef __LINUX_NETLINK_H
22+ #define __LINUX_NETLINK_H
23+24+-#include <linux/kernel.h>
25++#include <linux/const.h>
26+ #include <linux/socket.h> /* for __kernel_sa_family_t */
27+ #include <linux/types.h>
28+
···6 stdenv,
7 # PostgreSQL package
8 finalPackage,
9+ # PostgreSQL package's outputs
10+ outputs,
11}:
1213replaceVarsWith {
···17 isExecutable = true;
18 replacements = {
19 inherit runtimeShell;
20+ "pg_config.env" = replaceVarsWith {
21+ name = "pg_config.env";
22+ src = "${lib.getDev finalPackage}/nix-support/pg_config.env";
23+ replacements = outputs;
24+ };
25 };
26 nativeCheckInputs = [
27 diffutils
28 ];
29+ # The expected output only matches when outputs have *not* been altered by postgresql.withPackages.
30+ postCheck = lib.optionalString (outputs.out == lib.getOutput "out" finalPackage) ''
31 if [ -e ${lib.getDev finalPackage}/nix-support/pg_config.expected ]; then
32 diff ${lib.getDev finalPackage}/nix-support/pg_config.expected <($out/bin/pg_config)
33 fi
+1-1
pkgs/servers/sql/postgresql/pg_config.sh
···13# https://github.com/postgres/postgres/blob/7510ac6203bc8e3c56eae95466feaeebfc1b4f31/src/bin/pg_config/pg_config.sh
14# https://github.com/postgres/postgres/blob/master/src/bin/pg_config/pg_config.c
1516-source @postgresql-dev@/nix-support/pg_config.env
1718help="
19pg_config provides information about the installed version of PostgreSQL.
···13# https://github.com/postgres/postgres/blob/7510ac6203bc8e3c56eae95466feaeebfc1b4f31/src/bin/pg_config/pg_config.sh
14# https://github.com/postgres/postgres/blob/master/src/bin/pg_config/pg_config.c
1516+source @pg_config.env@
1718help="
19pg_config provides information about the installed version of PostgreSQL.
···549 budgiePlugins = throw "The `budgiePlugins` scope has been removed and all packages moved to the top-level"; # Added 2024-07-14
550 buildBarebox = throw "buildBarebox has been removed due to lack of interest in maintaining it in nixpkgs"; # Added 2025-04-19
551 buildGo122Module = throw "Go 1.22 is end-of-life, and 'buildGo122Module' has been removed. Please use a newer builder version."; # Added 2025-03-28
0552 buildGoPackage = throw "`buildGoPackage` has been deprecated and removed, see the Go section in the nixpkgs manual for details"; # Added 2024-11-18
553 buildXenPackage = throw "'buildXenPackage' has been removed as a custom Xen build can now be achieved by simply overriding 'xen'."; # Added 2025-05-12
554···1021 gnupg1orig = throw "'gnupg1orig' has been removed due to lack of active upstream maintainance. Consider using 'gnupg' instead"; # Added 2025-01-11
1022 gnupg22 = throw "'gnupg22' is end-of-life. Consider using 'gnupg24' instead"; # Added 2025-01-05
1023 go_1_22 = throw "Go 1.22 is end-of-life and 'go_1_22' has been removed. Please use a newer Go toolchain."; # Added 2024-03-28
01024 gogs = throw ''
1025 Gogs development has stalled. Also, it has several unpatched, critical vulnerabilities that
1026 weren't addressed within a year: https://github.com/gogs/gogs/issues/7777
···2043 python = python2; # Added 2022-01-11
2044 python-swiftclient = throw "'python-swiftclient' has been renamed to/replaced by 'swiftclient'"; # Converted to throw 2024-10-17
2045 pythonFull = python2Full; # Added 2022-01-11
0000002046 pythonPackages = python.pkgs; # Added 2022-01-11
2047 pypy39 = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03
2048···2243 # spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
2244 spidermonkey = throw "'spidermonkey' has been renamed to/replaced by 'spidermonkey_91'"; # Converted to throw 2024-10-17
2245 spidermonkey_78 = throw "'spidermonkey_78' has been removed because it was unused."; # Added 2025-02-02
02246 spidermonkey_102 = throw "'spidermonkey_102' is EOL since 2023/03"; # Added 2024-08-07
2247 spotify-unwrapped = spotify; # added 2022-11-06
2248 spring-boot = throw "'spring-boot' has been renamed to/replaced by 'spring-boot-cli'"; # Converted to throw 2024-10-17
···2562 xmlroff = throw "'xmlroff' has been removed as it is unmaintained and broken"; # Added 2025-05-18
2563 xmr-stak = throw "xmr-stak has been removed from nixpkgs because it was broken"; # Added 2024-07-15
2564 xmake-core-sv = throw "'xmake-core-sv' has been removed, use 'libsv' instead"; # Added 2024-10-10
02565 xournal = throw "'xournal' has been removed due to lack of activity upstream and depending on gnome2. Consider using 'xournalpp' instead."; # Added 2024-12-06
2566 xonsh-unwrapped = python3Packages.xonsh; # Added 2024-06-18
2567 xplayer = throw "xplayer has been removed as the upstream project was archived"; # Added 2024-12-27
···549 budgiePlugins = throw "The `budgiePlugins` scope has been removed and all packages moved to the top-level"; # Added 2024-07-14
550 buildBarebox = throw "buildBarebox has been removed due to lack of interest in maintaining it in nixpkgs"; # Added 2025-04-19
551 buildGo122Module = throw "Go 1.22 is end-of-life, and 'buildGo122Module' has been removed. Please use a newer builder version."; # Added 2025-03-28
552+ buildGo123Module = throw "Go 1.23 is end-of-life, and 'buildGo123Module' has been removed. Please use a newer builder version."; # Added 2025-08-13
553 buildGoPackage = throw "`buildGoPackage` has been deprecated and removed, see the Go section in the nixpkgs manual for details"; # Added 2024-11-18
554 buildXenPackage = throw "'buildXenPackage' has been removed as a custom Xen build can now be achieved by simply overriding 'xen'."; # Added 2025-05-12
555···1022 gnupg1orig = throw "'gnupg1orig' has been removed due to lack of active upstream maintainance. Consider using 'gnupg' instead"; # Added 2025-01-11
1023 gnupg22 = throw "'gnupg22' is end-of-life. Consider using 'gnupg24' instead"; # Added 2025-01-05
1024 go_1_22 = throw "Go 1.22 is end-of-life and 'go_1_22' has been removed. Please use a newer Go toolchain."; # Added 2024-03-28
1025+ go_1_23 = throw "Go 1.23 is end-of-life and 'go_1_23' has been removed. Please use a newer Go toolchain."; # Added 2025-08-13
1026 gogs = throw ''
1027 Gogs development has stalled. Also, it has several unpatched, critical vulnerabilities that
1028 weren't addressed within a year: https://github.com/gogs/gogs/issues/7777
···2045 python = python2; # Added 2022-01-11
2046 python-swiftclient = throw "'python-swiftclient' has been renamed to/replaced by 'swiftclient'"; # Converted to throw 2024-10-17
2047 pythonFull = python2Full; # Added 2022-01-11
2048+ python3Full = throw "python3Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2049+ python310Full = throw "python310Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2050+ python311Full = throw "python311Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2051+ python312Full = throw "python312Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2052+ python313Full = throw "python313Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2053+ python314Full = throw "python314Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set.";
2054 pythonPackages = python.pkgs; # Added 2022-01-11
2055 pypy39 = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03
2056···2251 # spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
2252 spidermonkey = throw "'spidermonkey' has been renamed to/replaced by 'spidermonkey_91'"; # Converted to throw 2024-10-17
2253 spidermonkey_78 = throw "'spidermonkey_78' has been removed because it was unused."; # Added 2025-02-02
2254+ spidermonkey_91 = throw "'spidermonkey_91 is EOL since 2022/09"; # Added 2025-08-26
2255 spidermonkey_102 = throw "'spidermonkey_102' is EOL since 2023/03"; # Added 2024-08-07
2256 spotify-unwrapped = spotify; # added 2022-11-06
2257 spring-boot = throw "'spring-boot' has been renamed to/replaced by 'spring-boot-cli'"; # Converted to throw 2024-10-17
···2571 xmlroff = throw "'xmlroff' has been removed as it is unmaintained and broken"; # Added 2025-05-18
2572 xmr-stak = throw "xmr-stak has been removed from nixpkgs because it was broken"; # Added 2024-07-15
2573 xmake-core-sv = throw "'xmake-core-sv' has been removed, use 'libsv' instead"; # Added 2024-10-10
2574+ xorg-autoconf = util-macros; # Added 2025-08-18
2575 xournal = throw "'xournal' has been removed due to lack of activity upstream and depending on gnome2. Consider using 'xournalpp' instead."; # Added 2024-12-06
2576 xonsh-unwrapped = python3Packages.xonsh; # Added 2024-06-18
2577 xplayer = throw "xplayer has been removed as the upstream project was archived"; # Added 2024-12-27