about summary refs log tree commit diff
path: root/pkgs/build-support
AgeCommit message (Collapse)AuthorFilesLines
2024-06-20buildFHSEnv: export GST_PLUGIN_SYSTEM_PATH_1_0Martino Fontana1-0/+4
GStreamer searches for plugins relative to its binary's location. However, since https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/bd97973ce0f2c5495bcda5cccd4f7ef7dcb7febc, it uses its *real* binary location, breaking the FHS. Fixes #311004 (tested on Heroic and Lutris too).
2024-06-20Merge pull request #320852 from obsidiansystems/fewer-cross-suffix-attrsJohn Ericson1-4/+4
Clean up cross bootstrapping
2024-06-20Merge pull request #317755 from thehabbos007/masterIlan Joselevich1-0/+2
BuildRustCrate: proc macros must be built for build's platform
2024-06-20Merge pull request #292759 from ShamrockLee/test-references-darwinRobert Hensing1-8/+15
tests.references: use `runNixOSTest` instead of `nixosTest`
2024-06-20BuildRustCrate: proc macros must be built for build's platformAhmad Sattar1-0/+2
When cross compiling proc macros, the proc macro needs to be built for the build platform's architecture. Without this change cross compiling from Darwin to Linux would simply fail because it tries to link to a library with a file extension that doesn't exist on the builder's platform.
2024-06-18Clean up cross bootstrappingJohn Ericson1-4/+4
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes, and `*bsdCross` pre-libc package sets. This was always bad because having "cross" things is "not declarative": the naming doesn't reflect what packages *need* but rather how we *provide* something. This is ugly, and creates needless friction between cross and native building. Now, almost all of these `*Cross` attributes are gone: just these are kept: - Glibc's and Musl's are kept, because those packages are widely used and I didn't want to risk changing the native builds of those at this time. - generic `libcCross`, `theadsCross`, and friends, because these relate to the convolulted GCC bootstrap which still needs to be redone. The BSD and obscure Linux or freestnanding libcs have conversely all been made to use a new `stdenvNoLibc`, which is like the old `crossLibcStdenv` except: 1. It usable for native and cross alike 2. It named according to what it *is* ("a standard environment without libc but with a C compiler"), rather than some non-compositional jargon ("the stdenv used for building libc when cross compiling", yuck). I should have done this change long ago, but I was stymied because of "infinite recursions". The problem was that in too many cases we are overriding `stdenv` to *remove* things we don't need, and this risks cyles since those more minimal stdenvs are used to build things in the more maximal stdenvs. The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to *build up* rather than *tear down*. For now, the full `stdenv` is also passed, so I don't need to change the native bootstraps, but I can see this changing as we make things more uniform and clean those up. Finally, the BSDs also had to be cleaned up, since they have a few pre-libc dependencies, demanding a systematic approach. I realized what rhelmot did in 61202561d92cf1cd74532fcbd8b9d6662c5bc57b (specify what packages just need `stdenvNoLibc`) is definitely the right approach for this, and adjusted NetBSD and OpenBSD to likewise use it.
2024-06-17Merge pull request #313005 from tie/dotnet-crossDavid McFarland8-171/+300
buildDotnetModule: fix structured attributes support
2024-06-16Merge pull request #319782 from thehabbos007/quoteIlan Joselevich1-1/+1
build-rust-crate: quote build script output env var
2024-06-15Merge pull request #212328 from ExpidusOS/flutter-engine/inittomberek1-7/+19
flutter.engine: init
2024-06-15Merge pull request #319623 from Infinidoge/fix-fetch-yarn-depsAtemu1-3/+5
fetchYarnDeps: properly accept src argument
2024-06-14buildFlutterApplication: use the engineTristan Ross1-7/+19
2024-06-14fetch-yarn-deps: reference files to be copied directlyAtemu1-2/+4
This would cause any drv to be rebuilt when any part of the default.nix changes. What we actually care about is the two JS files though, so simply reference them directly. Co-authored-by: Infinidoge <infinidoge@inx.moe>
2024-06-14fetchYarnDeps: properly accept src argumentInfinidoge1-1/+1
2024-06-14build-rust-crate: quote build script output env varAhmad Sattar1-1/+1
2024-06-13flutterPackages: support beta releasesTristan Ross1-0/+14
2024-06-13Merge pull request #315991 from ExpidusOS/fix/flutter-moreutilsPeder Bergebakken Sundt1-2/+5
flutter: drop moreutils for more bash
2024-06-11Merge master into staging-nextgithub-actions[bot]4-4/+4
2024-06-11buildRustCrate: extensions.sharedLibrary -> extensions.libraryIlan Joselevich4-4/+4
Switched to a common attribute for library file extensions: https://github.com/NixOS/nixpkgs/commit/de70971c90f3e3161e94ace851b30474228a0861 This makes buildRustCrate evaluate successfully when using pkgsCross/pkgsStatic.
2024-06-09Merge remote-tracking branch 'origin/master' into staging-nextAlyssa Ross5-5/+5
Conflicts: pkgs/applications/blockchains/polkadot/default.nix
2024-06-09treewide: Remove indefinite article from meta.descriptionAlexis Hildebrandt4-4/+4
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09treewide: Remove ending period from meta.descriptionAlexis Hildebrandt1-1/+1
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*".*\.";' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*)\.";/\1";/'
2024-06-09Merge master into staging-nextgithub-actions[bot]1-88/+0
2024-06-09Merge pull request #316764 from atorres1985-contrib/maven-refactorsuperherointj1-88/+0
Maven: refactor
2024-06-07Merge master into staging-nextgithub-actions[bot]1-9/+11
2024-06-06Merge pull request #310385 from szlend/cross-deterministic-unameAtemu1-9/+11
deterministic-uname: overridable platform
2024-06-04buildMaven: migrate to apache-maven subdirectoryAnderson Torres1-88/+0
And expose it via passthru
2024-06-03Merge master into staging-nextgithub-actions[bot]1-1/+1
2024-06-02Merge pull request #306716 from ShamrockLee/apptainer-default-path-substitutionSomeone1-1/+1
apptainer, singularity: refactor defaultPath substitution
2024-06-01Merge master into staging-nextgithub-actions[bot]1-8/+24
2024-06-01melpaBuild: add files parameter to specify :files of recipeLin Jian1-3/+11
2024-06-01melpaBuild: add doc and default value for recipeLin Jian1-8/+9
2024-06-01melpaBuild: add doc and default value for commitLin Jian1-1/+8
2024-05-30flutter: drop moreutils for more bashTristan Ross1-2/+5
Since moreutils depends on Perl and that causes #315990, drop moreutils until Perl is fixed to handle cross compiling properly. We now create a temporary file and write the jq result to it and then copy that to `$out`.
2024-05-29buildDotnetModule: fix structured attributes supportIvan Trubach8-171/+300
This change refactors internal hooks used by buildDotnetModule to support derivations with structured attributes. Note that this changes variable names that the internal hooks expect.
2024-05-27Revert "make-binary-wrapper: add cc to propagatedBuildInputs"Alyssa Ross1-1/+1
This reverts commit 0c34636a5690cf8d75ecbab62d41179c56571f79. Seems to be causing some weird side effects. pkgsMusl.systemd no longer builds: Command line: `clang /run/user/1008/tmp.WuVNjgdfHT/source/build/meson-private/tmpdd3qc57v/testfile.c -o /run/user/1008/tmp.WuVNjgdfHT/source/build/meson-private/tmpdd3qc57v/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -std=gnu11` -> 1 stderr: clang: error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
2024-05-27Reapply "srcOnly: reflink if possible and preserve attributes"sternenseemann1-1/+1
This reverts commit 610ee378fcf718b9cc655efa81dc34cf907c72ad. Reason for reapply: The change was alright, just went to the wrong branch.
2024-05-27Merge staging-next into staginggithub-actions[bot]1-1/+1
2024-05-27Revert "srcOnly: reflink if possible and preserve attributes"sternenseemann1-1/+1
This reverts commit 7173eb87b8720da79989bbf1ed1fa72465323778. Reason for revert: This causes too big a rebuild for master (since GHC uses srcOnly). This went unnoticed due to a stale ofborg rebuild count.
2024-05-27Merge staging-next into staginggithub-actions[bot]4-1/+76
2024-05-27testers.lycheeLinkCheck: init (#298665)Robert Hensing3-0/+75
* testers.lycheeLinkCheck: init Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-26srcOnly: reflink if possible and preserve attributessternenseemann1-1/+1
This matches how the default unpackPhase would copy from a store path into the build directory, so it seems wise to match this here. On file systems that support reflinks, this should improve performance as well.
2024-05-26Merge pull request #311794 from rhelmot/freebsd-minimal3/make-binary-wrapperJohn Ericson1-1/+1
make-binary-wrapper: add cc to propagatedBuildInputs
2024-05-25deterministic-uname: Overridable platformSimon Žlender1-9/+11
Some packages rely on `uname` to configure the host target which breaks cross-compilation. We can have more control over the evaluation of `uname` by placing `deterministic-uname` into the package's `nativeBuildInputs`. However the current `deterministic-uname` is hardcoded to `buildPlatform`. This PR introduces a build argument `forPlatform` to `deterministic-uname` which allows you to override the platform it reports. Example: ```nix deterministic-uname.override { forPlatform = stdenv.hostPlatform; } ```
2024-05-24setup-hooks/strip: uniqify files by inode number before strippingThomas Watson1-6/+10
https://github.com/NixOS/nixpkgs/pull/246164 but for hardlinks. Mesa, among other packages, has binaries that are linked together and can end up corrupted when the same binary is stripped through two different names. To resolve this, print out the device and inode number before each file name, sort/uniq based on that, then cut it back out before stripping. The symlink resolution logic is removed as the same file accessed through two different links in `$paths` will necessarily have the same numbers. File/directory within the paths listed in `$paths` are correctly not (and were never) processed due to the `-type f` predicate and (implied) `-P` option to `find`.
2024-05-23Merge staging-next into staginggithub-actions[bot]6-36/+35
2024-05-23Merge pull request #313514 from tie/dotnet-cross-splitDavid McFarland6-36/+35
buildDotnetModule: fix cross-compilation and remove dotnet-test-sdk
2024-05-23Merge staging-next into staginggithub-actions[bot]11-131/+288
2024-05-23Merge pull request #312231 from ↵Pol Dellaiera11-131/+288
drupol/build-support/php/init-composer-with-plugin build-support/php: init new builder `php.buildComposerWithPlugin`, refactor `php.packages.composer`, etc
2024-05-22buildDotnetModule: remove unnecessary callPackage callsIvan Trubach1-21/+28
This change removes no-op callPackage calls and reformats the file with nixpkgs-fmt.
2024-05-22buildDotnetModule: fix cross-compilation and remove dotnet-test-sdkIvan Trubach2-9/+1
This change fixes cross-compilation for .NET packages (that are not using .sln as project files). See relevant comment in the change list for more details. In addition to that, it removes dotnet-test-sdk that appears to be broken, that is, dotnet --list-sdks does not recognize SDKs from PATH, and when propagated from the check hook it was shadowed by inputs from preceding hooks. Note that dotnet-test-sdk used to work when it was introduced in PR 144062, but PR 155257 probably overlooked this case. However, currently it is not used in Nixpkgs and I think dotnetCorePackages.combinePackages should cover the intended use case for dotnet-test-sdk.