Commit graph

9451 commits

Author SHA1 Message Date
Martin Weinelt
f2aff81018
applyPatches: passthru outputHashAlog
Fixes evaluation of the find-tarballs.nix script used in the tarballs
mirror pipeline.

```
$ nix-instantiate --eval --json --strict maintainers/scripts/find-tarballs.nix --arg expr 'import maintainers/scripts/all-tarballs.nix' --show-trace
[...]
error:
       … while calling anonymous lambda
         at maintainers/scripts/find-tarballs.nix:3:1:
            2|
            3| {
             | ^
            4|   expr,

       … while evaluating uniqueFiles
         at maintainers/scripts/find-tarballs.nix:105:1:
          104| in
          105| uniqueFiles
             | ^
          106|

       … while calling the 'map' builtin
         at maintainers/scripts/find-tarballs.nix:26:17:
           25|
           26|   uniqueFiles = map (x: x.file) (genericClosure {
             |                 ^
           27|     startSet = map (file: {

       … while calling the 'genericClosure' builtin
         at maintainers/scripts/find-tarballs.nix:26:34:
           25|
           26|   uniqueFiles = map (x: x.file) (genericClosure {
             |                                  ^
           27|     startSet = map (file: {

       … while evaluating type
         at maintainers/scripts/find-tarballs.nix:28:28:
           27|     startSet = map (file: {
           28|       key = with file; (if type == null then "" else type + "+") + hash;
             |                            ^
           29|       inherit file;

       error: attribute 'outputHashAlgo' missing
       at maintainers/scripts/find-tarballs.nix:38:16:
           37|     isPatch = (drv ? postFetch && drv.postFetch != "");
           38|     type = drv.outputHashAlgo;
             |                ^
           39|     name = drv.name;
```
2025-06-08 01:20:38 +02:00
Philip Taron
0d03a88b48
appimageTools: Drop gtk2 (#414230) 2025-06-05 13:02:03 -07:00
Janne Heß
25a38ebfb0
appimageTools: Drop gtk2
Should work since it's not in the linked excludelist anymore: https://github.com/AppImageCommunity/pkg2appimage/blob/master/excludelist
Ref: https://github.com/NixOS/nixpkgs/issues/410814

Tested by running `joplin-desktop`
2025-06-05 14:32:22 +02:00
Johan Herland
abda866f17
fetchurl: Add hook for rewriting/filtering URLs
This allows on-the-fly rewriting of URLs before they are passed from
fetchurl (or fetchurlBoot) to curl.

The intended use is to allow inserting company-internal mirrors, or
working around company firewalls and similar network restrictions,
without having to extensively patch across all of nixpkgs. Instead,
users can pass a function in their nixpkgs that performs the necessary
URL rewrites.

Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>
2025-06-04 10:29:08 +00:00
Nick Cao
abe0e73a27
testers.hasCmakeConfigModules: init (#410516) 2025-06-03 20:40:35 -04:00
Philip Taron
ae61cffc49
fetchpatch: add support for patches to files with apostrophes (#410320) 2025-06-03 08:20:49 -07:00
Philip Taron
b589370df0
tests.fetchgit.fetchTags: fix flaky test by removing .git directory after getting tags (#413311) 2025-06-02 11:56:19 -07:00
Philip Taron
7ee611b07f
tests.fetchgit.fetchTags: fix flaky test by removing .git directory after getting tags
Closes #412967
2025-06-02 10:51:02 -07:00
Pol Dellaiera
6d9d3014ba
treewide: fix typos in comments (#413240) 2025-06-02 18:43:07 +02:00
Peder Bergebakken Sundt
c77ac9dfc3 treewide: fix typos 2025-06-02 16:07:07 +02:00
Paul Meyer
dff25816ad go/policy: some clarification
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2025-06-02 10:37:41 +02:00
qbisi
e4ab873cc1 testers.hasCmakeConfigModules: add self tests 2025-05-31 04:24:58 +08:00
qbisi
11291afcb3 testers.hasCmakeConfigModules: init 2025-05-31 04:24:52 +08:00
Jörg Thalheim
4420d42422 nixos: make squashfs reproducible 2025-05-30 11:34:05 +05:30
Philip Taron
7f8ad4ffb2
fetchgit: add fetchTags parameter (#411561) 2025-05-29 11:19:19 -07:00
Tim Black
1247031689 pkgs/build-support/fetchgit: add fetchTags parameter
Added fetchTags feature to fetchgit, explicit and clear support for
fetching all tags after the source tree fetch completes. Doing this at
build-time in the fetcher is required for packages that invoke commands
like 'git describe' which require tags, and since the nix store is
read-only by design, it is not possible to git fetch --tags at
activation- or run-time. This feature may have been possible by
specifying a postFetch option including calling git fetch --tags,
however doing so obfuscates the solution to this very real problem.
Explicit support for fetching tags should be a first class citizen just
like fetching other refs.
2025-05-28 16:47:34 -07:00
Philip Taron
d69ccb9e38
agda.withPackages: allow installing Agda without GHC using ghc = null; (#411666) 2025-05-28 08:15:19 -07:00
Tsung-Ju Chiang
17501d776b agda.withPackages: allow installing Agda without GHC using ghc = null; 2025-05-28 22:59:43 +08:00
Marcel Müller
842fa7428c vmTools: Use nixfmt-rfc-style from buildPackages set
`pkgs` might not contain the correct derivations if cross-compiling.
Using `buildPackages` ensures that the executables come from the correct
set.

Signed-off-by: Marcel Müller <neikos@neikos.email>
2025-05-27 20:04:15 +02:00
Jeremy Fleischman
1d32087125
fetchpatch: add support for patches to files with apostrophes
We're feeding a list of files from `lsdiff` to `filterdiff` via `xargs`.
That list is newline separated, and looks something like this:

```
$ lsdiff <(curl -s 1e86a219f5.patch)
a/README.md
b/files/The Answer to the Ultimate Question of Life, The Universe, and Everything.txt
```

However, if the list contains files with apostrophes in it, xargs freaks
out:

```
$ echo "there's an apostrophe here" | xargs -I{} python -c "import sys; print(sys.argv)" {}
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
```

The fix is simple, just explicitly specify a delimiter:

```
$ echo "there's an apostrophe here" | xargs -I{} --delimiter='\n' python -c "import sys; print(sys.argv)" {}
['-c', "there's an apostrophe here"]
```

I added 2 tests here:

- `nix-build -A pkgs.tests.fetchpatch.fileWithApostrophe` fails without the code change.
- `nix-build -A pkgs.tests.fetchpatch.fileWithSpace` passes both before
  and after this change, but I wanted to add it to prove that I didn't
  break anything.
2025-05-23 14:32:28 -07:00
Wolfgang Walther
0a666d5335
substituteAll{,Files}: drop 2025-05-23 08:53:46 +02:00
Aleksana
48b56e8fb5
lib.systems: raise minimum loongarch64 feature support (#403201) 2025-05-23 10:00:37 +08:00
Philip Taron
ca4a7eb0cd
writeReferencesToFile: remove entirely
It's been long enough.
2025-05-22 16:14:35 -07:00
aleksana
ff97a3df3b cc-wrapper: add -m{,no-}strict-align and -mcmodel parameter 2025-05-22 19:00:07 +08:00
aleksana
24df6aa12a cc-wrapper: add loongarch64 gcc.arch variants to isGccArchSupported 2025-05-22 19:00:07 +08:00
Philip Taron
a16efe5d2f
applyPatches: simplify src attribute inheritance (#409614) 2025-05-21 20:53:02 -07:00
Randy Eckenrode
4fbe10f581
Don't trigger the evaluation of apple-sdk in Linux stdenv (#409574) 2025-05-21 23:31:40 -04:00
Peder Bergebakken Sundt
9ec7451ac9 applyPatches: simplify src attribute inheritance.
This fixes the potential mismatch between a `applyPatches` with and without patches, as the latter would not merge the `meta` or `passthru` args.
This is technically a breaking change to the `applyPatches` interface, but there are no instances of this in nixpkgs.
2025-05-22 04:09:52 +02:00
Zhaofeng Li
5953ae56d8 Don't trigger the evaluation of apple-sdk in Linux stdenv
During the Apple SDK revamp of #346043, cc-wrapper and bintools-wrapper
were modified to automatically add a fallback SDK if $DEVELOPER_DIR is
not set [^1]. However, because of the order of the && operands,
apple-sdk is always evaluated even when it's not needed.

Flip the && operands so we only trigger the evaluation when targeting
Darwin.

[^1]: 51755b0c00
2025-05-21 16:53:22 -06:00
Philip Taron
6e1c539136
tests: eval and build more tests (#405702) 2025-05-20 16:58:59 -07:00
Emily
8b03b63301 vmtools.diskImageFuns: drop EOL distributions
These went back as far as 2011, and none of them are in active security
support. We shouldn’t ship them without a warning and I doubt anyone
is using them with a recent Nixpkgs.
2025-05-20 16:54:51 +01:00
Shogo Takata
00efca8c0c
dockerTools: fix build failure when building in vm
Fixes build failure for nixos.tests.docker-tools.
The tar command below the changed line relied on the $out directory
being created but it is not being created after the commit below.
97ed6b4565
2025-05-20 18:46:48 +09:00
Atemu
506bec1d86
testers.shellcheck: specify script source path (#405192) 2025-05-17 12:20:22 +02:00
jopejoe1
33964ab8ba tests: recurse into more attrs
This makes it so that our ci evals more tests and that hydra builds them, making it possible to catch more regressions.
2025-05-13 20:35:53 +02:00
jopejoe1
48ccdb5d4e tests.importCargoLock.*: remove usage of lib.fileset
The usage of lib.fileset was forbidden in nixpkgs due to a bug in nix.
For more information, see 8725e466ef and the PR it was merged in #369694
2025-05-13 20:28:49 +02:00
nixpkgs-ci[bot]
86051b5e95
Merge master into staging-next 2025-05-13 00:16:56 +00:00
Krsnik
ce440f99cd
typstPackages: skip build phase
Co-authored-by: Gongqi Huang <46938348+cherrypiejam@users.noreply.github.com>
2025-05-12 12:10:45 +02:00
Vladimír Čunát
a0df4882cd
treewide: more accurate pandoc availability check #404599 2025-05-11 10:01:30 +02:00
Florian Klink
180f5a2593
nixos/systemd-initrd: deprecate strip (#404512) 2025-05-10 19:11:16 +03:00
Alyssa Ross
14a2f96a75
treewide: more accurate pandoc/shellcheck availability checks
The actual problem here is that there is no GHC bootstrap tarball for
RISC-V or LoongArch, so the right thing to check here is whether the
platform being used to build GHC has a bootstrap tarball available for
it.  This way, we'll do the right thing in all cases where such a
tarball isn't available, not just riscv64 and loongarch64, without
having to resort to tryEval, which could be hiding all sorts of
problems.

Since we need to refer to (unspliced) buildPackages.pandoc and
buildPackages.shellcheck in the conditionals, I've opted to remove the
pandoc and shellcheck inputs that would be spliced in
nativeBuildInputs and use buildPackages explicitly there as well, to
avoid confusingly having two different instances of the same package
around.
2025-05-10 17:44:12 +02:00
Kristian Krsnik
58afedf468
typstPackages: skip unpack phase
Some typst packages include a Makefile for unit tests, which break the
builds.
Since typst packages are just static files no attempt should be made to
build them.
2025-05-09 20:40:32 +02:00
nixpkgs-ci[bot]
9f2b0a6818
Merge master into staging-next 2025-05-09 06:05:54 +00:00
Winter
19452031ea
fetchurl: don't prefer hashed mirrors by default (#405149) 2025-05-08 23:51:26 -04:00
Gerg-L
98313e2b81
nixos/systemd-initrd: deprecate strip
It only saved ~1MiB of initramfs size, but caused a few issues
like unloadable kernel modules.
2025-05-08 19:08:14 -04:00
nixpkgs-ci[bot]
7b793f256a
Merge master into staging-next 2025-05-08 18:05:13 +00:00
Jan Tojnar
e50f76c7d0 makeHardcodeGsettingsPatch: Add support for schemaExistsFunction
evolution-ews introduced a check for optional schemas, which would skip our hardcoded code paths.
a0c514bd34

Let’s update the semantic patch to also replace the invocations of specified `schemaExistsFunction` for known schemas with `true`.
2025-05-08 18:29:49 +02:00
Will Fancher
cf1934c1a5
make-initrd-ng: fix file permissions (#405190) 2025-05-08 10:26:02 -04:00
nixpkgs-ci[bot]
e3f655d284
Merge master into staging-next 2025-05-08 12:06:26 +00:00
Léana 江
f85b04bd6f
testers.shellcheck: specify script sourcepath 2025-05-08 12:23:13 +02:00
r-vdp
a9c75e7689
make-initrd-ng: fix file permissions
We want to strip the write bit from files after we copied them.
XOR is not the right operator for this, since if the bit is 0 in both
the actual permissions and the mask, then the result will be a 1.
So in practice, we were assigning write permissions for group and others
to all files and we were only stripping the write permissions of the
owner (since the owner had write permissions, and so the result of the
XOR is 0).

The correct thing to do is to AND with the maximum permissions that we
want to maintain (which is the inverse of what we want to strip), so
that only those bits are preserved and the others are always set to 0.
2025-05-08 12:13:50 +02:00