MinGW with LLVM compilers (e.g. pkgsCross.ucrtAarch64) do not support
that flag. It causes the configure script to incorrectly miss many of
its checks and the final link step fails, all complaining that this
argument is unknown. Removing it from MinGW targets only, in order to
not disturb any other usages
On FreeBSD and other platforms using modern bintools,
the linker will fail if given undefined versions in the version map.
The zlib configure script in its infinite wisdom uses an incorrect
version script during its test compile to determine if shared libraries
work, so always fails.
This avoids the pitfalls of win32/Makefile.gcc (which prevents building
on compilers other than gcc without patching and has non-standard
installation behavior) and fixes cross compilation for ucrtAarch64
Putting the DLL's in `$out/bin` was given the approval of:
John Ericson <John.Ericson@Obsidian.Systems>
Tested that with this change the packages
`pkgsCross.x86_64-{freebsd,openbsd}.zlib` build from an `x86_64-linux`
build platform, and that their hashes actually are changed due to this.
Specify the correct paths for installation in configuration phase. This
fixes the created pkg-config module and saves us from needing to move
files manually into the desired outputs.
Fixes: https://github.com/NixOS/nixpkgs/issues/66461
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
msvcrt is only one of the libcs in MinGW. We therefore
replace explictly testing for msvcrt with the isMinGW
predicate. This lays the foundation for ucrt64 support.
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
See docs.
Follow-up work:
- Existing packages should be converted
- `defaultPkgConfigPackages` should assert on `meta.pkgConfigModules`
and let `tests.pkg-config` alone test the build results.
CC @sternenseemann
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>