Commit graph

5546 commits

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