Commit Graph

5631 Commits

Author SHA1 Message Date
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
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
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
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
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