lol

various: move throws to aliases (#426639)

authored by

Wolfgang Walther and committed by
GitHub
174e6bba 69a99526

+47 -111
+4 -3
pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix
··· 1 1 { 2 + config, 2 3 lib, 3 4 callPackage, 4 5 pkg-config, ··· 28 29 { hypr-dynamic-cursors = import ./hypr-dynamic-cursors.nix; } 29 30 { hyprfocus = import ./hyprfocus.nix; } 30 31 { hyprgrass = import ./hyprgrass.nix; } 31 - { 32 - hyprscroller = throw "hyprlandPlugins.hyprscroller has been removed as the upstream project is deprecated. Consider using `hyprlandPlugins.hyprscrolling`."; 33 - } # Added 2025-05-09 34 32 { hyprspace = import ./hyprspace.nix; } 35 33 { hyprsplit = import ./hyprsplit.nix; } 36 34 (import ./hyprland-plugins.nix) 35 + (lib.optionalAttrs config.allowAliases { 36 + hyprscroller = throw "hyprlandPlugins.hyprscroller has been removed as the upstream project is deprecated. Consider using `hyprlandPlugins.hyprscrolling`."; # Added 2025-05-09 37 + }) 37 38 ]; 38 39 in 39 40 (lib.mapAttrs (name: plugin: callPackage plugin { inherit mkHyprlandPlugin; }) plugins)
+9 -2
pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
··· 1 - { pkgs, haskellLib }: 1 + { 2 + config, 3 + pkgs, 4 + haskellLib, 5 + }: 2 6 3 7 with haskellLib; 4 8 ··· 108 112 109 113 doctest = dontCheck super.doctest; 110 114 111 - haskell-language-server = throw "haskell-language-server has dropped support for ghc 9.0 in version 2.4.0.0, please use a newer ghc version or an older nixpkgs version"; 115 + haskell-language-server = 116 + lib.throwIf config.allowAliases 117 + "haskell-language-server has dropped support for ghc 9.0 in version 2.4.0.0, please use a newer ghc version or an older nixpkgs version" 118 + (markBroken super.haskell-language-server); 112 119 113 120 # Needs to use ghc-lib due to incompatible GHC 114 121 ghc-tags = doDistribute self.ghc-tags_1_5;
+9 -2
pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
··· 1 - { pkgs, haskellLib }: 1 + { 2 + config, 3 + pkgs, 4 + haskellLib, 5 + }: 2 6 3 7 with haskellLib; 4 8 ··· 74 78 } 75 79 ); 76 80 77 - haskell-language-server = throw "haskell-language-server has dropped support for ghc 9.2 in version 2.10.0.0, please use a newer ghc version or an older nixpkgs version"; 81 + haskell-language-server = 82 + lib.throwIf config.allowAliases 83 + "haskell-language-server has dropped support for ghc 9.2 in version 2.10.0.0, please use a newer ghc version or an older nixpkgs version" 84 + (markBroken super.haskell-language-server); 78 85 79 86 # For GHC < 9.4, some packages need data-array-byte as an extra dependency 80 87 hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
-2
pkgs/development/interpreters/python/hooks/default.nix
··· 422 422 } ./setuptools-build-hook.sh 423 423 ) { }; 424 424 425 - setuptoolsCheckHook = throw "The setuptoolsCheckHook has been removed, since the test command has been removed in setuptools 72.0"; 426 - 427 425 setuptoolsRustBuildHook = callPackage ( 428 426 { makePythonHook, setuptools-rust }: 429 427 makePythonHook {
+21 -39
pkgs/development/libraries/science/math/magma/generic.nix
··· 42 42 ; 43 43 inherit (magmaRelease) version hash supportedGpuTargets; 44 44 45 - # Per https://icl.utk.edu/magma/downloads, support for CUDA 12 wasn't added until 2.7.1. 46 - # If we're building a version prior to that, use the latest release of the 11.x series. 47 - effectiveCudaPackages = 48 - if strings.versionOlder version "2.7.1" then cudaPackages_11 else cudaPackages; 49 - 50 - inherit (effectiveCudaPackages) cudaAtLeast flags cudaOlder; 51 - 52 - effectiveRocmPackages = 53 - if strings.versionOlder version "2.8.0" then 54 - throw '' 55 - the required ROCm 5.7 version for magma ${version} has been removed 56 - '' 57 - else 58 - rocmPackages; 45 + inherit (cudaPackages) cudaAtLeast flags cudaOlder; 59 46 60 47 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements 61 48 # of the first list *from* the second list. That means: ··· 65 52 # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches. 66 53 # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must 67 54 # remove it. 68 - rocmArches = lists.map (x: strings.removePrefix "gfx" x) effectiveRocmPackages.clr.gpuTargets; 55 + rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets; 69 56 supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets; 70 57 unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches; 71 58 ··· 123 110 "test" 124 111 ]; 125 112 126 - postPatch = 127 - '' 128 - # For rocm version script invoked by cmake 129 - patchShebangs tools/ 130 - # Fixup for the python test runners 131 - patchShebangs ./testing/run_{tests,summarize}.py 132 - '' 133 - + lib.optionalString (strings.versionOlder version "2.9.0") '' 134 - substituteInPlace ./testing/run_tests.py \ 135 - --replace-fail \ 136 - "print >>sys.stderr, cmdp, \"doesn't exist (original name: \" + cmd + \", precision: \" + precision + \")\"" \ 137 - "print(f\"{cmdp} doesn't exist (original name: {cmd}, precision: {precision})\", file=sys.stderr)" 138 - ''; 113 + postPatch = '' 114 + # For rocm version script invoked by cmake 115 + patchShebangs tools/ 116 + # Fixup for the python test runners 117 + patchShebangs ./testing/run_{tests,summarize}.py 118 + ''; 139 119 140 120 nativeBuildInputs = 141 121 [ ··· 145 125 gfortran 146 126 ] 147 127 ++ lists.optionals cudaSupport [ 148 - effectiveCudaPackages.cuda_nvcc 128 + cudaPackages.cuda_nvcc 149 129 ]; 150 130 151 131 buildInputs = ··· 157 137 (getLib gfortran.cc) # libgfortran.so 158 138 ] 159 139 ++ lists.optionals cudaSupport ( 160 - with effectiveCudaPackages; 140 + with cudaPackages; 161 141 [ 162 142 cuda_cccl # <nv/target> and <cuda/std/type_traits> 163 143 cuda_cudart # cuda_runtime.h ··· 172 152 ] 173 153 ) 174 154 ++ lists.optionals rocmSupport ( 175 - with effectiveRocmPackages; 155 + with rocmPackages; 176 156 [ 177 157 clr 178 158 hipblas ··· 203 183 # Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged 204 184 # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated 205 185 # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build 206 - (strings.cmakeFeature "ROCM_CORE" "${effectiveRocmPackages.clr}") 207 - (strings.cmakeFeature "CMAKE_C_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc") 208 - (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc") 186 + (strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}") 187 + (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc") 188 + (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc") 209 189 ]; 210 190 211 191 # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. ··· 241 221 ''; 242 222 243 223 passthru = { 244 - inherit cudaSupport rocmSupport gpuTargets; 245 - cudaPackages = effectiveCudaPackages; 224 + inherit 225 + cudaPackages 226 + cudaSupport 227 + rocmSupport 228 + gpuTargets 229 + ; 246 230 testers = { 247 231 all = 248 232 let ··· 395 379 # dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237 396 380 (cudaSupport && !static) 397 381 || !(cudaSupport || rocmSupport) # At least one back-end enabled 398 - || (cudaSupport && rocmSupport) # Mutually exclusive 399 - || (cudaSupport && strings.versionOlder version "2.7.1" && cudaPackages_11 == null) 400 - || (rocmSupport && strings.versionOlder version "2.8.0"); 382 + || (cudaSupport && rocmSupport); # Mutually exclusive 401 383 }; 402 384 })
-62
pkgs/development/libraries/science/math/magma/releases.nix
··· 5 5 # CUDA works around magma's wrappers and uses FindCUDAToolkit directly 6 6 [ 7 7 { 8 - version = "2.6.2"; 9 - hash = "sha256-dbVU2rAJA+LRC5cskT5Q5/iMvGLzrkMrWghsfk7aCnE="; 10 - supportedGpuTargets = [ 11 - "700" 12 - "701" 13 - "702" 14 - "703" 15 - "704" 16 - "705" 17 - "801" 18 - "802" 19 - "803" 20 - "805" 21 - "810" 22 - "900" 23 - "902" 24 - "904" 25 - "906" 26 - "908" 27 - "909" 28 - "90c" 29 - "1010" 30 - "1011" 31 - "1012" 32 - "1030" 33 - "1031" 34 - "1032" 35 - "1033" 36 - ]; 37 - } 38 - { 39 - version = "2.7.2"; 40 - hash = "sha256-cpvBpw5RinQi/no6VFN6R0EDWne+M0n2bqxcNiV21WA="; 41 - supportedGpuTargets = [ 42 - "700" 43 - "701" 44 - "702" 45 - "703" 46 - "704" 47 - "705" 48 - "801" 49 - "802" 50 - "803" 51 - "805" 52 - "810" 53 - "900" 54 - "902" 55 - "904" 56 - "906" 57 - "908" 58 - "909" 59 - "90c" 60 - "1010" 61 - "1011" 62 - "1012" 63 - "1030" 64 - "1031" 65 - "1032" 66 - "1033" 67 - ]; 68 - } 69 - { 70 8 version = "2.9.0"; 71 9 hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw="; 72 10 supportedGpuTargets = [
+2
pkgs/top-level/aliases.nix
··· 1215 1215 ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10 1216 1216 mac = monkeysAudio; # Added 2024-11-30 1217 1217 MACS2 = macs2; # Added 2023-06-12 1218 + magma_2_6_2 = throw "'magma_2_6_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20 1219 + magma_2_7_2 = throw "'magma_2_7_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20 1218 1220 mailcore2 = throw "'mailcore2' has been removed due to lack of upstream maintenance."; # Added 2025-06-09 1219 1221 mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19 1220 1222 mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21
+1 -1
pkgs/top-level/all-packages.nix
··· 15317 15317 # standard BLAS and LAPACK. 15318 15318 openblasCompat = openblas.override { blas64 = false; }; 15319 15319 15320 - inherit (callPackage ../development/libraries/science/math/magma { }) magma magma_2_7_2 magma_2_6_2; 15320 + inherit (callPackage ../development/libraries/science/math/magma { }) magma; 15321 15321 15322 15322 magma-cuda = magma.override { 15323 15323 cudaSupport = true;
+1
pkgs/top-level/python-aliases.nix
··· 727 727 sequoia = throw "python3Packages.sequoia was replaced by pysequoia - built from a dedicated repository, with a new API."; # added 2023-06-24 728 728 setuptools_dso = setuptools-dso; # added 2024-03-03 729 729 setuptools_scm = setuptools-scm; # added 2021-06-03 730 + setuptoolsCheckHook = throw "The setuptoolsCheckHook has been removed, since the test command has been removed in setuptools 72.0."; # added 2024-08-06 730 731 setuptoolsTrial = setuptools-trial; # added 2023-11-11 731 732 sharkiqpy = sharkiq; # added 2022-05-21 732 733 shouldbe = throw "shouldbe was removed, because it was disabled on all python version since 3.8 and last updated in 2019."; # added 2024-05-12