From c73a057d30804029ae59e2ced609ffe5b0df8b2c Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 17:34:12 +0100 Subject: [PATCH] treewide: replace darwin.apple_sdk_11_0.stdenv with stdenv on darwin --- pkgs/by-name/ne/nextcloud-client/package.nix | 3 +- pkgs/by-name/op/openimagedenoise/package.nix | 5 +- pkgs/by-name/qo/qownnotes/package.nix | 2 +- .../libraries/mongocxx/default.nix | 4 +- .../libraries/qscintilla/default.nix | 5 +- .../python-modules/openusd/default.nix | 3 +- .../python-modules/python-mapnik/default.nix | 3 +- pkgs/top-level/all-packages.nix | 56 ++++--------------- pkgs/top-level/qt6-packages.nix | 2 - 9 files changed, 19 insertions(+), 64 deletions(-) diff --git a/pkgs/by-name/ne/nextcloud-client/package.nix b/pkgs/by-name/ne/nextcloud-client/package.nix index 58b8c585037c86..2ac1a04ecddb25 100644 --- a/pkgs/by-name/ne/nextcloud-client/package.nix +++ b/pkgs/by-name/ne/nextcloud-client/package.nix @@ -2,6 +2,7 @@ , gitUpdater , fetchFromGitHub , qt6Packages +, stdenv , cmake , extra-cmake-modules , inotify-tools @@ -18,7 +19,7 @@ , libsysprof-capture }: -qt6Packages.stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "nextcloud-client"; version = "3.15.2"; diff --git a/pkgs/by-name/op/openimagedenoise/package.nix b/pkgs/by-name/op/openimagedenoise/package.nix index 5f4c4336bba6fe..f9594f76c48d36 100644 --- a/pkgs/by-name/op/openimagedenoise/package.nix +++ b/pkgs/by-name/op/openimagedenoise/package.nix @@ -13,10 +13,7 @@ xcodebuild, }: -let - stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; -in -stdenv'.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "openimagedenoise"; version = "2.2.2"; diff --git a/pkgs/by-name/qo/qownnotes/package.nix b/pkgs/by-name/qo/qownnotes/package.nix index ac84c552e7ca03..c630fd65ddfcd5 100644 --- a/pkgs/by-name/qo/qownnotes/package.nix +++ b/pkgs/by-name/qo/qownnotes/package.nix @@ -17,7 +17,7 @@ let appname = "QOwnNotes"; version = "24.12.7"; in -qt6Packages.stdenv.mkDerivation { +stdenv.mkDerivation { inherit pname version; src = fetchurl { diff --git a/pkgs/development/libraries/mongocxx/default.nix b/pkgs/development/libraries/mongocxx/default.nix index 52ad4692ce7040..5c27f3275cfb6d 100644 --- a/pkgs/development/libraries/mongocxx/default.nix +++ b/pkgs/development/libraries/mongocxx/default.nix @@ -1,5 +1,5 @@ { lib -, pkgs +, stdenv , fetchFromGitHub , mongoc , openssl @@ -10,8 +10,6 @@ , darwin }: -let stdenv = if pkgs.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else pkgs.stdenv; in - stdenv.mkDerivation (finalAttrs: { pname = "mongocxx"; version = "4.0.0"; diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index abeecc0782f37d..91d349d3eb311c 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -10,10 +10,7 @@ darwin, }: -let - stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; -in -stdenv'.mkDerivation rec { +stdenv.mkDerivation rec { pname = "qscintilla-qt5"; version = "2.13.2"; diff --git a/pkgs/development/python-modules/openusd/default.nix b/pkgs/development/python-modules/openusd/default.nix index 959014e2513b8a..10a166ba58771c 100644 --- a/pkgs/development/python-modules/openusd/default.nix +++ b/pkgs/development/python-modules/openusd/default.nix @@ -62,8 +62,7 @@ buildPythonPackage rec { hash = "sha256-slBJleeDi0mCVThty4NUX4M9vaCLV+E8rnp1Ab77TmE="; }; - stdenv = - if python.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; + stdenv = python.stdenv; outputs = [ "out" ] ++ lib.optional withDocs "doc"; diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix index 4f467a84484e38..33770c3d82917f 100644 --- a/pkgs/development/python-modules/python-mapnik/default.nix +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -53,8 +53,7 @@ buildPythonPackage rec { ./python-mapnik_std_optional.patch ]; - stdenv = - if python.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; + stdenv = python.stdenv; build-system = [ setuptools ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58f4ab07d90a00..ac4def235b982d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3668,9 +3668,7 @@ with pkgs; haste-client = callPackage ../tools/misc/haste-client { }; - hal-hardware-analyzer = libsForQt5.callPackage ../applications/science/electronics/hal-hardware-analyzer { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; + hal-hardware-analyzer = libsForQt5.callPackage ../applications/science/electronics/hal-hardware-analyzer { }; halide = callPackage ../development/compilers/halide { llvmPackages = llvmPackages_18; @@ -4672,9 +4670,7 @@ with pkgs; padthv1 = libsForQt5.callPackage ../applications/audio/padthv1 { }; - pageedit = libsForQt5.callPackage ../applications/office/PageEdit { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; + pageedit = libsForQt5.callPackage ../applications/office/PageEdit { }; pagefind = libsForQt5.callPackage ../applications/misc/pagefind { }; @@ -4858,7 +4854,6 @@ with pkgs; proxmark3 = libsForQt5.callPackage ../tools/security/proxmark3/default.nix { inherit (darwin.apple_sdk_11_0.frameworks) Foundation AppKit; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; pws = callPackage ../tools/misc/pws { }; @@ -5259,7 +5254,6 @@ with pkgs; }; texmacs = libsForQt5.callPackage ../applications/editors/texmacs { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; extraFonts = true; }; @@ -7738,7 +7732,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv + stdenv = if stdenv.hostPlatform.isDarwin then stdenv else if stdenv.cc.isClang then llvmPackages.stdenv else if stdenv.cc.isGNU then gcc12Stdenv else stdenv; @@ -7750,7 +7744,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation IOKit; buildJdk = jdk21_headless; runJdk = jdk21_headless; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv + stdenv = if stdenv.hostPlatform.isDarwin then stdenv else if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; bazel_self = bazel_7; @@ -9052,10 +9046,6 @@ with pkgs; ghcid = haskellPackages.ghcid.bin; - gr-framework = callPackage ../by-name/gr/gr-framework/package.nix { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; - graphia = qt6Packages.callPackage ../applications/science/misc/graphia { }; libgit2 = callPackage ../development/libraries/libgit2 { @@ -9212,7 +9202,7 @@ with pkgs; goocanvas3 = callPackage ../development/libraries/goocanvas/3.x.nix { }; grpc = darwin.apple_sdk_11_0.callPackage ../development/libraries/grpc { stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 - then overrideSDK darwin.apple_sdk_11_0.stdenv { darwinMinVersion = "10.13"; } + then overrideSDK stdenv { darwinMinVersion = "10.13"; } else stdenv; }; @@ -10364,7 +10354,6 @@ with pkgs; }; pcl = libsForQt5.callPackage ../development/libraries/pcl { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) Cocoa AGL OpenGL; }; @@ -10511,7 +10500,6 @@ with pkgs; qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget kdePackages; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }); quill = callPackage ../tools/security/quill { @@ -11740,7 +11728,7 @@ with pkgs; boost = boost178.override { enableShared = false; }; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv.override (old: { + stdenv.override (old: { hostPlatform = old.hostPlatform // { darwinMinVersion = "10.14"; }; buildPlatform = old.buildPlatform // { darwinMinVersion = "10.14"; }; targetPlatform = old.targetPlatform // { darwinMinVersion = "10.14"; }; @@ -11753,7 +11741,7 @@ with pkgs; boost = boost179.override { enableShared = false; }; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv.override (old: { + stdenv.override (old: { hostPlatform = old.hostPlatform // { darwinMinVersion = "10.14"; }; buildPlatform = old.buildPlatform // { darwinMinVersion = "10.14"; }; targetPlatform = old.targetPlatform // { darwinMinVersion = "10.14"; }; @@ -13135,22 +13123,8 @@ with pkgs; av-98 = callPackage ../applications/networking/browsers/av-98 { }; - bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { - stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv - else - stdenv; - }; - bambootracker-qt6 = qt6Packages.callPackage ../applications/audio/bambootracker { - stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv - else - stdenv; - }; - - ptcollab = callPackage ../by-name/pt/ptcollab/package.nix { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; + bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { }; + bambootracker-qt6 = qt6Packages.callPackage ../applications/audio/bambootracker { }; schismtracker = callPackage ../applications/audio/schismtracker { inherit (darwin.apple_sdk.frameworks) Cocoa; @@ -13525,7 +13499,6 @@ with pkgs; keepassxc = libsForQt5.callPackage ../applications/misc/keepassxc { inherit (darwin.apple_sdk_11_0.frameworks) LocalAuthentication; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; evolution-data-server-gtk4 = evolution-data-server.override { withGtk3 = false; withGtk4 = true; }; @@ -15143,9 +15116,7 @@ with pkgs; qtpass = libsForQt5.callPackage ../applications/misc/qtpass { }; - quassel = libsForQt5.callPackage ../applications/networking/irc/quassel { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; + quassel = libsForQt5.callPackage ../applications/networking/irc/quassel { }; quasselClient = quassel.override { monolithic = false; @@ -15490,7 +15461,6 @@ with pkgs; }; synergy = libsForQt5.callPackage ../applications/misc/synergy { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver UserNotifications; }; @@ -16030,9 +16000,7 @@ with pkgs; lua = lua5_3; }; - xpdf = libsForQt5.callPackage ../applications/misc/xpdf { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - }; + xpdf = libsForQt5.callPackage ../applications/misc/xpdf { }; xmobar = haskellPackages.xmobar.bin; @@ -16151,7 +16119,6 @@ with pkgs; }; bitcoin = libsForQt5.callPackage ../applications/blockchains/bitcoin { - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; withGui = true; inherit (darwin) autoSignDarwinBinariesHook; }; @@ -16663,7 +16630,6 @@ with pkgs; mudlet = libsForQt5.callPackage ../games/mudlet { lua = lua5_1; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) AppKit; }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index d2d084b60b4b80..004359e6f529a4 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -8,7 +8,6 @@ , __splicedPackages , makeScopeWithSplicing' , generateSplicesForMkScope -, stdenv , pkgsHostTarget , kdePackages }: @@ -27,7 +26,6 @@ makeScopeWithSplicing' { inherit (self) callPackage; noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideDerivation" ]; in (noExtraAttrs qt6) // { - inherit stdenv; # LIBRARIES accounts-qt = callPackage ../development/libraries/accounts-qt { };