Commit Graph

7345 Commits

Author SHA1 Message Date
Lily Foster
05dc145e80
fetchNpmDeps: add forceEmptyCache option 2023-11-22 15:18:39 -05:00
Lily Foster
ec51a56dfc
prefetch-npm-deps: detect and error out when generating an empty cache 2023-11-22 15:18:16 -05:00
Lorenz Leutgeb
29cf6a0422 prefetch-yarn-deps: Fix access to .resolved
... and simplify `prefetchYarnDeps`
2023-11-22 18:03:48 +01:00
Lorenz Leutgeb
3843224a55 prefetch-yarn-deps: Fix parsing of scoped packages 2023-11-22 18:03:06 +01:00
Brian Leung
d1579a08ec emacs: remove backwards-compatibility aliases 2023-11-22 09:25:50 -03:00
Francesco Gazzetta
c034d14c41 fetchfossil: support SRI hashes 2023-11-22 09:47:57 +01:00
Felix Bühler
752fa8a3ac
Merge pull request #269061 from lilyinstarlight/fix/prefetch-yarn-deps-certs
prefetch-yarn-deps: add cacert to provide certificates during fetches
2023-11-21 23:31:57 +01:00
Lily Foster
ab99231a36
prefetch-yarn-deps: add cacert to provide certificates during fetches
Ideally fetch-yarn-deps could do like some other fetchers and support
using SSL_CERT_FILE if it exists and also only verify integrity on FOD
hash unless using an empty/test hash.

But this should keep at least the same semantics as before the recent
Node.js change to stop using the built-in certificate store in favor of
the system one (which does not exist by default in the build sandbox).
2023-11-21 16:24:57 -05:00
Jan Tojnar
bc41b2db3d makeHardcodeGsettingsPatch: Support applying patches
This is useful for replacing code that cannot be easily handled by the generator,
such as the tentative settings constructor in e-d-s.
2023-11-21 08:42:47 +01:00
Jan Tojnar
6f695f3d92 makeHardcodeGsettingsPatch: Improve docs
- Describe arguments and usage in more detail.
- Use finalAttrs in example.
- Use schema id, not path.
- Schema id is not what is replaced.
2023-11-21 08:42:47 +01:00
Aaron Jheng
97f4fac2ed
nix-template-rpm: remove 2023-11-20 15:10:03 +00:00
Robert Hensing
2834c0cf2a
Merge pull request #268458 from Mic92/dockertools
nixos/dockerTools: fixup proot/fakeroot code (fixes dockertools nixos test)
2023-11-19 21:50:16 +01:00
Ryan Lahfa
7e869d89ee
Merge pull request #266787 from tvbeat/cargo-manifest-links 2023-11-19 16:14:58 +01:00
Jörg Thalheim
4911915512 nixos/dockerTools: fixup proot/fakeroot code
Not sure how this ever worked but tar was trying to archive /proc and /sys, which failed to work.
Since this is never useful for containers to do, we exclude this now in the proot case.
Also fakeroot is not needed when proot is used as it provideds the same feature.
We now cleanly seperate those cases as both are kind of hacks and it's more likely
that the combination will just trigger new bugs.
2023-11-19 08:30:27 +01:00
midchildan
79459354cb buildNpmPackages: add missing deependencies 2023-11-17 07:58:58 +00:00
Maciej Krüger
f67b20cad6
Merge pull request #263939 from hacker1024/fix/dart-fod-wrapper 2023-11-17 05:00:37 +01:00
Weijia Wang
b1044bdc9d
Merge pull request #258184 from mdarocha/dotnet-fixes
buildDotnetModule small improvements
2023-11-16 23:41:25 +01:00
Vladimír Čunát
a7a8f8253d
Merge #263535: staging-next 2023-10-26 2023-11-16 22:06:22 +01:00
Felix Bühler
05a19f48a9
Merge pull request #267778 from lilyinstarlight/fix/yay-more-fixup-yarn-lock-stuff
prefetch-yarn-deps: re-add git hash for fixup
2023-11-16 21:06:38 +01:00
github-actions[bot]
dba5c9ef4e
Merge master into staging-next 2023-11-16 18:01:17 +00:00
Thiago Kenji Okada
d0e729bc26
Merge pull request #267861 from thiagokokada/graalvm-fixes
buildGraalvmNativeImage: fix Unicode issue by setting encoding explicitly
2023-11-16 13:48:13 +00:00
github-actions[bot]
301fcc69ba
Merge master into staging-next 2023-11-16 12:01:02 +00:00
happysalada
7fb490674f buildNpmPackage: allow passing npmDeps 2023-11-16 11:57:48 +00:00
Thiago Kenji Okada
ca662df7bf buildGraalvmNativeImage: fix Unicode issue by setting encoding explicitly
Remove the old workaround where we set it by LC_ALL, that does not seem
to be working anymore.

Fixes #260161.
2023-11-16 10:13:46 +00:00
Lily Foster
d02eb2d0e5
prefetch-yarn-deps: re-add git hash for fixup 2023-11-15 21:02:52 -05:00
Martin Weinelt
3c336a1647
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/libraries/gdcm/default.nix
2023-11-14 13:16:34 +01:00
Aaron Jheng
c3104c4cad buildGoModule: deprecate vendorSha256 attribute 2023-11-14 09:37:22 +01:00
github-actions[bot]
772c3bbbf5
Merge master into staging-next 2023-11-14 00:02:14 +00:00
Janik
582f1e7321
Merge pull request #254420 from lilyinstarlight/fix/npm-pack-pls-😭
npmHooks.npmInstallHook: avoid script output in npm pack command
2023-11-13 22:43:57 +01:00
Weijia Wang
74d102ce50 Merge branch 'master' into staging-next 2023-11-12 19:45:20 +01:00
SharzyL
b186e2d76e nix-prefetch-git: make it quiet
Some programs (e.g. nvfetcher) parse the output of nix-prefetch-git as
JSON. However, there is a pushd/popd command in nix-prefetch-git that
outputs the directory name, breaking the structure of the result JSON.
We suppressed it with `>/dev/null`.

Passingly fixes a mixuse of tab and spaces.
2023-11-12 15:20:16 +01:00
github-actions[bot]
33248a2caf
Merge master into staging-next 2023-11-12 00:02:14 +00:00
Elliot Cameron
3a99d1b642 nix-prefetch-git: respect NETRC
This script needs to support being run both as part of a `fetchgit`
derivation and as a standalone, command-line tool.

The use of `$NIX_BUILD_TOP` only works when used in `fetchgit` but not when
invoked as a standalone tool. Instead we try to respect `$NETRC` so that
the command-line invocation behaves more like standard tools and the
`fetchgit` derivation can explicitly set `$NETRC` when `netrcPhase` is used
to avoid all ambiguity.
2023-11-11 19:34:54 +01:00
Luka Blaskovic
8ffe19c099 build-rust-crate: set CARGO_MANIFEST_LINKS if links is set 2023-11-11 06:29:50 +00:00
github-actions[bot]
e8096ee1e1
Merge staging-next into staging 2023-11-10 18:01:34 +00:00
Alyssa Ross
afabc4a15d
Merge remote-tracking branch 'origin/master' into HEAD
Conflicts:
	pkgs/development/libraries/SDL2/default.nix
2023-11-10 15:18:19 +01:00
github-actions[bot]
2fe90802da
Merge master into haskell-updates 2023-11-10 00:12:24 +00:00
github-actions[bot]
6a669d1ab2
Merge staging-next into staging 2023-11-09 18:01:27 +00:00
github-actions[bot]
e112f9b8bb
Merge master into staging-next 2023-11-09 18:00:56 +00:00
Yt
5aaeafbe26
buildNpmPackage: make nodejs overridable (#265171)
* buildNpmPackage: allow nodejs to be passed as argument

* Update doc/languages-frameworks/javascript.section.md

Co-authored-by: Lily Foster <lily@lily.flowers>

---------

Co-authored-by: Lily Foster <lily@lily.flowers>
2023-11-09 16:19:24 +00:00
Alyssa Ross
e3e57b8f18 lib.systems: elaborate Rust metadata
We need this stuff to be available in lib so make-derivation.nix can
access it to construct the Meson cross file.

This has a couple of other advantages:

 - It makes Rust less special.  Now figuring out what Rust calls a
   platform is the same as figuring out what Linux or QEMU call it.

 - We can unify the schema used to define Rust targets, and the schema
   used to access those values later.  Just like you can set "config"
   or "system" in a platform definition, and then access those same
   keys on the elaborated platform, you can now set "rustcTarget" in
   your crossSystem, and then access "stdenv.hostPlatform.rustcTarget"
   in your code.

"rustcTarget", "rustcTargetSpec", "cargoShortTarget", and
"cargoEnvVarTarget" have the "rustc" and "cargo" prefixes because
these are not exposed to code by the compiler, and are not
standardized.  The arch/os/etc. variables are all named to match the
forms in the Rust target spec JSON.

The new rust.target-family only takes a list, since we don't need to
worry about backwards compatibility when that name is used.

The old APIs are all still functional with no warning for now, so that
it's possible for external code to use a single API on both 23.05 and
23.11.  We can introduce the warnings once 23.05 is EOL, and make them
hard errors when 23.11 is EOL.
2023-11-09 10:02:24 +01:00
github-actions[bot]
fecd99b105
Merge staging-next into staging 2023-11-09 06:01:40 +00:00
github-actions[bot]
4aad65bfdb
Merge master into staging-next 2023-11-09 06:01:11 +00:00
Shogo Takata
d6e1c7cae6
fetchgit: shallow clone for submodules (#254172) 2023-11-09 04:32:13 +02:00
github-actions[bot]
d0018c61ff
Merge staging-next into staging 2023-11-07 18:01:28 +00:00
Maximilian Bosch
be31242d37
Merge pull request #265414 from lheckemann/fix-empty-closureInfo
closureInfo: handle empty path set explicitly
2023-11-07 17:18:10 +01:00
Weijia Wang
8012034692 Merge branch 'staging-next' into staging 2023-11-07 03:41:49 +01:00
github-actions[bot]
8541e5ab09
Merge master into haskell-updates 2023-11-07 00:12:32 +00:00
github-actions[bot]
38bc2a577e
Merge master into staging-next 2023-11-07 00:02:31 +00:00
Artturi
59ff987fed
Merge pull request #264684 from ShamrockLee/shellcheck-minimal 2023-11-06 23:19:00 +02:00
Weijia Wang
32da89a1a1 Merge branch 'master' into staging-next 2023-11-06 14:33:18 +01:00
K900
fa40d6457a nix-prefetch-git: download submodules with --progress 2023-11-05 20:49:03 +03:00
Linus Heckemann
bdd23d10b2 closureInfo: handle empty path set explicitly
Arguably, this is a bug in Nix's structuredAttrs: without
structuredAttrs, exportReferencesGraph with an empty path set would
still result in information being provided. With structuredAttrs, no
info is provided for an empty path set.

Nevertheless, we need to be able to build even if Nix has the bug, so
work around it by checking for an empty path set and handling it
explicitly.
2023-11-04 09:54:41 +01:00
github-actions[bot]
0f196bb1eb
Merge master into haskell-updates 2023-11-01 00:13:02 +00:00
Yueh-Shun Li
409f95731e shellcheck-minimal: init
Expose the minimal and stripped shellcheck package used by writeShellApplication.
2023-11-01 06:23:04 +08:00
github-actions[bot]
f190372f1f
Merge staging-next into staging 2023-10-31 12:01:49 +00:00
github-actions[bot]
2fd5f8dd7a
Merge master into staging-next 2023-10-31 12:01:11 +00:00
Ryan Lahfa
b10994c38c
Merge pull request #220429 from amjoseph-nixpkgs/pr/build-rust-crate/cross/linker 2023-10-31 12:12:17 +01:00
Naïm Favier
29a23fb4f9
Merge pull request #262814 from ncfavier/agda-updates
Agda 2.6.4 updates
2023-10-29 20:53:55 +01:00
Artturi
a42eddb8dd
Merge pull request #202575 from Cloudef/darwin-include-so-files 2023-10-28 22:02:49 +03:00
github-actions[bot]
519b7ea0c3
Merge master into staging-next 2023-10-28 12:01:19 +00:00
hacker1024
bc82281e01 buildDartApplication: Generate Dart wrapper with symlinkJoin 2023-10-28 21:52:36 +11:00
Eirik Wittersø
2fd6af1929 fetchFromBittorrent: Rename to fetchtorrent 2023-10-28 11:32:10 +01:00
Jari Vetoniemi
0c73f39dab darwin: fix also .so names in darwin
Darwin does not actually require `*.dylib` extension, and some ports of
unix software may still simply compile and install these as `*.so` files.

Include `*.so` in the find in this case.

Co-authored-by: Artturi <Artturin@artturin.com>
Co-authored-by: toonn <toonn@toonn.io>
2023-10-28 00:00:52 +02:00
Vladimír Čunát
d811555465
Merge branch 'staging' into staging-next 2023-10-26 10:36:50 +02:00
Atemu
e2d06c5695
Merge pull request #263201 from LunNova/lunnova/build-fhs-env-no-usr-lib
build-fhsenv-bubblewrap: remove /usr/lib and /usr/lib32 from LD_LIBRARY_PATH
2023-10-25 19:03:08 +02:00
Naïm Favier
6c2b227d34
agdaPackages.*: support literate Typst files 2023-10-24 20:34:05 +02:00
Robert Hensing
c1dc59dc8c
Merge pull request #263096 from hercules-ci/clean-up-data-writers
Clean up data writers
2023-10-24 16:18:17 +02:00
Luna Nova
a9600ce894
build-fhsenv-bubblewrap: remove /usr/lib and /usr/lib32 from LD_LIBRARY_PATH
See https://github.com/NixOS/nixpkgs/issues/262775
2023-10-24 07:13:33 -07:00
Robert Hensing
a6622bf00a writers/test: Refactor
It now also checks the executable bit.
2023-10-24 11:17:38 +02:00
Robert Hensing
e64f987fd6 writers.makeDataWriter: Deprecate 2023-10-24 11:17:38 +02:00
Robert Hensing
79130267d3 writers/data.nix: Remove duplicate implementations 2023-10-24 11:17:38 +02:00
Pol Dellaiera
8ecf5abf79
Merge pull request #262388 from drupol/php/build-support/make-validation-non-blocking
build-support/php: make validation check a non blocking process
2023-10-24 08:41:49 +02:00
Robert Scott
25920d8de2
Merge pull request #253194 from risicle/ris-nix-hardening-enable-fortify3-imply-fortify
cc-wrapper: ensure `NIX_HARDENING_ENABLE` `fortify3` implies `fortify` too
2023-10-23 19:23:02 +01:00
github-actions[bot]
2c2c0379b7
Merge staging-next into staging 2023-10-23 12:02:04 +00:00
Adam Joseph
4fc0e33698 buildRustPackage: add isMips64n32 to badPlatforms
Rust is not yet able to target the n32 ABI on mips64.

Let's add `isMips64n32` to the `meta.badPlatforms` of all
derivations created by buildRustPackage.

I use this to automatically detect which packages on my system can
be built for n32 (almost all of them) and build those using n32, and
the few packages (mainly those that depend on boost or rust) that
can't for n64.
2023-10-23 08:38:25 +00:00
Adam Joseph
3bd3809d0e buildRustCrate: add isMips64n32 to badPlatforms
Rust is not yet able to target the n32 ABI on mips64.

Let's add `isMips64n32` to the `meta.badPlatforms` of all
derivations created by buildRustCrate.

I use this to automatically detect which packages on my system can
be built for n32 (almost all of them) and build those using n32, and
the few packages (mainly those that depend on boost or rust) that
can't for n64.
2023-10-23 08:38:25 +00:00
github-actions[bot]
9f5438ccdf
Merge staging-next into staging 2023-10-23 06:01:38 +00:00
Adam Joseph
0b2036cad0 cc-wrapper: fix -mtune= validation, add ARM, add fallbacks
Before this commit, cc-wrapper/default.nix was using
`isGccArchSupported` to validate `-mtune=` values.  This has two
problems:

- On x86, `-mtune=` can take the same values as `-march`, plus two
  additional values `generic` and `intel` which are not valid for
  `-march`.

- On ARM, `-mtune=` does not take the same values as `-march=`;
  instead it takes the same values as `-mcpu`.

This commit fixes these two problems by adding a new
`isGccTuneSupported` function.  For `isx86` this returns `true` for
the two special values and otherwise defers to `isGccArchSupported`.

This commit also adds support for `-mtune=` on Aarch64.

Unfortunately on Aarch64, Clang does not accept as wide a variety of
`-mtune=` values as Gcc does.  In particular, Clang does not tune
for big.LITTLE mixed-model chips like the very popular RK3399, which
is targeted using `-march=cortex-a72.cortex-a53` in gcc.

To address this problem, this commit also adds a function
`findBestTuneApproximation` which can be used to map
clang-unsupported tunings like `cortex-a72.cortex-a53` to
less-precise tunings like `cortex-a53`.

The work which led to this commit arose because we now have
packages, like `crosvm`, which use *both* `clang` *and* `gcc`.
Previously I had been using `overrideAttrs` to set
`NIX_CFLAGS_COMPILE` on a package-by-package basis based on which
compiler that package used.  Since we now have packages which use
*both* compilers, this strategy no longer works.

I briefly considered splitting `NIX_CFLAGS_COMPILE` into
`NIX_CFLAGS_COMPILE_GCC` and `NIX_CFLAGS_COMPILE_CLANG`, but since
`NIX_CFLAGS_COMPILE` is sort of a hack to begin with I figured that
adding the logic to `cc-wrapper` would be preferable.
2023-10-23 01:31:21 +00:00
github-actions[bot]
4312247c19
Merge staging-next into staging 2023-10-22 12:01:52 +00:00
Artturi
41222ebcf2
Merge pull request #262675 from Artturin/addcomment
expand-response-params: explain what a "response file" is
2023-10-22 10:57:11 +03:00
Artturin
bd8d94aa69 expand-response-params: explain what a "response file" is
Co-authored-by: Adam Joseph <adam@westernsemico.com>
2023-10-22 08:57:24 +03:00
github-actions[bot]
09fabcdc4e
Merge staging-next into staging 2023-10-22 00:03:08 +00:00
github-actions[bot]
1cf369a0dd
Merge master into staging-next 2023-10-22 00:02:31 +00:00
Maciej Krüger
b465d339b3
Merge pull request #231483 from hacker1024/feature/flutter-on-dart
buildFlutterApplication: Wrap buildDartApplication
2023-10-21 23:42:02 +02:00
hacker1024
98a7a5edd3 dartHooks.dartFixupHook: Add trailing newline 2023-10-22 00:42:07 +11:00
hacker1024
2addb67a14 buildFlutterApplication: Wrap buildDartApplication 2023-10-22 00:31:58 +11:00
hacker1024
becdfbe17c buildDartApplication: Recognise extraWrapProgramArgs 2023-10-22 00:14:42 +11:00
github-actions[bot]
682b6995b4
Merge staging-next into staging 2023-10-21 12:01:45 +00:00
github-actions[bot]
0c34dab04f
Merge master into staging-next 2023-10-21 12:01:08 +00:00
hacker1024
5391c0204e buildDartApplication: Allow passing a sdkSetupScript 2023-10-21 22:37:01 +11:00
hacker1024
6298ac2774 buildDartApplication: Use package override mechanism from buildFlutterApplication
This allows Dart applications to benefit from the package override system, which is useful for things like FFI dependencies.
2023-10-21 22:30:23 +11:00
nikstur
6958acea7e
Merge pull request #262179 from ElvishJerricco/systemd-stage-1-specific-fs-packages
systemd-stage-1: Use specific fs packages
2023-10-21 13:25:42 +02:00
hacker1024
234b63b0f0 buildDartApplication: Allow supplying runtime dependencies 2023-10-21 22:22:02 +11:00
hacker1024
64c638bfc0 fetchDartDeps: Disable install phase in depsListDrv 2023-10-21 22:13:12 +11:00
hacker1024
eeb3936722 buildDartApplication: Format with nixpkgs-fmt 2023-10-21 21:54:21 +11:00
Pol Dellaiera
46a7c4cade
build-support/php: add composerStrictValidation attribute
Set to `true` by default
2023-10-21 11:15:51 +02:00
github-actions[bot]
613d60266a
Merge staging-next into staging 2023-10-21 00:02:49 +00:00
github-actions[bot]
fb3e2499b7
Merge master into staging-next 2023-10-21 00:02:17 +00:00
Pol Dellaiera
921e3c16cc
build-support/php: add colors in case of errors 2023-10-20 23:39:53 +02:00