···250250:::251251252252::: {.note}253253-If one explores Nixpkgs, they will see derivations with names like `gccCross`. Such `*Cross` derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with “Cross” in the name covered the `build = host != target` case, while the other covered the `host = target`, with build platform the same or not based on whether one was using its `.nativeDrv` or `.crossDrv`. This ugliness will disappear soon.253253+If one explores Nixpkgs, they will see derivations with names like `gccCross`. Such `*Cross` derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with “Cross” in the name covered the `build = host != target` case, while the other covered the `host = target`, with build platform the same or not based on whether one was using its `.__spliced.buildHost` or `.__spliced.hostTarget`.254254:::
+9-6
lib/customisation.nix
···3838 //3939 (drv.passthru or {})4040 //4141- (if (drv ? crossDrv && drv ? nativeDrv)4242- then {4343- crossDrv = overrideDerivation drv.crossDrv f;4444- nativeDrv = overrideDerivation drv.nativeDrv f;4545- }4646- else { }));4141+ # TODO(@Artturin): remove before release 23.05 and only have __spliced.4242+ (lib.optionalAttrs (drv ? crossDrv && drv ? nativeDrv) {4343+ crossDrv = overrideDerivation drv.crossDrv f;4444+ nativeDrv = overrideDerivation drv.nativeDrv f;4545+ })4646+ //4747+ lib.optionalAttrs (drv ? __spliced) {4848+ __spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);4949+ });475048514952 /* `makeOverridable` takes a function from attribute set to attribute set and
···3344stdenv.mkDerivation rec {55 pname = "threema-desktop";66- version = "1.2.13";66+ version = "1.2.21";7788 src = fetchurl {99 # As Threema only offers a Latest Release url, the plan is to upload each1010 # new release url to web.archive.org until their Github releases page gets populated.1111- url = "https://web.archive.org/web/20220621152620id_/https://releases.threema.ch/web-electron/v1/release/Threema-Latest.deb";1212- sha256 = "sha256-X16GMxUIKUloj0FxhzWQKUBf4zwfSBVg0cwLgGxHPHE=";1111+ url = "https://web.archive.org/web/20220915175906if_/https://releases.threema.ch/web-electron/v1/release/Threema-Latest.deb";1212+ sha256 = "0icxn5whsvwmdmfbkfk4xnl3dn4iif5s5yw5hsimmyx066fq0qhb";1313 };14141515 nativeBuildInputs = [
···11-{ lib, makeSetupHook, nodejs, srcOnly, diffutils, jq, makeWrapper }:11+{ lib, makeSetupHook, nodejs, srcOnly, buildPackages, makeWrapper }:2233{44 npmConfigHook = makeSetupHook···991010 # Specify the stdenv's `diff` and `jq` by abspath to ensure that the user's build1111 # inputs do not cause us to find the wrong binaries.1212- # The `.nativeDrv` stanza works like nativeBuildInputs and ensures cross-compiling has the right version available.1313- diff = "${diffutils.nativeDrv or diffutils}/bin/diff";1414- jq = "${jq.nativeDrv or jq}/bin/jq";1212+ diff = "${buildPackages.diffutils}/bin/diff";1313+ jq = "${buildPackages.jq}/bin/jq";15141615 nodeVersion = nodejs.version;1716 nodeVersionMajor = lib.versions.major nodejs.version;···2829 deps = [ makeWrapper ];2930 substitutions = {3031 hostNode = "${nodejs}/bin/node";3131- jq = "${jq.nativeDrv or jq}/bin/jq";3232+ jq = "${buildPackages.jq}/bin/jq";3233 };3334 } ./npm-install-hook.sh;3435}
+1-3
pkgs/build-support/rust/hooks/default.nix
···22, callPackage33, cargo44, clang55-, diffutils65, lib76, makeSetupHook87, maturin···64656566 # Specify the stdenv's `diff` by abspath to ensure that the user's build6667 # inputs do not cause us to find the wrong `diff`.6767- # The `.nativeDrv` stanza works like nativeBuildInputs and ensures cross-compiling has the right version available.6868- diff = "${diffutils.nativeDrv or diffutils}/bin/diff";6868+ diff = "${lib.getBin buildPackages.diffutils}/bin/diff";69697070 # We want to specify the correct crt-static flag for both7171 # the build and host platforms. This is important when the wanted
-51
pkgs/development/libraries/gsl/gsl-1_16.nix
···11-{ fetchurl, fetchpatch, lib, stdenv }:22-33-stdenv.mkDerivation rec {44- pname = "gsl";55- version = "1.16";66-77- src = fetchurl {88- url = "mirror://gnu/gsl/gsl-${version}.tar.gz";99- sha256 = "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k";1010- };1111-1212- # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)1313- NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma";1414-1515- patches = [1616- (fetchpatch {1717- name = "bug-39055.patch";1818- url = "https://git.savannah.gnu.org/cgit/gsl.git/patch/?id=9cc12d";1919- sha256 = "1bmrmihi28cly9g9pq54kkix2jy59y7cd7h5fw4v1c7h5rc2qvs8";2020- })2121-2222- (fetchpatch {2323- name = "fix-parallel-test.patch";2424- url = "https://git.savannah.gnu.org/cgit/gsl.git/patch/?id=12654373c3b60541230921aae81f93b484ec5eaf";2525- sha256 = "1flzpbsfj7gjywv6v9qvm8wpdrkbpj7shryinfdpb40y7si9njdw";2626- })2727- ];2828-2929- enableParallelBuilding = true;3030- doCheck = true;3131-3232- meta = {3333- description = "The GNU Scientific Library, a large numerical library";3434- homepage = "https://www.gnu.org/software/gsl/";3535- license = lib.licenses.gpl3Plus;3636-3737- longDescription = ''3838- The GNU Scientific Library (GSL) is a numerical library for C3939- and C++ programmers. It is free software under the GNU General4040- Public License.4141-4242- The library provides a wide range of mathematical routines such4343- as random number generators, special functions and least-squares4444- fitting. There are over 1000 functions in total with an4545- extensive test suite.4646- '';4747- platforms = lib.platforms.unix;4848- # Failing "eigen" tests on aarch64.4949- badPlatforms = [ "aarch64-linux" ];5050- };5151-}
+2
pkgs/development/libraries/qt-6/default.nix
···107107 } ./hooks/qmake-hook.sh;108108 };109109110110+ # TODO(@Artturin): convert to makeScopeWithSplicing111111+ # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01110112 self = lib.makeScope newScope addPackages;111113in112114self
+1-1
pkgs/development/libraries/qt-6/qtModule.nix
···6161 if [[ -z "$dontSyncQt" && -f sync.profile ]]; then6262 # FIXME: this probably breaks crosscompiling as it's not from nativeBuildInputs6363 # I don't know how to get /libexec from nativeBuildInputs to work, it's not under /bin6464- ${self.qtbase.dev.nativeDrv or self.qtbase.dev}/libexec/syncqt.pl -version "''${version%%-*}"6464+ ${lib.getDev self.qtbase}/libexec/syncqt.pl -version "''${version%%-*}"6565 fi6666 '';6767
···582582 gr-rds = gnuradio3_7.pkgs.rds; # Added 2019-05-27, changed 2020-10-16583583 grv = throw "grv has been dropped due to the lack of maintanence from upstream since 2019"; # Added 2022-06-01584584 gsettings_desktop_schemas = throw "'gsettings_desktop_schemas' has been renamed to/replaced by 'gsettings-desktop-schemas'"; # Converted to throw 2022-02-22585585+ gsl_1 = throw "'gsl_1' has been renamed to/replaced by 'gsl'"; # Added 2022-11-19585586 gtk_doc = throw "'gtk_doc' has been renamed to/replaced by 'gtk-doc'"; # Converted to throw 2022-02-22586587 gtklick = throw "gtklick has been removed from nixpkgs as the project is stuck on python2"; # Added 2022-01-01587588 gtmess = throw "gtmess has been removed, because it was a MSN client."; # add 2021-12-15···757756 libgpgerror = libgpg-error; # Added 2021-09-04758757 libgroove = throw "libgroove has been removed, because it depends on an outdated and insecure version of ffmpeg"; # Added 2022-01-21759758 libgumbo = throw "'libgumbo' has been renamed to/replaced by 'gumbo'"; # Converted to throw 2022-02-22759759+ libheimdal = heimdal; # Added 2022-11-18760760 libintlOrEmpty = lib.optional (!stdenv.isLinux || stdenv.hostPlatform.libc != "glibc") gettext; # Added 2018-03-14761761 libixp_hg = libixp;762762 libjpeg_drop = libjpeg_original; # Added 2020-06-05
+2-4
pkgs/top-level/all-packages.nix
···790790 mysql-shell = callPackage ../development/tools/mysql-shell {791791 inherit (darwin) cctools developer_cmds DarwinTools;792792 inherit (darwin.apple_sdk.frameworks) CoreServices;793793+ antlr = antlr4_10;793794 boost = boost177; # Configure checks for specific version.794795 protobuf = protobuf3_19;795796 icu = icu69;···1858018579 cypress = callPackage ../development/web/cypress { };18581185801858218581 cyrus_sasl = callPackage ../development/libraries/cyrus-sasl {1858318583- libkrb5 = if stdenv.isFreeBSD then libheimdal else libkrb5;1858218582+ libkrb5 = if stdenv.isFreeBSD then heimdal else libkrb5;1858418583 };18585185841858618585 # Make bdb5 the default as it is the last release under the custom···19318193171931919318 gsl = callPackage ../development/libraries/gsl { };19320193191932119321- gsl_1 = callPackage ../development/libraries/gsl/gsl-1_16.nix { };1932219322-1932319320 gsl-lite = callPackage ../development/libraries/gsl-lite { };19324193211932519322 gsm = callPackage ../development/libraries/gsm {};···1949519496 inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration;1949619497 autoreconfHook = buildPackages.autoreconfHook269;1949719498 };1949819498- libheimdal = heimdal;19499194991950019500 harfbuzz = callPackage ../development/libraries/harfbuzz {1950119501 inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreText;
+6-11
pkgs/top-level/splice.nix
···88# The solution is to splice the package sets together as we do below, so every99# `callPackage`d expression in fact gets both versions. Each# derivation (and1010# each derivation's outputs) consists of the run-time version, augmented with a1111-# `nativeDrv` field for the build-time version, and `crossDrv` field for the1111+# `__spliced.buildHost` field for the build-time version, and `__spliced.hostTarget` field for the1212# run-time version.1313-#1414-# We could have used any names we want for the disambiguated versions, but1515-# `crossDrv` and `nativeDrv` were somewhat similarly used for the old1616-# cross-compiling infrastructure. The names are mostly invisible as1717-# `mkDerivation` knows how to pull out the right ones for `buildDepends` and1818-# friends, but a few packages use them directly, so it seemed efficient (to1919-# @Ericson2314) to reuse those names, at least initially, to minimize breakage.2013#2114# For performance reasons, rather than uniformally splice in all cases, we only2215# do so when `pkgs` and `buildPackages` are distinct. The `actuallySplice`···3946 valueHostTarget = pkgsHostTarget.${name} or {};4047 valueTargetTarget = pkgsTargetTarget.${name} or {};4148 augmentedValue = defaultValue4242- # TODO(@Ericson2314): Stop using old names after transition period4343- // (lib.optionalAttrs (pkgsBuildHost ? ${name}) { nativeDrv = valueBuildHost; })4444- // (lib.optionalAttrs (pkgsHostTarget ? ${name}) { crossDrv = valueHostTarget; })4949+ # TODO(@Artturin): remove before release 23.05 and only have __spliced.5050+ // (lib.optionalAttrs (pkgsBuildHost ? ${name}) { nativeDrv = lib.warn "use ${name}.__spliced.buildHost instead of ${name}.nativeDrv" valueBuildHost; })5151+ // (lib.optionalAttrs (pkgsHostTarget ? ${name}) { crossDrv = lib.warn "use ${name}.__spliced.hostTarget instead of ${name}.crossDrv" valueHostTarget; })4552 // {4653 __spliced =4754 (lib.optionalAttrs (pkgsBuildBuild ? ${name}) { buildBuild = valueBuildBuild; })5555+ // (lib.optionalAttrs (pkgsBuildHost ? ${name}) { buildHost = valueBuildHost; })4856 // (lib.optionalAttrs (pkgsBuildTarget ? ${name}) { buildTarget = valueBuildTarget; })4957 // (lib.optionalAttrs (pkgsHostHost ? ${name}) { hostHost = valueHostHost; })5858+ // (lib.optionalAttrs (pkgsHostTarget ? ${name}) { hostTarget = valueHostTarget; })5059 // (lib.optionalAttrs (pkgsTargetTarget ? ${name}) { targetTarget = valueTargetTarget;5160 });5261 };