Commit Graph

8300 Commits

Author SHA1 Message Date
Tristan Ross
3c6127cf01
cc-wrapper: exclude clang flags when cpp 2024-07-24 20:31:38 -07:00
github-actions[bot]
7208220b63
Merge master into staging-next 2024-07-24 18:01:18 +00:00
Robert Hensing
c5e5aa7266
Merge pull request #308822 from yorickvP/yorickvp/streamLayeredImage-overridable
dockerTools.streamLayeredImage: add includeNixDB argument, expose conf and streamScript
2024-07-24 16:02:35 +02:00
Christoph Traut
20a037237c appimage-run: Expose $APPIMAGE
Is supposed to be visible by the AppImage: https://docs.appimage.org/packaging-guide/environment-variables.html
2024-07-24 15:17:30 +02:00
github-actions[bot]
8402add1f4
Merge master into staging-next 2024-07-24 12:01:12 +00:00
Artturin
60e9cffe2c Merge branch 'master' into staging-next 2024-07-22 22:53:31 +03:00
Anderson Torres
539575ab2b treewide: remove yana from meta.maintainers [orphans] 2024-07-22 16:22:39 -03:00
Franz Pletz
719e8e672b
Merge pull request #328876 from katexochen/buildGoPackage/deprecate 2024-07-21 22:32:03 +02:00
Paul Meyer
b6c7f1bfd6 buildGoPackage: deprecate
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-07-21 12:50:54 +02:00
Will Fancher
6f959a9e96 nixos/make-initrd-ng: dlopen ELF notes 2024-07-21 06:31:42 -04:00
Will Fancher
e6c544270c nixos/make-initrd-ng: Pass contents as JSON 2024-07-21 06:31:42 -04:00
Arian van Putten
80be92660e autoPatchelfHook: add support for .note.dlopen
also retain libc in rpath if it was there originally
2024-07-21 06:25:51 -04:00
Will Fancher
ffbecb3c19 autoPatchelfHook: Stop using deprecated alias types 2024-07-21 06:25:51 -04:00
github-actions[bot]
be3262bae8
Merge master into staging-next 2024-07-21 00:02:58 +00:00
Alyssa Ross
f03d6497cb separateDebugInfo: tell rustc not to strip
There's no point generating debug info if the compiler immediately
strips it before we get a chance to do anything with it.

This is especially important since Cargo 1.77, which asks rustc to
strip by default.
2024-07-20 10:05:57 +02:00
Ivan Trubach
b40d043d5a test.testers: update tests for testers.testEqualContents
Updates tests for testers.testEqualContents with diffoscope and fixes
some bugs in tests (e.g. fileDiff always succeed because subshell does
not inherit errexit option).
2024-07-20 04:32:20 +03:00
github-actions[bot]
401d4660b3
Merge staging-next into staging 2024-07-18 18:01:57 +00:00
Ivan Trubach
fc5c829532 testers.testEqualContents: use diffoscope instead of diffing find output
Before this change, testers.testEqualContents implementation had several
bugs (e.g. executables at different paths were not considered equal). So
we switch to diffoscope that that is designed to handle exactly these
kinds of comparisons and gives more insights into the differences in the
output.
2024-07-18 19:33:44 +03:00
Ivan Trubach
b631366870 test.testers: add failing tests for testers.testEqualContents
This change adds tests for tests.testEqualContents to demonstrate that
the current implementation is failing in some cases.
2024-07-18 18:49:57 +03:00
lassulus
cb1303b5bc
Merge pull request #325619 from MatthewCroughan/mc/vmtools-custom-qemu
vmTools: allow qemu to be overridden via customQemu argument
2024-07-18 16:07:23 +02:00
K900
999be9b339
Merge pull request #279789 from nazarewk/hardware-firmware-edid-fix
nixos/hardware.display: init module
2024-07-18 17:02:02 +03:00
Krzysztof Nazarewski
4ede20cc6f makeModulesClosure: include /lib/firmware/edid
modules-closure.sh seems to consider everything under
 /lib/firmware to be a kernel module,
 this change adds a special handling of `edid` directory,
 which does not contain kernel modules

fixes #279739
2024-07-18 16:57:18 +03:00
Ivan Trubach
c2e1be3be0 doc: fixup doc/build-helpers references 2024-07-18 14:15:53 +03:00
Randy Eckenrode
f9b7f4ec09
tree-wide: use top-level cctools 2024-07-17 22:36:19 -04:00
Weijia Wang
078fdedf26 Merge branch 'staging-next' into staging 2024-07-17 13:10:23 +02:00
Florian Nagel
e18d3b4894
Added an error message when using enableFakechroot on Darwin (#327336)
* Added an error message when using enableFakechroot on Darwin

Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-07-17 10:06:42 +02:00
toonn
c3c5870e96
Merge pull request #307880 from reckenrode/ld64
cctools: 973.0.1 -> 1010.6
2024-07-17 08:22:14 +02:00
Robert Hensing
3fb14db08a testers.shellcheck: init
Needed for testing upcoming commit.
2024-07-16 20:10:02 +02:00
github-actions[bot]
df8055b727
Merge staging-next into staging 2024-07-16 18:01:37 +00:00
Artturin
a516ea8c99 Merge branch 'staging-next' into staging 2024-07-16 19:07:48 +03:00
Smaug123
7924a2513e
dotnet: fix fetchDeps null handling 2024-07-16 08:34:23 +01:00
David McFarland
d50a509660
Merge pull request #326785 from Smaug123/nuget-deterministic
dotnet: strip signature files from NuGet
2024-07-14 21:23:38 -03:00
Smaug123
368fc1c5b1
dotnet: strip signature files from NuGet packages 2024-07-14 22:41:30 +01:00
Robert Scott
b207b6ef74 cc-wrapper: add support for shadowstack hardening flag 2024-07-14 21:25:47 +01:00
Atemu
476b450df8
Merge pull request #272380 from chayleaf/gradle2
gradle: add setup hook
2024-07-14 22:08:41 +02:00
Vladimír Čunát
211398c03e
Merge branch 'staging-next' into staging 2024-07-14 08:35:35 +02:00
David McFarland
417776fc8a
Merge pull request #316362 from Smaug123/fetchdeps-script
buildDotnetModule: split fetch-deps script to new file
2024-07-13 21:10:17 -03:00
Randy Eckenrode
c922cb27b6
bintools-wrapper: drop postLinkSignHook
When the linker signs a Mach-O binary, it sets a flag in the signature’s code directory indicating that the signature was generated by a linker. Tools such as `strip` and `install_name_tool` read this flag and will
update ad hoc signatures after they perform their modifications.

The updated l64 supports signing binaries automatically. Both the updated cctools and LLVM will check for the linker-signed flag and resign binaries they modify automatically when it’s present. Given that, use of postLinkSignHook is unnecessary and potentially harmful.

In particular, if the hook is used and an unwrapped `strip` or `install_name_tool` is on the user’s path, they will not automatically update an ad hoc signature. Instead, they will issue a warning and create a binary with a broken signature.

It is more robust to let the tools handled this since the only time a signature would not be linker-signed is when the user is manually invoking `codesign` (or another tool such as `sigtool` or `rcodesign`), which by nature of the invocation updates the signature to a valid  one.

Since `strip` no longer needs to be wrapped for code-signing, binutils-wrapper now uses the GNU strip wrapper on Darwin.

Fixes https://github.com/NixOS/nixpkgs/issues/208951.
2024-07-13 17:54:36 -04:00
Randy Eckenrode
4712e8fe80
libredirect: use llvmPackages unconditionally
Darwin and its bootstrap tools both use LLVM 16, which is sufficient for
arm64e support in LLVM. Thsi change removes an unnecessary LLVM 13 build
from the stdenv bootstrap.
2024-07-13 10:59:41 -04:00
Randy Eckenrode
1cb1853573
ld-wrapper: use a temporary file for reponse file
This changes ld-wrapper to use a temporary file for the response file
passed to ld instead of using process substitution.

ld64 does not handle long command-lines when reading from the response
file, which defeats the point of using a response file to handle long
command-lines. cctools-port was patched to work around this, but nixpkgs
is now using Apple’s source release directly instead of the port.

Since it’s preferable not to patch Apple’s release heavily (to reduce
the difficulty of updating to new versions and to match upstream’s
behavior), use the approach that was adopted in cc-wrapper to work
around issues with response files in newer versions of clang.

Related PRs (cctools-port):
- https://github.com/NixOS/nixpkgs/pull/213831
- https://github.com/tpoechtrager/cctools-port/pull/132

Related PRs (cc-wrapper):
- https://github.com/NixOS/nixpkgs/pull/245282
- https://github.com/NixOS/nixpkgs/pull/258608
2024-07-13 10:59:41 -04:00
github-actions[bot]
b66506a79e
Merge staging-next into staging 2024-07-12 12:01:44 +00:00
chayleaf
62d13413f4
mitm-cache: init at 0.1.1 2024-07-12 18:24:47 +07:00
Smaug123
45037a9d73
buildDotnetModule: split fetch-deps script to new file
This makes the minimal change to put the script in a new file.
It does not fix the resulting ShellCheck warnings (which would
have been present in the previous version; I've just exposed
them).
2024-07-12 09:53:13 +01:00
Doron Behar
3cddaded22
Merge pull request #318015 from doronbehar/pkg/yarnConfigHook
Create yarnBuildHook and yarnConfigHook
2024-07-12 09:45:26 +03:00
Vladimír Čunát
2c053848df
Merge branch 'master' into staging 2024-07-11 22:05:05 +02:00
Florian Klink
9b481a9f7b
Merge pull request #325876 from flokli/defaultCreateOverridesAddZlib
defaultCrateOverrides: add extraLinkFlags to zlib
2024-07-11 11:24:25 +03:00
Martin Weinelt
176a56c40f
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/applications/misc/blender/default.nix
- pkgs/development/web/nodejs/nodejs.nix
2024-07-11 01:06:28 +02:00
Naïm Favier
0764f58ca3
Merge pull request #324503 from ncfavier/agda-mk-library-file
build-support/agda: expose mkLibraryFile
2024-07-11 00:44:48 +02:00
Doron Behar
2400268a38 fetch-yarn-deps: handle yarn.lock deps without a resolved url 2024-07-10 09:39:10 +03:00
Doron Behar
ee7cfec5aa doc/javascript: document yarn{Config,Build}Hook 2024-07-10 09:39:03 +03:00
Doron Behar
296556a320 yarnBuildHook: init 2024-07-10 09:39:02 +03:00
Doron Behar
a84f3ca3d8 yarnConfigHook: init 2024-07-10 09:39:02 +03:00
Doron Behar
1151b39c24 fetch-yarn-deps: format with nixfmt (RFC166) 2024-07-10 09:39:01 +03:00
John Ericson
279c439ac8
Merge pull request #323608 from obsidiansystems/openbsd-static
openbsd: Add static linking support
2024-07-09 23:44:49 -04:00
John Ericson
000b58721f Merge remote-tracking branch 'upstream/master' into openbsd-static 2024-07-09 18:18:47 -04:00
John Ericson
676df1cf2d openbsd: Add static linking support
I've had better luck creating statically-linked binaries that work than
dynamically-linked ones, so this is needed quite practically.
2024-07-09 18:17:06 -04:00
Wael Nasreddine
0505253a30
Merge pull request #303217 from deshaw/buildGoModule-setSourceRoot
buildGoModule: propagate setSourceRoot
2024-07-09 15:10:02 -07:00
Florian Klink
9e3825de8d defaultCrateOverrides: add extraLinkFlags to zlib
These libraries need zlib, and otherwise cause a linker error when
linking the final crate of a tauri/wry project.
2024-07-09 18:12:38 +03:00
matthewcroughan
65c851cd75 vmTools: allow qemu to be overridden via customQemu argument 2024-07-08 19:47:08 +01:00
David McFarland
691bec7b0e nuget-to-nix: fix hash generation when resolving multiple sources
Fixes: 2280d5c467
2024-07-08 12:14:09 -03:00
Vladimír Čunát
4c09ae2416
Merge branch 'staging-next' into staging 2024-07-08 10:43:15 +02:00
Anderson Torres
368f163caa emacs: migrate build-support/emacs to applications/editors/emacs/build-support
As a consequence of restrictions imposed by RFC 140 - Simple Package Paths [1]
-, files related to a package should be confined on the package directory.

Certainly this restriction does not apply to packages outside by-name hierarchy.

Nonetheless, this is an interesting organization heuristics: things that affect
Emacs should be confined inside Emacs directory. Besides a future migration, the
"debuggability" of a framework is way more enhanced when we know how to find all
its files.

A similar task was done before, when RFC 140 was not a thging yet - namely, the
migration of emacs-modes to elisp-packages [2].

[1] https://github.com/NixOS/rfcs/pull/140
[2] https://github.com/NixOS/nixpkgs/pull/123859
2024-07-06 09:41:13 -03:00
github-actions[bot]
1f5f0905f8
Merge staging-next into staging 2024-07-06 12:01:49 +00:00
Ilan Joselevich
7220592b15
Merge pull request #324880 from flokli/defaultCreateOverridesFixes
defaultCrateOverrides: fix some gtk dependencies
2024-07-06 13:05:14 +03:00
Martin Weinelt
e7b1ee45cf
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/tools/misc/watchlog/default.nix
2024-07-06 01:52:35 +02:00
Martin Weinelt
d9610a9f2e
Merge remote-tracking branch 'origin/master' into staging-next 2024-07-06 01:51:14 +02:00
Florian Klink
0c00ad14ac defaultCrateOverrides: fix some gtk dependencies
- gobject-sys and gio-sys need pkg-config
 - add gtkx11-sys
 - add javascriptcore-rs-sys
 - add soup3-sys
 - add webkit2gtk-sys
2024-07-06 00:05:43 +03:00
Florian Klink
890286ddbf
Merge pull request #324876 from flokli/buildRustCrateBuildRsOutput
buildRustCrate: don't swallow build.rs output
2024-07-05 23:05:31 +03:00
Florian Klink
cbe5cf5d81 buildRustCrate: don't swallow build.rs output
This is executed curing the build, and usually quite helpful in telling
you how the build failed, if it failed.

For example, when linking against system libraries, it shows which
system lib could not be discovered, the pkg-config path used etc.

Not showing it simply removes all this, and trying to parse out the
"important" bits and only show these is probably also brittle.

The output generally isn't that spammy normally, so let's just `tee` it.
2024-07-05 21:39:08 +03:00
github-actions[bot]
30cfd4445f
Merge master into staging-next 2024-07-05 00:02:21 +00:00
David McFarland
4f7953d244
Merge pull request #324526 from Aleksanaa/nugetHash
dotnet: add SRI hash support to dotnet packages
2024-07-04 20:59:56 -03:00
Robert Hensing
3f226f2f9c nixosTests.docker-tools: fix for hello's new versionCheckHook 2024-07-04 21:44:39 +02:00
github-actions[bot]
36cbae9ff0
Merge master into staging-next 2024-07-04 18:01:19 +00:00
éclairevoyant
dab3278128
Merge pull request #324365 from iynaix/make-desktopitem-directory
make-desktopitem: fix file extension for type directory
2024-07-04 12:54:28 +00:00
Naïm Favier
4ef7bf78bb
build-support/agda: expose mkLibraryFile 2024-07-04 14:51:30 +02:00
aleksana
74597434a7 buildDotNetGlobalTool: add SRI hash support 2024-07-04 20:16:51 +08:00
aleksana
2280d5c467 nuget-to-nix: generate SRI hash instead of sha256 2024-07-04 20:16:51 +08:00
aleksana
c3698a127a mkNugetDeps: add SRI hash support 2024-07-04 20:16:51 +08:00
github-actions[bot]
e14242d985
Merge staging-next into staging 2024-07-04 12:01:37 +00:00
aleksana
9aee77e045 fetchNuGet: add SRI hash support 2024-07-04 17:33:34 +08:00
Vladimír Čunát
44b36397c2
Merge branch 'master' into staging-next
Conflicts - GitHub wouldn't auto-resolve them but my local git did:
	pkgs/development/cuda-modules/cuda/overrides.nix
2024-07-04 10:10:22 +02:00
Masum Reza
410d1213cd
Merge pull request #323983 from Aleksanaa/cargoSha256-change
treewide: remove all cargoSha256 usage
2024-07-04 10:50:18 +05:30
Sandro Jäckel
2040dfa812
uglify-js: remove remaining aliases, entry from nodePackages 2024-07-03 21:25:54 +02:00
github-actions[bot]
d449302be6
Merge staging-next into staging 2024-07-03 18:01:32 +00:00
Vladimír Čunát
c76085b3a9
Merge branch 'master' into staging-next 2024-07-03 19:07:35 +02:00
Artturin
18b0068236
Merge pull request #323824 from tie/fetchpatch-build-inputs
fetchpatch: add patchutils to nativeBuildInputs
2024-07-03 19:04:44 +03:00
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