Commit graph

6077 commits

Author SHA1 Message Date
github-actions[bot] 18a6423900
Merge master into staging-next 2022-10-17 00:04:21 +00:00
Sergei Trofimovich 8480f40236
Merge pull request #191134 from Et7f3/remove-duplicate-code-cc-wrapper
cc-wrapper: remove duplicate C{C,XX}${role_post}
2022-10-16 21:02:04 +01:00
Maximilian Bosch a914b9460d
Merge pull request #193075 from Ma27/nextcloud-pkg-fix
fetchNextcloudApp: rewrite with fetchzip & applyPatches
2022-10-16 20:07:57 +02:00
Vladimír Čunát d700d8e8a2
stdenv cc-wrapper: revert a problematic change for non-Linux
The change from 0bea4a194f (PR #191724) broke stdenv bootstap
on *-darwin, and I didn't want to drop the *-linux binaries
that we have already.
2022-10-14 09:40:48 +02:00
Martin Weinelt c728598b84 Merge remote-tracking branch 'origin/staging-next' into staging 2022-10-13 23:29:04 +02:00
Robert Hensing 8fca2fd4bf
Merge pull request #141050 from koenw/dockertools_too_many_arguments
build-support: Fix error when building images with many layers
2022-10-13 21:45:10 +01:00
github-actions[bot] 7df9a7a84c
Merge staging-next into staging 2022-10-13 18:07:50 +00:00
Koen Wilde 2f5fcda329 build-support: Fix error when building images with many layers
When building a docker image using `dockertools.buildLayeredImage`, the
resulting image layers are passed to `jq` through the command line. When
building an image with too many layers this would exceed the maximum
command line argument length.

Hence, we store the list of layers in the Nix store and pass them to
`jq` as a file argument using `--slurpfile`.

Fixes #140908.
2022-10-13 16:27:13 +02:00
Shea Levy ee7722a7de
Merge pull request #100634 from fzakaria/faridzakaria/buildmaven-nix
buildMaven: Update buildMaven to pure Nix
2022-10-13 08:06:26 -04:00
Vladimír Čunát 00a757ed3f
Merge branch 'master' into staging 2022-10-13 08:27:55 +02:00
Artturi e66d2fd89d
Merge pull request #194256 from Artturin/treewides2 2022-10-13 00:08:01 +03:00
lassulus 85a36f9146 writers.writeJS: pass arguments to script 2022-10-11 20:16:37 +02:00
github-actions[bot] 5d957f3dba
Merge staging-next into staging 2022-10-11 00:05:26 +00:00
Martin Weinelt 85713b7e37 Merge remote-tracking branch 'origin/master' into staging-next 2022-10-11 00:18:04 +02:00
pacien 0495b0217b writers.writeFish: avoid loading user config files
This makes the Fish interpreter ignore user configuration files.
This was not desirable for running scripts, especially system ones.
2022-10-10 23:10:36 +02:00
Martin Weinelt 294201004f Merge remote-tracking branch 'origin/master' into staging-next 2022-10-10 21:45:18 +02:00
pacien 6e4a14b54f writers: add writeFish and writeFishBin
This adds writers for Fish shell scripts, with syntax checking.
2022-10-10 15:59:23 +02:00
Artturin 7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Artturin f4ea1208ec treewide: *Flags convert to list from str
*Flags implies a list

slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172

the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
2022-10-10 15:30:59 +03:00
adisbladis 01535ff0b0 autoPatchelfHook: support glob patterns
so for example cuda could be ignored by setting:
``` nix
autoPatchelfIgnoreMissingDeps = [ "*cuda*.so*" ];
```
2022-10-10 17:55:11 +13:00
adisbladis 41c09640e7 autoPatchelfHook: fix turning [ "*" ] into bash array
Previously globs were incorrectly handled and expanded by bash into the files in the temporary build directory.
2022-10-10 17:55:11 +13:00
github-actions[bot] cdfb8a30a4
Merge staging-next into staging 2022-10-08 12:02:12 +00:00
Vladimír Čunát 6565abc264
Merge branch 'master' into staging-next 2022-10-08 10:20:07 +02:00
Sergei Trofimovich 7d7030c6d5
Merge pull request #193871 from trofi/FORTIFY-unset-and-set
cc-wrapper/add-hardening.sh: always unset _FORTIFY_SOURCE before re-s…
2022-10-08 07:30:17 +01:00
Silvan Mosberger c36f929dee nixos/tests: Add tests for dockerTools.buildNixShellImage 2022-10-07 22:04:24 +02:00
Silvan Mosberger 8ec0837a72 Introduce dockerTools.buildNixShellImage 2022-10-07 22:04:22 +02:00
Alex Martens bac7ee3208 rustc: fix build for no_std targets 2022-10-07 07:35:29 -07:00
Anderson Torres 10c7f50248
Merge pull request #194425 from SuperSandro2000/remove-double-fixed-output
Add support for pname+version to fetchzip/fetchurl
2022-10-06 22:24:11 -03:00
Vladimír Čunát 4f6e99870b
Merge #191724: cc-wrapper: remove duplicate include flags
...into staging
2022-10-05 20:01:34 +02:00
Sandro 1fd6cf192a
fixup! fetchurl: add pname+version support 2022-10-05 15:54:57 +02:00
github-actions[bot] 2ae4a931aa
Merge master into staging-next 2022-10-05 06:10:04 +00:00
Sandro Jäckel 01dfd3cb58
fetchzip: add pname+version support 2022-10-04 18:57:46 +02:00
Sandro Jäckel 7deac8b8f7
fetchurl: add pname+version support 2022-10-04 17:30:06 +02:00
Silvan Mosberger 79ae4eb997 fake-nss: Add support for extra passwd and group lines 2022-10-04 00:05:34 +02:00
Lin Jian 4f65cecd45
emacs: remove warning of xargs when doing AOT native-comp
Before, there is a warning:

xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

According to the  manual[1], swap -I and -n can remove this warning.

[1]: https://www.gnu.org/software/findutils/manual/html_node/find_html/Conflicting-xargs-options.html
2022-10-04 02:53:55 +08:00
Yves-Stan Le Cornec b739da0693 buildBazelPackage: optionally run bazel tests in checkPhase
Tests from the bazelTestTargets argument will be run before the build. The new  bazelTestFlags argument can be used to pass additional flags to this phase.
2022-10-03 12:52:57 +02:00
github-actions[bot] 74f2e36035
Merge master into staging-next 2022-10-03 00:04:07 +00:00
Yureka aa3dc6440e
fetchYarnDeps: support passing src attribute (#193047) 2022-10-02 22:41:31 +02:00
Ivv 1a958fae46
Merge pull request #193033 from corngood/dotnet-deterministic-fetch-deps
dotnet: fix some problems with nuget-to-nix and make it deterministic
2022-10-02 21:31:01 +02:00
David McFarland b60c9fd2fe nuget-to-nix: find sources deterministically
The source used to download a particular package still isn't
deterministic in nuget. Even worse, the hash of the package can vary
between sources. This makes nuget use the first enabled source
containing the package.

The order of the dependencies may be slightly different because it now
uses glob order of the lower-case package names and versions, instead of
sorting the output.

If the package actually downloaded was the first source that contains
the package, then it will be hashed from disk to avoid downloading it
again.
2022-10-02 16:09:27 -03:00
David McFarland f8763b87e0 nuget-to-nix: exclude by package source, not list
This allows exclusions to be by version.
2022-10-02 16:09:27 -03:00
David McFarland 0eb6874732 build-dotnet-module: fix fetch-deps usage message 2022-10-02 16:09:27 -03:00
David McFarland f716d092e2 build-dotnet-module: limit package platforms by sdk support 2022-10-02 16:09:27 -03:00
David McFarland 4b40579b2d build-dotnet-module: clean up tmp file handling
Having:

rm -rf "$src" "$HOME"

Was slightly terrifying IMO, especially where the trap was installed
before HOME was set.
2022-10-02 16:09:24 -03:00
github-actions[bot] 0ae3aa5345
Merge master into staging-next 2022-10-02 17:45:43 +00:00
Théo Zimmermann 2dc3552aa1 coqPackages.mkCoqDerivation: upgrade to Dune 3
And remove the version number from the corresponding attributes.
2022-10-02 14:42:28 +02:00
github-actions[bot] e879e7d54e
Merge master into staging-next 2022-10-02 00:04:43 +00:00
figsoda a1d50eecab
Merge pull request #193132 from figsoda/clean-up
treewide: clean up
2022-10-01 17:03:11 -04:00
Sergei Trofimovich 2a9fc04635 cc-wrapper/add-hardening.sh: always unset _FORTIFY_SOURCE before re-setting it
On darwin clang driver always sets -D_FORTIFY_SOURCE=0 under asan.
This causes -Werror to trip over macro redefinition:

    <command line>:1:9: error: '_FORTIFY_SOURCE' macro redefined [-Werror,-Wmacro-redefined]
    #define _FORTIFY_SOURCE 2
            ^

To avoid it let's always explicitly undefine it first before redefining.
2022-10-01 08:30:11 +01:00
github-actions[bot] 9c14978f84
Merge master into staging-next 2022-09-29 12:01:25 +00:00
Robert Hensing aed1deab05 nixos/testing: Fix release.nix tests evaluation
Fixes the problem introduced by 12b3066aae
which caused nixos/release.nix to return the wrong attributes, while
intending to only affect nixos/lib's runTest.
This also removes callTest from the test options, because callTest is
only ever invoked by all-tests.nix.
2022-09-29 10:49:09 +02:00
Daniel Barter 0bea4a194f cc-wrapper/setup-hook.sh: remove duplicate flags in NIX_CFLAGS_COMPILE 2022-09-28 13:24:42 -07:00
Vladimír Čunát 292756e9ff
Merge #190093: rustc: propagate libiconv on darwin
...into staging
2022-09-28 09:45:11 +02:00
figsoda dd73077dc3 srcOnly: remove unused binding 2022-09-26 22:18:55 -04:00
figsoda dc19b95eff rustPlatform.buildRustPackage: remove unused function 2022-09-26 21:53:37 -04:00
Maximilian Bosch 3ca9b9a8ad
fetchNextcloudApp: rewrite with fetchzip & applyPatches
There are the following issues with the current implementation:

* `fetchurl` with a tarball from GitHub appears to break occasionally
  because the tarballs are not necessarily reproducible. Because of
  that, `fetchFromGitHub` unpacks the tarball already because the
  contents are actually reproducible in contrast to the tarball. To have
  the same behavior here, we use `fetchzip` now (and `applyPatches` on
  top to apply additional patches if needed).

* Fixes the way how patches are applied. Previously, when having patches
  for a git checkout of the app, these wouldn't apply because the
  `appname-version` prefix is missing.

* Because all old hashes are broken with this, I added an evaluation
  check that breaks evaluation when using the old API (i.e. with
  `name`/`version` which are not needed anymore).
2022-09-26 20:32:33 +02:00
github-actions[bot] 892a84aea0
Merge staging-next into staging 2022-09-26 18:02:33 +00:00
github-actions[bot] 59a37c822b
Merge master into staging-next 2022-09-26 18:01:53 +00:00
Ivv 2650d450a7
Merge pull request #190403 from IvarWithoutBones/dotnetmodule-fixes
buildDotnetModule: several usability improvements
2022-09-26 15:04:31 +02:00
github-actions[bot] cbfc406adc
Merge staging-next into staging 2022-09-26 12:02:05 +00:00
github-actions[bot] 7a06ced970
Merge master into staging-next 2022-09-26 12:01:27 +00:00
Sandro ff3be8e16c
Merge pull request #161278 from gdamjan/make-portable 2022-09-26 11:38:13 +02:00
Frederik Rietdijk 63e480ba16 Merge staging-next into staging 2022-09-26 09:31:50 +02:00
Frederik Rietdijk de57d754a0 Merge master into staging-next 2022-09-26 09:31:22 +02:00
Sandro c4cdfe815b
Merge pull request #188041 from SuperSamus/appimage-run 2022-09-26 00:34:21 +02:00
Ivar Scholten 987d32bbac buildRustPackage: dont rely on NIX_BUILD_TOP in cargoSetupPostPatchHook
This breaks the builder when a nix-shell or keepBuildTree is used. The
issue occurs because paths to cargo lockfiles are read with NIX_BUILD_TOP,
which is not reliable.

This breaks a nix-shell because NIX_BUILD_TOP simply is not set, causing
an invalid path to be used. This can be worked around using
NIX_BUILD_TOP=$PWD, but that obviously is not great.

This breaks keepBuildTree because it changes the working directory to a
different path than NIX_BUILD_TOP. Since the lockfiles are copied based
on the working directory, but read based on NIX_BUILD_TOP, this causes
the hook to not be able to find them.

This was solved by both reading these files based on the working directory,
using absolute paths to avoid having to traverse back in the directory tree.

Fixes: #138554
2022-09-25 16:17:36 +02:00
Дамјан Георгиевски 499aebcf34 portableService: tooling to create portable service images
see https://systemd.io/PORTABLE_SERVICES/ about the definition of
portable services. this tooling is analogous to the `pkgs.dockerTools.buildImage`
tooling and is called `pkgs.portableService`.

systemd (since version 239) supports a concept of “Portable Services”.
“Portable Services” are a delivery method for system services that uses
two specific features of container management:

* Applications are bundled. I.e. multiple services, their binaries and all
  their dependencies are packaged in an image, and are run directly from it.
* Stricter default security policies, i.e. sandboxing of applications.

The primary tool for interacting with Portable Services is portablectl,
and they are managed by the systemd-portabled service.

This function will create a squashfs raw image in `result/$pname_$version.raw`
that has the required files by the portable services spec, and all the
dependencies for the running program in the nix store.
2022-09-22 20:11:25 +02:00
github-actions[bot] 7f9508dfa0
Merge staging-next into staging 2022-09-21 06:24:07 +00:00
github-actions[bot] 071a9fc320
Merge master into staging-next 2022-09-21 06:23:26 +00:00
Robert Hensing 97f6e8b3e6
Merge pull request #191988 from zombiezen/fix-docker-ca-certificates
dockerTools: add missing mkdir to caCertificates derivation
2022-09-21 01:20:00 +01:00
Anderson Torres 0502262f1c
Merge pull request #191769 from osama-re/melpa-fetchers-v2
emacs: fix emacs packages with new fetchers
2022-09-20 21:14:54 -03:00
Robert Hensing cbb1f39264 nixosTests.docker-tools: Add image-with-certs 2022-09-21 01:00:04 +01:00
Ross Light f140b54916 dockerTools: add missing mkdir to caCertificates derivation 2022-09-20 08:07:23 -07:00
github-actions[bot] abd82bc57d
Merge staging-next into staging 2022-09-20 12:02:05 +00:00
Martin Weinelt 5d4267b0f2 Merge remote-tracking branch 'origin/master' into staging-next 2022-09-20 12:25:19 +02:00
Theodore Ni c319d8ae3b
cc-wrapper: comment explaining C++ stdlib order
There is context here that I needed when resolving an issue in which
libc was added to NIX_CFLAGS_COMPILE before the C++ stdlib that took
me awhile to understand.

It was suggested to me that this context be included as a comment,
since it is not obvious and could help others in the future.
2022-09-20 12:14:51 +02:00
Uri Baghin 24ac72e8a1
Merge pull request #147649 from veprbl/pr/bazel_darwin_sandbox_fix
buildBazelPackage: fix sandboxed builds on darwin
2022-09-20 16:18:14 +10:00
Robert Hensing 8deb17a36e
Merge pull request #186323 from ShamrockLee/make-setuphook-passthru
trivial-builders.nix: Add input argument `passthru` to makeSetupHook
2022-09-19 11:30:37 +01:00
Ivar Scholten 4a8eb528be
buildDotnetModule: add the option to keep sources to fetch-deps 2022-09-18 18:02:03 +02:00
Ivar Scholten 8e00d6ac26
buildDotnetModule: move nugetDeps throw to when its actually needed
Previously we had an assert that would complain when nugetDeps wasnt set,
which also didnt allow any passthru attributes (like fetch-deps) to be
build. That causes a cycle where you need nugetDeps to fetch the nuget
deps, but arent able to build the script to do so.
2022-09-18 18:00:37 +02:00
Ivar Scholten 03a1b62cb3
buildDotnetModule: dont require specifing a projectFile
In a lot of cases dotnet can figure this out by itself, so we can just
invoke it without the project argument.
2022-09-18 18:00:37 +02:00
Ivar Scholten a7c598e458
buildDotnetModule: minor changes to hooks
Abide by `set -e` rules and use `local -r` where applicable.
2022-09-18 18:00:37 +02:00
Ivar Scholten e100b74627
buildDotnetModule: format with nixpkgs-fmt 2022-09-18 18:00:29 +02:00
Osama Rebach eff9931ef8
package-build: don't use mtime when creating tarballs 2022-09-18 10:02:53 +01:00
Osama Rebach b82454134d
update package-build: 35017a2 -> c3c535e 2022-09-18 10:02:53 +01:00
github-actions[bot] f2681f8bd1
Merge master into staging-next 2022-09-17 18:01:15 +00:00
Benjamin Hipple 1066f0ef92
Merge pull request #178964 from linsui/cargo
fetch-cargo-tarball: allow use index mirror
2022-09-17 12:04:27 -04:00
github-actions[bot] 5b2ff5fc26
Merge master into staging-next 2022-09-16 18:02:08 +00:00
Cole Helbling e97ee029b4 build-dotnet-module/fetch-deps: fixup temp naming when pname has a capital X in it
For example, this script doesn't work for `xivlauncher` because its
proper `pname` is `XIVLauncher`, and `mktemp` complains about "too few
X's":

    $ mktemp -td "XXXXXX-XIVLauncher-home"
    mktemp: too few X's in template ‘XXXXXX-XIVLauncher-home’

vs

    $ mktemp -td "XIVLauncher-home-XXXXXX"
    /tmp/XIVLauncher-home-EdGMei
2022-09-16 09:18:22 -07:00
David McFarland c91f7dd64a nuget-to-nix: skip local packages 2022-09-15 19:39:36 -03:00
David McFarland 4ec86553b1 make-nuget-deps: use . for version separator
This allows the output to be used as a nuget source.
2022-09-15 19:39:36 -03:00
Et7f3 d937f6fc2f
cc-wrapper: remove duplicate C{C,XX}${role_post}
This might be typo but I don't know which other variable was intended to be named. This can also come from a merge conflict.
2022-09-14 02:41:05 +02:00
Frederik Rietdijk 3086301ac4 Merge staging-next into staging 2022-09-12 19:49:24 +02:00
github-actions[bot] 33ef8defa2
Merge master into staging-next 2022-09-12 00:02:43 +00:00
Ivv 44ef157f55
Merge pull request #187359 from IvarWithoutBones/dotnetmodule-updatescripts
treewide: migrate buildDotnetModule update scripts to use fetch-deps
2022-09-11 21:40:06 +02:00
github-actions[bot] 6ec60fd222
Merge master into staging-next 2022-09-11 18:01:19 +00:00
Dmitry Kalinkin fe67982028
buildBazelPackage: run in batch mode to avoid requiring loopback networking 2022-09-11 12:51:57 -04:00
Sandro Jäckel c3f51d1b55
dotenv: convert CRLF line endings into LF
otherwise git converts the line endings with every rebase on Linux
2022-09-11 17:02:00 +02:00
Dennis Gosnell a3f5759e53
Merge pull request #188766 from cdepillabout/overrideCoqDerivation
coqPackages.mkCoqDerivation: add a lib.overrideCoqDerivation function
2022-09-11 08:41:55 -04:00
Ivar Scholten efd92e7fd7
buildDotnetModule: restore for all platforms in fetch-deps
This makes buildDotnetModule restore nuget dependencies for the
platforms set in meta.platforms. This should help with generating
lockfiles for platforms other than the host machine.

Co-authored-by: mdarocha <git@mdarocha.pl>
2022-09-11 01:06:33 +02:00
Dennis Gosnell 346454873e
coqPackages.lib.overrideCoqDerivation: update documentation for overriding version 2022-09-11 07:41:17 +09:00
Adam Joseph 31e5930b57 default-crate-overrides.nix: add pangocairo-sys 2022-09-10 02:06:30 -07:00
Adam Joseph 2ab5cfe7ce default-crate-overrides.nix: import pango 2022-09-10 02:06:29 -07:00
Adam Joseph 02de33cacd default-crate-overrides.nix: add atk-sys 2022-09-09 19:51:43 -07:00
Adam Joseph c804cea71d default-crate-overrides.nix: add {gtk4,gdk4,gsk4}-sys 2022-09-09 18:58:59 -07:00
Adam Joseph 4ceec72751 default-crate-overrides.nix: add cairo-sys-rs 2022-09-09 18:58:21 -07:00
Winter b6fc00b8f4 rustc: propagate libiconv on darwin
Rust binaries are unconditionally linked to libiconv on Darwin (see https://github.com/rust-lang/libc/issues/2870). We already add it as a dependency in `buildRustPackage`, so let's go a step further and propagate it.
2022-09-06 23:17:56 -04:00
github-actions[bot] a8a3bf5fc0
Merge staging-next into staging 2022-08-31 18:02:12 +00:00
github-actions[bot] 708377a1e3
Merge master into staging-next 2022-08-31 18:01:30 +00:00
Robert Hensing 62b25a28fe
Merge pull request #170906 from Sohalt/dockerTools.ca-certificates.crt
dockerTools ca-certificates.crt helper
2022-08-31 14:08:02 +02:00
Linus Heckemann 9a1c300112
Merge pull request #188299 from ncfavier/remove-references-no-storedir
removeReferencesTo: kill lone hashes
2022-08-30 13:35:40 +02:00
Dennis Gosnell 06ece659f0
coqPackages.mkCoqDerivation: add a coqPackages.lib.overrideCoqDerivation function
`overrideCoqDerivation` allows end-users the ability to easily override
arguments to the underlying call to `mkCoqDerivation` for a given Coq
library.

This is similar to `haskell.lib.overrideCabal` for Haskell packages and
`.overridePythonAttrs` for Python packges.
2022-08-29 14:41:03 +09:00
github-actions[bot] 882732454c
Merge staging-next into staging 2022-08-26 12:02:32 +00:00
github-actions[bot] d944d69ed2
Merge master into staging-next 2022-08-26 12:01:48 +00:00
squalus 4246654992 writers.makePythonWriter: fix cross compile
The check script needs to run at build time. Add a new argument to
makePythonWriter for the appropriate buildPackages version of pythonPackages,
and use this to run the check script.
2022-08-25 17:46:34 -07:00
github-actions[bot] 766839d4c3
Merge staging-next into staging 2022-08-26 00:03:17 +00:00
github-actions[bot] 9fef82dc0b
Merge master into staging-next 2022-08-26 00:02:34 +00:00
John Ericson 6a0d3815a3
Merge pull request #187975 from marius851000/rustRequiredFeatures
buildRustCrate: Do not compile binaries if all the requiredFeatures aren't enabled.
2022-08-25 17:45:52 -04:00
github-actions[bot] efe19ddf3b
Merge staging-next into staging 2022-08-25 18:01:48 +00:00
github-actions[bot] 0b8aa77df1
Merge master into staging-next 2022-08-25 18:01:10 +00:00
Naïm Favier 3c697db972
removeReferencesTo: kill lone hashes
Nix counts any occurrence of a store path's *hash* as a reference, even
without a store directory prefix. The current version only kills
references of the form `/nix/store/<hash>-`, which can fail e.g. for
compressed files.
2022-08-25 17:25:58 +02:00
Bernardo Meurer 6943487dde
Merge pull request #178310 from minijackson/add-microblaze
Add MicroBlaze architecture
2022-08-25 11:59:49 -03:00
Minijackson bec06f5bba
cc-wrapper: disable stackprotector for MicroBlaze
This option doesn't seem to be supported in the cross-compiler
2022-08-25 16:00:49 +02:00
Bernardo Meurer 9ce4fd2585
Merge pull request #187399 from tjni/revert-cc-wrapper-hardening-disable
cc-wrapper: fortran: enable stackprotector on M1
2022-08-25 10:27:48 -03:00
Bernardo Meurer fbd067fef0
Merge pull request #187841 from amjoseph-nixpkgs/pr/rust/toTargetArch
build-support/rust: toTargetArch: strip off endianness
2022-08-25 10:22:34 -03:00
Martin Weinelt 249398ffa8 Merge remote-tracking branch 'origin/staging-next' into staging 2022-08-25 00:32:27 +02:00
Vladimír Čunát b784c5ae63
Merge #186941: staging-next 2022-08-16 2022-08-24 19:10:16 +02:00
Stig 24f160cfcd
Merge pull request #187884 from helsinki-systems/feat/perl-sri
perlPackages: Switch to SRI hashes, add `hash` support to bootstrap fetchurl, bump minimal nix version
2022-08-24 17:28:04 +02:00
Vladimír Čunát 7bfc2b2564
Merge branch 'master' into staging-next 2022-08-24 17:10:55 +02:00
Vladimír Čunát 0e304ff0d9
Merge #182953: fetchurl: disallow specifying both sha256 and hash 2022-08-24 17:05:37 +02:00
Janne Heß 0b3e7f063c
boostrap fetchurl: Add SRI support 2022-08-24 09:55:45 +02:00
github-actions[bot] 9f510422cb
Merge master into staging-next 2022-08-24 00:02:43 +00:00
Jonathan Ringer dc607cf67b writeShellApplication: don't prefix empty PATH 2022-08-23 22:41:28 +02:00
Martino Fontana 18a9211640 appimage-run: add vulkan-loader and libpulseaudio 2022-08-23 17:45:54 +02:00
marius david 3291bda7b6 buildRustCrate: Do not compile binaries if all the requiredFeatures aren't enabled. 2022-08-23 13:09:33 +02:00
Adam Joseph 8682bd0a81 build-support/rust: toTargetArch: strip off endianness
`toTargetArch` in `pkgs/build-support/rust/lib/default.nix` is used to
set `CARGO_CFG_TARGET_ARCH`.  This environment variable is supposed to
be the `<arch>` portion of an LLVM-style platform name:

```
<arch><sub>-<kernel>-<libc><abi>
```

Note that the pointer-width (the "64" in "x86_64" and "mips64") is
part of `<arch>`, but the endianness (the `_be` in `aarch64_be`) is
*not*.

Unfortunately at the moment nixpkgs' parsed `cpuType` has no way to
query for the three subparts (name, pointer-width, and
subarch/endianness), nor any way to ask for just the first two parts.

For now, this commit simply fixes the problem in the two cases that
matter: `mips64el` and `powerpc64le`, which I believe are the only two
platforms supported by both rust and nixpkgs which have a
"subarchitecture".
2022-08-22 02:27:06 -07:00
linsui 7d8f9ee62e build-rust-package: cargoSha256 and cargoHash must not be null 2022-08-21 17:09:09 +08:00
linsui 51a6ac79d2 fetch-cargo-tarball: fix for packages without dep 2022-08-21 16:28:28 +08:00
linsui 656e3022f4 fetch-cargo-tarball: allow use index mirror 2022-08-21 16:28:28 +08:00
Theodore Ni 1f6366d38c
cc-wrapper: fortran: enable stackprotector on M1
Was failing due to https://github.com/iains/gcc-darwin-arm64/issues/54,
fix picked up in https://github.com/NixOS/nixpkgs/pull/186477.
2022-08-19 16:41:36 -07:00
Sandro 5b76f42372
buildGo{Module,Package}: don't run vet linter 2022-08-20 07:37:14 +10:00
github-actions[bot] 767bdf0d81
Merge master into staging-next 2022-08-19 00:03:25 +00:00
Zhaofeng Li 3d07ae8afd build-dotnet-module: Allow specifying the output path of fetch-deps 2022-08-18 13:49:45 -06:00
Zhaofeng Li 1528ce3063 nuget-to-nix: Make exclusion file optional 2022-08-18 13:49:45 -06:00
github-actions[bot] 6406c43ce5
Merge master into staging-next 2022-08-18 18:01:17 +00:00
Evan Petousis b4de4dc3bf
buildDotnetModule: set fetch-deps utils via PATH 2022-08-18 23:46:37 +10:00
Evan Petousis c51e1a1fba
buildDotnetModule: use coreutils in fetch-deps
cp on macOS doesn't support the -T flag, which causes the fetch-deps
script to fail. Use Nix's coreutils to ensure the script works
consistently across all platforms.
2022-08-18 23:36:25 +10:00
Evan Petousis d7728dfc67
buildDotnetModule: use platform-agnostic cp format
cp on macOS doesn't support the -T flag, which causes the fetch-deps
script to fail. Appending `/.` to the source argument replicates the
same functionality.
2022-08-18 23:35:50 +10:00
github-actions[bot] 87085e3d62
Merge master into staging-next 2022-08-18 00:02:31 +00:00
K900 59888d2218 build-fhs-userenv-bubblewrap: fix eval 2022-08-17 22:36:45 +03:00
Pascal Bach 6af1c99422
Merge pull request #132963 from jonringer/plex-on-aarch64
plex: allow use on non-x86 platforms
2022-08-17 20:14:38 +02:00
github-actions[bot] 954d3734e9
Merge master into staging-next 2022-08-17 12:01:28 +00:00
Alex James c9af898255
dockerTools.buildImage: make VM memSize configurable
Fixes #186752. This adds buildVMMemorySize (defaults to 512 MiB) to
buildImage, which is passed to vm.runInLinuxVM. This is needed for
larger base images, which may otherwise cause container build failures
due to OOM in the VM.
2022-08-16 21:47:29 -05:00
Adam Joseph 6d9a490980 default-crate-overrides.nix: remove unnecessary attrs from previous commit
Sorry, I should have removed these before submitting https://github.com/NixOS/nixpkgs/pull/186748
2022-08-15 01:08:13 -07:00
github-actions[bot] 4e717ab958
Merge staging-next into staging 2022-08-15 06:01:47 +00:00
Adam Joseph 58e5bd56d6 default-crate-overrides.nix: add libevdev for evdev-rs 2022-08-14 21:20:55 -07:00
Sebastián Mancilla d2df2fcfad
Merge pull request #180087 from aaronjheng/bazel
buildBazelPackage: allow custom impureEnvVars
2022-08-14 22:08:51 -04:00
Sebastián Mancilla 10a745eac8
Merge pull request #179896 from erikarvstedt/fix-bash-exit-handler
treewide: fix bash exit handlers
2022-08-14 21:42:41 -04:00
github-actions[bot] 842c52c5ba
Merge staging-next into staging 2022-08-15 00:03:15 +00:00
Winter dbd18a63a7 fetchgit: allow disabling cone mode for sparse checkouts, fix test 2022-08-14 23:03:07 +02:00
github-actions[bot] 7ef4d517f3
Merge staging-next into staging 2022-08-14 18:01:52 +00:00
Ivv 7ec728db17
Merge pull request #181512 from mdarocha/dotnet-6-update
dotnet-sdk: 6.0.301 -> 6.0.400, refactor to streamline dotnet updates
2022-08-14 15:08:43 +02:00
Jörg Thalheim f08b424f73
Merge pull request #186443 from yu-re-ka/feature/rustc-musl2
fix pkgsMusl.rustc
2022-08-13 16:39:56 +01:00
Yureka 51c62063e3 cargoSetupHook: set crt-static
Tell rust if we want our binaries linked statically or dynamically.
Otherwise the compiler will always produce statically linked binaries for musl
targets, as this is the default.
2022-08-13 15:25:41 +02:00
Yureka 66ac47bdf6 cargoSetupHook: remove unneeded rustflags for aarch64+static cross
The linked issue was resolved upstream and the `-lgcc` is no longer required
since https://github.com/rust-lang/compiler-builtins/pull/377 was merged.
2022-08-13 15:24:14 +02:00
Robert Hensing c078d552fe wrapGAppsHook: Set name
The previous commit, removing substitutions, causes a mass rebuild,
so we use the opportunity to set the name; also a mass rebuild.
2022-08-13 11:53:06 +02:00
Robert Hensing e8a38a2f52 makeSetupHook: Deprecate substitutions.passthru 2022-08-13 11:53:06 +02:00
Robert Hensing 4dc28e0057 setup hooks: substitutions.passthru -> passthru 2022-08-13 10:29:10 +02:00
Shamrock Lee ba895a7da8 trivial-builders.nix: Add input argument passthru to makeSetupHook
One significant use case is adding `passthru.tests` to setup-hooks,
and help increase test coverage for mission-critical setup-hooks.

As `meta`, `passthru` doesn't go into the build script directly.
However, passing an empty set to `passthru` breaks nixpkgs-review
and OfBorg tests, so pass it only when specified.
2022-08-13 04:20:12 +08:00
github-actions[bot] 3e8df11515
Merge staging-next into staging 2022-08-11 12:02:11 +00:00
Guillaume Maudoux 11976981f5
Merge pull request #185021 from mdarocha/fix-self-contained
buildDotnetModule: fix build for dotnet-sdk versions below 6
2022-08-11 12:04:16 +02:00
Sergei Trofimovich 3ceb8a59a6
Merge pull request #185537 from trofi/decouple-strip-and-separate-debug
setup-hooks/separate-debug-info.sh: don't inhibit strip hook
2022-08-11 08:53:24 +01:00
mdarocha a3fff0c947 buildDotnetModule: exclude sdk-specific packages in fetch-deps result 2022-08-10 16:26:49 +02:00
mdarocha 886280e8a9 buildDotnetModule: include sdk-specific packages in nuget source
Some packages are defined by the build proccess, and change every time
the dotnet-sdk package changes. To avoid having to regenerate every
dependant packages dependencies every dotnet update, this moves these
packages into the `dotnet-sdk` `passthru` attribute, and includes them
every time `buildDotnetModule` is used.
2022-08-10 16:26:43 +02:00
github-actions[bot] 67f5b5a85d
Merge staging-next into staging 2022-08-08 18:02:11 +00:00
adisbladis 5cc12aa8cb
Merge pull request #182187 from adisbladis/newlib-nano-cc
newlib-nano: Set same flags as regular newlib in cc-wrapper/gcc config
2022-08-08 22:07:57 +08:00
github-actions[bot] c5367ef65c
Merge staging-next into staging 2022-08-07 12:02:20 +00:00
Sergei Trofimovich b3b672d5a1 setup-hooks/separate-debug-info.sh: don't inhibit strip hook
Before the change separate-debug-info.sh did the stripping itself.
This scheme has a few problems:
1. Stripping happens only on ELF files. *.a and *.o files are skipped.
   Derivations have to do it manually. Usually incorrectly
   as they don't run $RANLIB (true for `glibc` and `musl`).
2. Stripping happens on all paths. Ideally only `stripDebugList` paths
   should be considered.
3. Host strip is called on Target files.

This change offloads stripping logic to strip hook. This strips more
files for `glibc` and `musl`. Now we can remove most $STRIP calls
from individual derivations.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-08-07 12:49:37 +01:00
zowoq 9a49ca9f9a buildGo{Module,Package}: move to build-support/go 2022-08-07 18:26:01 +10:00
zowoq 621cc6c813 garble: move to development/tools 2022-08-07 18:26:01 +10:00
Sergei Trofimovich 57080facf2
Merge pull request #184908 from trofi/expand-gcc-strip
gcc: extend stripping of .a libraries and .o objects
2022-08-06 17:17:10 +01:00
Sergei Trofimovich e58a10f3c9
Merge pull request #184251 from trofi/avoid-hyphens
bintools-wrapper, cc-wrapper: avoid invalid export of 'expand-respons…
2022-08-06 17:16:12 +01:00
olaf 5a6853b3bf use consistently user alice for examples 2022-08-05 13:13:24 +02:00
Sergei Trofimovich c817efe660 gcc: extend stripping of .a libraries and .o objects
The initial intent was to strip .a and .o files, not .a.o files.
While at it expanded stripping for $lib output as well.

Without the change `libgcc.a` was not stripped and `.debug*` sections
made into final binaries. It's not a problem on it's own, but it's an
unintended side-effect. Noticed on `crystal_1_0` test failure where
`crystal` was not able to handle `dwarf-5`.

While at it allowed absolute file names to be passed to stripDebugList
and friends.
2022-08-03 22:28:47 +01:00
K900 eabbad8af1
Merge pull request #185036 from K900/goblinization
make-initrd-ng: parse ELFs ourselves instead of shelling out to patchelf and friends
2022-08-03 19:57:55 +03:00
mdarocha 134da4ce36 buildDotnetModule: fix build for dotnet-sdk versions below 6
The --self-contained and --no-self-contained switches were
added to the dotnet build command starting with .NET 6.
The switch is equivalent to the setting the SelfContained
property, so we use the property for backwards compatibility.
2022-08-03 16:15:59 +02:00
Adam Joseph c8a1838d30 fetchgit: remove "security" from comment about "security risk"
Closes #178410
2022-08-03 05:07:34 -07:00
github-actions[bot] 537fbd1326
Merge master into staging-next 2022-08-03 00:02:25 +00:00
ash lea 488056a418 steam: fix opengl inside pressure-vessel 2022-08-02 13:48:34 -07:00
github-actions[bot] 411aad5a4d
Merge master into staging-next 2022-08-02 18:01:14 +00:00
K900 de93795b46 make-initrd-ng: clean up a bit 2022-08-02 10:54:55 +03:00
Linus Heckemann ee38010981 makeInitrdNG: add meta and update script 2022-08-02 10:54:55 +03:00
Linus Heckemann 6fc909a1cc makeInitrdNG: make stripping fully optional
Now the tool will only strip binaries if a strip executable is passed
via the STRIP environment variable. This is exposed via the strip
option for makeInitrdNG and the NixOS option boot.initrd.systemd.strip.
2022-08-02 10:19:48 +03:00
K900 daee67dae6 make-initrd-ng: use goblin instead of shelling out to patchelf and friends 2022-08-02 10:19:48 +03:00
K900 1356441cb1 make-initrd-ng: rustfmt 2022-08-02 10:19:48 +03:00
John Ericson cc29693a09 buildRustCrate: Add support for standard library deps
We are replicating one mechanism behind `-Z build-std`.

There isn't yet crate2nix support for this, but one can (and I do) add
the missing stdlib deps (for this feature to pick up) with overrides.
2022-08-01 15:34:49 -04:00
Sergei Trofimovich 549e08c8e8 bintools-wrapper, cc-wrapper: avoid invalid export of 'expand-response-params'
POSIX sh (and `bash`) impose a restriction on environment variable name
format and disallow hypheps in the names. Normally it's not a problem
as nothing usually tries to refer nyphenated names.

One exception is `nix develop` (https://github.com/NixOS/nix/issues/6848):

    $ nix develop -f. gcc -L
    gcc-wrapper> ...-get-env.sh: line 70: expand-response-params: bad substitution

Note that bash usually uses explicitly created `expandResponseParams`
variant of the same variable.

To work the problem around let's avoid environment variable export and move
it to `passthru` for `cc` (used ina  few places) and remove it completely for
`binutils` (does not seem to be used at all).
2022-07-31 16:31:13 +01:00
github-actions[bot] 15686bdd94
Merge master into staging-next 2022-07-30 18:01:31 +00:00
Sergei Trofimovich f2e3c9efff
Merge pull request #183415 from dramforever/uclibc-dyld
bintools-wrapper: Add dynamicLinker for uClibc
2022-07-30 18:39:06 +01:00
Vladimír Čunát 5b5843e2b2
Merge #151983: wrapper: Fortran: disable stackprotector
...hardening on darwin aarch64 (merge into staging)
2022-07-29 19:27:34 +02:00
Artturi 2679e22074
Merge pull request #183461 from Artturin/crossfixes1 2022-07-29 01:36:57 +03:00
Artturin 0e16aa7b56 bintools-wrapper: symlink ar too
missed this in 1d44ac176c
2022-07-28 23:44:20 +03:00
dramforever 22ac2bce66 bintools-wrapper: Add dynamicLinker for uClibc 2022-07-29 01:43:36 +08:00
github-actions[bot] 437247fc43
Merge staging-next into staging 2022-07-28 12:02:23 +00:00
ajs124 349612483d
Merge pull request #182940 from helsinki-systems/feat/fetchncapp-pname 2022-07-28 12:47:23 +02:00
Sandro f358b0d40d
Merge pull request #182273 from mdarocha/dotnet-self-contained-build
buildDotnetModule: add option to make a self-contained build
2022-07-28 11:59:09 +02:00
Bernardo Meurer 88c63ca65a
Merge pull request #182513 from trofi/strip-for-host-and-target
gcc: enable stripping for cross-compilers
2022-07-28 00:30:49 -07:00
github-actions[bot] 9153131664
Merge staging-next into staging 2022-07-27 12:02:00 +00:00
github-actions[bot] 9ed58a6fb6
Merge master into staging-next 2022-07-27 12:01:18 +00:00
Lassulus 63218387d8
Merge pull request #182101 from ezemtsov/patch-2
nuget-to-nix: fallback to default URL for directories
2022-07-27 10:58:12 +02:00
mdarocha 19403a85d9 buildDotnetModule: add option to make a self-contained build 2022-07-26 18:00:15 +02:00
Vladimír Čunát cb704bf922
fetchurl: disallow specifying both sha256 and hash
A full check would be more complicated to write -
and more importantly - probably also more expensive.

Motivation: eval-time catch for errors like in commit 8198636be0.
2022-07-26 12:47:14 +02:00
ajs124 0ce971e5d2 fetchnextcloudapp: name -> pname
this way name and the storepath contain the version, which can be useful
sometimes
2022-07-26 10:58:06 +02:00
Sergei Trofimovich 0507725061 setup-hooks/strip.sh: run RANLIB on static archives after stripping
'strip' does not normally preserve archive index in .a files.
This usually causes linking failures against static libs like:

    $ nix build --no-link -f. pkgsCross.mingw32.re2c
    > ...-i686-w64-mingw32-binutils-2.38/bin/i686-w64-mingw32-ld:
      /nix/store/...-i686-w64-mingw32-stage-final-gcc-13.0.0-lib/i686-w64-mingw32/lib/libstdc++.dll.a:
        error adding symbols: archive has no index; run ranlib to add one

We restore the index by running ranlib explicitly.
2022-07-25 11:06:58 +01:00
Sergei Trofimovich 0f45ce6e77 setup-hooks/strip.sh: add strip{All,Debug}ListTarget variables
This change mimics existing strip{All,Debug}List variables to
allow special stripping directories just for Target.

The primary use case in mind is gcc where package has to install
both host and target ELFs. They have to be stripped by their own
strip tools accordingly.

Co-authored-by: Rick van Schijndel <Mindavi@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-25 11:06:45 +01:00
Evgeny Zemtsov 7ab35bdaa6 nuget-to-nix: fallback to default URL for directories
In some cases `$pkgs_src` can be a path. For example with `FSharp.Core` when it comes with dotnet SDK.
In these cases we need to fallback on default URL otherwise curl fails.
2022-07-25 11:05:10 +02:00
John Ericson 21966e13d2
Merge pull request #181943 from trofi/fix-cross-built-gcc
gcc: pass --with-build-sysroot=/
2022-07-23 23:52:07 -04:00
Sergei Trofimovich 34636efced gcc: pass --with-build-sysroot=/ for gcc builds
Without this change cross-built gcc fails to detect stack protector style:

    $ nix log -f pkgs/stdenv/linux/make-bootstrap-tools-cross.nix powerpc64le.bootGCC | fgrep __stack_chk_fail
    checking __stack_chk_fail in target C library... no
    checking __stack_chk_fail in target C library... no

It happens because gcc treats search paths differently:

    https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/configure.ac;h=446747311a6aec3c810ad6aa4190f7bd383b94f7;hb=HEAD#l2458

     if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x ||
        test x$build != x$host || test "x$with_build_sysroot" != x; then
       ...
       if test "x$with_build_sysroot" != "x"; then
         target_header_dir="${with_build_sysroot}${native_system_header_dir}"
       elif test "x$with_sysroot" = x; then
         target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
       elif test "x$with_sysroot" = xyes; then
         target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
       else
         target_header_dir="${with_sysroot}${native_system_header_dir}"
       fi
     else
       target_header_dir=${native_system_header_dir}
     fi

By passing --with-build-sysroot=/ we trick cross-case to use
`target_header_dir="${with_sysroot}${native_system_header_dir}"`
which makes it equivalent to non-cross
`target_header_dir="${with_build_sysroot}${native_system_header_dir}"`

Tested the following setups:
- cross-compiler without libc headers (powerpc64le-static)
- cross-compiler with libc headers (powerpc64le-debug)
- cross-build compiler with libc headers (powerpc64le bootstrapTools)

Before the change only 2 of 3 compilers detected libc headers.
After the change all 3 compilers detected libc headers.

For darwin we silently ignore '-syslibroot //' argument as it does not
introduce impurities.

While at it dropped mingw special case for no-libc build. Before the change
we passed both '--without-headers --with-native-system-headers-dir' for
no-libc gcc-static builds. This tricked darwin builds to find sys/sdt.h
and fail inhibid_libc builds. Now all targets avoid passing native headers
for gcc-static builds.

While at it fixed correct headers passing to
--with-native-system-headers-dir= in host != target case: we were passing
host's headers where intention was to pass target's headers.
Noticed the mismatch as a build failure on pkgsCross.powernv.stdenv.cc
on darwin where `sys/sdt.h` is present in host's headers (libSystem)
but not target's headers (`glibc`).

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2022-07-23 18:40:07 +01:00
Artturi 981d9c0926
Merge pull request #182385 from Artturin/bintoolswrapper1
bintools-wrapper: symlink unsymlinked binaries from -unwrapped
2022-07-23 08:07:43 +03:00
Sergei Trofimovich 17f413f293 setup-hooks/strip.sh: use STRIP_FOR_TARGET, not TARGET_STRIP
Since 1ac53985 "*-wrapper; Switch from `infixSalt` to `suffixSalt`"
(2020) 'TARGET_' prefix (and infix) is no more. '_FOR_TARGET' suffix
is the only used suffix for target-specific tools and flags.

Use that in stip instead of always-empty variable.
2022-07-22 18:38:02 +01:00
toonn 946c3d8389
Merge pull request #181485 from Itaros/normal-clang-llvm-redirection
cc-wrapper: broaden explicit libc++abi linking for LLVM stdenv
2022-07-22 16:41:25 +02:00
Artturin e682dd84cf bintools-wrapper: symlink unsymlinked binaries from -unwrapped
this shouldn't change any binary available in the default build environment
because bintools-unwrapped is already in path ( idk where it comes from but i know because objcopy is in path but not in the wrapper )

this just makes all the binaries available under 'bintools' instead of
having to use 'bintools-unwrapped'

reduces confusion because now 'objcopy' and others will be in 'bintools'
2022-07-22 02:48:29 +03:00
Martin Weinelt b4988e25b5 maturin: 0.12.9 -> 0.13.0 2022-07-21 22:35:32 +02:00
John Ericson c38de9b3f2
Merge pull request #181525 from alyssais/rust-debug
separateDebugInfo: enable full Rust debug info
2022-07-21 13:09:19 -04:00
Anderson Torres b73f704a2f
Merge pull request #178567 from Artturin/pkgconfignew
makePkgconfigItem: init new function to generate pc files
2022-07-20 23:31:58 -03:00
Artturin 41877098f3 fetchpatch2: init
allows us to use the new features of patchutils without having to reset
all fetchpatch hashes in nixpkgs

https://github.com/NixOS/nixpkgs/issues/32084
2022-07-20 22:47:14 +03:00
Sergei Trofimovich cf2e2a65ae
Merge pull request #182143 from hamishmack/patch-7
libredirect: Fix cross compilation `buildPackages`
2022-07-20 15:41:39 +01:00
adisbladis d5fb429c7d cc-wrapper: Set correct hardening_unsupported_flags for newlib-nano 2022-07-20 16:41:48 +08:00
Artturin 7249b8a2f3 makePkgconfigItem: init new function to generate pc files
A function to generate pkg-config files for Nix packages that need to create them ad hoc,
like blas and lapack.

Inspiration taken from `makeDesktopItem`.
2022-07-20 06:22:39 +03:00
Hamish Mackenzie b5250a333b
libredirect: Fix cross compilation buildPackages
Currently when cross compiling the `buildPackages.libredirect` has the wrong dynamic library extension.

To reproduce the issue run something like:

```
file $(nix-build -A pkgsCross.mingwW64.buildPackages.libredirect)/lib/libredirect.dll
/nix/store/80llmqa9lkabg3qnmglngzz22fwf739q-libredirect-0/lib/libredirect.dll: Mach-O 64-bit dynamically linked shared library x86_64
```

or

```
nix-diff $(nix-instantiate -A libredirect) $(nix-instantiate -A pkgsCross.mingwW64.buildPackages.libredirect)
```
2022-07-20 10:26:48 +12:00
Michal Sojka ae45c235fa multiple-output.sh: fix moveToOutput comment
The comment suggested that "{foo,bar}" is a supported pattern, which
is not true. "{foo,bar}" is only understood by brace expansion but the
code performs only globbing. We replace the comment with "[abc]",
which is a correct example of globbing.
2022-07-19 08:23:35 +02:00
John Ericson 39811b1da9 build-support/rust/lib: make arch and os functions respect target JSON 2022-07-18 22:54:19 -04:00
Robert Hensing 17019dcf9a
Merge pull request #177039 from Sciencentistguy/makeDesktopItem-overridable
build-support/makeDesktopItem: make overridable
2022-07-16 20:37:06 +02:00
Rick van Schijndel e243499338
Merge pull request #173889 from IvarWithoutBones/fix/dotnet-cross
dotnet ecosystem: fix cross compilation
2022-07-16 12:37:11 +02:00
zowoq 0c98db7b91 dockerTools: use list of strings for configureFlags 2022-07-15 10:23:07 +10:00
Alyssa Ross d7fff81159
separateDebugInfo: enable full Rust debug info
By default, Cargo will only enable line tables.  -g enables full debug
info.  The RUSTFLAGS environment variable is examined by Cargo,
similar to how the NIX_*FLAGS* variables are examined by our compiler
wrappers.
2022-07-14 21:44:12 +00:00
Ivv 2ca3a5e4aa
Merge pull request #179187 from mdarocha/eventstore-bump-and-refactor
eventstore: 5.0.8 -> 21.10.5, refactor to use buildDotnetModule
2022-07-14 20:30:41 +02:00
Semion Nadezhdin b060076e21 cc-wrapper: broaden explicit libc++abi linking for LLVM stdenv 2022-07-13 21:19:12 +03:00
adisbladis 8619d75795
Merge pull request #181174 from ttuegel/emacs-wrapper-package-el
emacsWithPackages: Rely on package.el for autoloads
2022-07-14 00:57:30 +08:00
mdarocha 98db245db7 buildDotnetModule: explicitly set UseAppHost to true
On macOS, the native executable is not generated by default
on Catalina and above. See https://github.com/dotnet/sdk/issues/10780
2022-07-13 17:15:39 +02:00
mdarocha 3d79e4871b buildDotnetModule: set LD_LIBRARY_PATH from runtimeDeps in dotnetCheckHook
Tests should execute in a similar environment to the final app
2022-07-13 17:15:36 +02:00
Evgeny Zemtsov 8d79dfe6f0 nuget-to-nix: enable default netrc
Enable default netrc for curl command. Otherwise this doesn't work for private repositories that require authentication.
2022-07-12 21:11:57 +02:00
Thomas Tuegel 017fa2d7a0
emacsWithPackages: Rely on package.el for autoloads
The builtin `package.el` functionality is necessary and sufficient to handle
autoloads in the Emacs wrapper.
2022-07-11 20:22:20 -05:00
Théo Zimmermann c6815758ac Do not rely on legacy ocaml passthru value. 2022-07-08 14:33:24 +02:00
Robert Hensing 613e768608
Merge pull request #179801 from hercules-ci/fix-footgun-dockerTools-buildImage-contents
dockerTools.buildImage: Add copyToRoot to replace contents, explain usage
2022-07-07 09:51:41 +02:00
Robert Hensing e007eb480c dockerTools.buildImage: Add copyToRoot to replace contents, explain usage 2022-07-06 07:30:24 +02:00
Aaron Jheng 80ba8111d4
buildBazelPackage: allow custom impureEnvVars 2022-07-04 08:29:23 +00:00
Thiago Kenji Okada 8f58bc3a1d buildGraalvmNativeImage: allow LC_ALL overrides 2022-07-03 18:16:38 +01:00
sternenseemann f76ac449d1 srcOnly: fix with separateDebugInfo and/or multiple outputs
Before this change `srcOnly git` gives:

    duplicate derivation output 'debug', at pkgs/stdenv/generic/make-derivation.nix:270:7

This was because separateDebugInfo = true was passed on to the srcOnly
mkDerivation as well as the outputs list _including_ the debug output.
Luckily we don't need to untangle this mess since srcOnly is only
supposed to have a single output anyways.
2022-07-02 19:32:24 +02:00
Erik Arvstedt 3f54dfa475
treewide: fix bash exit handlers
Transform exit handlers of the form
trap cleanup EXIT [INT] [TERM] [QUIT] [HUP] [ERR]
  (where cleanup is idempotent)
to
trap cleanup EXIT

This fixes a common bash antipattern.

Each of the above signals causes the script to exit. For each signal,
bash first handles the signal by running `cleanup` and then runs
`cleanup` again when handling EXIT.
(Exception:  `vscode/*` prevents the second run of `cleanup` by removing
the trap in cleanup`).

Simplify the cleanup logic by just trapping exit, which is always run
when the script exits due to any of the above signals.

Note: In case of borgbackup, the exit handler is not idempotent, but just
trapping EXIT guarantees that it's only run once.
2022-07-02 16:13:12 +02:00
Robert Hensing 1e17bb943e
Merge pull request #164662 from infinisil/fetchurl-curlOpts-list
fetchurl: Allow passing curl options with spaces
2022-06-30 21:10:57 +02:00
Silvan Mosberger 588439e131 fetchurl: Add curlOptsList test 2022-06-30 19:49:54 +02:00
Sebastian Jordan 783e2ef46e Revert "nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone"
This reverts commit 1dfaad73ed.
2022-06-30 11:52:36 +00:00
Profpatsch a1aed2a716 builders/writeHaskell: build with threaded GHC runtime
Some haskell code starts silently hanging when not built with a
threaded runtime, so let’s assume people using `writeHaskell` don’t
care about micro-optimizations like this and do the expected thing.

Some architectures don’t support a threaded runtime, for these we
provide the `threadedRuntime` option to turn it off (it should fail at
build time in that case, easy to detect).

If somebody already passed `"-threaded"` before via ghcArgs, this
will not add the flag a second time. Thus it’s backward-compatible in
this regard.

I tested out both branches (with `-threaded` set and not set before),
on an example I had where the runtime would hang when not compiled
with `-threaded`.
2022-06-30 10:12:50 +02:00
ajs124 45ec5898cb maintainers: remove tstrobel
was ts468 on github afaict and was actually a committer, but that account hasn't been active since early 2018
2022-06-29 00:54:53 +02:00
Maximilian Bosch e4bf881ee0
Merge pull request #177575 from seppeljordan/nix-prefetch-git-fix
nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone
2022-06-28 14:03:41 +02:00
github-actions[bot] 506a80a667
Merge staging-next into staging 2022-06-23 00:02:43 +00:00
Robert Hensing 1751679911
Merge pull request #177326 from a-m-joseph/pr/fetchgit/allowedRequisites
fetchgit: inherit allowedRequisites in mkDerivation
2022-06-22 23:21:17 +02:00
github-actions[bot] 9a2405d657
Merge staging-next into staging 2022-06-22 18:02:10 +00:00
Robert Hensing 9d92bee00a
Merge pull request #175474 from hercules-ci/issue-148456-dockerTools-example-etc
dockerTools: Add example of using NixOS' etc
2022-06-22 15:43:29 +02:00
github-actions[bot] cea2503d73
Merge staging-next into staging 2022-06-21 18:01:45 +00:00
Ivv 8168651288
Merge pull request #178446 from zimbatm/dotnet-nugetdeps
buildDotnetModule: allow passing derivations to nugetDeps
2022-06-21 16:00:48 +02:00
zimbatm ba2f31b6db
buildDotnetModule: allow passing derivations to nugetDeps
Sometimes I want to pass a different implementation of `mkNugetDeps`.
For example in private repos, it can be handy to use `__noChroot = true`
and bypass the deps.nix generation altogether. Or some Nuget packages
ship with ELF binaries that need to be patched, and that's best done as
soon as possible.
2022-06-21 15:45:52 +02:00
mdarocha 5b7f8d2e43 buildDotnetModule: use src-only in fetch-deps script 2022-06-21 12:13:39 +02:00
mdarocha fb94bb0b20 src-only: pass all arguments
This allows executing postPatch and other hooks correctly
2022-06-21 12:13:38 +02:00
mdarocha c277bd86a5 make-nuget-deps: support an url field in fetchNuGet
If a package source defines an url field, use it instead of the
url based on package name and version, which assumes nuget.org as
a package source.
2022-06-21 12:13:37 +02:00
mdarocha 2f07f578b2 nuget-to-nix: support custom package sources
If the package was not restored from nuget.org (determinted by checking
the "source" field of ".nupkg.metadata"), query the custom source for
the package endpoint (the way nuget api is built we can't determine it
without an API query) and build a custom package URL to save in the
generated deps file.
2022-06-21 12:13:34 +02:00
github-actions[bot] 3746a49dcc
Merge staging-next into staging 2022-06-21 00:02:48 +00:00
Ivar Scholten 0d8b21b3c8 buildDotnetModule: fix cross compilation 2022-06-20 21:58:04 +02:00
Robert Scott 0886438a2c
Merge pull request #177308 from risicle/ris-native-source-provenance-appimage
appimageTools.wrapAppImage: default produced derivations to `sourceProvenance` `binaryNativeCode`
2022-06-20 20:02:26 +01:00
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
Jonathan Ringer d6915ebb3f
buildFHSUserEnvBubblewrap: allow for non-x86 platforms 2022-06-14 22:13:43 -07: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
Sebastian Jordan 1dfaad73ed nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone
The fetchgit function in nixpkgs sets the leaveDotGit argument to true
if deepClone is set to true. nix-prefetch-git did behave differently. It
would not assume --leave-dotGit if --deepClone is specified. With this
change the inconsistency is addressed by assuming --leave-dotGit if
--deepClone is specified.
2022-06-14 00:23:16 +02: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
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