Commit graph

5573 commits

Author SHA1 Message Date
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
Robert Hensing 33cf95ef36
Merge pull request #168932 from hercules-ci/init-postgresqlTestHook
`postgresqlTestHook`: init
2022-04-18 11:58:34 +02:00
Sandro Jäckel 538a5a28b7
fetchgit: allow passing thru meta 2022-04-18 03:06:02 +02:00
Sandro 7c4f591673
Merge pull request #166135 from illustris/hadoop
hbase: 0.98.24 -> 2.4.11, spark & hadoop: improve interoperability
2022-04-18 00:38:17 +02:00
illustris 6701dd6a4d mirrors: add recommended apache mirror 2022-04-18 02:02:43 +05:30
Artturi 3886bcd30f
Merge pull request #168703 from Artturin/testversion1 2022-04-17 22:40:45 +03:00
Martin Weinelt 70d726c2a5 Merge remote-tracking branch 'origin/master' into staging-next 2022-04-17 20:29:43 +02:00
Daniel Nagy 4489718d8f
emacsWrapper: preload autoloads
This commits changes the Emacs wrapper, in order to preload all autoload
definitions when built with additional packages. The list of all
definitions is generated at build-time. Packages do not need to
be (require)d for them to work.

Before this change, a code like

```sh
nix-shell -I "nixpkgs=$PWD" -p "emacs.pkgs.withPackages(e:[e.magit])" \
          --run "emacs -Q -nw -f magit"
```

will fail with the message `Symbol’s function definition is void: magit`

After the change, the same code above will open Emacs with magit
enabled.

A slightly longer startup time of ~10ms was detected in local, informal
experiments.

More information on autoloading:
https://www.gnu.org/software/emacs/manual/html_node/eintr/Autoload.html
2022-04-17 14:36:24 +02:00
Sandro Jäckel a67950f20b
fetchurl: passthru url 2022-04-17 05:30:04 +02:00
Martin Weinelt fa1bb283d8 Merge remote-tracking branch 'origin/master' into staging-next 2022-04-16 23:14:55 +02:00
Janne Heß 031b95e587
Merge pull request #168814 from helsinki-systems/feat/systemd-stage-1-pass-vars
nixos/systemd-stage-1: Pass more vars to the builder
2022-04-16 22:02:26 +02:00
Janne Heß b9bf28fd70
nixos/stage-1-init: Pass all parameters to the builder
This is for compatiblity with the old builder to get compat with uboot
support and to prepend microcode updates to the initrd
2022-04-16 20:36:18 +01:00
Ben Siraphob 259fa13d53 treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
Robert Hensing e77e09c5d2 postgresqlTestHook: init 2022-04-16 17:17:46 +02:00
github-actions[bot] 6be56bfc2e
Merge master into staging-next 2022-04-16 12:01:10 +00:00
Faye Duxovni bc5e8ae506 buildRustCrate: don't try to set CARGO_FEATURE_ variables for dep: features
These features are internal-only, have special characters that bash
doesn't support in variable names, and aren't normally given
environment variables by cargo as far as I can tell.
2022-04-16 06:53:45 -04:00
Thiago Kenji Okada 113a29b107
Merge pull request #168816 from thiagokokada/graalvm-cleanup
graalvmXX-ee: remove; graalvmXX-ce: remove Ruby/Python/WASM support
2022-04-16 11:36:41 +01:00
Martin Weinelt 2bd8fc9378 Merge remote-tracking branch 'origin/master' into staging-next 2022-04-16 00:52:15 +02:00
Thiago Kenji Okada 44a4401945 buildGraalvmNativeImage: mark as broken if Native Image is not available 2022-04-15 23:20:52 +01:00
Lin Yinfeng bedc267a78
autoPatchelfHook: fix precise dependency ignorance
This commit fixes precise dependency ignorance by converting the
environment variable `autoPatchelfIgnoreMissingDeps` into a bash array
`ignoreMissingDepsArray`, passing `"${ignoreMissingDepsArray[@]}"`
instead of `"${autoPatchelfIgnoreMissingDeps[@]}"` to the python
script.

The original implementation does not work when
`autoPatchelfIgnoreMissingDeps` contains multiple dependency names.
Because it mistakenly passes `"${autoPatchelfIgnoreMissingDeps[@]}"`
to the python script. According to the Nix manual
(https://nixos.org/manual/nix/stable/expressions/derivations.html),
lists of strings are concatenated into whitespace-separated strings,
then passed to the builder as environment variables. So, if
`autoPatchelfIgnoreMissingDeps = [ "dep1" "dep2" "dep3" ]`,
`"${autoPatchelfIgnoreMissingDeps[@]}"` will be expanded to a single
argument `"dep1 dep2 dep3"`, which is not the intended behavior,
because the python script takes the long argument as a dependency
name.

With this commit, `"${ignoreMissingDepsArray[@]}"` will be expanded to
three arguments `"dep1" "dep2" "dep3"` arguments as expected, fixing
the issue.
2022-04-15 10:35:11 +08:00
Thomas Watson 7fd6cea253 make-initrd: fix reproducibility problems
cpio includes the number of directory hard links in archives it creates.
Some filesystems, like btrfs, do not count directory hard links the same
way as more common filesystems like ext4 or tmpfs, so archives built
when /tmp is on such a filesystem do not reproduce. This patch replaces
cpio with bsdtar, which does not have this issue. The specific
invocation is from this page:
https://reproducible-builds.org/docs/archives/
2022-04-14 19:06:30 -05:00
Jan Tojnar fba8a1de00
appimageTools.defaultFhsEnvArgs: Drop GConf
It has been deprecated and unmaintained for years. And it would not work without the daemon anyway.
2022-04-14 23:31:36 +02:00
Artturin 390439d726 testVersion: when there is a error show the whole error
before

$ nix build ".#whipper.tests.version"
whipper>   File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/bin/.whipper-wrapped", line 6, in <module>
whipper>   File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/lib/python3.9/site-packages/whipper/__init__.py", line 5, in <module>
note: keeping build directory '/tmp/nix-build-whipper-0.10.0-test-version.drv-7'

after
$ nix build ".#whipper.tests.version"
whipper> Traceback (most recent call last):
whipper>   File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/bin/.whipper-wrapped", line 6, in <module>
whipper>     from whipper.command.main import main
whipper>   File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/lib/python3.9/site-packages/whipper/__init__.py", line 5, in <module>
whipper>     from pkg_resources import (get_distribution,
whipper> ModuleNotFoundError: No module named 'pkg_resources'
note: keeping build directory '/tmp/nix-build-whipper-0.10.0-test-version.drv-34'
error: builder for '/nix/store/5lxjicdhwgmjcz9ddlxgq3s3gyaa6lz4-whipper-0.10.0-test-version.drv' failed with exit code 1;
2022-04-14 23:10:20 +03:00
Vladimír Čunát d5d94127fd
Merge branch 'staging-next' into staging
Minor conflicts; I hope I didn't mess up:
	pkgs/development/tools/misc/binutils/default.nix
	pkgs/games/openjk/default.nix
2022-04-14 09:53:21 +02:00
Samuel Ainsworth 263292cb5e
Merge pull request #167397 from samuela/samuela/autopatchelf
autoPatchelfHook: more precise dependency ignorance
2022-04-12 08:58:00 -07:00
Artturi 74f33d9a4a
Merge pull request #164825 from ilya-fedin/fhs-less-copy 2022-04-11 16:37:01 +03:00
Samuel Ainsworth a7fc2f6392 autoPatchelfHook: more precise dependency ignorance 2022-04-11 01:28:55 +00:00
zowoq 3a70d5dc83 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/compilers/go/2-dev.nix
2022-04-07 22:12:13 +10:00
toonn 5eb21a55ee copyDesktopItems: Use variable for repeated path
Co-authored-by: K900 <me@0upti.me>
2022-04-07 11:04:11 +00:00
toonn d1bbb2b3d6 copyDesktopItems: Use bin output
Desktop files are only useful when accompanied by the binaries they
specify. So it makes more sense to put them next to the binaries rather
than `$out` which only usually contains the binaries.
2022-04-07 11:04:11 +00:00
github-actions[bot] 3dc8bd98b9
Merge staging-next into staging 2022-04-06 00:02:41 +00:00
Vladimír Čunát b4729bad3d
Merge #165406: staging-next 2022-03-23 2022-04-05 20:34:08 +02:00
Robert Hensing 559ac3c9e7
Merge pull request #166383 from hercules-ci/always-sanitize-derivation-name
Always sanitize derivation name
2022-04-05 20:05:33 +02:00
github-actions[bot] 3063a8ea39
Merge staging-next into staging 2022-04-05 12:10:46 +00:00
github-actions[bot] 27a4e52731
Merge master into staging-next 2022-04-05 12:05:41 +00:00
zowoq e65aba25f8 dockerTools: misc fixes
- add nixosTests to `dockerTools.tests`
- don't use `pkgs` or `lib.singleton`
2022-04-05 17:04:59 +10:00
Martin Weinelt bf1914e12a Merge remote-tracking branch 'origin/staging-next' into staging 2022-04-05 04:05:02 +02:00
zowoq 76636e0099 dockerTools: pkgs.system -> pkgs.stdenv.hostPlatform.system
`pkgs.system` is an alias
2022-04-05 10:19:40 +10:00
github-actions[bot] 120925b5cb
Merge master into staging-next 2022-04-05 00:02:06 +00:00
Robert Hensing a292213c44
Merge pull request #166792 from hercules-ci/pkgs-config-allowAliases-option
config.allowAliases: Define as option
2022-04-04 21:09:44 +02:00
Martin Weinelt f95a3d1140 Merge remote-tracking branch 'origin/staging-next' into staging 2022-04-04 00:46:25 +02:00
github-actions[bot] c46200d454
Merge master into staging-next 2022-04-03 18:01:07 +00:00
Janne Heß 7cdc4dd5d1
Merge pull request #164943 from ElvishJerricco/systemd-initrd-reuse-systemd-module
initrd: Opt-in bare bones systemd-based initrd
2022-04-03 15:53:02 +02:00
Alyssa Ross 8ba23e138d
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/development/libraries/zlib/default.nix
	pkgs/development/lua-modules/overrides.nix
2022-04-02 16:45:48 +00:00
github-actions[bot] 50497647fa
Merge master into staging-next 2022-04-01 12:01:21 +00:00
Robert Hensing 200175a701 config.allowAliases: Define as option
This simplifies usages and makes the default value consistent.

In a few cases, the default value was interpreted to be `false`,
but this is useless, because virtually nobody will explicitly
set `allowAliases = true;`.
2022-04-01 11:33:10 +02:00
Thiago Kenji Okada bdfff535f0 buildGraalvmNativeImage: allow usage of arbitrary graalvm derivation
This will allow for easier overrides for specific systems (e.g.
`aarch64-linux` that is only supported in `graalvm17-ce`).
2022-03-31 22:35:44 +01:00
toonn 261b736521
desktopToDarwinBundle: Implement %F and %U Exec field codes
Similar to the implementation of the `%f` and `%u` field codes. In this
case the amount of arguments passed poses no problem but the position
could, at least in theory.

This finishes the implementation of all the non-deprecated field codes.
As a part of that, repetitions of field codes are left alone. Originally
all field codes were removed. Now we replace only the first occurence.
This is correct for at least `%f`, `%u`, `%F` and `%U` because at most
one of them is permitted.

Shortcomings:

  1. We replace `%[cfFikuU]` patterns one at a time. This means if the
     right field code appears as part of the rest of the `Exec` field or
     in a field code that was substituted earlier.

  2. If any field code is repeated, only the first occurence is
     substituted.
2022-03-31 15:27:39 +02:00
toonn f31d945755
desktopToDarwinBundle: Implement %f and %u Exec field codes
`%f` and `%u` are used to signal the program only accepts a single file
or URI argument. I do not believe there's a way to signal this
information to macOS but it is possible the program really won't work if
multiple files are passed and it's possible the relative position of
`%i`, `%c` or `%k` matters. So we replace `%f` or `%u` with `$1`. That
way we only pass one file in the (possibly significant) position of the
field code.
2022-03-31 14:04:52 +02:00
toonn 196f989ae8
desktopToDarwinBundle: Implement %i Exec field code 2022-03-31 13:44:15 +02:00
toonn 4dc94e1489
desktopToDarwinBundle: Implement %c Exec field code 2022-03-31 13:00:11 +02:00
toonn 4a749a89c4
desktopToDarwinBundle: Implement %k Exec field code 2022-03-31 12:47:54 +02:00
toonn 30e8e0a9a3
desktopToDarwinBundle: Change empty directory test
`ls -1 "$iconsdir/"*` listed the source directory for me when the glob
had no matches. Switching to `-A` circumvents this problem and has the
added advantage that it cannot run into argument list length limits.
2022-03-31 12:47:54 +02:00
toonn 7ef15c96dc
desktopToDarwinBundle: Add X-macOS-Exec and log editing Exec
Co-authored-by: milahu <milahu@gmail.com>
2022-03-30 16:42:13 +02:00
toonn b52a962141
desktopToDarwinBundle: Complete field code removal
Checked the desktop entry spec, there's other field codes than `%[fFuU]`
and those can in fact occur more than once, hence dropping '$' and
adding `/g`.
2022-03-30 16:42:13 +02:00
toonn 99f387e462
desktopToDarwinBundle: Fixup Exec
The "Exec" key in desktop items sometimes has one of the `%f`, `%F`,
`%u` and `%U` suffixes, which specify whether the command takes a file,
multiple files or a generalized URL or URLs. Darwin application bundles
do no understand this syntax so we do the next best thing, which is
simply dropping it.
2022-03-30 16:42:02 +02:00
Robert Hensing c39eff52dc testEqualDerivation: Rely on mkDerivation to sanitize name 2022-03-30 10:29:19 +02:00
Robert Hensing 225ca9088a runCommand*: Rely on mkDerivation to sanitize name 2022-03-30 10:29:19 +02:00