···11-{ pkgs, haskellLib }:
11+{
22+ config,
33+ pkgs,
44+ haskellLib,
55+}:
2637with haskellLib;
48···108112109113 doctest = dontCheck super.doctest;
110114111111- 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";
115115+ haskell-language-server =
116116+ lib.throwIf config.allowAliases
117117+ "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"
118118+ (markBroken super.haskell-language-server);
112119113120 # Needs to use ghc-lib due to incompatible GHC
114121 ghc-tags = doDistribute self.ghc-tags_1_5;
···11-{ pkgs, haskellLib }:
11+{
22+ config,
33+ pkgs,
44+ haskellLib,
55+}:
2637with haskellLib;
48···7478 }
7579 );
76807777- 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";
8181+ haskell-language-server =
8282+ lib.throwIf config.allowAliases
8383+ "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"
8484+ (markBroken super.haskell-language-server);
78857986 # For GHC < 9.4, some packages need data-array-byte as an extra dependency
8087 hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
···422422 } ./setuptools-build-hook.sh
423423 ) { };
424424425425- setuptoolsCheckHook = throw "The setuptoolsCheckHook has been removed, since the test command has been removed in setuptools 72.0";
426426-427425 setuptoolsRustBuildHook = callPackage (
428426 { makePythonHook, setuptools-rust }:
429427 makePythonHook {
···4242 ;
4343 inherit (magmaRelease) version hash supportedGpuTargets;
44444545- # Per https://icl.utk.edu/magma/downloads, support for CUDA 12 wasn't added until 2.7.1.
4646- # If we're building a version prior to that, use the latest release of the 11.x series.
4747- effectiveCudaPackages =
4848- if strings.versionOlder version "2.7.1" then cudaPackages_11 else cudaPackages;
4949-5050- inherit (effectiveCudaPackages) cudaAtLeast flags cudaOlder;
5151-5252- effectiveRocmPackages =
5353- if strings.versionOlder version "2.8.0" then
5454- throw ''
5555- the required ROCm 5.7 version for magma ${version} has been removed
5656- ''
5757- else
5858- rocmPackages;
4545+ inherit (cudaPackages) cudaAtLeast flags cudaOlder;
59466047 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
6148 # of the first list *from* the second list. That means:
···6552 # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches.
6653 # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must
6754 # remove it.
6868- rocmArches = lists.map (x: strings.removePrefix "gfx" x) effectiveRocmPackages.clr.gpuTargets;
5555+ rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets;
6956 supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets;
7057 unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches;
7158···123110 "test"
124111 ];
125112126126- postPatch =
127127- ''
128128- # For rocm version script invoked by cmake
129129- patchShebangs tools/
130130- # Fixup for the python test runners
131131- patchShebangs ./testing/run_{tests,summarize}.py
132132- ''
133133- + lib.optionalString (strings.versionOlder version "2.9.0") ''
134134- substituteInPlace ./testing/run_tests.py \
135135- --replace-fail \
136136- "print >>sys.stderr, cmdp, \"doesn't exist (original name: \" + cmd + \", precision: \" + precision + \")\"" \
137137- "print(f\"{cmdp} doesn't exist (original name: {cmd}, precision: {precision})\", file=sys.stderr)"
138138- '';
113113+ postPatch = ''
114114+ # For rocm version script invoked by cmake
115115+ patchShebangs tools/
116116+ # Fixup for the python test runners
117117+ patchShebangs ./testing/run_{tests,summarize}.py
118118+ '';
139119140120 nativeBuildInputs =
141121 [
···145125 gfortran
146126 ]
147127 ++ lists.optionals cudaSupport [
148148- effectiveCudaPackages.cuda_nvcc
128128+ cudaPackages.cuda_nvcc
149129 ];
150130151131 buildInputs =
···157137 (getLib gfortran.cc) # libgfortran.so
158138 ]
159139 ++ lists.optionals cudaSupport (
160160- with effectiveCudaPackages;
140140+ with cudaPackages;
161141 [
162142 cuda_cccl # <nv/target> and <cuda/std/type_traits>
163143 cuda_cudart # cuda_runtime.h
···172152 ]
173153 )
174154 ++ lists.optionals rocmSupport (
175175- with effectiveRocmPackages;
155155+ with rocmPackages;
176156 [
177157 clr
178158 hipblas
···203183 # Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged
204184 # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated
205185 # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build
206206- (strings.cmakeFeature "ROCM_CORE" "${effectiveRocmPackages.clr}")
207207- (strings.cmakeFeature "CMAKE_C_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc")
208208- (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc")
186186+ (strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}")
187187+ (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc")
188188+ (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc")
209189 ];
210190211191 # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU.
···241221 '';
242222243223 passthru = {
244244- inherit cudaSupport rocmSupport gpuTargets;
245245- cudaPackages = effectiveCudaPackages;
224224+ inherit
225225+ cudaPackages
226226+ cudaSupport
227227+ rocmSupport
228228+ gpuTargets
229229+ ;
246230 testers = {
247231 all =
248232 let
···395379 # dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237
396380 (cudaSupport && !static)
397381 || !(cudaSupport || rocmSupport) # At least one back-end enabled
398398- || (cudaSupport && rocmSupport) # Mutually exclusive
399399- || (cudaSupport && strings.versionOlder version "2.7.1" && cudaPackages_11 == null)
400400- || (rocmSupport && strings.versionOlder version "2.8.0");
382382+ || (cudaSupport && rocmSupport); # Mutually exclusive
401383 };
402384})
···12151215 ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10
12161216 mac = monkeysAudio; # Added 2024-11-30
12171217 MACS2 = macs2; # Added 2023-06-12
12181218+ magma_2_6_2 = throw "'magma_2_6_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20
12191219+ magma_2_7_2 = throw "'magma_2_7_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20
12181220 mailcore2 = throw "'mailcore2' has been removed due to lack of upstream maintenance."; # Added 2025-06-09
12191221 mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19
12201222 mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21
···727727 sequoia = throw "python3Packages.sequoia was replaced by pysequoia - built from a dedicated repository, with a new API."; # added 2023-06-24
728728 setuptools_dso = setuptools-dso; # added 2024-03-03
729729 setuptools_scm = setuptools-scm; # added 2021-06-03
730730+ setuptoolsCheckHook = throw "The setuptoolsCheckHook has been removed, since the test command has been removed in setuptools 72.0."; # added 2024-08-06
730731 setuptoolsTrial = setuptools-trial; # added 2023-11-11
731732 sharkiqpy = sharkiq; # added 2022-05-21
732733 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