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 { 2 lib, 3 callPackage, 4 pkg-config, ··· 28 { hypr-dynamic-cursors = import ./hypr-dynamic-cursors.nix; } 29 { hyprfocus = import ./hyprfocus.nix; } 30 { 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 { hyprspace = import ./hyprspace.nix; } 35 { hyprsplit = import ./hyprsplit.nix; } 36 (import ./hyprland-plugins.nix) 37 ]; 38 in 39 (lib.mapAttrs (name: plugin: callPackage plugin { inherit mkHyprlandPlugin; }) plugins)
··· 1 { 2 + config, 3 lib, 4 callPackage, 5 pkg-config, ··· 29 { hypr-dynamic-cursors = import ./hypr-dynamic-cursors.nix; } 30 { hyprfocus = import ./hyprfocus.nix; } 31 { hyprgrass = import ./hyprgrass.nix; } 32 { hyprspace = import ./hyprspace.nix; } 33 { hyprsplit = import ./hyprsplit.nix; } 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 + }) 38 ]; 39 in 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 }: 2 3 with haskellLib; 4 ··· 108 109 doctest = dontCheck super.doctest; 110 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"; 112 113 # Needs to use ghc-lib due to incompatible GHC 114 ghc-tags = doDistribute self.ghc-tags_1_5;
··· 1 + { 2 + config, 3 + pkgs, 4 + haskellLib, 5 + }: 6 7 with haskellLib; 8 ··· 112 113 doctest = dontCheck super.doctest; 114 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); 119 120 # Needs to use ghc-lib due to incompatible GHC 121 ghc-tags = doDistribute self.ghc-tags_1_5;
+9 -2
pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
··· 1 - { pkgs, haskellLib }: 2 3 with haskellLib; 4 ··· 74 } 75 ); 76 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"; 78 79 # For GHC < 9.4, some packages need data-array-byte as an extra dependency 80 hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
··· 1 + { 2 + config, 3 + pkgs, 4 + haskellLib, 5 + }: 6 7 with haskellLib; 8 ··· 78 } 79 ); 80 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); 85 86 # For GHC < 9.4, some packages need data-array-byte as an extra dependency 87 hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
-2
pkgs/development/interpreters/python/hooks/default.nix
··· 422 } ./setuptools-build-hook.sh 423 ) { }; 424 425 - setuptoolsCheckHook = throw "The setuptoolsCheckHook has been removed, since the test command has been removed in setuptools 72.0"; 426 - 427 setuptoolsRustBuildHook = callPackage ( 428 { makePythonHook, setuptools-rust }: 429 makePythonHook {
··· 422 } ./setuptools-build-hook.sh 423 ) { }; 424 425 setuptoolsRustBuildHook = callPackage ( 426 { makePythonHook, setuptools-rust }: 427 makePythonHook {
+21 -39
pkgs/development/libraries/science/math/magma/generic.nix
··· 42 ; 43 inherit (magmaRelease) version hash supportedGpuTargets; 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; 59 60 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements 61 # of the first list *from* the second list. That means: ··· 65 # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches. 66 # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must 67 # remove it. 68 - rocmArches = lists.map (x: strings.removePrefix "gfx" x) effectiveRocmPackages.clr.gpuTargets; 69 supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets; 70 unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches; 71 ··· 123 "test" 124 ]; 125 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 - ''; 139 140 nativeBuildInputs = 141 [ ··· 145 gfortran 146 ] 147 ++ lists.optionals cudaSupport [ 148 - effectiveCudaPackages.cuda_nvcc 149 ]; 150 151 buildInputs = ··· 157 (getLib gfortran.cc) # libgfortran.so 158 ] 159 ++ lists.optionals cudaSupport ( 160 - with effectiveCudaPackages; 161 [ 162 cuda_cccl # <nv/target> and <cuda/std/type_traits> 163 cuda_cudart # cuda_runtime.h ··· 172 ] 173 ) 174 ++ lists.optionals rocmSupport ( 175 - with effectiveRocmPackages; 176 [ 177 clr 178 hipblas ··· 203 # Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged 204 # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated 205 # 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") 209 ]; 210 211 # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. ··· 241 ''; 242 243 passthru = { 244 - inherit cudaSupport rocmSupport gpuTargets; 245 - cudaPackages = effectiveCudaPackages; 246 testers = { 247 all = 248 let ··· 395 # dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237 396 (cudaSupport && !static) 397 || !(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"); 401 }; 402 })
··· 42 ; 43 inherit (magmaRelease) version hash supportedGpuTargets; 44 45 + inherit (cudaPackages) cudaAtLeast flags cudaOlder; 46 47 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements 48 # of the first list *from* the second list. That means: ··· 52 # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches. 53 # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must 54 # remove it. 55 + rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets; 56 supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets; 57 unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches; 58 ··· 110 "test" 111 ]; 112 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 + ''; 119 120 nativeBuildInputs = 121 [ ··· 125 gfortran 126 ] 127 ++ lists.optionals cudaSupport [ 128 + cudaPackages.cuda_nvcc 129 ]; 130 131 buildInputs = ··· 137 (getLib gfortran.cc) # libgfortran.so 138 ] 139 ++ lists.optionals cudaSupport ( 140 + with cudaPackages; 141 [ 142 cuda_cccl # <nv/target> and <cuda/std/type_traits> 143 cuda_cudart # cuda_runtime.h ··· 152 ] 153 ) 154 ++ lists.optionals rocmSupport ( 155 + with rocmPackages; 156 [ 157 clr 158 hipblas ··· 183 # Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged 184 # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated 185 # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build 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") 189 ]; 190 191 # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. ··· 221 ''; 222 223 passthru = { 224 + inherit 225 + cudaPackages 226 + cudaSupport 227 + rocmSupport 228 + gpuTargets 229 + ; 230 testers = { 231 all = 232 let ··· 379 # dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237 380 (cudaSupport && !static) 381 || !(cudaSupport || rocmSupport) # At least one back-end enabled 382 + || (cudaSupport && rocmSupport); # Mutually exclusive 383 }; 384 })
-62
pkgs/development/libraries/science/math/magma/releases.nix
··· 5 # CUDA works around magma's wrappers and uses FindCUDAToolkit directly 6 [ 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 version = "2.9.0"; 71 hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw="; 72 supportedGpuTargets = [
··· 5 # CUDA works around magma's wrappers and uses FindCUDAToolkit directly 6 [ 7 { 8 version = "2.9.0"; 9 hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw="; 10 supportedGpuTargets = [
+2
pkgs/top-level/aliases.nix
··· 1215 ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10 1216 mac = monkeysAudio; # Added 2024-11-30 1217 MACS2 = macs2; # Added 2023-06-12 1218 mailcore2 = throw "'mailcore2' has been removed due to lack of upstream maintenance."; # Added 2025-06-09 1219 mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19 1220 mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21
··· 1215 ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10 1216 mac = monkeysAudio; # Added 2024-11-30 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 1220 mailcore2 = throw "'mailcore2' has been removed due to lack of upstream maintenance."; # Added 2025-06-09 1221 mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19 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 # standard BLAS and LAPACK. 15318 openblasCompat = openblas.override { blas64 = false; }; 15319 15320 - inherit (callPackage ../development/libraries/science/math/magma { }) magma magma_2_7_2 magma_2_6_2; 15321 15322 magma-cuda = magma.override { 15323 cudaSupport = true;
··· 15317 # standard BLAS and LAPACK. 15318 openblasCompat = openblas.override { blas64 = false; }; 15319 15320 + inherit (callPackage ../development/libraries/science/math/magma { }) magma; 15321 15322 magma-cuda = magma.override { 15323 cudaSupport = true;
+1
pkgs/top-level/python-aliases.nix
··· 727 sequoia = throw "python3Packages.sequoia was replaced by pysequoia - built from a dedicated repository, with a new API."; # added 2023-06-24 728 setuptools_dso = setuptools-dso; # added 2024-03-03 729 setuptools_scm = setuptools-scm; # added 2021-06-03 730 setuptoolsTrial = setuptools-trial; # added 2023-11-11 731 sharkiqpy = sharkiq; # added 2022-05-21 732 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
··· 727 sequoia = throw "python3Packages.sequoia was replaced by pysequoia - built from a dedicated repository, with a new API."; # added 2023-06-24 728 setuptools_dso = setuptools-dso; # added 2024-03-03 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 731 setuptoolsTrial = setuptools-trial; # added 2023-11-11 732 sharkiqpy = sharkiq; # added 2022-05-21 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