49 Commits
Author SHA1 Message Date
nixpkgs-ci[bot]andGitHub 23ee7d594c Merge master into staging-next 2026-03-14 00:21:49 +00:00
Alexander Bantyev 2839911e81 various: add security-review team as a maintainer
Adds the @NixOS/security-review team as a maintainer to multiple
packages deemed to be important security-wise.

For the motivation of the package list, see:
https://github.com/NixOS/nixpkgs/issues/494349#issuecomment-4005099033
2026-03-05 15:19:44 +01:00
matthewcroughanandAlyssa Ross 25b049670b bash: use -std=c23 when cross compiling with clang
CC and CC_FOR_BUILD do not support the same -std level. For example gnu ->
llvm cross compilation, which is fixed by using a higher -std when cross
compiling

Co-authored-by: Alyssa Ross <hi@alyssa.is>
2026-02-21 19:12:06 +00:00
John Ericson 6a6c4961a2 bash: Fix FreeBSD cross build
See code comment for details on this hacky fix.
2026-01-02 15:24:25 -05:00
David McFarlandandBrian McKenna 8a3548925c bash: fix cygwin build
Co-authored-by: Brian McKenna <brian@brianmckenna.org>
2025-12-05 13:55:26 -04:00
Pol Dellaiera e6de6e6025 bash: minor reformating
- Replace `lib.optional` with `lib.optionals` when dealing with lists
- Remove `with lib;` from `meta`
2025-11-09 12:24:54 +01:00
Pol Dellaiera 151aa96218 bash: replace util-linux with util-linuxMinimal 2025-11-09 12:24:54 +01:00
Pol Dellaiera 7ac1c1c203 bash: fix usage of finalAttrs pattern
Issue introduced in #435033 in 305c5f1f12
2025-11-09 12:24:54 +01:00
Aliaksandr 80f12557f5 treewide: replace "yes" else "no" usages to lib.boolToYesNo 2025-10-21 16:04:34 +03:00
Silvan MosbergerandGitHub b5cadfdf0e bash: Add tests.withChecks passthru to run tests (#435033) 2025-10-10 18:22:13 +00:00
Silvan Mosberger 6d5da10473 bash: Add myself to maintainers 2025-10-08 00:35:15 +02:00
Silvan MosbergerandAlexander Bantyev 305c5f1f12 bash: Add tests.withChecks passthru to run tests
Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
2025-10-08 00:35:13 +02:00
Yuriy Taraday dd12290517 Reapply "stdenv: Add CPE fields to meta"
This reverts commit de74f9caf0.
2025-09-15 17:25:11 +02:00
K900andGitHub de74f9caf0 Revert "stdenv: Add CPE fields to meta" 2025-08-30 09:29:43 +03:00
Yuriy Taraday b0ce3dc09f stdenv: Add CPE fields to meta
Add `identifiers` attr to `meta` attribute with following attrs:
* `cpe` with the full CPE string when available
* `possibleCPEs` with the list of potential CPEs when not all
  information is provided
* `cpeParts` with the destructured CPE string, allowing to override it
  whenever needed
* `v1` attribute set with `cpe` and `cpeParts` from above and a
  guarantee of a backwards-compatible interface

Related issue: https://github.com/NixOS/nixpkgs/issues/354012
2025-08-29 15:40:03 +02:00
Sergei Trofimovich 33a086ac03 bash: update hash following upstream re-release
In https://github.com/NixOS/nixpkgs/pull/427862#issuecomment-3141489866
we found out that `bash` did a re-release to regenerate `.gmo` files.
Let's update the hash.

Closes: https://github.com/NixOS/nixpkgs/issues/429953
2025-08-01 07:08:57 +01:00
Wolfgang Walther 535b720589 Merge branch 'master' into staging-next 2025-07-24 14:27:50 +02:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
nixpkgs-ci[bot]andGitHub e5eafe4042 Merge master into staging-next 2025-07-23 18:05:04 +00:00
Silvan Mosberger 8a6390ee11 bash: Add a comment to a patch
With this, all (non-upstream) patches are commented
2025-07-23 00:55:31 +02:00
Sergei Trofimovich a69b606940 bash: 5.2.p37 -> 5.3p0
Changes: https://lists.gnu.org/archive/html/bug-bash/2025-06/msg00004.html
2025-07-13 20:57:30 +01:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Silvan Mosberger e3491c9e40 bash: Make interactive the default
The status quo of `bash` not being interactive is frustrating for many users,
because trying to use it interactively is just messed up, and
`bashInteractive` is not intuitive and barely discoverable.

This was brought to my (and many others) attention by @stahnma in his
[talk at CfgMgmtCamp 2025](https://cfp.cfgmgmtcamp.org/ghent2025/talk/YUVUTN/),
where he highlighted this as one of the frustrations he ran into when
learning Nix.

Why this is fine:
- No reason for not making interactive the default was given in the original commit (6c6ff6f36f), but probably it was due to the increase in closure size
- The closure size only increases by 6.9MiB (19.5%) today, with the
  added dependency on the store paths for readline and ncurses, which
  are needed on systems in almost all cases anyways
- If somebody really needs to get a more minimal system, they can use
  the newly-introduced `bashNonInteractive` instead now
- Though to apply it consistently, they'll need to do that in an
  overlay like
  ```
  final: prev: {
    bash = self.bashNonInteractive;
  }
  ```

  Or alternatively using the `system.replaceDependencies.replacements`
  NixOS option approach.

While there's also other such `*Interactive` packages that could use the
same treatment, `bash` is a great start.

This was already attempted before in
https://github.com/NixOS/nixpkgs/pull/151227, but was not continued for
unknown reason.

To avoid stdenv becoming bigger, all uses of bash in the (working)
stdenv's are changed to the explicitly non-interactive version here.

This commit will however still cause a mass rebuild for all packages (and reverse deps)
making use of the default bash.
2025-02-05 00:31:46 +01:00
Silvan Mosberger 10053c5dfd bash: Deprecate unnecessary withDocs flag
Bash is distributing the rendered docs with the source,
so no build tools are used or needed anymore.

This was not the case originally, see dd91141a06
2025-02-05 00:31:46 +01:00
ColinandArne Keller 4eb1020650 bash: define DEFAULT_LOADABLE_BUILTINS_PATH for non-FHS builds
this compile-time constant becomes the runtime value for
BASH_LOADABLES_PATH when otherwise not set. it was added in bash 4.4,
with an upstream default of:
"/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:."
(see: <https://git.savannah.gnu.org/cgit/bash.git/tree/config-top.h?h=bash-5.2#n83>)
and is documented here:
<https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#index-enable>

nixpkgs' bash already builds these loadables: this patch simply improves
the ergonomics, from:

```
bash -i
$ BASH_LOADABLES_PATH="$(dirname $(which bash))/../lib/bash"
$ enable -f realpath realpath
$ realpath ...
```

to:

```
bash -i
$ enable -f realpath realpath
$ realpath ...
```

Co-authored-by: Arne Keller <2012gdwu+github@posteo.de>
2024-12-02 23:15:54 +00:00
Audrey DutcherandArtemis Tosini 928b4da58e bash: add FreeBSD to static cross compilation special case 2024-11-04 03:13:32 +00:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
ArtturinandAlyssa Ross 8c116c6112 bash: badPlatforms mingw
`bash` doesn't compile for `mingw`

https://www.github.com/NixOS/nixpkgs/issues/333338
2024-09-12 08:23:58 +02:00
Emily b62cfa99c3 bash: add upstream fix for pop_var_context error
Closes: #214822
2024-08-01 15:35:34 +01:00
Emily a76707e813 bash: 5.2p26 -> 5.2p32
Replace one patch with its upstream version.
2024-08-01 15:35:17 +01:00
Jörg Thalheimandaleksana 5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
Anderson Torres c5aa149ef9 bash-5: remove dtzWill as maintainer [orphan]
Since theey is not active in a long span of time.
2024-07-17 12:12:56 -03:00
John Ericson 97550cd031 bash: Fix OpenBSD build
See added code comment for details
2024-06-29 13:14:51 -04:00
Audrey DutcherandJohn Ericson 846de80d1c various: Enable updateAutotoolsGnuConfigScriptsHook
Prior to August 2023, any config.guess generated by autoconf will
include a hardcoded /usr/bin/uname invocation for FreeBSD on any
architecture other than arm. This clearly doesn't work under nix.
We must then update or otherwise patch each old config.guess.
2024-05-27 11:09:28 -04:00
Audrey DutcherandAlyssa Ross fc246ead19 bash: Fix build on FreeBSD cross 2024-05-18 10:04:17 +02:00
Sergei Trofimovich 4181c1f587 bash: 5.2p21 -> 5.2p26
While at it exposed patch suffix as a `version` attribute.
2024-01-17 11:08:09 +00:00
ArtturiandGitHub b6e0319318 Merge pull request #257358 from Artturin/bashunnecessaryexplici 2023-09-30 22:58:33 +03:00
Artturin 6c73dc6746 bash: Remove unnecessary explicit passing of binutils
`binutils` for darwin was added in (add binutils to bash build for size)[9c153e2227].

The override was added in (bash: provide a working binutils)[9e05276949].
2023-09-26 04:05:52 +03:00
Vladimír Čunát 223b83ca54 Merge #250128: bash: disable bash-malloc everywhere
...into staging
2023-09-16 15:42:10 +02:00
Sergei Trofimovich 8708ae0e37 bash: disable bash-malloc everywhere, not just on musl
TIme to time I bump into pathological behaviour of `bash` memory
allocator. Today's example:

    $ time { ls /nix/store/ > /dev/null; }
    real    0m0,965s user    0m0,876s sys     0m0,087s
    $ time { echo /nix/store/* > /dev/null; }
    real    2m18,287s user    2m17,946s sys     0m0,125s
    $ time { echo /nix/store/* > /dev/null; }
    real    0m1,764s user    0m1,712s sys     0m0,048s

Note how initial `echo` takes alsmot 2 minutes to finish.

Let's rely  on system's allocator instead.

After the change initial run is fast again:

    $ time { echo /nix/store/* > /dev/null; }
    real    0m1,328s user    0m1,264s sys     0m0,063s
2023-08-19 08:39:13 +01:00
Sergei Trofimovich 99e148dd27 bash: fix parallel build failure on unwind_prot.o
As reported by Robert Scott in https://github.com/NixOS/nixpkgs/pull/245066
without the change `make -j8` build of `make` occasionally fails to
buildin parallel. The simplest reproducer is:

    $$ ./configure
    $$ make unwind_prot.o
    ...
    In file included from unwind_prot.c:51:
    In file included from ./bashintl.h:30:
    ./include/gettext.h:27:11: fatal error: 'libintl.h' file not found
    # include <libintl.h>
              ^~~~~~~~~~~
    1 error generated.
    make: * [Makefile:106: unwind_prot.o] Error 1

The change adds missing ttransitive `${LIBINTL_H}` dependency for
unwind_prot.o.
2023-07-24 23:23:14 +01:00
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
github-actions[bot]andGitHub 87f957b5e2 Merge master into staging-next 2023-02-12 16:02:45 +00:00
Sandro Jäckel d5e55b8df9 bash: add pkgsStatic.bash to passthru
to prevent regressions on updates
2023-02-12 13:48:04 +01:00
Alyssa Ross c9a88f969d bash: add debug info 2023-01-29 10:47:01 +00:00
Alyssa Ross e049b85910 bash: apply static fix unconditionally
To ease maintenance.
2023-01-23 15:59:25 +00:00
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Alyssa Ross be0d0f2905 pkgsStatic.bash: fix build
Link: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00000.html
2023-01-13 13:12:40 +00:00
Markus NapierkowskiandSandro Jäckel aae36e6869 bash: 5.1 -> 5.2 2022-12-28 21:05:43 +01:00