Commit Graph

5887 Commits

Author SHA1 Message Date
linsui
7d8f9ee62e build-rust-package: cargoSha256 and cargoHash must not be null 2022-08-21 17:09:09 +08:00
linsui
51a6ac79d2 fetch-cargo-tarball: fix for packages without dep 2022-08-21 16:28:28 +08:00
linsui
656e3022f4 fetch-cargo-tarball: allow use index mirror 2022-08-21 16:28:28 +08:00
Theodore Ni
1f6366d38c
cc-wrapper: fortran: enable stackprotector on M1
Was failing due to https://github.com/iains/gcc-darwin-arm64/issues/54,
fix picked up in https://github.com/NixOS/nixpkgs/pull/186477.
2022-08-19 16:41:36 -07:00
Sandro
5b76f42372
buildGo{Module,Package}: don't run vet linter 2022-08-20 07:37:14 +10:00
github-actions[bot]
767bdf0d81
Merge master into staging-next 2022-08-19 00:03:25 +00:00
Zhaofeng Li
3d07ae8afd build-dotnet-module: Allow specifying the output path of fetch-deps 2022-08-18 13:49:45 -06:00
Zhaofeng Li
1528ce3063 nuget-to-nix: Make exclusion file optional 2022-08-18 13:49:45 -06:00
github-actions[bot]
6406c43ce5
Merge master into staging-next 2022-08-18 18:01:17 +00:00
Evan Petousis
b4de4dc3bf
buildDotnetModule: set fetch-deps utils via PATH 2022-08-18 23:46:37 +10:00
Evan Petousis
c51e1a1fba
buildDotnetModule: use coreutils in fetch-deps
cp on macOS doesn't support the -T flag, which causes the fetch-deps
script to fail. Use Nix's coreutils to ensure the script works
consistently across all platforms.
2022-08-18 23:36:25 +10:00
Evan Petousis
d7728dfc67
buildDotnetModule: use platform-agnostic cp format
cp on macOS doesn't support the -T flag, which causes the fetch-deps
script to fail. Appending `/.` to the source argument replicates the
same functionality.
2022-08-18 23:35:50 +10:00
github-actions[bot]
87085e3d62
Merge master into staging-next 2022-08-18 00:02:31 +00:00
K900
59888d2218 build-fhs-userenv-bubblewrap: fix eval 2022-08-17 22:36:45 +03:00
Pascal Bach
6af1c99422
Merge pull request #132963 from jonringer/plex-on-aarch64
plex: allow use on non-x86 platforms
2022-08-17 20:14:38 +02:00
github-actions[bot]
954d3734e9
Merge master into staging-next 2022-08-17 12:01:28 +00:00
Alex James
c9af898255
dockerTools.buildImage: make VM memSize configurable
Fixes #186752. This adds buildVMMemorySize (defaults to 512 MiB) to
buildImage, which is passed to vm.runInLinuxVM. This is needed for
larger base images, which may otherwise cause container build failures
due to OOM in the VM.
2022-08-16 21:47:29 -05:00
github-actions[bot]
4e717ab958
Merge staging-next into staging 2022-08-15 06:01:47 +00:00
Adam Joseph
58e5bd56d6 default-crate-overrides.nix: add libevdev for evdev-rs 2022-08-14 21:20:55 -07:00
Sebastián Mancilla
d2df2fcfad
Merge pull request #180087 from aaronjheng/bazel
buildBazelPackage: allow custom impureEnvVars
2022-08-14 22:08:51 -04:00
Sebastián Mancilla
10a745eac8
Merge pull request #179896 from erikarvstedt/fix-bash-exit-handler
treewide: fix bash exit handlers
2022-08-14 21:42:41 -04:00
github-actions[bot]
842c52c5ba
Merge staging-next into staging 2022-08-15 00:03:15 +00:00
Winter
dbd18a63a7 fetchgit: allow disabling cone mode for sparse checkouts, fix test 2022-08-14 23:03:07 +02:00
github-actions[bot]
7ef4d517f3
Merge staging-next into staging 2022-08-14 18:01:52 +00:00
Ivv
7ec728db17
Merge pull request #181512 from mdarocha/dotnet-6-update
dotnet-sdk: 6.0.301 -> 6.0.400, refactor to streamline dotnet updates
2022-08-14 15:08:43 +02:00
Jörg Thalheim
f08b424f73
Merge pull request #186443 from yu-re-ka/feature/rustc-musl2
fix pkgsMusl.rustc
2022-08-13 16:39:56 +01:00
Yureka
51c62063e3 cargoSetupHook: set crt-static
Tell rust if we want our binaries linked statically or dynamically.
Otherwise the compiler will always produce statically linked binaries for musl
targets, as this is the default.
2022-08-13 15:25:41 +02:00
Yureka
66ac47bdf6 cargoSetupHook: remove unneeded rustflags for aarch64+static cross
The linked issue was resolved upstream and the `-lgcc` is no longer required
since https://github.com/rust-lang/compiler-builtins/pull/377 was merged.
2022-08-13 15:24:14 +02:00
Robert Hensing
c078d552fe wrapGAppsHook: Set name
The previous commit, removing substitutions, causes a mass rebuild,
so we use the opportunity to set the name; also a mass rebuild.
2022-08-13 11:53:06 +02:00
Robert Hensing
e8a38a2f52 makeSetupHook: Deprecate substitutions.passthru 2022-08-13 11:53:06 +02:00
Robert Hensing
4dc28e0057 setup hooks: substitutions.passthru -> passthru 2022-08-13 10:29:10 +02:00
Shamrock Lee
ba895a7da8 trivial-builders.nix: Add input argument passthru to makeSetupHook
One significant use case is adding `passthru.tests` to setup-hooks,
and help increase test coverage for mission-critical setup-hooks.

As `meta`, `passthru` doesn't go into the build script directly.
However, passing an empty set to `passthru` breaks nixpkgs-review
and OfBorg tests, so pass it only when specified.
2022-08-13 04:20:12 +08:00
github-actions[bot]
3e8df11515
Merge staging-next into staging 2022-08-11 12:02:11 +00:00
Guillaume Maudoux
11976981f5
Merge pull request #185021 from mdarocha/fix-self-contained
buildDotnetModule: fix build for dotnet-sdk versions below 6
2022-08-11 12:04:16 +02:00
Sergei Trofimovich
3ceb8a59a6
Merge pull request #185537 from trofi/decouple-strip-and-separate-debug
setup-hooks/separate-debug-info.sh: don't inhibit strip hook
2022-08-11 08:53:24 +01:00
mdarocha
a3fff0c947 buildDotnetModule: exclude sdk-specific packages in fetch-deps result 2022-08-10 16:26:49 +02:00
mdarocha
886280e8a9 buildDotnetModule: include sdk-specific packages in nuget source
Some packages are defined by the build proccess, and change every time
the dotnet-sdk package changes. To avoid having to regenerate every
dependant packages dependencies every dotnet update, this moves these
packages into the `dotnet-sdk` `passthru` attribute, and includes them
every time `buildDotnetModule` is used.
2022-08-10 16:26:43 +02:00
github-actions[bot]
67f5b5a85d
Merge staging-next into staging 2022-08-08 18:02:11 +00:00
adisbladis
5cc12aa8cb
Merge pull request #182187 from adisbladis/newlib-nano-cc
newlib-nano: Set same flags as regular newlib in cc-wrapper/gcc config
2022-08-08 22:07:57 +08:00
github-actions[bot]
c5367ef65c
Merge staging-next into staging 2022-08-07 12:02:20 +00:00
Sergei Trofimovich
b3b672d5a1 setup-hooks/separate-debug-info.sh: don't inhibit strip hook
Before the change separate-debug-info.sh did the stripping itself.
This scheme has a few problems:
1. Stripping happens only on ELF files. *.a and *.o files are skipped.
   Derivations have to do it manually. Usually incorrectly
   as they don't run $RANLIB (true for `glibc` and `musl`).
2. Stripping happens on all paths. Ideally only `stripDebugList` paths
   should be considered.
3. Host strip is called on Target files.

This change offloads stripping logic to strip hook. This strips more
files for `glibc` and `musl`. Now we can remove most $STRIP calls
from individual derivations.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-08-07 12:49:37 +01:00
zowoq
9a49ca9f9a buildGo{Module,Package}: move to build-support/go 2022-08-07 18:26:01 +10:00
zowoq
621cc6c813 garble: move to development/tools 2022-08-07 18:26:01 +10:00
Sergei Trofimovich
57080facf2
Merge pull request #184908 from trofi/expand-gcc-strip
gcc: extend stripping of .a libraries and .o objects
2022-08-06 17:17:10 +01:00
Sergei Trofimovich
e58a10f3c9
Merge pull request #184251 from trofi/avoid-hyphens
bintools-wrapper, cc-wrapper: avoid invalid export of 'expand-respons…
2022-08-06 17:16:12 +01:00
olaf
5a6853b3bf use consistently user alice for examples 2022-08-05 13:13:24 +02:00
Sergei Trofimovich
c817efe660 gcc: extend stripping of .a libraries and .o objects
The initial intent was to strip .a and .o files, not .a.o files.
While at it expanded stripping for $lib output as well.

Without the change `libgcc.a` was not stripped and `.debug*` sections
made into final binaries. It's not a problem on it's own, but it's an
unintended side-effect. Noticed on `crystal_1_0` test failure where
`crystal` was not able to handle `dwarf-5`.

While at it allowed absolute file names to be passed to stripDebugList
and friends.
2022-08-03 22:28:47 +01:00
K900
eabbad8af1
Merge pull request #185036 from K900/goblinization
make-initrd-ng: parse ELFs ourselves instead of shelling out to patchelf and friends
2022-08-03 19:57:55 +03:00
mdarocha
134da4ce36 buildDotnetModule: fix build for dotnet-sdk versions below 6
The --self-contained and --no-self-contained switches were
added to the dotnet build command starting with .NET 6.
The switch is equivalent to the setting the SelfContained
property, so we use the property for backwards compatibility.
2022-08-03 16:15:59 +02:00
github-actions[bot]
537fbd1326
Merge master into staging-next 2022-08-03 00:02:25 +00:00
ash lea
488056a418 steam: fix opengl inside pressure-vessel 2022-08-02 13:48:34 -07:00
github-actions[bot]
411aad5a4d
Merge master into staging-next 2022-08-02 18:01:14 +00:00
K900
de93795b46 make-initrd-ng: clean up a bit 2022-08-02 10:54:55 +03:00
Linus Heckemann
ee38010981 makeInitrdNG: add meta and update script 2022-08-02 10:54:55 +03:00
Linus Heckemann
6fc909a1cc makeInitrdNG: make stripping fully optional
Now the tool will only strip binaries if a strip executable is passed
via the STRIP environment variable. This is exposed via the strip
option for makeInitrdNG and the NixOS option boot.initrd.systemd.strip.
2022-08-02 10:19:48 +03:00
K900
daee67dae6 make-initrd-ng: use goblin instead of shelling out to patchelf and friends 2022-08-02 10:19:48 +03:00
K900
1356441cb1 make-initrd-ng: rustfmt 2022-08-02 10:19:48 +03:00
John Ericson
cc29693a09 buildRustCrate: Add support for standard library deps
We are replicating one mechanism behind `-Z build-std`.

There isn't yet crate2nix support for this, but one can (and I do) add
the missing stdlib deps (for this feature to pick up) with overrides.
2022-08-01 15:34:49 -04:00
Sergei Trofimovich
549e08c8e8 bintools-wrapper, cc-wrapper: avoid invalid export of 'expand-response-params'
POSIX sh (and `bash`) impose a restriction on environment variable name
format and disallow hypheps in the names. Normally it's not a problem
as nothing usually tries to refer nyphenated names.

One exception is `nix develop` (https://github.com/NixOS/nix/issues/6848):

    $ nix develop -f. gcc -L
    gcc-wrapper> ...-get-env.sh: line 70: expand-response-params: bad substitution

Note that bash usually uses explicitly created `expandResponseParams`
variant of the same variable.

To work the problem around let's avoid environment variable export and move
it to `passthru` for `cc` (used ina  few places) and remove it completely for
`binutils` (does not seem to be used at all).
2022-07-31 16:31:13 +01:00
github-actions[bot]
15686bdd94
Merge master into staging-next 2022-07-30 18:01:31 +00:00
Sergei Trofimovich
f2e3c9efff
Merge pull request #183415 from dramforever/uclibc-dyld
bintools-wrapper: Add dynamicLinker for uClibc
2022-07-30 18:39:06 +01:00
Vladimír Čunát
5b5843e2b2
Merge #151983: wrapper: Fortran: disable stackprotector
...hardening on darwin aarch64 (merge into staging)
2022-07-29 19:27:34 +02:00
Artturi
2679e22074
Merge pull request #183461 from Artturin/crossfixes1 2022-07-29 01:36:57 +03:00
Artturin
0e16aa7b56 bintools-wrapper: symlink ar too
missed this in 1d44ac176c
2022-07-28 23:44:20 +03:00
dramforever
22ac2bce66 bintools-wrapper: Add dynamicLinker for uClibc 2022-07-29 01:43:36 +08:00
github-actions[bot]
437247fc43
Merge staging-next into staging 2022-07-28 12:02:23 +00:00
ajs124
349612483d
Merge pull request #182940 from helsinki-systems/feat/fetchncapp-pname 2022-07-28 12:47:23 +02:00
Sandro
f358b0d40d
Merge pull request #182273 from mdarocha/dotnet-self-contained-build
buildDotnetModule: add option to make a self-contained build
2022-07-28 11:59:09 +02:00
Bernardo Meurer
88c63ca65a
Merge pull request #182513 from trofi/strip-for-host-and-target
gcc: enable stripping for cross-compilers
2022-07-28 00:30:49 -07:00
github-actions[bot]
9153131664
Merge staging-next into staging 2022-07-27 12:02:00 +00:00
github-actions[bot]
9ed58a6fb6
Merge master into staging-next 2022-07-27 12:01:18 +00:00
Lassulus
63218387d8
Merge pull request #182101 from ezemtsov/patch-2
nuget-to-nix: fallback to default URL for directories
2022-07-27 10:58:12 +02:00
mdarocha
19403a85d9 buildDotnetModule: add option to make a self-contained build 2022-07-26 18:00:15 +02:00
Vladimír Čunát
cb704bf922
fetchurl: disallow specifying both sha256 and hash
A full check would be more complicated to write -
and more importantly - probably also more expensive.

Motivation: eval-time catch for errors like in commit 8198636be0.
2022-07-26 12:47:14 +02:00
ajs124
0ce971e5d2 fetchnextcloudapp: name -> pname
this way name and the storepath contain the version, which can be useful
sometimes
2022-07-26 10:58:06 +02:00
Sergei Trofimovich
0507725061 setup-hooks/strip.sh: run RANLIB on static archives after stripping
'strip' does not normally preserve archive index in .a files.
This usually causes linking failures against static libs like:

    $ nix build --no-link -f. pkgsCross.mingw32.re2c
    > ...-i686-w64-mingw32-binutils-2.38/bin/i686-w64-mingw32-ld:
      /nix/store/...-i686-w64-mingw32-stage-final-gcc-13.0.0-lib/i686-w64-mingw32/lib/libstdc++.dll.a:
        error adding symbols: archive has no index; run ranlib to add one

We restore the index by running ranlib explicitly.
2022-07-25 11:06:58 +01:00
Sergei Trofimovich
0f45ce6e77 setup-hooks/strip.sh: add strip{All,Debug}ListTarget variables
This change mimics existing strip{All,Debug}List variables to
allow special stripping directories just for Target.

The primary use case in mind is gcc where package has to install
both host and target ELFs. They have to be stripped by their own
strip tools accordingly.

Co-authored-by: Rick van Schijndel <Mindavi@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-25 11:06:45 +01:00
Evgeny Zemtsov
7ab35bdaa6 nuget-to-nix: fallback to default URL for directories
In some cases `$pkgs_src` can be a path. For example with `FSharp.Core` when it comes with dotnet SDK.
In these cases we need to fallback on default URL otherwise curl fails.
2022-07-25 11:05:10 +02:00
John Ericson
21966e13d2
Merge pull request #181943 from trofi/fix-cross-built-gcc
gcc: pass --with-build-sysroot=/
2022-07-23 23:52:07 -04:00
Sergei Trofimovich
34636efced gcc: pass --with-build-sysroot=/ for gcc builds
Without this change cross-built gcc fails to detect stack protector style:

    $ nix log -f pkgs/stdenv/linux/make-bootstrap-tools-cross.nix powerpc64le.bootGCC | fgrep __stack_chk_fail
    checking __stack_chk_fail in target C library... no
    checking __stack_chk_fail in target C library... no

It happens because gcc treats search paths differently:

    https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/configure.ac;h=446747311a6aec3c810ad6aa4190f7bd383b94f7;hb=HEAD#l2458

     if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x ||
        test x$build != x$host || test "x$with_build_sysroot" != x; then
       ...
       if test "x$with_build_sysroot" != "x"; then
         target_header_dir="${with_build_sysroot}${native_system_header_dir}"
       elif test "x$with_sysroot" = x; then
         target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
       elif test "x$with_sysroot" = xyes; then
         target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
       else
         target_header_dir="${with_sysroot}${native_system_header_dir}"
       fi
     else
       target_header_dir=${native_system_header_dir}
     fi

By passing --with-build-sysroot=/ we trick cross-case to use
`target_header_dir="${with_sysroot}${native_system_header_dir}"`
which makes it equivalent to non-cross
`target_header_dir="${with_build_sysroot}${native_system_header_dir}"`

Tested the following setups:
- cross-compiler without libc headers (powerpc64le-static)
- cross-compiler with libc headers (powerpc64le-debug)
- cross-build compiler with libc headers (powerpc64le bootstrapTools)

Before the change only 2 of 3 compilers detected libc headers.
After the change all 3 compilers detected libc headers.

For darwin we silently ignore '-syslibroot //' argument as it does not
introduce impurities.

While at it dropped mingw special case for no-libc build. Before the change
we passed both '--without-headers --with-native-system-headers-dir' for
no-libc gcc-static builds. This tricked darwin builds to find sys/sdt.h
and fail inhibid_libc builds. Now all targets avoid passing native headers
for gcc-static builds.

While at it fixed correct headers passing to
--with-native-system-headers-dir= in host != target case: we were passing
host's headers where intention was to pass target's headers.
Noticed the mismatch as a build failure on pkgsCross.powernv.stdenv.cc
on darwin where `sys/sdt.h` is present in host's headers (libSystem)
but not target's headers (`glibc`).

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2022-07-23 18:40:07 +01:00
Artturi
981d9c0926
Merge pull request #182385 from Artturin/bintoolswrapper1
bintools-wrapper: symlink unsymlinked binaries from -unwrapped
2022-07-23 08:07:43 +03:00
Sergei Trofimovich
17f413f293 setup-hooks/strip.sh: use STRIP_FOR_TARGET, not TARGET_STRIP
Since 1ac53985 "*-wrapper; Switch from `infixSalt` to `suffixSalt`"
(2020) 'TARGET_' prefix (and infix) is no more. '_FOR_TARGET' suffix
is the only used suffix for target-specific tools and flags.

Use that in stip instead of always-empty variable.
2022-07-22 18:38:02 +01:00
toonn
946c3d8389
Merge pull request #181485 from Itaros/normal-clang-llvm-redirection
cc-wrapper: broaden explicit libc++abi linking for LLVM stdenv
2022-07-22 16:41:25 +02:00
Artturin
e682dd84cf bintools-wrapper: symlink unsymlinked binaries from -unwrapped
this shouldn't change any binary available in the default build environment
because bintools-unwrapped is already in path ( idk where it comes from but i know because objcopy is in path but not in the wrapper )

this just makes all the binaries available under 'bintools' instead of
having to use 'bintools-unwrapped'

reduces confusion because now 'objcopy' and others will be in 'bintools'
2022-07-22 02:48:29 +03:00
Martin Weinelt
b4988e25b5 maturin: 0.12.9 -> 0.13.0 2022-07-21 22:35:32 +02:00
John Ericson
c38de9b3f2
Merge pull request #181525 from alyssais/rust-debug
separateDebugInfo: enable full Rust debug info
2022-07-21 13:09:19 -04:00
Anderson Torres
b73f704a2f
Merge pull request #178567 from Artturin/pkgconfignew
makePkgconfigItem: init new function to generate pc files
2022-07-20 23:31:58 -03:00
Sergei Trofimovich
cf2e2a65ae
Merge pull request #182143 from hamishmack/patch-7
libredirect: Fix cross compilation `buildPackages`
2022-07-20 15:41:39 +01:00
adisbladis
d5fb429c7d cc-wrapper: Set correct hardening_unsupported_flags for newlib-nano 2022-07-20 16:41:48 +08:00
Artturin
7249b8a2f3 makePkgconfigItem: init new function to generate pc files
A function to generate pkg-config files for Nix packages that need to create them ad hoc,
like blas and lapack.

Inspiration taken from `makeDesktopItem`.
2022-07-20 06:22:39 +03:00
Hamish Mackenzie
b5250a333b
libredirect: Fix cross compilation buildPackages
Currently when cross compiling the `buildPackages.libredirect` has the wrong dynamic library extension.

To reproduce the issue run something like:

```
file $(nix-build -A pkgsCross.mingwW64.buildPackages.libredirect)/lib/libredirect.dll
/nix/store/80llmqa9lkabg3qnmglngzz22fwf739q-libredirect-0/lib/libredirect.dll: Mach-O 64-bit dynamically linked shared library x86_64
```

or

```
nix-diff $(nix-instantiate -A libredirect) $(nix-instantiate -A pkgsCross.mingwW64.buildPackages.libredirect)
```
2022-07-20 10:26:48 +12:00
John Ericson
39811b1da9 build-support/rust/lib: make arch and os functions respect target JSON 2022-07-18 22:54:19 -04:00
Robert Hensing
17019dcf9a
Merge pull request #177039 from Sciencentistguy/makeDesktopItem-overridable
build-support/makeDesktopItem: make overridable
2022-07-16 20:37:06 +02:00
Rick van Schijndel
e243499338
Merge pull request #173889 from IvarWithoutBones/fix/dotnet-cross
dotnet ecosystem: fix cross compilation
2022-07-16 12:37:11 +02:00
zowoq
0c98db7b91 dockerTools: use list of strings for configureFlags 2022-07-15 10:23:07 +10:00
Alyssa Ross
d7fff81159
separateDebugInfo: enable full Rust debug info
By default, Cargo will only enable line tables.  -g enables full debug
info.  The RUSTFLAGS environment variable is examined by Cargo,
similar to how the NIX_*FLAGS* variables are examined by our compiler
wrappers.
2022-07-14 21:44:12 +00:00
Ivv
2ca3a5e4aa
Merge pull request #179187 from mdarocha/eventstore-bump-and-refactor
eventstore: 5.0.8 -> 21.10.5, refactor to use buildDotnetModule
2022-07-14 20:30:41 +02:00
Semion Nadezhdin
b060076e21 cc-wrapper: broaden explicit libc++abi linking for LLVM stdenv 2022-07-13 21:19:12 +03:00
adisbladis
8619d75795
Merge pull request #181174 from ttuegel/emacs-wrapper-package-el
emacsWithPackages: Rely on package.el for autoloads
2022-07-14 00:57:30 +08:00
mdarocha
98db245db7 buildDotnetModule: explicitly set UseAppHost to true
On macOS, the native executable is not generated by default
on Catalina and above. See https://github.com/dotnet/sdk/issues/10780
2022-07-13 17:15:39 +02:00
mdarocha
3d79e4871b buildDotnetModule: set LD_LIBRARY_PATH from runtimeDeps in dotnetCheckHook
Tests should execute in a similar environment to the final app
2022-07-13 17:15:36 +02:00
Evgeny Zemtsov
8d79dfe6f0 nuget-to-nix: enable default netrc
Enable default netrc for curl command. Otherwise this doesn't work for private repositories that require authentication.
2022-07-12 21:11:57 +02:00
Thomas Tuegel
017fa2d7a0
emacsWithPackages: Rely on package.el for autoloads
The builtin `package.el` functionality is necessary and sufficient to handle
autoloads in the Emacs wrapper.
2022-07-11 20:22:20 -05:00
Théo Zimmermann
c6815758ac Do not rely on legacy ocaml passthru value. 2022-07-08 14:33:24 +02:00
Robert Hensing
613e768608
Merge pull request #179801 from hercules-ci/fix-footgun-dockerTools-buildImage-contents
dockerTools.buildImage: Add copyToRoot to replace contents, explain usage
2022-07-07 09:51:41 +02:00
Robert Hensing
e007eb480c dockerTools.buildImage: Add copyToRoot to replace contents, explain usage 2022-07-06 07:30:24 +02:00
Aaron Jheng
80ba8111d4
buildBazelPackage: allow custom impureEnvVars 2022-07-04 08:29:23 +00:00
Thiago Kenji Okada
8f58bc3a1d buildGraalvmNativeImage: allow LC_ALL overrides 2022-07-03 18:16:38 +01:00
sternenseemann
f76ac449d1 srcOnly: fix with separateDebugInfo and/or multiple outputs
Before this change `srcOnly git` gives:

    duplicate derivation output 'debug', at pkgs/stdenv/generic/make-derivation.nix:270:7

This was because separateDebugInfo = true was passed on to the srcOnly
mkDerivation as well as the outputs list _including_ the debug output.
Luckily we don't need to untangle this mess since srcOnly is only
supposed to have a single output anyways.
2022-07-02 19:32:24 +02:00
Erik Arvstedt
3f54dfa475
treewide: fix bash exit handlers
Transform exit handlers of the form
trap cleanup EXIT [INT] [TERM] [QUIT] [HUP] [ERR]
  (where cleanup is idempotent)
to
trap cleanup EXIT

This fixes a common bash antipattern.

Each of the above signals causes the script to exit. For each signal,
bash first handles the signal by running `cleanup` and then runs
`cleanup` again when handling EXIT.
(Exception:  `vscode/*` prevents the second run of `cleanup` by removing
the trap in cleanup`).

Simplify the cleanup logic by just trapping exit, which is always run
when the script exits due to any of the above signals.

Note: In case of borgbackup, the exit handler is not idempotent, but just
trapping EXIT guarantees that it's only run once.
2022-07-02 16:13:12 +02:00
Robert Hensing
1e17bb943e
Merge pull request #164662 from infinisil/fetchurl-curlOpts-list
fetchurl: Allow passing curl options with spaces
2022-06-30 21:10:57 +02:00
Silvan Mosberger
588439e131 fetchurl: Add curlOptsList test 2022-06-30 19:49:54 +02:00
Sebastian Jordan
783e2ef46e Revert "nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone"
This reverts commit 1dfaad73ed.
2022-06-30 11:52:36 +00:00
Profpatsch
a1aed2a716 builders/writeHaskell: build with threaded GHC runtime
Some haskell code starts silently hanging when not built with a
threaded runtime, so let’s assume people using `writeHaskell` don’t
care about micro-optimizations like this and do the expected thing.

Some architectures don’t support a threaded runtime, for these we
provide the `threadedRuntime` option to turn it off (it should fail at
build time in that case, easy to detect).

If somebody already passed `"-threaded"` before via ghcArgs, this
will not add the flag a second time. Thus it’s backward-compatible in
this regard.

I tested out both branches (with `-threaded` set and not set before),
on an example I had where the runtime would hang when not compiled
with `-threaded`.
2022-06-30 10:12:50 +02:00
ajs124
45ec5898cb maintainers: remove tstrobel
was ts468 on github afaict and was actually a committer, but that account hasn't been active since early 2018
2022-06-29 00:54:53 +02:00
Maximilian Bosch
e4bf881ee0
Merge pull request #177575 from seppeljordan/nix-prefetch-git-fix
nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone
2022-06-28 14:03:41 +02:00
github-actions[bot]
506a80a667
Merge staging-next into staging 2022-06-23 00:02:43 +00:00
Robert Hensing
1751679911
Merge pull request #177326 from a-m-joseph/pr/fetchgit/allowedRequisites
fetchgit: inherit allowedRequisites in mkDerivation
2022-06-22 23:21:17 +02:00
github-actions[bot]
9a2405d657
Merge staging-next into staging 2022-06-22 18:02:10 +00:00
Robert Hensing
9d92bee00a
Merge pull request #175474 from hercules-ci/issue-148456-dockerTools-example-etc
dockerTools: Add example of using NixOS' etc
2022-06-22 15:43:29 +02:00
github-actions[bot]
cea2503d73
Merge staging-next into staging 2022-06-21 18:01:45 +00:00
Ivv
8168651288
Merge pull request #178446 from zimbatm/dotnet-nugetdeps
buildDotnetModule: allow passing derivations to nugetDeps
2022-06-21 16:00:48 +02:00
zimbatm
ba2f31b6db
buildDotnetModule: allow passing derivations to nugetDeps
Sometimes I want to pass a different implementation of `mkNugetDeps`.
For example in private repos, it can be handy to use `__noChroot = true`
and bypass the deps.nix generation altogether. Or some Nuget packages
ship with ELF binaries that need to be patched, and that's best done as
soon as possible.
2022-06-21 15:45:52 +02:00
mdarocha
5b7f8d2e43 buildDotnetModule: use src-only in fetch-deps script 2022-06-21 12:13:39 +02:00
mdarocha
fb94bb0b20 src-only: pass all arguments
This allows executing postPatch and other hooks correctly
2022-06-21 12:13:38 +02:00
mdarocha
c277bd86a5 make-nuget-deps: support an url field in fetchNuGet
If a package source defines an url field, use it instead of the
url based on package name and version, which assumes nuget.org as
a package source.
2022-06-21 12:13:37 +02:00
mdarocha
2f07f578b2 nuget-to-nix: support custom package sources
If the package was not restored from nuget.org (determinted by checking
the "source" field of ".nupkg.metadata"), query the custom source for
the package endpoint (the way nuget api is built we can't determine it
without an API query) and build a custom package URL to save in the
generated deps file.
2022-06-21 12:13:34 +02:00
github-actions[bot]
3746a49dcc
Merge staging-next into staging 2022-06-21 00:02:48 +00:00
Ivar Scholten
0d8b21b3c8 buildDotnetModule: fix cross compilation 2022-06-20 21:58:04 +02:00
Robert Scott
0886438a2c
Merge pull request #177308 from risicle/ris-native-source-provenance-appimage
appimageTools.wrapAppImage: default produced derivations to `sourceProvenance` `binaryNativeCode`
2022-06-20 20:02:26 +01:00
Sergei Trofimovich
ef2a9cba19
Merge pull request #178084 from KAction/fix-darwin-bootstrap
cc-wrapper: fix typo in shell script
2022-06-20 18:07:01 +00:00
github-actions[bot]
9f3b3514f1
Merge staging-next into staging 2022-06-19 00:03:16 +00:00
github-actions[bot]
b7aba4fb0f
Merge master into staging-next 2022-06-19 00:02:36 +00:00
Vincent Laporte
af888339b6
mkCoqDerivation: do not set DESTDIR
Fixes #178109
2022-06-18 11:54:21 +02:00
Dmitry Bogatov
6eb689d490
cc-wrapper: fix typo in shell script
Noticed this bug when was trying to bootstrap m4 on darwin. That fixes

	line 163: no such file or directory error

That does not solve all problems staging has on darwin.
2022-06-17 20:25:27 -04:00
github-actions[bot]
8c938c76c8
Merge staging-next into staging 2022-06-16 18:01:58 +00:00
github-actions[bot]
1b3f8ec8e4
Merge master into staging-next 2022-06-16 18:01:17 +00:00
Sandro
c4159a237e
Merge pull request #176095 from SuperSandro2000/prefer-remote-fetch
prefer-remote-fetch: don't overwrite fetcher's which set preferLocalB…
2022-06-16 17:44:41 +02:00
github-actions[bot]
ca38c61118
Merge staging-next into staging 2022-06-16 00:02:52 +00:00
github-actions[bot]
d1886be475
Merge master into staging-next 2022-06-16 00:02:14 +00:00
John Ericson
e23e71f9e4
Merge pull request #176152 from mmlb/cc-wrapper-allow-target-override
cc-wrapper: Allow user to override -target for clang
2022-06-15 15:09:27 -04:00
Sergei Trofimovich
206b2cfd22
Merge pull request #176253 from trofi/fetchzip-forced-UTF-8
fetchzip: force UTF-8 compatible locale to unpack non-ASCII symbols
2022-06-15 18:32:41 +00:00
Chuang Zhu
e3e091672f
fetchYarnDeps: support hash in pkg.integrity (#177255) 2022-06-15 20:13:41 +02:00
Manuel Mendez
0fdc72b7e9 cc-wrapper: Add clang specific options to clang specific file
This way gcc doesn't need to be rebuilt because of clang. This also avoids
rebuilding clang when only the wrapper needs to be tweaked.
2022-06-15 11:34:53 -04:00
github-actions[bot]
7d845ac90c
Merge staging-next into staging 2022-06-15 12:02:14 +00:00
Martin Weinelt
cf610b5257 Merge remote-tracking branch 'origin/master' into staging-next 2022-06-15 13:05:54 +02:00
Alexander Bantyev
a32637f296
Merge pull request #177360 from ilya-fedin/fix-replace-dependency
replace-dependency: fix a syntax error while generating references.nix
2022-06-15 11:21:51 +04:00
Jonathan Ringer
d6915ebb3f
buildFHSUserEnvBubblewrap: allow for non-x86 platforms 2022-06-14 22:13:43 -07:00
Ben Wolsieffer
882741f632 tests.buildRustCrate: add rcgen test
rcgen depends on ring, and therefore exercises support for static libraries
2022-06-14 20:09:33 -04:00
Ben Wolsieffer
a6bbe3f794 buildRustCrate: pass link flags when building libraries
With Rust 1.61, it is necessary to link to external static/dynamic libaries
when building the rlib that uses them, rather than when linking the final
binary. In fact, it is no longer necessary to specify the libraries to link
when building the final binary, but the library search path flags must still
be included.
2022-06-14 20:09:33 -04:00
Sebastian Jordan
1dfaad73ed nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone
The fetchgit function in nixpkgs sets the leaveDotGit argument to true
if deepClone is set to true. nix-prefetch-git did behave differently. It
would not assume --leave-dotGit if --deepClone is specified. With this
change the inconsistency is addressed by assuming --leave-dotGit if
--deepClone is specified.
2022-06-14 00:23:16 +02:00
github-actions[bot]
15c142e5c0
Merge staging-next into staging 2022-06-13 18:02:13 +00:00
github-actions[bot]
6ccd35f78f
Merge master into staging-next 2022-06-13 18:01:35 +00:00
Matthieu Coudron
fb6f9ee28f update-luarocks-package: fix mirrors 2022-06-13 11:17:36 +02:00
Thiago Kenji Okada
299538e834
Merge pull request #172769 from ncfavier/wrappers-append-args
makeWrapper,makeBinaryWrapper: implement `--append-flags`
2022-06-12 11:46:03 +01:00
Ilya Fedin
f767bee1f4 replace-dependency: fix a syntax error while generating references.nix 2022-06-12 06:44:30 +04:00
Adam Joseph
5ed4944130 fetchgit: allow passing allowedRequisites through to stdenv.mkDerivation
When maintainers override stages of `fetchgit' (e.g. `postPatch`) it
is very easy for them to accidentally leak the outpath-hash of their
current `stdenv` into `fetchgit''s output, and therefore into the
value they paste into `sha256`.

This is a problem, because the resulting expression will break
whenever any change is made to `stdenv` or when anybody attempts to
build the expression on a different platform than the one used by the
original maintainer.

Almost as much of a problem is the fact that CI **does not catch**
these problems.  The `fetchgit` is run only once, then its output goes
into cachix, and all future builds (hydra, CI, ofborg) pull from
cachix.

Let's offer maintainers the option to check that they aren't making
this mistake, by passing through `allowedRequisites`.  The default
value is `null`, but it might be worth changing that at some point in
the future.

It is also sometimes difficult to communicate to package maintainers
why their expression is problematic.  Having `allowedRequisites`
passed through makes it easier to do this: "look, when I switch on
`allowedRequisites` your package breaks; are you sure you meant to
hardcode the hash today's `x86_64-linux.stdenv` into your expression?`

For an example use case, see https://github.com/NixOS/nixpkgs/pull/171223

The issue above is part of a larger problem with nixpkgs infra: there
large parts of cachix cannot be reproduced easily if they are lost.
Once something ends goes into cachix, we never ever again reverify the
procedure by which it was placed into cachix.
2022-06-11 12:42:33 -07:00
Robert Scott
6095bc6eb2 appimageTools.wrapAppImage: default produced derivations to sourceProvenance binaryNativeCode 2022-06-11 17:17:12 +01:00
Sergei Trofimovich
ffb456ae61 fetchzip: force UTF-8 compatibel locale to unpack non-ASCII symbols
musl and darwin support UTF-8 locales without any extras. As a result
unzip can unpack UTF-8 filenames there as is. But on glibc without
locale archive presence files get mangled as:

    deps/αβ -> deps/#U03b1#U03b2

This makes `fetchzip` fixed-output derivations unstable.

Tested this change to fail in `coq.src` which was generated in system
that mangles UTF-8 symbols:

    $ nix build -f. coq.src --rebuild -L
    source> trying https://github.com/coq/coq/archive/V8.15.2.zip
    source>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
    source>                                  Dload  Upload   Total   Spent    Left  Speed
    source>   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
    source> 100 8945k  100 8945k    0     0  1513k      0  0:00:05  0:00:05 --:--:-- 1989k
    source> unpacking source archive /build/V8.15.2.zip
    error: hash mismatch in fixed-output derivation '/nix/store/hrnyykm7wgw8vxisgq7hc2bg5gr0y6s8-source.drv':
             specified: sha256-h81nFqkuvZkMR7YLHy7laTq5yOhjMW+w6rYzncxvyD4=
                got:    sha256-DTspmwyD3Evl1CUmvUy2MonbLGUezvsHN3prmP9eK2I=

Note: it means that some of existing caches for fixed output
derivations become incorrect. It should not break already cached
tarballs on cache.nixos.org thus the impact should not be widespread.
2022-06-11 11:25:58 +01:00
Manuel Mendez
19b6ccd9ac cc-wrapper: Allow for override of -target for clang/clang++
This enables users to make use of clang's multi-platform/target support
without having to go through full cross system setup. This is especially useful
for generating bpf object files, I'm not even usre what would a no-userland
cross compile system tuple even look like to even try going that route.

Fixes #176128
2022-06-09 16:57:15 -04:00
Manuel Mendez
e91b5670e3 cc-wrapper: Use case statements instead of bunch of if/elif checks
Makes for easier to read code imo, case-in-point there was a duplicate test for
`$p = -E` before. While doing this little bit of refactor I changed rest ->
kept because that makes more sense, rest sounds like its the rest of params
while kept says these are the params that we've kept.

I tested for no change in behavior using the following bash script:

```
reset() {
	cInclude=1
	cxxInclude=1
	cxxLibrary=1
	dontLink=0
	isCxx=0
	nonFlagArgs=0
	params=()
}

parseParams() {
	declare -i n=0
	nParams=${#params[@]}
	while (("$n" < "$nParams")); do
		p=${params[n]}
		p2=${params[n + 1]:-} # handle `p` being last one

		case "$p" in
		-[cSEM] | -MM) dontLink=1 ;;
		-cc1) cc1=1 ;;
		-nostdinc) cInclude=0 cxxInclude=0 ;;
		-nostdinc++) cxxInclude=0 ;;
		-nostdlib) cxxLibrary=0 ;;
		-x)
			case "$p2" in
			*-header) dontLink=1 ;;
			c++*) isCxx=1 ;;
			esac
			;;
		-?*) ;;
		*) nonFlagArgs=1 ;; # Includes a solitary dash (`-`) which signifies standard input; it is not a flag
		esac
		n+=1
	done
}

for p in c S E M MM; do
	reset
	params=-$p
	parseParams
	[[ $dontLink != 1 ]] && echo "expected dontLink=1 for params:${params[@]}" >&2 && exit 1
done

reset
params=(-x foo-header)
parseParams
[[ $dontLink != 1 ]] && echo "expected dontLink=1 for params:${params[@]}" >&2 && exit 1

reset
params=(-x c++-foo)
parseParams
[[ $isCxx != 1 ]] && echo "expected isCxx=1 for params:${params[@]}" >&2 && exit 1

reset
params=-nostdlib
parseParams
[[ $cxxLibrary != 0 ]] && echo "expected cxxLibrary=0 for params:${params[@]}" >&2 && exit 1

reset
params=-nostdinc
parseParams
[[ $cInclude != 0 ]] && echo "expected cInclude=0 for params:${params[@]}" >&2 && exit 1
[[ $cxxInclude != 0 ]] && echo "expected cxxInclude=0 for params:${params[@]}" >&2 && exit 1

reset
params=-nostdinc++
parseParams
[[ $cxxInclude != 0 ]] && echo "expected cxxInclude=0 for params:${params[@]}" >&2 && exit 1

reset
params=-cc1
parseParams
[[ $cc1 != 1 ]] && echo "expected cc1=1 for params:${params[@]}" >&2 && exit 1

reset
params=-
parseParams
[[ $nonFlagArgs != 1 ]] && echo "expected nonFlagArgs=1 for params:${params[@]}" >&2 && exit 1

reset
params=bleh
parseParams
[[ $nonFlagArgs != 1 ]] && echo "expected nonFlagArgs=1 for params:${params[@]}" >&2 && exit 1

reset
params=-?
parseParams
[[ $nonFlagArgs != 0 ]] && echo "expected nonFlagArgs=0 for params:${params[@]}" >&2 && exit 1

exit 0
```
2022-06-09 16:57:15 -04:00
Jamie Quigley
1f4324c3de
build-support/makeDesktopItem: make overridable 2022-06-09 15:32:44 +01:00
Anderson Torres
78028df447
Merge pull request #174709 from FliegendeWurst/fortran-format-security
cc-wrapper: Fortran: disable format hardening
2022-06-08 22:32:47 -03:00
Sandro Jäckel
43d4ddf28e
treewide: remove usage of runCommandNoCC aliases 2022-06-07 16:57:06 +02:00
Rick van Schijndel
99b94f9522
Merge pull request #168713 from NixOS/appimage-drop-gconf
appimageTools.defaultFhsEnvArgs: Drop GConf
2022-06-03 19:25:26 +02:00
Sandro Jäckel
6c1c885da2
prefer-remote-fetch: don't overwrite fetcher's which set preferLocalBuild explicitly 2022-06-03 14:05:37 +02:00
Rick van Schijndel
17e891b141
Merge pull request #175317 from ncfavier/makeBinaryWrapper-cross
makeBinaryWrapper: fix cross-compilation and add test
2022-06-02 22:27:14 +02:00
github-actions[bot]
d6ede66f6a
Merge master into staging-next 2022-05-31 18:01:11 +00:00
Naïm Favier
eef2c762ce
makeBinaryWrapper: fix cross-compilation and add test
Fixes https://github.com/NixOS/nixpkgs/issues/175045
2022-05-31 13:55:41 +02:00
Naïm Favier
1c70b694fe
makeWrapper,makeBinaryWrapper: implement --append-flags 2022-05-30 23:07:58 +02:00
Robert Hensing
44522c1d59 dockerTools.examples.etc: Make it a reliable test
/etc/hosts is generally also provided by the container runtime.
2022-05-30 14:32:14 +02:00
Robert Hensing
116832edbf dockerTools: Add example of using NixOS' etc
(cherry picked from commit 9b2af8673be82d48ce76c8c152de85ad921d26ba)
2022-05-30 14:26:52 +02:00
Artturin
9ca1379bdf fetchCargoTarball: allow adding nativeBuildInputs 2022-05-28 21:55:39 +03:00
Artturin
36ad5b9b96 buildRustPackage: add missing attr to remove
cargoUpdateHook is used in cargoDeps
2022-05-28 21:06:27 +03:00
github-actions[bot]
ff43d848bf
Merge staging-next into staging 2022-05-27 18:01:52 +00:00
Artturi
60a0871486
Merge pull request #172391 from Artturin/deprecate-stdenv-glibc 2022-05-27 17:56:19 +03:00
Artturin
c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
github-actions[bot]
d8aac1a80f
Merge staging-next into staging 2022-05-26 12:01:59 +00:00
FliegendeWurst
7b185e04a9 cc-wrapper: Fortran: disable format hardening
Otherwise, these warnings are emitted:
command-line option '-Wformat=1' is valid for C/C++/ObjC/ObjC++ but not for Fortran
command-line option '-Wformat-security' is valid for C/C++/ObjC/ObjC++ but not for Fortran
'-Werror=' argument '-Werror=format-security' is not valid for Fortran

Fixes part of #27218
2022-05-26 12:29:35 +02:00
adisbladis
6d6531477a
Merge pull request #174689 from alyssais/compress-firmware-empty
compressFirmwareXz: fix with empty lib/firmware
2022-05-26 16:02:11 +08:00
Alyssa Ross
76405e3077
compressFirmwareXz: fix with empty lib/firmware
Fixes: 8aa8e0ce7f ("nixos/udev: compress all firmware if supported")
2022-05-26 07:08:50 +00:00
github-actions[bot]
f82caaee74
Merge staging-next into staging 2022-05-26 00:02:58 +00:00
Sandro
b9c9593a88
Merge pull request #173304 from IvarWithoutBones/bump/dotnetmodule 2022-05-26 00:26:18 +02:00
Sandro
9f8610e5db
Merge pull request #174291 from jtojnar/unstable-updater-url 2022-05-25 23:52:26 +02:00
Ben Siraphob
b20b6fa0d8
Merge pull request #172962 from Artturin/defaultparallelnorebuild 2022-05-25 12:25:34 -07:00
github-actions[bot]
ab6c34c083
Merge staging-next into staging 2022-05-25 18:01:56 +00:00
Cyril Cohen
d113661156 coqPackages: etc
- put `findlib` in `buildInputs` of `mkCoqDerivation` to make sure `coq` packages find their ocaml plugin dependencies,
- use `propagatedBuildInputs` to make sure ocaml plugin dependencies are in path,
- updated `coqPackage.heq` (broken url),
- fixed use of `DESTDIR` and `COQMF_COQLIB` in mkCoqDerivation,
- adding `COQCORELIB` environement variable to put ocaml plugin files in the right place,
- make `metaFetch` available from `coqPackages`
2022-05-25 20:00:25 +02:00
Pavol Rusnak
ef50f067f7
Merge pull request #171043 from prusnak/curlWithGnuTls
treewide: refactor curlWithGnuTls into all-packages.nix
2022-05-25 17:18:07 +02:00
Artturin
1d44ac176c treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same
when enableParallelBuildingByDefault is enabled

verified with
`nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
2022-05-25 16:03:14 +03:00
Artturin
0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
github-actions[bot]
59d64381a5
Merge staging-next into staging 2022-05-25 00:04:08 +00:00
adisbladis
b70152ec07
Merge pull request #174178 from tadfisher/melpa2nix-update
emacsPackages.melpaBuild: Update package-build, avoid monkey-patch
2022-05-25 03:12:11 +08:00
Jan Tojnar
7aae279ad9 unstableGitUpdater: fix updating fetchzip-based sources
a67950f20b added `url` attribute
from `fetchurl` and therefore also from `fetchzip`.
We previously relied on `url` from fetchgit-based fetchers
to find the repo URL but now it will just return tarballs
in the case of `fetchFrom{GitHub,GitLab}`.

Let’s add an attribute to `fetch{git,FromGitHub,FromGitLab}`
to expose a repo URL consistently.
2022-05-24 19:12:12 +02:00
github-actions[bot]
574f2d4696
Merge staging-next into staging 2022-05-24 00:02:57 +00:00
Thomas Tuegel
a81fb7121a
Merge pull request #169296 from NickCao/qt6-cleanup
qt6: init at 6.3.0
2022-05-23 15:10:40 -05:00
Tad Fisher
b4e4982e6c
emacsPackages.melpaBuild: Update package-build, avoid monkey-patch 2022-05-23 12:52:17 -07:00
github-actions[bot]
fc9784b2f1
Merge staging-next into staging 2022-05-23 18:02:01 +00:00
github-actions[bot]
b30c12f45d
Merge master into staging-next 2022-05-23 18:01:20 +00:00
Janne Heß
3673f148b3
Merge remote-tracking branch 'origin/staging-next'
* origin/staging-next: (62 commits)
  Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  openldap: fix cross-compilation
  makeBinaryWrapper: fix codesign on aarch64-darwin
  python3Packages.ldap: fix linking with openldap 2.5+
  Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  wine: enable parallel build again
  pkgsi686Linux.gdb: fix formatting for 32-bit systems
  gtk4: Fix incorrect merge
  nixos/openldap: use upstream unit defaults
  openldap: update maintainers
  openldap: 2.4.58 -> 2.6.2
  Revert "Add mingwW64-llvm cross-system."
  lua: fix on darwin by using makeBinaryWrapper (#172749)
  python310Packages.python-mimeparse: execute tests
  pandas: fix darwin build
  gtk3: 3.24.33 -> 3.24.33-2022-03-11
  gtk4: patch fixing g-c-c crashes
  e2fsprogs: patch for CVE-2022-1304
  firefox-unwrapped: fix cross compilation
  rustc: expose correct llvmPackages for cross compile
  ...
2022-05-23 19:56:59 +02:00
Martin Weinelt
1923b68bda Merge remote-tracking branch 'origin/staging-next' into staging 2022-05-23 17:35:37 +02:00
Artturi
e00bb60b19
Merge pull request #173430 from Artturin/fetchzippost 2022-05-23 18:25:50 +03:00
Artturin
b3caa2f1fe treewide: extraPostFetch -> postFetch 2022-05-23 17:18:50 +03:00
milahu
5baa20d7c8
qt6: init at 6.3.0 2022-05-23 09:37:40 +08:00
yvt
bf139d83ec
systems: support cross-compiling for Renesas RX microcontrollers (#173858) 2022-05-22 20:52:36 -04:00
Naïm Favier
1cc6f08cdd
makeBinaryWrapper: fix codesign on aarch64-darwin
Reverts 8b79ef2c on aarch64-darwin, no-op on other platforms.
2022-05-22 21:46:06 +02:00
Artturin
5a6a31e54d fetchzip: extraPostFetch -> postFetch && tests 2022-05-22 21:18:52 +03:00
Artturin
f002ffed9a treewide: enable strictDeps in bootstrap packages 2022-05-22 16:40:26 +03:00
Artturin
39b85d1c2a trivial-builders.nix: add TODO 2022-05-22 16:40:22 +03:00
github-actions[bot]
39ddfff2f2
Merge staging-next into staging 2022-05-18 18:01:51 +00:00
github-actions[bot]
925219f62b
Merge master into staging-next 2022-05-18 18:01:13 +00:00
Artturi
ca714e40fb
Merge pull request #172946 from Artturin/tester1 2022-05-18 20:00:44 +03:00
John Ericson
15f3cc41fb
Merge pull request #173487 from NixOS/revert-171418-mingwW64-clang
Revert "Add mingwW64-llvm cross-system."
2022-05-18 09:38:34 -04:00
github-actions[bot]
bd9c07eb24
Merge master into staging-next 2022-05-18 12:01:24 +00:00
Janne Heß
c911240e9c
Revert "Add mingwW64-llvm cross-system." 2022-05-18 13:50:23 +02:00
Shea Levy
89ad105c2e
Merge branch 'no-ldemulation' into staging 2022-05-18 06:30:39 -04:00
Shea Levy
0f68ed163c
Merge branch 'mingwW64-clang' into staging 2022-05-18 06:30:21 -04:00
Lassulus
68ff63179a
Merge pull request #165388 from r-ryantm/auto-update/garble
garble: 0.5.1 -> 0.6.0
2022-05-18 10:50:25 +02:00
Ivar Scholten
6107bbf553 buildDotnetModule: change default dotnet SDK and runtime to version 6
dotnet 5 is now EOL.
2022-05-16 21:39:35 +02:00
Artturin
a23fbeb6e8 testers.testVersion: if grep failed then print the output of the command 2022-05-16 16:16:35 +03:00
github-actions[bot]
17a8a7deac
Merge staging-next into staging 2022-05-16 06:01:47 +00:00
Jörg Thalheim
03bf2ff19e
Merge pull request #173206 from SuperSandro2000/writeCBin
writeCBin: fix formatting
2022-05-16 06:58:47 +01:00
github-actions[bot]
e2602ad62e
Merge staging-next into staging 2022-05-16 00:04:11 +00:00
Sandro
27123795ad
writeCBin: fix formatting 2022-05-16 01:43:05 +02:00
7c6f434c
f2ebcd6509
Merge pull request #173059 from Julow/linkfarm-2
Fix string context lost in `linkFarm`
2022-05-15 20:17:21 +00:00
Jules Aguillon
4acd65ce95
Escape paths
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2022-05-15 21:29:01 +02:00
Jan Tojnar
d1b77f990f Merge branch 'staging-next' into staging
Conflicts:
	pkgs/applications/networking/browsers/firefox/common.nix between f6c5761935 and a373324120.
2022-05-15 07:08:29 +02:00
Ivv
5f721cfb1c
Merge pull request #169121 from ashkitten/xivlauncher
xivlauncher: init at 1.0.0.4
2022-05-14 22:53:35 +02:00
Jules Aguillon
f2a91a6679 Fix string context lost in linkFarm
```nix
let pkgs = import ./. {}; in
pkgs.linkFarm "test" [
  { name = "foo"; path = ./README.md; }
]
```

The nix code above generates this result: (`nix build -f test.nix`)

```
lrwxrwxrwx 1 root root 31 Jan  1  1970 /nix/store/98mdz626n99w0467q4r203q154bnnli9-test/foo -> /home/juloo/w/nixpkgs/README.md
```

With this patch, the target file is naturally copied into the store:

```
lrwxrwxrwx 1 root root 53 Jan  1  1970 /nix/store/ndvffnardifqwzbp07g15llav55r5k1m-test/foo -> /nix/store/9rqwjskbbgbflrpyhzi6rak2j7jspr5f-README.md
```
2022-05-14 19:23:15 +02:00
7c6f434c
cd6eea51c4
Merge pull request #171083 from ehmry/wrapCCWith-nixSuport
wrapCCWith: structured argument for wrapper flags
2022-05-14 15:05:25 +00:00
adisbladis
fb222e0086
Merge pull request #172820 from alyssais/compressed-firmware
Compressed firmware
2022-05-14 02:38:48 +08:00
Alyssa Ross
8aa8e0ce7f
nixos/udev: compress all firmware if supported
This should be a significant disk space saving for most NixOS
installations.  This method is a bit more complicated than doing it in
the postInstall for the firmware derivations, but this way it's
automatic, so each firmware package doesn't have to separately
implement its compression.

Currently, only xz compression is supported, but it's likely that
future versions of Linux will additionally support zstd, so I've
written the code in such a way that it would be very easy to implement
zstd compression for those kernels when they arrive, falling back to
xz for older (current) kernels.

I chose the highest possible level of compression (xz -9) because even
at this level, decompression time is negligible.  Here's how long it took
to decompress every firmware file my laptop uses:

	i915/kbl_dmc_ver1_04.bin                  	2ms
	regulatory.db                             	4ms
	regulatory.db.p7s                         	3ms
	iwlwifi-7265D-29.ucode                    	62ms
	9d71-GOOGLE-EVEMAX-0-tplg.bin             	22ms
	intel/dsp_fw_kbl.bin                      	65ms
	dsp_lib_dsm_core_spt_release.bin          	6ms
	intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq	7ms

And since booting NixOS is a parallel process, it's unlikely (but
difficult to measure) that the time to user interaction was held up at
all by most of these.

Fixes (partially?) #148197
2022-05-13 14:36:34 +00:00
github-actions[bot]
814126147f
Merge staging-next into staging 2022-05-13 12:02:03 +00:00
Vincent Laporte
1f11888116 Revert "coqPackages: etc"
This reverts commit 7e589a45ef.
2022-05-13 06:47:14 +02:00
github-actions[bot]
d79af4efe4
Merge staging-next into staging 2022-05-13 00:03:35 +00:00
sternenseemann
357da6c296 buildRustPackage: make cargoDeps logic easier to follow
The old logic flow had the structure

  if ( … ) {
    if ( … ) {
      …
    } else {
      …
    }
  } else {
    …
  }

which is quite hard to follow in Nix. Instead we ensure that no if
expression is inside a then branch.

This change is zero rebuild, as no logic was changed.
2022-05-13 08:18:39 +10:00
Thiago Kenji Okada
5c5187646d
Merge pull request #172366 from ncfavier/wrappers-cleanup
make{,Binary}Wrapper: some cleanups
2022-05-12 22:17:34 +01:00
Naïm Favier
3e385d9a82
makeBinaryWrapper: add comment 2022-05-12 15:23:38 +02:00
Cyril Cohen
7e589a45ef coqPackages: etc
- use propagatedBuildInputs to make sure ocaml plugin stuff is in path
- updated coqPackage.heq (broken url)
- fixed use of `DESTDIR` and `COQMF_COQLIB` in mkCoqDerivation
- adding `COQCORELIB` environement variable to put ocaml plugin files in the right place
- make metaFetch available from `coqPackages`
2022-05-12 06:11:43 +02:00
Naïm Favier
88369997e1
makeBinaryWrapper: add extractCmd
A small shell script that can be used to extract a binary wrapper's
makeCWrapper call from its embedded docstring, without depending on
makeBinaryWrapper.
2022-05-12 01:44:02 +02:00
Naïm Favier
2ae69114a1
makeWrapper: implement --inherit-argv0
For symmetry/interoperability with makeBinaryWrapper. Implemented as
--argv0 '$0'
2022-05-10 22:07:57 +02:00
Naïm Favier
8b79ef2cb6
makeBinaryWrapper: remove cc from deps
Fixes https://github.com/NixOS/nixpkgs/issues/172249
2022-05-10 22:07:57 +02:00
Naïm Favier
81b9c712ce
wrapGAppsHook: rename argument to makeWrapper
...and pass it makeBinaryWrapper in all-packages.nix
2022-05-10 22:07:56 +02:00
Naïm Favier
62245943aa
makeWrapper,makeBinaryWrapper: introduce explicitly named functions
Because both versions might end up in a derivation's build inputs, it
might be useful to be able to explicitly select which function to use.
2022-05-10 22:07:56 +02:00
Naïm Favier
0d6bcb513b
makeBinaryWrapper: move into its own folder
The derivation is complex enough to warrant moving out of
all-packages.nix
2022-05-10 22:07:56 +02:00
ash lea
e530db9baf buildDotnetModule: fix args 2022-05-10 11:40:59 -04:00
Alyssa Ross
6592d3fbc7
skawarePackages.buildPackage: fix typo in comment 2022-05-09 15:52:56 +00:00
Shea Levy
d68a532d1b
Set a default machine type when using lld targeting Windows.
Fixes autotools checks parsing --help
2022-05-09 10:09:42 -04:00
Shea Levy
078a07708a
libunwind: Fix build against compiler-rt-using clang 2022-05-09 10:05:47 -04:00
Shea Levy
4c0d5f80fc
bintools-wrapper: Don't pass -z to lld targeting Windows 2022-05-09 10:05:45 -04:00
Shea Levy
dee9af9323
bintools: Add isXXX flags to check linker type 2022-05-09 10:03:48 -04:00