Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pkgs/applications/editors/vscode/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
libglvnd,
libkrb5,
openssl,

# Populate passthru.tests
tests,
ripgrep,

# needed to fix "Save as Root"
asar,
bash,
}:

{
# Attributes inherit from specific versions
version,
vscodeVersion ? version,
Expand All @@ -53,9 +53,11 @@
vscodeServer ? null,
sourceExecutableName ? executableName,
useVSCodeRipgrep ? false,
ripgrep,
hasVsceSign ? false,
patchVSCodePath ? true,

# Populate passthru.tests
tests,
}:

stdenv.mkDerivation (
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vscode/vscode.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
stdenv,
stdenvNoCC,
callPackage,
buildVscode,
fetchurl,
nixosTests,
srcOnly,
Expand Down Expand Up @@ -51,7 +51,7 @@ let
# This is used for VS Code - Remote SSH test
rev = "7d842fb85a0275a4a8e4d7e040d2625abbf7f084";
in
callPackage ./generic.nix {
buildVscode {
pname = "vscode" + lib.optionalString isInsiders "-insiders";

executableName = "code" + lib.optionalString isInsiders "-insiders";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vscode/vscodium.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
stdenv,
callPackage,
buildVscode,
fetchurl,
nixosTests,
commandLineArgs ? "",
Expand Down Expand Up @@ -36,7 +36,7 @@ let

sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) ".";
in
callPackage ./generic.nix rec {
buildVscode rec {
inherit sourceRoot commandLineArgs useVSCodeRipgrep;

# Please backport all compatible updates to the stable release.
Expand Down
6 changes: 5 additions & 1 deletion pkgs/by-name/ae/aegisub/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
spellcheckSupport ? true,
useBundledLuaJIT ? false,
}:
}@args:

let
luajit = args.luajit.override { enable52Compat = true; };
in

stdenv.mkDerivation (finalAttrs: {
pname = "aegisub";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ak/akkoma-admin-fe/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
yarn,
nodejs,
git,
python3,
python311,
pkg-config,
libsass,
nix-update-script,
Expand Down Expand Up @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
yarn
nodejs
pkg-config
python3
python311
git
libsass
]
Expand Down
13 changes: 12 additions & 1 deletion pkgs/by-name/ak/akkoma/package.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{
lib,
beamPackages,
beam_minimal,
fetchFromGitea,
cmake,
file,
nixosTests,
nix-update-script,
}:

let
beamPackages = beam_minimal.packages.erlang_26.extend (
self: super: {
elixir = self.elixir_1_16;
rebar3 = self.rebar3WithPlugins {
plugins = with self; [ pc ];
};
}
);
in

beamPackages.mixRelease rec {
pname = "akkoma";
version = "3.15.2";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/al/alsa-utils/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
pciutils,
procps,
which,
fftw,
fftwFloat,
pipewire,
withPipewireLib ? true,
symlinkJoin,
Expand Down Expand Up @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
alsa-lib
ncurses
libsamplerate
fftw
fftwFloat
];

configureFlags = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/aq/aquamarine/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
stdenv,
gcc15Stdenv,
cmake,
fetchFromGitHub,
hwdata,
Expand All @@ -21,7 +21,7 @@
wayland-protocols,
wayland-scanner,
}:
stdenv.mkDerivation (finalAttrs: {
gcc15Stdenv.mkDerivation (finalAttrs: {
pname = "aquamarine";
version = "0.9.5";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ar/armips/package.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
stdenv,
clangStdenv,
lib,
fetchFromGitHub,
cmake,
}:

stdenv.mkDerivation rec {
clangStdenv.mkDerivation rec {
pname = "armips";
version = "0.11.0";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ar/art/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
lcms2,
libraw,
libiptcdata,
fftw,
fftwSinglePrec,
expat,
pcre2,
libsigcxx,
Expand Down Expand Up @@ -81,7 +81,7 @@ stdenv.mkDerivation rec {
lcms2
libraw
libiptcdata
fftw
fftwSinglePrec
expat
pcre2
libsigcxx
Expand Down
8 changes: 7 additions & 1 deletion pkgs/by-name/at/atf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
autoreconfHook,
kyua,
gitUpdater,
}:
darwin,
}@args:

let
# atf is a dependency of libiconv. Avoid an infinite recursion with `pkgsStatic` by using a bootstrap stdenv.
stdenv = if args.stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else args.stdenv;
Copy link
Contributor

@reckenrode reckenrode Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that it’s impossible to override the stdenv on Darwin (without knowing implementation details of the derivation). Is there a way to do this that preserves the ability to override it? That’s why I originally did it in all-packages.nix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @emilazy's comment in #453948 (comment) applies to that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried moving this into darwin's stdenv bootstrap, but failed. I'm sure you'd be capable of doing that, though :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can’t be in the bootstrap because then pkgsStatic will have an infinite recursion. To make things behave the same between native and cross, the “overrides” have to be in the package definitions not in the bootstrap overlay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that would explain me failing to do it.

We could introduce a withStdenv ? if ... argument to allow overriding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting as draft for the moment. I am currently looking into a way to make this case better to solve here - it's really unsatisfactory, that we can't override stdenv for these packages afterwards anymore.

in

stdenv.mkDerivation (finalAttrs: {
pname = "atf";
Expand Down
7 changes: 6 additions & 1 deletion pkgs/by-name/ba/basalt-monado/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
xorg,
cudaPackages,
enableCuda ? config.cudaSupport,
}:
}@args:

let
opencv = args.opencv.override { enableGtk3 = true; };
in

stdenv.mkDerivation {
pname = "basalt-monado";
version = "0-unstable-2025-09-25";
Expand Down
12 changes: 5 additions & 7 deletions pkgs/by-name/ba/bazel_7/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
makeBinaryWrapper,
autoPatchelfHook,
buildFHSEnv,
# this package (through the fixpoint glass)
# TODO probably still need for tests at some point
bazel_self,
# native build inputs
runtimeShell,
zip,
Expand All @@ -35,10 +32,11 @@
# Apple dependencies
cctools,
libtool,
sigtool,
darwin,
# Allow to independently override the jdks used to build and run respectively
buildJdk,
runJdk,
jdk21_headless,
buildJdk ? jdk21_headless,
runJdk ? jdk21_headless,
# Toggle for hacks for running bazel under buildBazelPackage:
# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
Expand Down Expand Up @@ -417,7 +415,7 @@ stdenv.mkDerivation rec {
# don't use system installed Xcode to run clang, use Nix clang instead
sed -i -E \
-e "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
-e "s;/usr/bin/codesign;CODESIGN_ALLOCATE=${cctools}/bin/${cctools.targetPrefix}codesign_allocate ${sigtool}/bin/codesign;" \
-e "s;/usr/bin/codesign;CODESIGN_ALLOCATE=${cctools}/bin/${cctools.targetPrefix}codesign_allocate ${darwin.sigtool}/bin/codesign;" \
scripts/bootstrap/compile.sh \
tools/osx/BUILD

Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/bi/biblioteca/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
gtk4,
gobject-introspection,
libadwaita,
webkitgtk,
webkitgtk_6_0,
coreutils,
makeShellWrapper,
wrapGAppsHook4,
Expand Down Expand Up @@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
gtk4
gobject-introspection
libadwaita
webkitgtk
webkitgtk_6_0
glib-networking
];

Expand All @@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
gtk4.devdoc
glib.devdoc
libadwaita.devdoc
webkitgtk.devdoc
webkitgtk_6_0.devdoc
gobject-introspection.devdoc
]
++ extraDocsPackage;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/by-name/bl/blender/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
pkg-config,
potrace,
pugixml,
python3Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340
python311Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340
rocmPackages, # comes with a significantly larger closure size
runCommand,
shaderc,
Expand All @@ -94,6 +94,7 @@ let
(!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin;
vulkanSupport = !stdenv.hostPlatform.isDarwin;

python3Packages = python311Packages;
python3 = python3Packages.python;
pyPkgsOpenusd = python3Packages.openusd.override (old: {
opensubdiv = old.opensubdiv.override { inherit cudaSupport; };
Expand Down
4 changes: 3 additions & 1 deletion pkgs/by-name/bl/bluespec/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
yices, # bsc uses a patched version of yices
zlib,
ghc,
gmp-static,
gmp,
iverilog,
asciidoctor,
texliveFull,
Expand Down Expand Up @@ -52,6 +52,8 @@ let
])
);

gmp-static = gmp.override { withStatic = true; };

in
stdenv.mkDerivation rec {
pname = "bluespec";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ca/cantata/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
withHttpStream ? true,
gst_all_1,
withReplaygain ? true,
ffmpeg,
ffmpeg_6,
speex,
mpg123,
withMtp ? true,
Expand Down Expand Up @@ -91,7 +91,7 @@ let
];
enable = withReplaygain;
pkgs = [
ffmpeg
ffmpeg_6
speex
mpg123
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cl/clang-uml/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
fetchFromGitHub,
stdenv,
clangStdenv,
cmake,
pkg-config,
installShellFiles,
Expand All @@ -15,7 +15,7 @@
enableLibcxx ? false,
debug ? false,
}:
stdenv.mkDerivation (finalAttrs: {
clangStdenv.mkDerivation (finalAttrs: {
pname = "clang-uml";
version = "0.6.1";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cl/clash-verge-rev/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
wrapGAppsHook3,
v2ray-geoip,
v2ray-domain-list-community,
libsoup,
libsoup_3,
}:
let
pname = "clash-verge-rev";
Expand Down Expand Up @@ -50,7 +50,7 @@ let
pnpm-hash
vendor-hash
meta
libsoup
libsoup_3
;
};

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cl/clash-verge-rev/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
kdePackages,
libayatana-appindicator,
libsForQt5,
libsoup,
libsoup_3,
openssl,
webkitgtk_4_1,
}:
Expand Down Expand Up @@ -99,7 +99,7 @@ rustPlatform.buildRustPackage {

buildInputs = [
libayatana-appindicator
libsoup
libsoup_3
openssl
webkitgtk_4_1
];
Expand Down
Loading
Loading