treewide: hide more deprecated stuff if allowAliases is false (#354709)

This commit is contained in:
Jörg Thalheim 2024-11-27 21:44:06 +01:00 committed by GitHub
commit 1b02ba59aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 77 additions and 66 deletions

View File

@ -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;
}

View File

@ -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";
}

View File

@ -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;

View File

@ -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;
};
}

View File

@ -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)

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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.";
})

View File

@ -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 { };

View File

@ -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 {};