diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 74a313c4196d..946619698dbc 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -2,6 +2,7 @@ , stdenv , makeSetupHook , callPackage +, config , vimUtils , vimPlugins , nodejs @@ -256,5 +257,6 @@ in inherit normalizePlugins normalizedPluginsToVimPackage; inherit buildNeovimPlugin; +} // lib.optionalAttrs config.allowAliases { buildNeovimPluginFrom2Nix = lib.warn "buildNeovimPluginFrom2Nix was renamed to buildNeovimPlugin" buildNeovimPlugin; } diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/vim-utils.nix index d5536ee3b63a..512b1b39cc3e 100644 --- a/pkgs/applications/editors/vim/plugins/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/vim-utils.nix @@ -4,6 +4,7 @@ , python3 , callPackage, makeSetupHook , linkFarm +, config }: /* @@ -358,8 +359,6 @@ rec { overrideAttrs = f: makeCustomizable (vim.overrideAttrs f); }; - vimWithRC = throw "vimWithRC was removed, please use vim.customize instead"; - vimGenDocHook = callPackage ({ vim }: makeSetupHook { name = "vim-gen-doc-hook"; @@ -430,4 +429,6 @@ rec { vimPlugin = true; }; }); +} // lib.optionalAttrs config.allowAliases { + vimWithRC = throw "vimWithRC was removed, please use vim.customize instead"; } diff --git a/pkgs/build-support/checkpoint-build.nix b/pkgs/build-support/checkpoint-build.nix index f1202ca1ce0a..11e4f9e3ab03 100644 --- a/pkgs/build-support/checkpoint-build.nix +++ b/pkgs/build-support/checkpoint-build.nix @@ -1,5 +1,6 @@ { lib , buildPackages +, config }: let @@ -9,9 +10,38 @@ let mktemp rsync ; + + /* Build a derivation based on the checkpoint output generated by + * the `prepareCheckpointBuild` function. + * + * Usage: + * let + * checkpointArtifacts = prepareCheckpointBuild drv; + * in mkCheckpointBuild drv checkpointArtifacts + */ + mkCheckpointBuild = drv: checkpointArtifacts: drv.overrideAttrs (old: { + # The actual checkpoint build phase. + # We compare the changed sources from a previous build with the current and create a patch. + # Afterwards we clean the build directory and copy the previous output files (including the sources). + # The source difference patch is then applied to get the latest changes again to allow short build times. + preBuild = (old.preBuild or "") + '' + set +e + sourceDifferencePatchFile=$(${mktemp}/bin/mktemp) + diff -ur ${checkpointArtifacts}/sources ./ > "$sourceDifferencePatchFile" + set -e + shopt -s dotglob + rm -r * + ${rsync}/bin/rsync \ + --checksum --times --atimes --chown=$USER:$USER --chmod=+w \ + -r ${checkpointArtifacts}/outputs/ . + patch -p 1 -i "$sourceDifferencePatchFile" + rm "$sourceDifferencePatchFile" + ''; + }); in rec { + inherit mkCheckpointBuild; /* Prepare a derivation for local builds. * * This function prepares checkpoint builds by storing @@ -60,35 +90,7 @@ rec { doInstallCheck = false; doDist = false; }); - - /* Build a derivation based on the checkpoint output generated by - * the `prepareCheckpointBuild` function. - * - * Usage: - * let - * checkpointArtifacts = prepareCheckpointBuild drv; - * in mkCheckpointBuild drv checkpointArtifacts - */ - mkCheckpointBuild = drv: checkpointArtifacts: drv.overrideAttrs (old: { - # The actual checkpoint build phase. - # We compare the changed sources from a previous build with the current and create a patch. - # Afterwards we clean the build directory and copy the previous output files (including the sources). - # The source difference patch is then applied to get the latest changes again to allow short build times. - preBuild = (old.preBuild or "") + '' - set +e - sourceDifferencePatchFile=$(${mktemp}/bin/mktemp) - diff -ur ${checkpointArtifacts}/sources ./ > "$sourceDifferencePatchFile" - set -e - shopt -s dotglob - rm -r * - ${rsync}/bin/rsync \ - --checksum --times --atimes --chown=$USER:$USER --chmod=+w \ - -r ${checkpointArtifacts}/outputs/ . - patch -p 1 -i "$sourceDifferencePatchFile" - rm "$sourceDifferencePatchFile" - ''; - }); - +} // lib.optionalAttrs config.allowAliases { mkCheckpointedBuild = lib.warn "`mkCheckpointedBuild` is deprecated, use `mkCheckpointBuild` instead!" mkCheckpointBuild; diff --git a/pkgs/development/compilers/rust/make-rust-platform.nix b/pkgs/development/compilers/rust/make-rust-platform.nix index 4078041928be..41380005e196 100644 --- a/pkgs/development/compilers/rust/make-rust-platform.nix +++ b/pkgs/development/compilers/rust/make-rust-platform.nix @@ -1,4 +1,4 @@ -{ lib, buildPackages, callPackage, callPackages, cargo-auditable, stdenv, runCommand }@prev: +{ lib, buildPackages, callPackage, callPackages, cargo-auditable, config, stdenv, runCommand }@prev: { rustc , cargo @@ -8,11 +8,6 @@ }: rec { - rust = { - rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc; - cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo; - }; - fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball { git = buildPackages.gitMinimal; inherit cargo; @@ -39,4 +34,9 @@ rec { inherit (callPackages ../../../build-support/rust/hooks { inherit stdenv cargo rustc; }) cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook maturinBuildHook bindgenHook; +} // lib.optionalAttrs config.allowAliases { + rust = { + rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc; + cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo; + }; } diff --git a/pkgs/development/idris-modules/default.nix b/pkgs/development/idris-modules/default.nix index 6ab2c28be399..38b4385ee719 100644 --- a/pkgs/development/idris-modules/default.nix +++ b/pkgs/development/idris-modules/default.nix @@ -153,7 +153,6 @@ refined = callPackage ./refined.nix {}; - sdl = throw "'idrisPackages.sdl' has been removed, as it was broken and unmaintained"; # added 2024-05-09 sdl2 = callPackage ./sdl2.nix {}; semidirect = callPackage ./semidirect.nix {}; @@ -207,5 +206,6 @@ } // builtins_ // pkgs.lib.optionalAttrs config.allowAliases { # removed packages protobuf = throw "idrisPackages.protobuf has been removed: abandoned by upstream"; # Added 2022-02-06 + sdl = throw "'idrisPackages.sdl' has been removed, as it was broken and unmaintained"; # added 2024-05-09 }; in fix' (extends overrides idrisPackages) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index ea93ef4a4572..801fce5447cf 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -9,6 +9,7 @@ let setAttr hasAttr optionals + optionalAttrs isDerivation hasSuffix splitString @@ -252,8 +253,6 @@ let nativeLibs = [ pkgs.openblas ]; }; - cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio"; - cl-gtk4 = build-asdf-system { pname = "cl-gtk4"; version = "1.0.0"; @@ -294,8 +293,6 @@ let ]; }; - cl-gtk4_dot_webkit2 = throw "cl-gtk4_dot_webkit2 was replaced by cl-gtk4_dot_webkit"; - cl-gtk4_dot_webkit = build-asdf-system { pname = "cl-gtk4.webkit"; version = self.cl-gtk4.version; @@ -471,6 +468,9 @@ let }; }); + } // optionalAttrs pkgs.config.allowAliases { + cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio"; + cl-gtk4_dot_webkit2 = throw "cl-gtk4_dot_webkit2 was replaced by cl-gtk4_dot_webkit"; }); in packages diff --git a/pkgs/development/rocm-modules/6/default.nix b/pkgs/development/rocm-modules/6/default.nix index 6825a8bf860d..6cd85b0a575a 100644 --- a/pkgs/development/rocm-modules/6/default.nix +++ b/pkgs/development/rocm-modules/6/default.nix @@ -1,4 +1,6 @@ { stdenv +, lib +, config , callPackage , recurseIntoAttrs , symlinkJoin @@ -236,11 +238,6 @@ in rec { # hipBlasLt - Very broken with Tensile at the moment, only supports GFX9 # hipTensor - Only supports GFX9 - miopengemm= throw '' - 'miopengemm' has been deprecated. - It is still available for some time as part of rocmPackages_5. - ''; # Added 2024-3-3 - composable_kernel = callPackage ./composable_kernel/unpack.nix { composable_kernel_build = callPackage ./composable_kernel { inherit rocmUpdateScript rocm-cmake clr; @@ -264,11 +261,6 @@ in rec { miopen-hip = miopen; - miopen-opencl= throw '' - 'miopen-opencl' has been deprecated. - It is still available for some time as part of rocmPackages_5. - ''; # Added 2024-3-3 - migraphx = callPackage ./migraphx { inherit rocmUpdateScript rocm-cmake rocblas composable_kernel miopen clr half rocm-device-libs; inherit (llvm) openmp clang-tools-extra; @@ -327,12 +319,6 @@ in rec { useCPU = false; }; - mivisionx-opencl = throw '' - 'mivisionx-opencl' has been deprecated. - Other versions of mivisionx are still available. - It is also still available for some time as part of rocmPackages_5. - ''; # Added 2024-3-24 - mivisionx-cpu = mivisionx.override { rpp = rpp-cpu; useOpenCL = false; @@ -525,4 +511,20 @@ in rec { ]; }; }; +} // lib.optionalAttrs config.allowAliases { + miopengemm= throw '' + 'miopengemm' has been deprecated. + It is still available for some time as part of rocmPackages_5. + ''; # Added 2024-3-3 + + miopen-opencl= throw '' + 'miopen-opencl' has been deprecated. + It is still available for some time as part of rocmPackages_5. + ''; # Added 2024-3-3 + + mivisionx-opencl = throw '' + 'mivisionx-opencl' has been deprecated. + Other versions of mivisionx are still available. + It is also still available for some time as part of rocmPackages_5. + ''; # Added 2024-3-24 } diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index e4da6845cdcb..0a2aaa457931 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , pkgs , stdenv +, config }: let @@ -50,8 +51,6 @@ let in rec { inherit mkTmuxPlugin; - mkDerivation = throw "tmuxPlugins.mkDerivation is deprecated, use tmuxPlugins.mkTmuxPlugin instead"; # added 2021-03-14 - battery = mkTmuxPlugin { pluginName = "battery"; version = "unstable-2019-07-04"; @@ -911,4 +910,6 @@ in rec { maintainers = with maintainers; [ o0th ]; }; }; +} // lib.optionalAttrs config.allowAliases { + mkDerivation = throw "tmuxPlugins.mkDerivation is deprecated, use tmuxPlugins.mkTmuxPlugin instead"; # added 2021-03-14 } diff --git a/pkgs/shells/nushell/plugins/default.nix b/pkgs/shells/nushell/plugins/default.nix index 63a041357794..ada3fb0f1bcd 100644 --- a/pkgs/shells/nushell/plugins/default.nix +++ b/pkgs/shells/nushell/plugins/default.nix @@ -1,14 +1,15 @@ -{ lib, newScope, dbus, IOKit, CoreFoundation, Foundation, Security }: +{ lib, config, newScope, dbus, IOKit, CoreFoundation, Foundation, Security }: lib.makeScope newScope (self: with self; { gstat = callPackage ./gstat.nix { inherit Security; }; formats = callPackage ./formats.nix { inherit IOKit Foundation; }; polars = callPackage ./polars.nix { inherit IOKit Foundation; }; query = callPackage ./query.nix { inherit IOKit CoreFoundation; }; - regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release."; net = callPackage ./net.nix { inherit IOKit CoreFoundation; }; units = callPackage ./units.nix { inherit IOKit Foundation; }; highlight = callPackage ./highlight.nix { inherit IOKit Foundation; }; dbus = callPackage ./dbus.nix { inherit dbus; nushell_plugin_dbus = self.dbus; }; skim = callPackage ./skim.nix { inherit IOKit CoreFoundation; }; +} // lib.optionalAttrs config.allowAliases { + regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release."; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c0f48949c29..f24271a5e3e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13894,14 +13894,15 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa; }; - greetd = recurseIntoAttrs { - dlm = throw "greetd.dlm has been removed as it is broken and abandoned upstream"; #Added 2024-07-15 + greetd = recurseIntoAttrs ({ greetd = callPackage ../applications/display-managers/greetd { }; gtkgreet = callPackage ../applications/display-managers/greetd/gtkgreet.nix { }; regreet = callPackage ../applications/display-managers/greetd/regreet.nix { }; tuigreet = callPackage ../applications/display-managers/greetd/tuigreet.nix { }; wlgreet = callPackage ../applications/display-managers/greetd/wlgreet.nix { }; - }; + } // lib.optionalAttrs config.allowAliases { + dlm = throw "greetd.dlm has been removed as it is broken and abandoned upstream"; #Added 2024-07-15 + }); goldendict = libsForQt5.callPackage ../applications/misc/goldendict { }; goldendict-ng = qt6Packages.callPackage ../applications/misc/goldendict-ng { }; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 5dc2bf56e8af..ce3d2b893cd3 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -701,9 +701,10 @@ in { linux_default = packages.linux_6_6; # Update this when adding the newest kernel major version! linux_latest = packages.linux_6_12; - linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake"; linux_rt_default = packages.linux_rt_5_15; linux_rt_latest = packages.linux_rt_6_6; + } // lib.optionalAttrs config.allowAliases { + linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake"; }; manualConfig = callPackage ../os-specific/linux/kernel/manual-config.nix {};