about summary refs log tree commit diff
path: root/pkgs/build-support
AgeCommit message (Collapse)AuthorFilesLines
2024-03-09Merge pull request #290351 from corngood/dotnet-fixesDavid McFarland1-1/+2
dotnet: infrastructure cleanup
2024-03-08Merge master into staging-nextgithub-actions[bot]5-3/+283
2024-03-08Merge pull request #289231 from adisbladis/fetchnpmlockadisbladis5-3/+283
importNpmLock: init
2024-03-06nuget-to-nix: fix error handlingDavid McFarland1-1/+2
2024-03-06Merge master into staging-nextgithub-actions[bot]1-1/+22
2024-03-06Merge pull request #293582 from ↵Pol Dellaiera1-1/+22
drupol/build-support/php/improve-composer-validate build-support/php: update `composer validate` steps
2024-03-06Merge master into staging-nextgithub-actions[bot]7-72/+46
2024-03-05Merge pull request #190129 from corngood/dotnet-sdkDavid McFarland3-4/+16
dotnetCorePackages.dotnet_8: build from source
2024-03-05build-support/php: update `composer validate` stepsPol Dellaiera1-1/+22
2024-03-05build-support/php: move functions around (dry)Pol Dellaiera3-40/+26
2024-03-05phpPackages.composer: 2.6.6 -> 2.7.1Pol Dellaiera2-26/+2
Diff: https://github.com/composer/composer/compare/2.6.6..2.7.1 Changelog: https://github.com/composer/composer/releases/tag/2.7.1 Fix CVE: CVE-2024-24821
2024-03-05build-support/php/composer-local-repo-plugin: 1.0.3 -> 1.1.0Pol Dellaiera1-2/+2
2024-03-05importNpmLock: initadisbladis5-3/+283
This is an alternative to `fetchNpmDeps` that is notably different in that it uses metadata from `package.json` & `package-lock.json` instead of specifying a fixed-output hash. Notable features: - IFD free. - Only fetches a node dependency once. No massive FODs. - Support for URL, Git and path dependencies. - Uses most of the existing `npmHooks` `importNpmLock` can be used _only_ in the cases where we need to check in a `package-lock.json` in the tree. Currently this means that we have 13 packages that would be candidates to use this function, though I expect most usage to be in private repositories. This is upstreaming the builder portion of https://github.com/adisbladis/buildNodeModules into nixpkgs (different naming but the code is the same). I will archive this repository and consider nixpkgs the new upstream once it's been merged. For more explanations and rationale see https://discourse.nixos.org/t/buildnodemodules-the-dumbest-node-to-nix-packaging-tool-yet/35733 Example usage: ``` nix stdenv.mkDerivation { pname = "my-nodejs-app"; version = "0.1.0"; src = ./.; nativeBuildInputs = [ importNpmLock.hooks.npmConfigHook nodejs nodejs.passthru.python # for node-gyp npmHooks.npmBuildHook npmHooks.npmInstallHook ]; npmDeps = buildNodeModules.fetchNodeModules { npmRoot = ./.; }; } ```
2024-03-04Merge master into staging-nextgithub-actions[bot]2-435/+151
2024-03-04Merge master into staging-nextgithub-actions[bot]2-151/+435
2024-03-04Revert "writers: add support for wrapping"Vladimír Čunát2-435/+151
2024-03-04Merge pull request #291854 from DavHau/writers-wraplassulus2-151/+435
writers: add support for wrapping
2024-03-03mkNugetDeps: provide default for nugetDepsDavid McFarland2-2/+1
2024-03-03nuget-to-nix: skip local sourcesDavid McFarland1-2/+15
2024-03-02Merge pull request #292777 from alyssais/rustdoc-wrapMartin Weinelt2-5/+7
wrapRustc: wrap rustdoc
2024-03-02wrapRustc: wrap rustdocAlyssa Ross2-5/+7
We need to set -crt-static on musl for rustdoc as well, so let's unify the wrappers. Ideally, rather than wrapping rustdoc, we'd have rustdoc use the wrapped rustc, but that's currently only possible with an unstable option (--test-builder). The options set by the wrapper, -C target-feature and --sysroot, are supported by both rustdoc and rustc, but other flags maybe not be supported by both, so I've introduced different environment variables (the existing NIX_RUSTFLAGS and a new NIX_RUSTDOCFLAGS) to allow those to be set independently. This fixes cargo-auditable in pkgsMusl., which broke because its doctests stopped working when -crt-static was moved to the wrapper. Fixes: 79156bf13ae7 ("rustc: move crt-static default override to wrapper (#291829)")
2024-03-02Merge master into staging-nextgithub-actions[bot]2-5/+5
2024-03-02macOS support for NixOS tests (#282401)Gabriella Gonzalez2-5/+5
Closes #193336 Closes #261694 Related to #108984 The goal here was to get the following flake to build and run on `aarch64-darwin`: ```nix { inputs.nixpkgs.url = <this branch>; outputs = { nixpkgs, ... }: { checks.aarch64-darwin.default = nixpkgs.legacyPackages.aarch64-darwin.nixosTest { name = "test"; nodes.machine = { }; testScript = ""; }; }; } ``` … and after this change it does. There's no longer a need for the user to set `nodes.*.nixpkgs.pkgs` or `nodes.*.virtualisation.host.pkgs` as the correct values are inferred from the host system.
2024-03-01Merge master into staging-nextgithub-actions[bot]1-30/+51
2024-03-01Merge #291901: clang: don't set -march for overridden targetVladimír Čunát2-2/+9
...into staging-next
2024-03-01clang: don't set -march for overridden targetAlyssa Ross2-2/+9
If -target is explicitly passed to clang, we shouldn't pass our -march value for the default target, because it probably won't exist for the target being used. Up until now, clang has been lenient with this, but it's a hard error with clang 17, so since gcc.arch is always set on aarch64, fixing this is a hard requirement for upgrading our default clang to 17. Before (with clang 17 on aarch64-linux): $ clang -target bpf -c -o /dev/null test.bpf.c clang: warning: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Woption-ignored] clang: error: unsupported option '-march=' for target 'bpf' clang: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/cngak08nb1yk44gnjipv5rg1ahh1xkax-gcc-13.2.0' [-Wunused-command-line-argument] After: $ clang -target bpf -c -o /dev/null test.bpf.c clang: warning: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Woption-ignored] clang: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/cngak08nb1yk44gnjipv5rg1ahh1xkax-gcc-13.2.0' [-Wunused-command-line-argument]
2024-03-01Merge pull request #292300 from hsjobeki/writerslassulus1-30/+51
doc & fix: Clean up writers/data.nix file
2024-02-29Merge staging-next into staginggithub-actions[bot]1-0/+2
2024-02-29Merge pull request #289840 from PigeonF/masterPol Dellaiera1-0/+2
Make `dockerTools.buildImageWithNixDb` reproducible
2024-02-29writers: add support for wrappingDavHau2-151/+435
Add a makeWrapperArgs argument to all script writers under pkgs.writers. This can be used to set, prefix, or suffix the PATH or other environment variables which improves the ability to generate scripts with reproducible behavior. Some of the writers (writeBash, writeDash, writeFish, writeNu) previously did not support passing an argument set, for example ``` writeBash "example" "echo hello" ``` In order to add the new capability to these writers as well, their call signature is now overloaded in order to allow the following: (The old call style from the example above remains intact) ``` writeBash "example" { makeWrapperArgs = [ "--prefix" "PATH" ":" "${pkgs.hello}/bin" ]; } '' hello '' ``` Done as well: - add tests - add more docs - fix some misleading docs - extend existing docs with more examples
2024-02-29doc: improve pkgs.writers commentsJohannes Kirschbauer1-30/+51
2024-02-29Merge remote-tracking branch 'origin/staging-next' into stagingMartin Weinelt3-13/+64
Conflicts: - pkgs/development/python-modules/influxdb/default.nix - pkgs/development/tools/misc/binutils/default.nix
2024-02-29applyPatches: Fix a bug (#283887)Thomas Lepoix1-6/+7
2024-02-29substitute: Deprecate `replacements`, introduce `replacementsList`Silvan Mosberger2-7/+57
Also: - Add tests - Treewide update - Improve docs
2024-02-28rustc: move crt-static default override to wrapper (#291829)Alyssa Ross2-1/+21
Previously, when cross compiling from non-musl to musl, the crt-static default override wouldn't be applied, because the compiler wouldn't have been built with it due to fastCross. Moving it to the wrapper fixes this without having to introduce extra compiler rebuilds. And because the wrapper is applied even to the bootstrap rustc, we no longer need special handling of crt-static in the Cargo expression. Unlike --sysroot, rustc allows -C target-feature= to be passed multiple times, with later instances taking precedence over earlier ones. This means that it's very easy to set the default in the wrapper, just by our overridden default before any other arguments. This fixes pkgsCross.aarch64-multiplatform-musl.mesa from x86_64-linux.
2024-02-28Merge staging-next into staginggithub-actions[bot]2-45/+45
2024-02-28Merge pull request #282886 from WxNzEMof/docker-tools-uidRobert Hensing2-45/+45
Allow streaming layered containers with non-root Nix store
2024-02-27Merge staging-next into staginggithub-actions[bot]4-6/+38
2024-02-26Merge pull request #285828 from drupol/php/remove-COMPOSER-ROOT-VERSION-envThomas Gerbet4-6/+38
build-support/php: set `COMPOSER_ROOT_VERSION` environment variable
2024-02-26Remove the redundant comments from streamLayeredImage parametersWxNzEMof1-34/+14
The proper place to describe them is the documentation, where they are described thoroughly.
2024-02-26streamLayeredImage: Change mode of /nix, /nix/store to 755WxNzEMof1-1/+1
The change is insignificant when the owner is root. However, when it is not root, this change is needed to allow using Nix (as an unprivileged user) inside the container.
2024-02-26streamLayeredImage: Allow customizing ownershipWxNzEMof2-12/+32
This opens the way towards building images where Nix can be used as an unprivileged user (in single-user mode).
2024-02-25Merge staging-next into staginggithub-actions[bot]1-1/+1
2024-02-25gnatPackages: Add scope for all ada packagesThomas Heijligen1-1/+1
Ada depencencies musst be build with the same gnat version as the project. Use a namespace as preperation to build with different gnat versions. gprbuild and gnatprove are still globaly visable.
2024-02-25build-support/php: set `COMPOSER_ROOT_VERSION` by defaultPol Dellaiera4-6/+38
2024-02-24cc-wrapper: add trivialautovarinit hardening flag supportRobert Scott1-1/+5
this equates to -ftrivial-auto-var-init=pattern clang has removed support for -ftrivial-auto-var-init=zero and are unlikely to re-add it, so use -ftrivial-auto-var-init=pattern on both compilers if only to make behaviour more consistent between the two. add to pkgsExtraHardening's defaultHardeningFlags.
2024-02-23Merge branch 'master' into staging-nextWeijia Wang2-1/+2
2024-02-22Merge pull request #277494 from trofi/buildFHSEnv-fix-evalSandro1-1/+1
2024-02-22Merge pull request #283572 from baracoder/appimage-pipewireBruno Bigras1-0/+1
appimage-run: Add pipewire support
2024-02-19Merge master into staging-nextgithub-actions[bot]2-14/+87