Commit Graph

8264 Commits

Author SHA1 Message Date
Lin Xianyi
93a9ecd024 make-desktopitem: fix file extension for type directory 2024-07-03 23:23:30 +08:00
aleksana
07fddc62e4 buildRustPackage: deprecate cargoSha256 in favor of cargoHash 2024-07-03 21:54:26 +08:00
aleksana
a9709c299b treewide: change cargoSha256 with SRI hash to cargoHash 2024-07-03 21:53:11 +08:00
github-actions[bot]
a47e41c3cd
Merge staging-next into staging 2024-07-03 06:01:42 +00:00
github-actions[bot]
d33a11464d
Merge master into staging-next 2024-07-03 06:01:11 +00:00
Ryan Hendrickson
40428630bc
Merge pull request #317106 from trofi/dashed-source
stdenv: handle $sourceRoot that starts with dash
2024-07-02 23:48:25 -04:00
Silvan Mosberger
06a8bee760
Merge pull request #323398 from NixOS/prep-dev-shell
init `devShellTools`
2024-07-03 05:19:42 +02:00
github-actions[bot]
5cfda25a07
Merge staging-next into staging 2024-07-02 12:01:51 +00:00
Martin Weinelt
7b8429bbc4
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/jaxtyping/default.nix
2024-07-02 12:08:49 +02:00
Jan Tojnar
0f56e32213
Merge pull request #319659 from jtojnar/gnome-extract
Move various packages out of gnome scope
2024-07-02 08:03:53 +02:00
github-actions[bot]
d5bca87877
Merge staging-next into staging 2024-07-02 06:01:38 +00:00
K900
665f1d6183 Merge remote-tracking branch 'origin/master' into staging-next 2024-07-02 08:32:46 +03:00
Lily Foster
c678743f80 treewide: remove lilyinstarlight 2024-07-02 03:17:01 +02:00
Ilan Joselevich
b870209e42
Merge pull request #323110 from thehabbos007/cargo-cdylib
buildRustCrate: add support for `cargo::rustc-cdylib-link-arg`
2024-07-01 21:09:25 +03:00
Ivan Trubach
6ed79156ce fetchpatch: add patchutils to nativeBuildInputs
This change allows using programs from patchutils in postFetch.
2024-07-01 18:09:00 +03:00
Ivan Trubach
32b51c3352 fetchpatch2: fix hash in tests 2024-07-01 18:09:00 +03:00
Ahmad Sattar
1cf6e5eaa1 buildRustCrate: add support for cargo::rustc-cdylib-link-arg 2024-07-01 09:29:46 +02:00
Jan Tojnar
b69ed4249d zenity: Move from gnome scope to top-level
It is widely used outside gnome, not much inside.
2024-07-01 08:26:47 +02:00
Someone
c5a1cae1f1
Merge pull request #275241 from Scrumplex/treewide/use-addDriverRunpath
addOpenGLRunpath: deprecate
2024-07-01 01:09:05 +00:00
github-actions[bot]
716005516a
Merge staging-next into staging 2024-07-01 00:03:27 +00:00
Martin Weinelt
9b79a05ae1
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/flexcache/default.nix
- pkgs/development/python-modules/flexparser/default.nix
- pkgs/development/python-modules/odp-amsterdam/default.nix
- pkgs/development/python-modules/pint/default.nix
- pkgs/development/python-modules/uncertainties/default.nix
- pkgs/top-level/python-packages.nix
2024-07-01 01:07:21 +02:00
Sefa Eyeoglu
484dd2f92f
addOpenGLRunpath: deprecate
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-06-30 14:52:02 -04:00
jade
b8946c1bf2
Merge pull request #319220 from ExpidusOS/fix/test-infinite-recurse
Fix failures with pkgs/top-level/release-attrpaths-superset.nix
2024-06-30 09:00:23 -07:00
Florian Klink
641b2f29b6
Merge pull request #319153 from Kranzes/buildRustCrate-wasm
buildRustCrate: add support for compiling to wasm32-unknown-unknown
2024-06-30 14:05:33 +03:00
Robert Hensing
8398e087cd devShellTools.{stringValue -> valueToString} 2024-06-29 17:22:57 +02:00
Robert Hensing
469039098b devShellTools.stringValue: init 2024-06-29 17:21:01 +02:00
Robert Hensing
091d8370a2 devShellTools: init (empty) 2024-06-29 16:41:13 +02:00
Silvan Mosberger
f814e5cb8f Revert "trivial: make pkgs.writeText always fixed output"
This reverts commit 9f4b1064c6.

It caused problems: https://github.com/NixOS/nixpkgs/pull/318872#issuecomment-2196168990

FODs are not allowed to have references, but writeText is often used to create a file with references.

Leading to this error:

error: fixed output derivation 'packages.json' is not allowed to refer to other store paths.
2024-06-28 09:15:13 +02:00
github-actions[bot]
6d0b2daaa6
Merge staging-next into staging 2024-06-28 00:02:38 +00:00
github-actions[bot]
2f3bfad6d2
Merge master into staging-next 2024-06-28 00:02:11 +00:00
PoweredByPie
e72b347c1d Resolve _all_ Windows DLL dependencies
The current DLL linker only links direct dependencies of the derivation. Indirect dependencies are sometimes missed.
2024-06-25 19:04:22 -07:00
github-actions[bot]
29409717c6
Merge staging-next into staging 2024-06-26 00:02:39 +00:00
github-actions[bot]
27074b7d07
Merge master into staging-next 2024-06-26 00:02:13 +00:00
Vincent Laporte
5d61a87d94 mkCoqDerivation: fix install path of ML plug-in built w/ dune 2024-06-25 21:07:57 +02:00
Silvan Mosberger
5838e6883f
Merge pull request #318872 from hraban/trivial/fod-write-text
trivial: make pkgs.writeText always fixed output
2024-06-25 18:38:01 +02:00
Ilan Joselevich
cc379b60f0
tests.buildRustCrate: add crateLibOutputsWasm32
Added a cross compilation test for wasm32-unknown-unknown. This also
required using crate.metadata instead of using the regex to get rid of
the hash in the library filename. It also required adding a mkCrate
argument to assertOutputs so we can override the buildRustCrate used.
2024-06-24 21:13:50 +03:00
Ilan Joselevich
cf5e2c2c9a
buildRustCrate: support cross compiling to wasm32-unknown-unknown
With this change you will finally be able to use
buildRustCrate/crate2nix to build your wasm32-unknown-unknown
rust projects.

Simply import nixpkgs like so:
```
lib = <nixpkgs/lib>;
pkgsForWasm32 = import <nixpkgs> {
  crossSystem = lib.examples.wasm32-unknown-none;
}
```
or use pkgsCross directly with
```
pkgsCross.wasm32-unknown-none.callPackage ./. { };
```
2024-06-24 19:28:33 +03:00
github-actions[bot]
fca5c19283
Merge staging-next into staging 2024-06-24 00:03:38 +00:00
David McFarland
2ae0ffc65d
Merge pull request #320851 from tie/dotnet-cross
buildDotnetModule: convert makeWrapperArgs to an array
2024-06-23 20:24:58 -03:00
Martin Weinelt
2096642430
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/os-specific/windows/mingw-w64/default.nix
2024-06-23 19:09:00 +02:00
Winter
2de1fd60fc
Revert "rust: Write config.toml not config" 2024-06-23 12:32:29 -04:00
Doron Behar
9c7e7d8f18
Merge pull request #258058 from doronbehar/pkg/transmission_4
transmission: sent a warning and alias it to transmission_3
2024-06-23 00:07:37 +03:00
Emily
fbda1dbfd6 treewide: replace freeglut with libglut
Allow the macOS GLUT framework to be used automatically in many
cases. Packages that specifically search for freeglut or require its
additional APIs should still explicitly depend on it.

Deliberately skip the Haskell package set, which is mostly
automatically generated, and mupdf, which has its own fork of freeglut.
2024-06-22 18:06:51 +01:00
Pol Dellaiera
a2b5266973
Merge pull request #321095 from mmlb/rust-write-config.toml-not-config
rust: Write config.toml not config
2024-06-21 22:32:49 +02:00
github-actions[bot]
fb94da4e9e
Merge staging-next into staging 2024-06-21 18:01:30 +00:00
Ilan Joselevich
b561a29e4d
defaultCrateOverrides: add missing protobuf to crates 2024-06-21 18:21:39 +03:00
Linus Heckemann
e5adf0b547 maintainers: drop lheckemann 2024-06-21 15:54:54 +02:00
github-actions[bot]
c6707a9686
Merge staging-next into staging 2024-06-21 12:01:53 +00:00
Ilan Joselevich
d9e5089751
Merge pull request #321220 from thehabbos007/cargo-colon
buildRustCrate: support new cargo invocation syntax for build script outputs
2024-06-21 14:21:47 +03:00
Doron Behar
7645dde059 transmission_3: rename from transmission 2024-06-21 12:33:37 +03:00
superherointj
40ae5e072c
build-support/ocaml: deprecate minimumOCamlVersion (#319907)
* ocamlPackages.wtf8: use minimalOCamlVersion

* ocamlPackages.ppx_yojson_conv: minimalOCamlVersion

* ocamlPackages.postgresql: use minimalOCamlVersion

* ocamlPackages.opti: use minimalOCamlVersion

* ocamlPackages.opam-repository: use minimalOCamlVersion

* ocamlPackages.opam-format: use minimalOCamlVersion

* ocamlPackages.lwt-dllist: use minimalOCamlVersion

* ocamlPackages.lacaml: use minimalOCamlVersion

* ocamlPackages.gnuplot: use minimalOCamlVersion

* ocamlPackages.fix: use minimalOCamlVersion

* ocamlPackages.eigen: use minimalOCamlVersion

* ocamlPackages.earley: use minimalOCamlVersion

* ocamlPackages.directories: use minimalOCamlVersion

* ocamlPackages.cpuid: use minimalOCamlVersion

* build-support/ocaml: deprecate minimumOCamlVersion

* build-support/ocaml: deprecate minimumOCamlVersion

---------

Co-authored-by: Vincent Laporte <Vincent.Laporte@gmail.com>
2024-06-21 10:29:31 +02:00
Ahmad Sattar
95bb410817 buildRustCrate: support cargo:: invocation syntax for build script outputs
In order to allow for the new `cargo::` prefix for build script outputs
we have to adjust the configure-crate bash scripts in buildRustCrate to
properly parse the new additional syntax.

These changes don't affect existing build scripts configured with the
old `cargo:` prefix.

For more information, see https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script
2024-06-21 08:29:24 +02:00
Vladimír Čunát
879821772c
Revert #320852: Clean up cross bootstrapping
It rebuilt stdenv on *-darwin; we can't do that in nixpkgs master.
This reverts commit 2f20501c5f, reversing
changes made to fd469c24af.
2024-06-21 07:48:24 +02:00
Martino Fontana
a196f7741c buildFHSEnv: export GST_PLUGIN_SYSTEM_PATH_1_0
GStreamer searches for plugins relative to its binary's location.

However, since bd97973ce0, it uses its *real* binary location, breaking the FHS.

Fixes #311004 (tested on Heroic and Lutris too).
2024-06-20 13:30:28 -05:00
John Ericson
2f20501c5f
Merge pull request #320852 from obsidiansystems/fewer-cross-suffix-attrs
Clean up cross bootstrapping
2024-06-20 10:44:20 -04:00
Ilan Joselevich
c5d75bb7f6
Merge pull request #317755 from thehabbos007/master
BuildRustCrate: proc macros must be built for build's platform
2024-06-20 17:04:57 +03:00
Robert Hensing
cb5a0285b0
Merge pull request #292759 from ShamrockLee/test-references-darwin
tests.references: use `runNixOSTest` instead of `nixosTest`
2024-06-20 15:50:22 +02:00
Ahmad Sattar
fb927d5019
BuildRustCrate: proc macros must be built for build's platform
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-20 14:35:49 +03:00
Manuel Mendez
3f7663c1d7 rust: Write to .cargo/config.toml instead of .cargo/config
Seeing the following new warnings pop up on stderr when cargo was bumped
to 1.78:

```
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
```

which happens to break commitmsgfmt builds in nix (#320294).

closes #320294
2024-06-19 14:56:51 -04:00
Rick van Schijndel
43ce0f9ee0
Merge pull request #318256 from risicle/ris-stack-clash-protection
cc-wrapper: add stack clash protection hardening flag
2024-06-19 19:54:30 +02:00
Ivan Trubach
4caf9a61f9 buildDotnetModule: convert makeWrapperArgs to an array 2024-06-19 00:34:15 +03:00
John Ericson
51f1ecaa59 Clean up cross bootstrapping
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 61202561d9 (specify what
packages just need `stdenvNoLibc`) is definitely the right approach for
this, and adjusted NetBSD and OpenBSD to likewise use it.
2024-06-18 17:04:16 -04:00
Martin Weinelt
f822b2ba5c Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/development/python-modules/langsmith/default.nix
- pkgs/development/python-modules/rich-pixels/default.nix
- pkgs/servers/teleport/generic.nix
2024-06-18 20:16:19 +02:00
David McFarland
b5447275d2
Merge pull request #313005 from tie/dotnet-cross
buildDotnetModule: fix structured attributes support
2024-06-17 09:43:51 -03:00
Ilan Joselevich
9f0e39ede4
Merge pull request #319782 from thehabbos007/quote
build-rust-crate: quote build script output env var
2024-06-16 23:28:39 +03:00
github-actions[bot]
857d0ab18b
Merge staging-next into staging 2024-06-16 00:03:10 +00:00
tomberek
f7aae7b083
Merge pull request #212328 from ExpidusOS/flutter-engine/init
flutter.engine: init
2024-06-15 18:53:38 -04:00
Atemu
2bea8917b2
Merge pull request #319623 from Infinidoge/fix-fetch-yarn-deps
fetchYarnDeps: properly accept src argument
2024-06-15 21:02:02 +02:00
Alyssa Ross
6f756b4065 clang: don't set machine flags for overridden target
We already did this for -march in 12b0e8ac74 ("clang: don't set
-march for overridden target"), but it should have been done for all
machine flags, for the same reason.

Example bug this fixes:

	nix-shell -E '
	  with import ./. {
	    crossSystem = {
	      system = "powerpc64le-linux";
	      gcc.cpu = "power10";
	    };
	  };
	  clangStdenv.mkDerivation { name = "test"; }
	' --run '$CC -target wasm32-unknown-unknown -c /dev/null'

Which previously failed with:

      clang: error: unsupported option '-mcpu=' for target 'wasm32-unknown-unknown'
2024-06-15 08:02:29 +02:00
github-actions[bot]
520c7e2ee8
Merge staging-next into staging 2024-06-15 06:01:20 +00:00
Tristan Ross
4a59129384
buildFlutterApplication: use the engine 2024-06-14 21:01:19 -07:00
Tristan Ross
23ce5265d0
pkgs/build-support/kernel/make-initrd.nix: fix eval for test on darwin 2024-06-14 18:38:45 -07:00
Hraban Luyat
9f4b1064c6 trivial: make pkgs.writeText always fixed output
This can prevent a cascade of rebuilds across nixpkgs versions because these
small files tend to be found at the leaves of dependency trees.
2024-06-14 15:44:30 -04:00
Hraban Luyat
5aa55272c2 trivial: input type assertions for writeText 2024-06-14 15:44:17 -04:00
Hraban Luyat
d544b1259a trivial: fix pkgs.writeText test to pass string
Passing a non-string value and relying on pkgs.writeText to implicitly call
builtins.toString is incorrect.
2024-06-14 15:40:54 -04:00
Atemu
882cf18005 fetch-yarn-deps: reference files to be copied directly
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-14 17:53:18 +02:00
Infinidoge
efff2acc5b
fetchYarnDeps: properly accept src argument 2024-06-14 11:18:10 -04:00
Ahmad Sattar
c730e033ca build-rust-crate: quote build script output env var 2024-06-14 10:23:28 +02:00
Dmitry Kalinkin
fbd21c5067
rustPlatform.maturinBuildHook: specify the output directory (#291025) 2024-06-13 19:21:52 -04:00
Tristan Ross
cdd31bb726
flutterPackages: support beta releases 2024-06-13 14:47:30 -07:00
github-actions[bot]
7f41e5efc9
Merge staging-next into staging 2024-06-13 06:01:38 +00:00
Peder Bergebakken Sundt
88c0896b01
Merge pull request #315991 from ExpidusOS/fix/flutter-moreutils
flutter: drop moreutils for more bash
2024-06-13 02:28:56 +02:00
github-actions[bot]
f9c7b930b4
Merge staging-next into staging 2024-06-11 12:01:44 +00:00
github-actions[bot]
14aa6e8765
Merge master into staging-next 2024-06-11 12:01:16 +00:00
Ilan Joselevich
de9a49c390 buildRustCrate: extensions.sharedLibrary -> extensions.library
Switched to a common attribute for library file extensions:
de70971c90

This makes buildRustCrate evaluate successfully when using
pkgsCross/pkgsStatic.
2024-06-11 11:27:17 +01:00
Sergei Trofimovich
a3f1b476c7 setup-hooks/set-source-date-epoch-to-latest.sh: handle $path that starts with dash
Without the change `updateSourceDateEpoch` fails on tarballs like
`diffoscope-269` that contain single top-level `-269` root as:

    diffoscope> source root is -269
    diffoscope> find: unknown predicate `-269'
    diffoscope> chmod: invalid mode: ‘-269’
    diffoscope> Try 'chmod --help' for more information.

Currently `diffoscope-269` has a `sourceRoot = "./-269";` workaround to
bypass the failure.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2024-06-10 23:56:46 +01:00
github-actions[bot]
c8c2ff3b9b
Merge staging-next into staging 2024-06-10 00:02:49 +00:00
Alyssa Ross
3df6bb2c85
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
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-09 23:07:45 +02:00
Alexis Hildebrandt
bf995e3641 treewide: Remove ending period from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*".*\.";' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*)\.";/\1";/'
2024-06-09 23:04:51 +02:00
github-actions[bot]
83e8f42c49
Merge staging-next into staging 2024-06-09 18:01:26 +00:00
github-actions[bot]
5aea0ef461
Merge master into staging-next 2024-06-09 18:00:55 +00:00
superherointj
21f2d189e4
Merge pull request #316764 from atorres1985-contrib/maven-refactor
Maven: refactor
2024-06-09 10:59:06 -03:00
Franz Pletz
3db93c351d cc-wrapper: add stack clash protection hardening flag
Most Linux distributions are enabling this these days and it does
protect against real world vulnerabilities as demonstrated by
CVE-2018-16864 and CVE-2018-16865.

Fix #53753.

Information on llvm version support gleaned from
6609892a2d
68e07da3e5
092507a730

Information on gcc version support a lot harder to gather,
but both 32bit and 64bit arm do appear to be supported
based on the test suite.
2024-06-07 20:23:46 +01:00
toonn
eed45499c8
Merge pull request #273850 from wegank/dylib-error-fix
fixDarwinDylibNames: fix error message output
2024-06-07 18:48:33 +02:00
Martin Weinelt
7ff8facb8b
Merge remote-tracking branch 'origin/staging-next' into staging 2024-06-07 07:25:52 +02:00
github-actions[bot]
4ace29447c
Merge master into staging-next 2024-06-07 00:02:15 +00:00
Atemu
10b7b6a403
Merge pull request #310385 from szlend/cross-deterministic-uname
deterministic-uname: overridable platform
2024-06-06 21:09:43 +02:00
Anderson Torres
8b1530b937 buildMaven: migrate to apache-maven subdirectory
And expose it via passthru
2024-06-04 21:56:17 -03:00
Robert Scott
f2389281fb
Merge pull request #316761 from risicle/ris-zerocallusedregs-default
stdenv: promote `zerocallusedregs` to `defaultHardeningFlags`
2024-06-03 19:52:30 +01:00
Lin Jian
905b774c4f
Merge pull request #316726 from linj-fork/pr/improve-melpaBuild-version
melpaBuild: allow nix unstable version format
2024-06-03 08:23:39 +08:00
github-actions[bot]
f12893b626
Merge staging-next into staging 2024-06-03 00:02:47 +00:00
github-actions[bot]
c987c730bb
Merge master into staging-next 2024-06-03 00:02:20 +00:00
Robert Scott
dd80ca4d00 stdenv: promote zerocallusedregs to defaultHardeningFlags 2024-06-02 23:53:36 +01:00
Someone
9f48aac218
Merge pull request #306716 from ShamrockLee/apptainer-default-path-substitution
apptainer, singularity: refactor defaultPath substitution
2024-06-02 22:33:55 +00:00
Lin Jian
ee46aa8a13
melpaBuild: allow nix unstable version format
Before, an unstable version of melpaBuild has to be in MELPA format,
which has some disadvantages:
- existing update scripts cannot be reused[1]
- it causes inconsistence.

This patch fixes that by allowing an unstable version to be in Nix
format.

We heuristically detect if it is an unstable version in Nix format.
If so, we convert it to MELPA format.

This does not bring evaluation performance overhead.  Here is my
benchmark result using hyperfine-1.18.0 and nix-2.18.1.

Without this patch:

Benchmark 1: NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.melpaPackages --apply 'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))' --no-eval-cache >/dev/null
  Time (mean ± σ):      9.126 s ±  0.048 s    [User: 6.531 s, System: 0.997 s]
  Range (min … max):    9.056 s …  9.186 s    10 runs

With this patch applied:

Benchmark 1: NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.melpaPackages --apply 'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))' --no-eval-cache >/dev/null
  Time (mean ± σ):      9.124 s ±  0.057 s    [User: 6.522 s, System: 1.011 s]
  Range (min … max):    9.040 s …  9.220 s    10 runs

[1]: 177c9eddad/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix (L93-L108)
2024-06-03 05:29:23 +08:00
Sandro
e3716f214b
Merge pull request #305908 from ShamrockLee/go-module-noflagfile 2024-06-02 19:30:03 +02:00
Sandro
7be7b5dfd2
Merge pull request #289517 from SFrijters/shell-completion-check 2024-06-02 18:56:49 +02:00
Yueh-Shun Li
26baea8388 buildGoModule: don't pass buildFlagsArray as file
Store buildFlagsArray as Bash global array variable instead of
creating/sourcing a file containing its declaration.

buildFlagsArray is short enough, and it is not assigned in a sub-shell.
There's no reason to pass it as a file. Storing it as a variable makes
the build more efficient.
2024-06-01 23:29:41 +00:00
Weijia Wang
91a237cd7a fixDarwinDylibNames: fix error message output 2024-06-01 22:49:42 +02:00
github-actions[bot]
738e64a2f9
Merge master into staging-next 2024-06-01 00:02:18 +00:00
Lin Jian
7f5aedecb5
melpaBuild: add files parameter to specify :files of recipe 2024-06-01 02:29:59 +08:00
Lin Jian
6c9f79c133
melpaBuild: add doc and default value for recipe 2024-06-01 02:22:28 +08:00
Lin Jian
428dfcb007
melpaBuild: add doc and default value for commit 2024-06-01 02:16:28 +08:00
Tristan Ross
d2a06d2573
flutter: drop moreutils for more bash
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-30 14:06:11 -07:00
Felix Schröter
c9de424f87
make-startupitem: add prependExtraArgs and appendExtraArgs 2024-05-30 22:27:15 +02:00
Ivan Trubach
f7d8046fb8 buildDotnetModule: fix structured attributes support
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-29 08:45:25 +03:00
Alyssa Ross
f82a1d12eb Revert "make-binary-wrapper: add cc to propagatedBuildInputs"
This reverts commit 0c34636a56.

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-27 21:56:47 +02:00
sternenseemann
affa8f75ec Reapply "srcOnly: reflink if possible and preserve attributes"
This reverts commit 610ee378fc.

Reason for reapply: The change was alright, just went to the wrong
branch.
2024-05-27 13:41:36 +02:00
github-actions[bot]
c67f226431
Merge staging-next into staging 2024-05-27 06:02:17 +00:00
sternenseemann
610ee378fc Revert "srcOnly: reflink if possible and preserve attributes"
This reverts commit 7173eb87b8.

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-27 02:11:54 +02:00
github-actions[bot]
7b88bc39ef
Merge staging-next into staging 2024-05-27 00:02:54 +00:00
Robert Hensing
e0c43a96d2
testers.lycheeLinkCheck: init (#298665)
* testers.lycheeLinkCheck: init

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-27 01:14:19 +02:00
sternenseemann
7173eb87b8 srcOnly: reflink if possible and preserve attributes
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-26 22:06:10 +02:00
John Ericson
e897cae4da
Merge pull request #311794 from rhelmot/freebsd-minimal3/make-binary-wrapper
make-binary-wrapper: add cc to propagatedBuildInputs
2024-05-26 11:50:45 -04:00
Simon Žlender
2ed51a3ff0 deterministic-uname: Overridable platform
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-25 23:34:31 +03:00
Thomas Watson
4d6d293fad setup-hooks/strip: uniqify files by inode number before stripping
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-24 16:53:14 -05:00
github-actions[bot]
7655996362
Merge staging-next into staging 2024-05-23 18:02:28 +00:00
David McFarland
f17d1f9302
Merge pull request #313514 from tie/dotnet-cross-split
buildDotnetModule: fix cross-compilation and remove dotnet-test-sdk
2024-05-23 14:05:46 -03:00
github-actions[bot]
044fbf6429
Merge staging-next into staging 2024-05-23 12:02:05 +00:00
Pol Dellaiera
a18047b6ad
Merge pull request #312231 from drupol/build-support/php/init-composer-with-plugin
build-support/php: init new builder `php.buildComposerWithPlugin`, refactor `php.packages.composer`, etc
2024-05-23 12:03:42 +02:00
Stefan Frijters
6b6073f1fb
installShellCompletion: add sanity check 2024-05-22 23:13:37 +02:00
Ivan Trubach
cfd1bd6141 buildDotnetModule: remove unnecessary callPackage calls
This change removes no-op callPackage calls and reformats the file with
nixpkgs-fmt.
2024-05-22 03:12:30 +03:00
Ivan Trubach
0e64e645c9 buildDotnetModule: fix cross-compilation and remove dotnet-test-sdk
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.
2024-05-22 03:08:42 +03:00
github-actions[bot]
949e5b9d89
Merge staging-next into staging 2024-05-22 00:02:35 +00:00
K900
ca2605c4e2
Merge pull request #312241 from tpwrules/bwrap-better-display
buildFHSEnvBubblewrap: allow more varied $DISPLAY syntax
2024-05-21 22:52:24 +03:00
github-actions[bot]
a3599a93ae
Merge staging-next into staging 2024-05-21 12:01:47 +00:00
Audrey Dutcher
718b237d0b bintools: Add dynamic loader path for FreeBSD native 2024-05-21 08:20:45 +02:00
Audrey Dutcher
8073fc75a8 bintools: Add an assertion which produces better error messages 2024-05-21 08:20:45 +02:00
github-actions[bot]
af402f7b70
Merge staging-next into staging 2024-05-21 00:02:42 +00:00
Robert Hensing
28df2298ff
Merge pull request #311069 from nbraud/fix-307770
testers.hasPkgConfigModules: fix bug in `versionCheck` handling
2024-05-21 00:13:09 +02:00
Ivan Trubach
7877140075 buildDotnetModule: do not run dotnet command using env
There should be no reason to use env here:

1. In places where it is used to run dotnet with environment variables,
   the same can be done with shell syntax.

   For example, `env "FOO=$bar" baz` is equivalent to `FOO="$bar" baz`.

2. Otherwise, it just unnecessarily forces PATH lookup for dotnet
   command. In addition to that, some dotnet invocations did not use
   env.
2024-05-20 03:02:23 +03:00
Pol Dellaiera
450e9396fd
php.packages.composer: do not use buildComposerProject
I decided to avoid the use of `buildComposerProject because it requires `composer-local-repo-plugin` which is going to be refactored.
2024-05-19 22:10:03 +02:00
Pol Dellaiera
6bad2e219e
build-support/php: use php.packages.composer-local-repo-plugin 2024-05-19 22:10:03 +02:00
Pol Dellaiera
bd92bef332
php.buildComposerWithPlugin: init new builder 2024-05-19 22:10:02 +02:00
Alyssa Ross
4816a73bb5 rustPlatform: --frozen -> --offline
--frozen is stricter than we need in Nixpkgs.  If a Cargo.lock is
slightly wrong, or (in my use case) if building a subproject that is
not a member of the top-level workspace, but the correct Cargo.lock
can be entirely resolved from the existing top-level Cargo.lock, it
should be deterministic, and shouldn't cause any problems, to let
cargo generate the new Cargo.lock.  This should result in less need to
bother upstreams about fixing their Cargo.lock files in cases where
they could have been automatically fixed.
2024-05-18 11:18:59 +02:00
Artemis Tosini
0c34636a56 make-binary-wrapper: add cc to propagatedBuildInputs
Adding cc to propagatedBuildInputs makes derivations with
makeBinaryWrapper in nativeBuildInputs run the cc-wrapper
setup hook. This isn't an issue for derivations using
stdenv, as the cc setup hook is already run by default.
However, derivations that are made with stdenvNoCC, e.g.
because they're made with runCommand, will not run the
cc-wrapper setup hook without this change.

For some reason the FreeBSD native compiler will not work
correctly without the setup hook.
2024-05-17 12:52:49 -07:00
Pol Dellaiera
b258b44a5d
build-support/php: add composerGlobal variable
This doesn't change anything to the existing workflow
2024-05-17 10:25:02 +02:00
Thomas Watson
dd99084843 buildFHSEnvBubblewrap: allow more varied $DISPLAY syntax
The $DISPLAY variable has a format of [host]:num[.screen]. Previously,
the number would only be extracted properly if it had the form :num.
Allow all forms but correctly discard the unused parts.
2024-05-16 10:14:07 -05:00
Audrey Dutcher
5a1987d381 deterministic-uname: add support for FreeBSD 2024-05-14 15:30:46 -07:00
Atemu
b4047a0455
Merge pull request #279260 from SuperSamus/multiPkgs-false-remove
treewide: remove `multiArch=false` and wrong usage of `extraPkgs`
2024-05-14 09:59:43 +02:00
Martino Fontana
1ee25e4d13 wrapAppImage: default extraPkgs to pkgs: [ ]
Sane default in preparation for the next commit.
2024-05-13 20:32:47 +02:00
Pol Dellaiera
7325d7ec2d
Merge pull request #310325 from patka-123/php-default-updatescript2
buildsupport/php: add passthru.updateScript
2024-05-13 14:08:52 +02:00
nicoo
bf4d46e338 fixup! testers.hasPkgConfigModules: don't display on ignored version mismatches 2024-05-12 20:48:09 +00:00
nicoo
43efaaaae8 testers.hasPkgConfigModules: don't display on ignored version mismatches 2024-05-12 14:12:41 +00:00
nicoo
4af3b807fc testers.hasPkgConfigModules: fix versionCheck conditional
Broke tests, as the version check was effectively always enabled:
  https://github.com/NixOS/nixpkgs/pull/307770#issuecomment-2102586718
2024-05-12 13:49:32 +00:00
nicoo
1d4d9facbc tests.testers.hasPkgConfigModules: test the versionCheck parameter
Shell script is currently buggy and effectively ignores the value, always enforcing version match:
  https://github.com/NixOS/nixpkgs/pull/307770#issuecomment-2102586718
2024-05-12 13:49:32 +00:00
github-actions[bot]
42828a757c
Merge master into staging-next 2024-05-11 18:01:23 +00:00
Ryan Lahfa
f16f9410d0
Merge pull request #310453 from RaitoBezarius/lix-preps
build-support/meson: explicitly use ambiant CMake during cross compilation
2024-05-11 15:24:44 +02:00
github-actions[bot]
12da532fe3
Merge master into staging-next 2024-05-11 12:01:09 +00:00
Raito Bezarius
d4c673a92b build-support/meson: explicitly use ambiant CMake during cross compilation
Thanks to Qyriad, it was found out that Nixpkgs was unable to cross
compile when CMake was needed at cross compilation time with Meson
because Meson refuse to use the ambiant CMake.

A simple fix is to always provide the ambiant CMake and trust the
packager to pass the right CMake, otherwise the rest of the build would
probably fail in mysterious ways.

An example of package that required this fix is the Lix, a Nix
implementation, that uses `toml11` discovered via CMake during the Meson
configure phase.

Co-authored-by: Qyriad <qyriad@qyriad.me>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-11 13:32:14 +02:00
Jan Tojnar
4be4408157 Merge branch 'master' into staging-next
; Conflicts:
;	maintainers/scripts/luarocks-packages.csv
;	pkgs/development/lua-modules/generated-packages.nix
2024-05-11 12:47:40 +02:00
K900
f80228a805 build-support/rust: rewrite workspace dependency inheritance
This fixes at least one bug with default-features, and also
just aligns us more with what Cargo actually does.

Also some Python style fixes and a bit less mutating state.
2024-05-10 20:55:39 +03:00
Pol Dellaiera
c7578123cf
Merge pull request #310528 from alyssais/buildRustPackage-platforms
buildRustPackage: add new supported platforms
2024-05-10 10:50:42 +02:00
Alyssa Ross
6d4a14504e
buildRustPackage: add new supported platforms
The new NetBSD platforms have appeared since last time I updated this
list, but it looks like I just missed the MIPS linux ones last time.
2024-05-10 10:18:20 +02:00
Patka
8cd73735dc
buildsupport/php: add passthru.updateScript
PHP packages where upstream provides a lock file can be automatically updated with the standard updateScript
2024-05-09 14:42:27 +02:00
github-actions[bot]
8d97a60dd1
Merge master into staging-next 2024-05-08 18:01:26 +00:00
Atemu
6d5fc9c5d9
Merge pull request #305582 from TomaSajt/dub-to-nix-git-deps
dub-to-nix,buildDubPackage: allow git-type dependencies
2024-05-08 16:34:21 +02:00
Linus Heckemann
a10842c7f0
Merge pull request #302300 from Ma27/kernel-zstd
linux kernel: prefer zstd where possible
2024-05-08 15:17:45 +02:00
TomaSajt
eaab342480
dub-to-nix,buildDubPackage: allow git-type dependencies 2024-05-08 14:01:35 +02:00
github-actions[bot]
9b1eee6539
Merge master into staging-next 2024-05-07 18:01:11 +00:00
Pol Dellaiera
3d155494e4
build-support/php: reorganize files
Pave the way for having multiple versions in the future
2024-05-07 11:18:34 +02:00
Yorick van Pelt
8891e98f24
dockerTools: add nixDB tests 2024-05-06 17:48:49 +02:00
Yorick van Pelt
62e9e0f963
dockerTools: add includeNixDB to buildImage and document 2024-05-06 14:57:08 +02:00
github-actions[bot]
b05583e319
Merge master into staging-next 2024-05-06 12:01:18 +00:00
Randy Eckenrode
318a6a6b52
Merge pull request #290684 from corngood/dotnet-darwin
dotnet: fix dotnet executables in darwin sandbox
2024-05-06 07:57:02 -04:00
github-actions[bot]
041bd1cdf7
Merge master into staging-next 2024-05-05 18:00:54 +00:00
Pol Dellaiera
4d2dad358d
build-support/php: remove obsolete parameters 2024-05-05 19:51:01 +02:00
Pol Dellaiera
31bdcac6a0
build-support/php: add missing binding 2024-05-05 18:51:03 +02:00
Pol Dellaiera
d8f509a470
build-support/php: composer, add meta.mainProgram 2024-05-05 18:51:03 +02:00
Pol Dellaiera
409e640cef
build-support/php: use lib.getExe 2024-05-05 18:51:03 +02:00
Pol Dellaiera
b5855e4e66
build-support/php: move environment variables under env attribute 2024-05-05 18:51:03 +02:00
Pol Dellaiera
6ca2dfeaec
build-support/php: remove obsolete parameters 2024-05-05 18:45:27 +02:00
Jan Tojnar
100509c030 Merge branch 'staging-next' into staging
Conflicts in luaPackages.luarocks-nix:

- 8b563cd9f9 switched to the new version format (prefixed by 0 since there was no relevant last tag in the branch).
  bc4f6fa543 bumped version and switched to the new version format. But the tag used is not part of the branch the commit comes from (master).

  Used the new version but replaced the tag prefix with 0.

- b73ec84b9e removed meta (it is already set in the overridden luarocks). But that would cause the update script to try to update the overridden luarocks (as did the previously used old.meta).
  bf311d950e modified meta to fix the update script properly.

  Kept the meta from the latter since it allows update script to work.
2024-05-05 14:50:32 +02:00
David McFarland
26c3d6878a dotnet: fix dotnet executables in darwin sandbox
This fixes:

    Could not load ICU data. UErrorCode: 2

We're using a hook instead of a wrapper because various things like to
reference the unwrapped dotnet executable.
2024-05-04 19:14:39 -03:00
Pol Dellaiera
75ae762133
workflows/check-nix-format: enforce for build-support/php 2024-05-04 23:06:24 +02:00
github-actions[bot]
63659f437f
Merge staging-next into staging 2024-05-04 00:02:40 +00:00
nicoo
a817fdac5f
Merge #307770: add optional version check in testers.hasPkgConfigModules 2024-05-03 20:18:56 +00:00
Weijia Wang
b4617eb071 Merge branch 'staging-next' into staging 2024-05-03 19:03:51 +02:00
Wael Nasreddine
7c4cc6476b
Merge pull request #298847 from ShamrockLee/build-go-module-buildflag
buildGoModule: warn about buildFlags only when using buildPhase provided by buildGoModule
2024-05-03 10:57:22 -06:00
Yorick van Pelt
c055845069
dockerTools.streamLayeredImage: add includeNixDB argument, expose conf and streamScript 2024-05-03 16:40:48 +02:00
github-actions[bot]
4e3bc63c95
Merge staging-next into staging 2024-05-02 12:02:05 +00:00
github-actions[bot]
c4dfa193ac
Merge master into staging-next 2024-05-02 12:01:36 +00:00
Weijia Wang
a6742256e2
Merge pull request #279391 from katexochen/buildGoModule/deprecate-buildflags
buildGoModule: announce removal of `buildFlags` and `buildFlagsArray`
2024-05-02 12:58:35 +02:00
Pol Dellaiera
e7ad484731
build-support/php: replace --no-ansi with --no-progress 2024-05-01 11:15:39 +02:00
Pol Dellaiera
382220e679
build-support/php: remove makeBinaryWrapper 2024-05-01 11:15:16 +02:00
nicoo
c150eb5e44 tests.testers.hasPkgConfigModules: Fix typo in comment 2024-04-30 22:24:47 +00:00
nicoo
039bd24f54 tests.testers.hasPkgConfigModules: add testcases for versionCheck 2024-04-30 22:24:05 +00:00
nicoo
1e9d263dd7 testers.hasPkgConfigModules: Optionally check each module's version 2024-04-30 20:34:07 +00:00
nicoo
5fce6cb334 testers.hasPkgConfigModules: Report all errors rather than fail early 2024-04-30 20:34:07 +00:00
Elliot Cameron
e6adf1505c buildGoModule: propagate setSourceRoot to goModules
The underlying goModules derivation must have the same source root as
the overall package. sourceRoot is being propagated already, but
setSourceRoot was not. This was surely an oversight.

This is implemented in such a way that it cannot break existing
vendorHashes unless the package is using setSourceRoot already. If
that's the case, then the package is either broken or found a workaround
to do deal with this very issue (e.g. by using `cd path` in an early
phase).

A simple search (`rg setSourceRoot $(rg -l buildGoModule)`) reveals that
no such packages obviously exist in Nixpkgs.
2024-04-29 14:12:26 -04:00
Jan Tojnar
eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00
Jan Tojnar
70cf3ecaae wrapGAppsHook: Flip inheritance relationship with wrapGAppsNoGuiHook 2024-04-27 00:05:46 +02:00
Yueh-Shun Li
d09aedb1a0 singularity-tools.buildImage: increase default memSize
Increase the default RAM size for image-building QEMU VM.

Make singularity.tests.image-hello-cowsay build on aarch64-linux.
2024-04-26 14:56:52 +08:00
github-actions[bot]
05273cc291
Merge master into staging-next 2024-04-25 00:02:07 +00:00
Atemu
2432c6b829
Merge pull request #271071 from pbsds/wrapAppImage-pname-redux
appimageTools.wrapAppImage: remove version from `pname`
2024-04-24 21:48:19 +02:00
Peder Bergebakken Sundt
340d601e84 appimage: avoid setting name 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
90622c10bd appimageTools.wrapAppImage: passthru pname and version 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
eb02e003b0 buildFHSEnvBubblewrap/buildFHSEnv: permit pname+version instead of name 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
bbb1f25bfb buildFHSEnvBubblewrap: do not infer pname from name 2024-04-24 15:26:52 +02:00
github-actions[bot]
3e8920f50b
Merge master into staging-next 2024-04-23 00:02:30 +00:00
Peder Bergebakken Sundt
088cdb337b
Merge pull request #300538 from ShamrockLee/write-shell-application-extra
writeShellApplication: add argument extraShellCheckFlags
2024-04-22 22:45:44 +02:00
github-actions[bot]
5cc1b6ed0f
Merge staging-next into staging 2024-04-22 18:01:30 +00:00
Lily Foster
ddb94deafa prefetch-npm-deps: switch to data-encoding 2024-04-22 23:14:15 +10:00
Lily Foster
c588edaf25 prefetch-npm-deps: remove runtime dependency on nix 2024-04-22 23:14:15 +10:00
Scott Worley
697bba9892 fetchgit: Support fetching signed tags over dumb http transport 2024-04-22 02:16:02 +02:00
github-actions[bot]
98becd63e7
Merge staging-next into staging 2024-04-21 12:01:48 +00:00
binarycat
eaf5ec98fe fetchurl: add codemirror.dlang.org to the list of dub mirrors
code.dlang.org actually went down recently, hopefully this should
make that a bit less likely to happen in the future.
2024-04-21 18:51:45 +10:00
Maximilian Bosch
b6ef9ffdfd
nixos/udev: compress firmware with zstd if possible
Closes #267442

    $ nix path-info -Sh /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz
    /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz	440.3M
    $ nix path-info -Sh /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd
    /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd	460.6M

This is an increase of 4.4%, but OTOH zstd has a significantly higher
decompression speed[1].

[1] https://gregoryszorc.com/blog/2017/03/07/better-compression-with-zstandard/
2024-04-19 16:46:25 +02:00
Maximilian Bosch
378177d269
linux kernel: prefer zstd where possible
Closes #302291
Closes #301536

The following things have changed:

* For 5.7+: ZSWAP compressor uses zstd now.
* For 5.11+: ZRAM compressor uses zstd now.
* For 5.13+: kernel modules are compressed with zstd instead of xz.
* For 5.19+: support zstd-compressed firmware.

The modules-closure functionality needed explicit support for copying
over `.zst` files. Also, the VM image builder used busybox's `insmod`
before which doesn't support zstd. Switched to `kmod` and added xz/zstd
as dependencies for it, similar to how it's done for the actual stage1
in d33e52b253. The use of `kmod` here
doesn't seem to be such a big deal since it's only a build-time
dependency.
2024-04-19 16:45:35 +02:00
github-actions[bot]
183a214e9e
Merge staging-next into staging 2024-04-19 12:01:41 +00:00
sternenseemann
5e8f10fe93 expand-response-params: add description
Since the tool is exposed more prominently now, we should clear up what
it is and note that it is to be considered unstable, i.e. we may change
it if the necessity arises. (In practice it is probably going to be
fairly stable though, as compiler interfaces tend to be quite stable.)

Should we add a version?
2024-04-18 20:49:13 +02:00
sternenseemann
7be562d046 wrapCC, wrapBintools: move expand-response-params bootstrapping out
The cc and bintools wrapper contained ad hoc bootstrapping logic for
expand-response-params (which was callPackage-ed in a let binding). This
lead to the strange situation that the bootstrapping logic related to
expand-response-params is split between the wrapper derivations (where
it is duplicated) and the actual stdenv bootstrapping.

To clean this up, the wrappers simply should take expand-response-params
as an ordinary input: They need an adjacent expand-response-params (i.e.
one that runs on their host platform), but don't care about the how.
Providing this is only problematic during stdenv bootstrapping where we
have to pull it from the previous stage at times.
2024-04-18 20:49:13 +02:00
sternenseemann
b2a568906a wrapCC, wrapBintools: use runtimeShell instead of stdenv shell
We don't need to artificially make sure that we can execute the wrapper
scripts on the build platform by using stdenv's shell (which comes from
buildPackages) since our cross infrastructure will get us the wrapper
from buildPackages. The upside of this change is that cross-compiled
wrappers (e.g. pkgsCross.aarch64-multiplatform.gcc) will actually work
when executed!

For bootstrapping this is also not a problem, since we have a long
build->build platform chain so runtimeShell is just as good as
stdenvNoCC.shell. We do fall back to old ways, though, by explicitly
using the bootstrap-tools shell in stage2, so the adjacent bash is only
used from stage4 onwards. This is unnecessary in principle (I'll try
removing this hack in the future), but ensures this change causes zero
rebuilds.
2024-04-18 20:49:13 +02:00
Yueh-Shun Li
8d861e6118 buildGoModule: place GOFLAGS-related warnings around GOFLAGS specification
Avoid "global" warnings that complicates fixed-point arguments support.
2024-04-18 15:14:43 +00:00
Yueh-Shun Li
6500de413a buildGoModule: warn about flags only when using provided buildPhase
Warn about buildFlags and ldflags only when using buildPhase provided by
buildGoModule.

This allows developers to use buildFlags in custom buildPhase.
2024-04-18 15:05:37 +00:00
John Ericson
0820a71359
Merge pull request #304033 from sternenseemann/wrapper-cleanups
wrapCC, wrapBintools, stdenv: make Nix code a bit more consistent
2024-04-18 10:57:18 -04:00
Sandro Jäckel
6181939cdf
fixup-yarn-lock: split out from prefetch-yarn-deps, cleanup installing
To reduce dependencies (mainly nix-prefetch-git and through that git,
git-lfs) when we just need to fixup a lock file, eg when building electron.
This also tries to avoid needless rebuilds when eg. golang is updated.

Also this cleans up and combined the build/installPhase of both tools to
be a lot simpler.
2024-04-17 11:35:22 -04:00
Ruben Sanchez Diez
e6dc0fb1a1 rustPlatform.importCargoLock: Adding sparse protocol
When added the new sparse protocol the derivation is not handling properly Cargo.lock with sparse+ registries
2024-04-17 15:42:49 +02:00
github-actions[bot]
b1f0a79f07
Merge staging-next into staging 2024-04-18 18:01:29 +00:00
github-actions[bot]
a181110966
Merge staging-next into staging 2024-04-18 00:02:44 +00:00
lassulus
55205ec1a1
Merge pull request #302926 from helsinki-systems/fix/buildrustpackage-structuredattrs
cargoBuildHook: Fix features with __structuredAttrs
2024-04-16 23:10:26 +02:00
sternenseemann
63d21d1325 wrapCC, wrapBintools: remove unnecessary indexing into platform sets
`targetPlatform` and `hostPlatform` are already in scope, so it is
unnecessary to index into `stdenvNoCC`.
2024-04-15 12:54:29 +02:00
sternenseemann
4aa9e4ecc6 wrapCC, wrapBintools: don't alias stdenvNoCC to stdenv
In delicate code like this, it seems unwise to pass something of as
something it isn't for convenience's (?) sake. It causes a slight
possibility for confusion with `buildPackages.stdenv`. However, it
should be possible to eliminate the need for this in a separate change.
2024-04-15 12:54:25 +02:00
sternenseemann
fde3861f21 wrapCC: check darwin-ness for -mcpu/-march based on targetPlatform
`stdenv.is*` defaults to `hostPlatform` which is technically incorrect
here, since what we are gating concerns the target platform only.

This would be a problem in practice if cross compiling from
x86_64-darwin to aarch64-darwin whilst using gcc which is probably
rare enough.
2024-04-15 12:49:29 +02:00
Sandro
ec2cb66cbe
Merge pull request #301928 from nevivurn/feat/gomod-workvendor
buildGoModule: vendorHash fixes for proxyVendor and Go 1.22
2024-04-14 21:57:17 +02:00
Naïm Favier
25f42f0350
Merge pull request #302351 from phijor/agda-separate-bin-output
haskellPackages.Agda: Split outputs to reduce closure size
2024-04-14 09:56:56 +02:00
Yongun Seong
3e28bdc678
buildGoModule: inherit env from main package to goModule derivation 2024-04-14 14:27:44 +09:00
Jacek Galowicz
8d3a38e8b1 NixOS Integration tests: Re-enable for macOS 2024-04-12 13:41:27 +02:00
Paul Meyer
dd540970e2 buildGoModule: announce removal of buildFlags
and `buildFlagsArray`
2024-04-12 10:40:35 +02:00
Olivia Crain
1348195416
tests.importCargoLock: fix self-inclusive src listings in .nix files
Replace `src = ./.` instances with more explicit source listings.
Otherwise, derivations will be rebuilt on any change to the files
defining them (e.g. formatting via nixfmt-rfc-style).
2024-04-10 10:27:12 -05:00
Linus Heckemann
9d50a5b0d8
Merge pull request #264147 from lheckemann/foreign-distros
vmTools: misc debian tool improvements
2024-04-10 13:31:39 +02:00
Janne Heß
6486868c28
cargoBuildHook: Fix features with __structuredAttrs 2024-04-10 09:24:17 +02:00
Atemu
44ec127d3b
Merge pull request #302172 from tpwrules/bubblewrap-no-32
build-fhsenv-bubblewrap: reference 32-bit binaries only if multiArch
2024-04-09 15:18:15 +02:00
Tristan Ross
b1ef46706f
llvmPackages_9: remove due to age 2024-04-08 22:39:53 -07:00
Robert Hensing
c740c98fc1
Merge pull request #292760 from PigeonF/dockertools-build-layered-compressor
dockerTools: Fix changing compression method for `buildLayeredImage`
2024-04-08 09:24:18 +02:00
Thomas Watson
9bcd91ba09 build-fhsenv-bubblewrap: reference 32-bit binaries only if multiArch
Fixes issues using bubblewrap'd fhsenvs in scenarios where i686 is not
supported (such as Rosetta 2 emulation in a Linux VM on Apple Silicon).
2024-04-07 10:44:53 -05:00
Philipp Joram
294245f750 haskellPackages.Agda: Split outputs to reduce closure size
After enabling a separate binary output for the `Agda` Haskell package,
the new `bin` output measures ~100MiB, compared to the ~4.5GiB before.
Using it in `agdaWithPackages` reduces the closure size of an Agda
installation from ~5GiB to ~3GiB.  The remaining space is taken up
mostly by the GHC backend.

With this change, derivations depending on `haskellPackages.Agda`
directly need to pick the right (binary) output.  This concerns in
particular `emacsPackages.agda2-mode`.
2024-04-07 16:36:57 +03:00
Weijia Wang
7b1000581c
Merge pull request #295812 from UlyssesZh/fix-nuget-to-nix-trailing-slash
nuget-to-nix: fix the bug of wrong url in the generated nix file when base url does not have trailing slash
2024-04-05 06:31:00 +02:00
Nick Cao
2f46085c19
pkg-config: set prefixed mainProgram for cross compilation
`lib.getExe pkgsCross.riscv64.buildPackages.pkg-config` should return
`<prefix>/bin/riscv64-unknown-linux-gnu-pkg-config` not `<prefix>/bin/pkg-config`
2024-04-04 14:55:10 -04:00