Commit graph

5397 commits

Author SHA1 Message Date
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
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
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
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
Artturi 62866bc352
Merge pull request #169449 from Artturin/movetesting1
testers.testVersion: move from trivial-builders.nix
2022-04-23 06:06:16 +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
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
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