Commit Graph

5631 Commits

Author SHA1 Message Date
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
Robert Hensing
c3bbe1d9c7 testers.nixosTest: Remove redundant system.stateVersion = lib.trivial.release;
Already present in nixos/modules/testing/test-instrumentation.nix,
which is imported by the test framework.
2022-05-09 14:33:49 +02:00
Robert Hensing
ebf0465d09 Merge remote-tracking branch 'upstream/master' into testers 2022-05-09 14:27:13 +02:00
Robert Hensing
93abb7bef7 tests.testers.nixosTest-example: move from tests.nixos-functions.nixosTest-test
And improve the test a bit, to assert correct wiring of `pkgs`.
2022-05-09 14:21:56 +02:00
Robert Hensing
ae172a2bb4 treewide: nixosTest -> testers.nixosTest 2022-05-09 14:16:06 +02:00
Shea Levy
b00016d9d9
bintools-wrapper: Remove LDEMULATION setting.
As far as I can tell, this has never actually done anything, as
LDEMULATION is not exported. I tried exporting it and builds broke,
and as it doesn't seem to have caused any problems as a noop all these
years it didn't seem worth investigating further.
2022-05-07 06:13:58 -04:00
Naïm Favier
d4aa650608
makeBinaryWrapper: really unset NIX_CFLAGS
f8cc8ff575
fails to unset the variables in the environment due to a Bash quirk,
so set them to the empty string instead.
2022-05-06 17:03:52 +02:00
Shea Levy
4b503b2a58
cc-wrapper: clang doesn't support -fPIC on Windows 2022-05-06 10:54:52 -04:00
Naïm Favier
42a4c05dd0
makeBinaryWrapper: add -Wno-overlength-strings
The generated C code contains large string literals that are longer than
the maximum length specified by the standard.

However, GCC has no trouble dealing with those strings, so we can just
add -Wno-overlength-strings.

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Woverlength-strings
2022-05-06 16:12:57 +02:00
github-actions[bot]
b962dee3e7
Merge master into staging-next 2022-05-06 00:02:16 +00:00
ilkecan
d6bd313f07 buildRustCrate: set meta.mainProgram to crateName 2022-05-05 14:25:27 +00:00
Robert Hensing
7edb414660 testers.nixosTest: Move from top-level and improve docs 2022-05-05 12:48:47 +02:00
Robert Hensing
c071530ca5 testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
github-actions[bot]
00dc0eecc7
Merge staging-next into staging 2022-05-03 12:01:45 +00:00
Janne Heß
2edce50847
Merge pull request #171134 from helsinki-systems/feat/make-initrd-ng-strip
makeInitrdNG: Strip more and remove output
2022-05-03 09:41:22 +02:00
Vladimír Čunát
9478ec747c
Merge branch 'staging-next-2022-04-23'
Close #169965: the PR and real 'staging-next' branch contained
extra systemd rebuild that I wanted to avoid in this iteration.
(to save Hydra's work)
2022-05-02 09:12:51 +02:00
github-actions[bot]
677697c12f
Merge staging-next into staging 2022-05-01 18:01:35 +00:00
github-actions[bot]
da9b549e31
Merge master into staging-next 2022-05-01 18:01:03 +00:00
David Scherer
13a9006ec3 Fix determinism by defaulting codegenUnits to 1, not NIX_BUILD_CORES 2022-05-01 11:48:32 -04:00
Mateusz Kowalczyk
f6897d23f4 buildRustCrate: make codegen-units configurable
This parameter is being set to `$NIX_BUILD_CORES` by default. This is a
standard practice but there's a suspicion that this can produce broken
builds. For some details see
https://github.com/cargo2nix/cargo2nix/issues/184 . As a
work-around/test, it'd be good if codegen-units can be set to something
constant, such as `1`. This PR allows it.

Note that the default of `$NIX_BUILD_CORES` is preserved so this MR
causes no change in default behaviour and no rebuilds.
2022-05-01 11:48:32 -04:00
Janne Heß
e5995b2235
makeInitrdNG: Strip more and remove output
This strips all elf files as far as possible and removes a lot of
unnecessary output. Also wrap in the binaries instead of relying on
$PATH.
2022-05-01 17:06:14 +02:00
Vladimír Čunát
cec6e7362c
Merge branch 'master' into staging-next-2022-04-23 2022-05-01 14:26:52 +02:00
github-actions[bot]
676b5fba35
Merge staging-next into staging 2022-05-01 06:01:47 +00:00
github-actions[bot]
dc0ace8d6e
Merge master into staging-next 2022-05-01 06:01:14 +00:00
Emery Hemingway
89a0dd2414 wrapCCWith: structured argument for wrapper flags
Take a "nixSupport" argument that is an attrset of lists to append
to "$out/nix-support/${name}" where name is the name of the
attribute. This attrset is available from the passthru of the
wrapped compiler.

This is an alternative to imperatively issuing flags with
extraBuildCommands and makes it possible to append or filter
flags with an override.
2022-04-30 21:21:41 -05:00
Ivar Scholten
e3c19ba57e nuget-to-nix: include required dependencies 2022-04-30 18:24:48 -07:00
=
f0af1ef49c buildDotnetModule: properly inherit arguments from drv
Previously buildDotnetModule did not properly inherit some arguments from
derivations, take for example this expression:

dotnetFlags = [
    "--runtime linux-x64"
];

It would error out as follows: "MSBUILD : error MSB1001: Unknown switch.".
Setting the same flag from bash would work fine. This fixes that, all
arguments should now be properly interpreted :)
2022-04-30 18:24:48 -07:00
=
f69de108fb buildDotnetModule: nuget source cleanup
There used to be a few issues with the way we generate the nuget source:

* The derivation generated for the deps would have "nuget-deps" in them twice:
  /nix/store/...-foo-1.0-nuget-deps-nuget-deps

* We always tried to generate the dependencies for "projectReferences"
  even when it wasn't set, causing a warning.

This fixes those issues :)
2022-04-30 18:24:48 -07:00
=
38419c65ce mkNugetSource: fix bug in metadata generation
This improves the metadata generation, previously it would take any
"license" entry from the nuspec, and tried to match it to an spdx ID from
"lib.licenses".

Sometimes however licenses are provided in plain-text, which we
obviously cannot cleanly resolve. This resulted in in useless information
("LICENSE.txt") being written to "meta.license".
2022-04-30 18:24:48 -07:00
Vladimír Čunát
c480cc2895
Merge branch 'master' into staging-next-2022-04-23 2022-04-30 23:02:28 +02:00
Pavol Rusnak
4b7a8ae947
treewide: refactor curlWithGnuTls into all-packages.nix 2022-04-30 18:56:59 +02:00
github-actions[bot]
03ecebd53a
Merge staging-next into staging 2022-04-29 00:03:11 +00:00
github-actions[bot]
619828db66
Merge master into staging-next 2022-04-29 00:02:35 +00:00
Yusuf Bera Ertan
e2a3a3c690
default-crate-overrides: only add Security to propagatedBuildInputs on darwin for security-framework-sys 2022-04-28 21:24:46 +03:00
Doron Behar
40d287cfd7
Merge pull request #164163 from ncfavier/gapps-binary-wrapper 2022-04-27 23:30:37 +03:00
Silvan Mosberger
86c902d673 fetchurl: Introduce curlOptsList as an improvement over curlOpts
It's impossible to pass arguments with spaces with curlOpts.
curlOptsList supports that. Passing a list to curlOpts has been
deprecated. This commit is fully backwards compatible.
2022-04-26 21:01:19 +02:00
Naïm Favier
f8cc8ff575
makeBinaryWrapper: unset NIX_CFLAGS
Prevent the wrapper from being affected by the derivation's CFLAGS,
which may not even apply to GCC.
2022-04-26 12:14:39 +02:00
Naïm Favier
532ebf6b57
wrapGAppsHook: use makeBinaryWrapper
Reduces the likelihood of having apps wrapped twice by a shell script,
which causes problems with argv0.
2022-04-26 12:14:39 +02:00
github-actions[bot]
f8c265f433
Merge master into staging-next 2022-04-26 06:01:08 +00:00
Anders Kaseorg
6920d8ca42 treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-04-25 13:35:24 -07:00
Vladimír Čunát
82ec893b68
Merge branch 'staging' into staging-next 2022-04-23 18:10:57 +02:00
Artturi
62866bc352
Merge pull request #169449 from Artturin/movetesting1
testers.testVersion: move from trivial-builders.nix
2022-04-23 06:06:16 +03:00
github-actions[bot]
05f9abf294
Merge staging-next into staging 2022-04-22 18:01:54 +00:00
Artturi
785373a76f
Merge pull request #166605 from siraben/remove-redundant-stdenv 2022-04-22 20:25:38 +03:00
Artturin
41808d42d2 doc: move testers to their own chapter 2022-04-22 16:24:29 +03:00
Artturin
3cc2e86bab testers: convert to a format that is kind of compatible with nixdoc
Examples: support has to be added to https://github.com/nix-community/nixdoc

'nixdoc --category testers --description "nixpkgs testers" --file ./pkgs/build-support/testers/default.nix'
2022-04-22 16:24:29 +03:00
Artturin
250ef1ff39 testers.testVersion: move from trivial-builders.nix
we will have more testers in the future so they should have their own
location

putting 'testers' in args will also make it simpler to use multiple testers
2022-04-22 16:22:40 +03:00
Lassulus
1468e8f52d
Merge pull request #165111 from toonn/darwin-bundle-outputBin
make-darwin-bundle: Use output bin
2022-04-22 12:04:09 +01:00
Mario Rodas
f73ff5c229 emacsWrapper: add missing variable substitutions to Darwin app 2022-04-22 04:20:00 +00:00
Artturi
98ff3e401c
Merge pull request #165892 from tpwrules/fix-initrd-dirlinks
make-initrd: fix reproducibility problems
2022-04-21 20:51:35 +03:00
Sandro
eb004259d6
Merge pull request #169005 from SuperSandro2000/devilutionX 2022-04-20 22:00:07 +02:00
Sandro
d07dcace99
Merge pull request #169137 from SuperSandro2000/fetchgit
fetchgit: allow passing thru meta
2022-04-20 20:14:54 +02:00
Artturin
52a744b7f8 testers.testEqualDerivation: move from build-support/test-equal-derivation.nix 2022-04-20 15:44:40 +03:00
Domen Kožar
36bbcc2a4a
Merge pull request #165112 from toonn/darwin-bundle-Exec-field-codes
desktopToDarwinBundle: Patch Exec field codes
2022-04-20 12:24:01 +01:00
Daniel Nagy
0f316e5553
emacsWrapper: fix mishandling of empty package list
The native compiler of emacs does not handle empty files well.

This arose in https://github.com/NixOS/nixpkgs/pull/168954 .
2022-04-19 21:12:45 +02:00