diff options
Diffstat (limited to 'pkgs/development')
227 files changed, 7757 insertions, 624 deletions
diff --git a/pkgs/development/compilers/dart/sources.nix b/pkgs/development/compilers/dart/sources.nix index 0c8167ca790a..d12394c37bbc 100644 --- a/pkgs/development/compilers/dart/sources.nix +++ b/pkgs/development/compilers/dart/sources.nix @@ -1,24 +1,24 @@ -let version = "3.3.1"; in +let version = "3.3.2"; in { fetchurl }: { versionUsed = version; "${version}-x86_64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip"; - sha256 = "1jihiryf8lm4mc5wrnhjwlyazpmhk3n40f8z7r25xnz7glafwvg5"; + sha256 = "0ii494ffj5vkxnpq3aykxmn54cw4jlf45slwlg9g1crm6j3lcwak"; }; "${version}-aarch64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip"; - sha256 = "1d6404r9vhp8q5r4nf3hlcgyvxlyxv63jzd4zlmdxghvm68kkv01"; + sha256 = "0ffqwbmwx737hrq04rbpyxqfm86mqhfayq2i1ssjkjgqyzzrpmy7"; }; "${version}-aarch64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip"; - sha256 = "08amw2mw2zfpd7savydxsv8ncy8yk76ak1aixgb1csyh8pn4pagc"; + sha256 = "079jq4sp8sw8y4khw8j8l2q38149bjmn8j5yibmnzyxpwyc4ysx2"; }; "${version}-x86_64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip"; - sha256 = "0mnplv2vzzfvg7a7xj8vrc75lvsj9xksbwzd3cc7s0xjxvyic40v"; + sha256 = "07ixd7qj78y6m27cv9mjlkr2kdnmld6cxc23x4dip3a02drs8990"; }; "${version}-i686-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-ia32-release.zip"; - sha256 = "1ndj3nlw6qd94w3h4kw7jyihm71jlp3y0kc0ybgwh2r22dd2r2yd"; + sha256 = "1jwjiyxcr2ii4f7rlb4hsjq9hlmdhv9f41wa5camhy74x56z5fhn"; }; } diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix index e00294cf1845..be6c3f7e98ef 100644 --- a/pkgs/development/compilers/ghdl/default.nix +++ b/pkgs/development/compilers/ghdl/default.nix @@ -13,13 +13,13 @@ assert backend == "mcode" || backend == "llvm"; stdenv.mkDerivation (finalAttrs: { pname = "ghdl-${backend}"; - version = "3.0.0"; + version = "4.0.0"; src = fetchFromGitHub { owner = "ghdl"; repo = "ghdl"; rev = "v${finalAttrs.version}"; - hash = "sha256-94RNtHbOpbC2q/Z+PsQplrLxXmpS3LXOCXyTBB+n9c4="; + hash = "sha256-KQwesrj2g8cDCyiEb5j4bkM5O3fGPuXzGUOEEGw6zRI="; }; LIBRARY_PATH = "${stdenv.cc.libc}/lib"; diff --git a/pkgs/development/compilers/opensycl/default.nix b/pkgs/development/compilers/opensycl/default.nix index c406d4c9d5c2..cdf9a5b9d22c 100644 --- a/pkgs/development/compilers/opensycl/default.nix +++ b/pkgs/development/compilers/opensycl/default.nix @@ -9,11 +9,13 @@ , libffi , makeWrapper , config -, rocmPackages +, rocmPackages_5 , rocmSupport ? config.rocmSupport }: let inherit (llvmPackages_15) stdenv; + # move to newer ROCm version once supported + rocmPackages = rocmPackages_5; in stdenv.mkDerivation rec { pname = "OpenSYCL"; diff --git a/pkgs/development/compilers/zulu/16.nix b/pkgs/development/compilers/zulu/16.nix deleted file mode 100644 index 941a7e8d64f9..000000000000 --- a/pkgs/development/compilers/zulu/16.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ callPackage -, enableJavaFX ? false -, ... -}@args: - -callPackage ./common.nix ({ - # Details from https://www.azul.com/downloads/?version=java-16-sts&package=jdk - # Note that the latest build may differ by platform - dists = { - x86_64-darwin = { - zuluVersion = "16.32.15"; - jdkVersion = "16.0.2"; - hash = - if enableJavaFX then "sha256-6URaSBNHQWLauO//kCuKXb4Z7AqyshWnoeJEyVRKgaY=" - else "sha256-NXgBj/KixTknaCYbo3B+rOo11NImH5CDUIU0LhTCtMo="; - }; - - aarch64-darwin = { - zuluVersion = "16.32.15"; - jdkVersion = "16.0.2"; - hash = - if enableJavaFX then "sha256-QuyhIAxUY3Vv1adGihW+LIsXtpDX2taCmFsMFj9o5vs=" - else "sha256-3bUfDcLLyahLeURFAgLAVapBZHvqtam8GHbWTA6MQog="; - }; - }; -} // builtins.removeAttrs args [ "callPackage" ]) diff --git a/pkgs/development/coq-modules/VST/default.nix b/pkgs/development/coq-modules/VST/default.nix index 178db27c6379..706d11786354 100644 --- a/pkgs/development/coq-modules/VST/default.nix +++ b/pkgs/development/coq-modules/VST/default.nix @@ -23,11 +23,13 @@ mkCoqDerivation { repo = "VST"; inherit version; defaultVersion = with lib.versions; lib.switch coq.coq-version [ + { case = range "8.15" "8.19"; out = "2.14"; } { case = range "8.15" "8.17"; out = "2.13"; } { case = range "8.14" "8.16"; out = "2.10"; } { case = range "8.13" "8.15"; out = "2.9"; } { case = range "8.12" "8.13"; out = "2.8"; } ] null; + release."2.14".sha256 = "sha256-NHc1ZQ2VmXZy4lK2+mtyeNz1Qr9Nhj2QLxkPhhQB7Iw="; release."2.13".sha256 = "sha256-i6rvP3cpayBln5KHZOpeNfraYU5h0O9uciBQ4jRH4XA="; release."2.12".sha256 = "sha256-4HL0U4HA5/usKNXC0Dis1UZY/Hb/LRd2IGOrqrvdWkw="; release."2.11.1".sha256 = "sha256-unpNstZBnRT4dIqAYOv9n1J0tWJMeRuaaa2RG1U0Xs0="; diff --git a/pkgs/development/coq-modules/compcert/default.nix b/pkgs/development/coq-modules/compcert/default.nix index 68a839cc4e8b..769017d4e282 100644 --- a/pkgs/development/coq-modules/compcert/default.nix +++ b/pkgs/development/coq-modules/compcert/default.nix @@ -29,7 +29,7 @@ compcert = mkCoqDerivation { releaseRev = v: "v${v}"; defaultVersion = with lib.versions; lib.switch coq.version [ - { case = range "8.14" "8.17"; out = "3.13.1"; } + { case = range "8.14" "8.19"; out = "3.13.1"; } { case = isEq "8.13" ; out = "3.10"; } { case = isEq "8.12" ; out = "3.9"; } { case = range "8.8" "8.11"; out = "3.8"; } @@ -170,12 +170,27 @@ compcert.overrideAttrs (o: }) ]; } - { cases = [ (isEq "8.17") (isEq "3.13") ]; + { cases = [ (range "8.17" "8.19") (isEq "3.13") ]; out = [ # Support for Coq 8.17.0 & Coq 8.17.1 (fetchpatch { - url = "https://github.com/AbsInt/CompCert/commit/030a0fafe6a1a315bb13c5276e0af536e4f713ce.patch"; - hash = "sha256-iRdmgYuun1wp6chRoDy99KKmFyvY79NGWzrltyQaW1o="; + url = "https://github.com/AbsInt/CompCert/commit/2e04d986bdae578186e40330842878559a550402.patch"; + hash = "sha256-2ZRAjUUSScJI8ogWFTnukCUnJdLWGvyOPyfIVlHL4ig="; + }) + # Support for Coq 8.18.0 + (fetchpatch { + url = "https://github.com/AbsInt/CompCert/commit/28218c5663cba36c6078ca342335d4e55c412bd7.patch"; + hash = "sha256-aAatUMO26oZwFYGh1BXYWxbTuyOgU8BAKMGDS5796hM="; + }) + # MenhirLib update + (fetchpatch { + url = "https://github.com/AbsInt/CompCert/commit/9f3d7b6eb99377ad4689cd57563c484c57baa457.patch"; + hash = "sha256-paofdSBxP/JFoBSiO1OI+mjKRI3UCanXRh/drzYt93E="; + }) + # Support for Coq 8.19.0 & Coq 8.19.1 + (fetchpatch { + url = "https://github.com/AbsInt/CompCert/commit/a2e4ed62fc558d565366845f9d135bd7db5e23c4.patch"; + hash = "sha256-ufk0bokuayLfkSvK3cK4E9iXU5eZpp9d/ETSa/zCfMg="; }) ]; } diff --git a/pkgs/development/coq-modules/mathcomp-word/default.nix b/pkgs/development/coq-modules/mathcomp-word/default.nix index 52d4799eb173..0183de981226 100644 --- a/pkgs/development/coq-modules/mathcomp-word/default.nix +++ b/pkgs/development/coq-modules/mathcomp-word/default.nix @@ -18,15 +18,17 @@ mkCoqDerivation { releaseRev = v: "v${v}"; + release."3.1".sha256 = "sha256-qQHis6554sG7NpCpWhT2wvelnxsrbEPVNv3fpxwxHMU="; release."3.0".sha256 = "sha256-xEgx5HHDOimOJbNMtIVf/KG3XBemOS9XwoCoW6btyJ4="; + release."2.3".sha256 = "sha256-whU1yvFFuxpwQutW41B/WBg5DrVZJW/Do/GuHtzuI3U="; release."2.2".sha256 = "sha256-8BB6SToCrMZTtU78t2K+aExuxk9O1lCqVQaa8wabSm8="; release."2.1".sha256 = "sha256-895gZzwwX8hN9UUQRhcgRlphHANka9R0PRotfmSEelA="; release."2.0".sha256 = "sha256-ySg3AviGGY5jXqqn1cP6lTw3aS5DhawXEwNUgj7pIjA="; inherit version; defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [ - { cases = [ (range "8.16" "8.19") (isGe "2.0") ]; out = "3.0"; } - { cases = [ (range "8.12" "8.19") (range "1.12" "1.19") ]; out = "2.2"; } + { cases = [ (range "8.16" "8.19") (isGe "2.0") ]; out = "3.1"; } + { cases = [ (range "8.12" "8.19") (range "1.12" "1.19") ]; out = "2.3"; } ] null; propagatedBuildInputs = [ mathcomp.algebra mathcomp.ssreflect mathcomp.fingroup ]; diff --git a/pkgs/development/embedded/wch-isp/default.nix b/pkgs/development/embedded/wch-isp/default.nix index c577779772e5..3021c875f08b 100644 --- a/pkgs/development/embedded/wch-isp/default.nix +++ b/pkgs/development/embedded/wch-isp/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, libusb1 }: +{ lib, stdenv, fetchFromSourcehut, pkg-config, libusb1 }: stdenv.mkDerivation rec { pname = "wch-isp"; - version = "0.4.0"; + version = "0.4.1"; - src = fetchFromGitHub { - owner = "jmaselbas"; + src = fetchFromSourcehut { + owner = "~jmaselbas"; repo = pname; rev = "v${version}"; - hash = "sha256-cTePTpzvWf2DdInhBxFY72aVNb0SAlCHb/tUwNqqX1U="; + hash = "sha256-JB7cvZPzRhYJ8T3QJkguHOzZFrLOft5rRz0F0sVav/k="; }; nativeBuildInputs = [ pkg-config ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { description = "Firmware programmer for WCH microcontrollers over USB"; mainProgram = "wch-isp"; license = lib.licenses.gpl2Only; - homepage = "https://github.com/jmaselbas/wch-isp"; + homepage = "https://git.sr.ht/~jmaselbas/wch-isp"; maintainers = with lib.maintainers; [ lesuisse ]; platforms = lib.platforms.unix; }; diff --git a/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch b/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch new file mode 100644 index 000000000000..8099eefc88d0 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch @@ -0,0 +1,12 @@ +diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py +index 4856594755..6769ab8026 100644 +--- a/Lib/venv/__init__.py ++++ b/Lib/venv/__init__.py +@@ -522,6 +522,7 @@ def skip_file(f): + with open(dstfile, 'wb') as f: + f.write(new_data) + shutil.copymode(srcfile, dstfile) ++ os.chmod(dstfile, 0o644) + + def upgrade_dependencies(self, context): + logger.debug( diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 0191517aa9ef..301af7a29c9e 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -60,6 +60,7 @@ , static ? stdenv.hostPlatform.isStatic , enableFramework ? false , noldconfigPatch ? ./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch" +, enableGIL ? true # pgo (not reproducible) + -fno-semantic-interposition # https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations @@ -111,6 +112,7 @@ let inherit (lib) concatMapStringsSep concatStringsSep + enableFeature getDev getLib optionals @@ -304,7 +306,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { # Make sure that the virtualenv activation scripts are # owner-writable, so venvs can be recreated without permission # errors. + ] ++ optionals (pythonOlder "3.13") [ ./virtualenv-permissions.patch + ] ++ optionals (pythonAtLeast "3.13") [ + ./3.13/virtualenv-permissions.patch ] ++ optionals mimetypesSupport [ # Make the mimetypes module refer to the right file ./mimetypes.patch @@ -399,6 +404,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { "--enable-shared" ] ++ optionals enableFramework [ "--enable-framework=${placeholder "out"}/Library/Frameworks" + ] ++ optionals (pythonAtLeast "3.13") [ + (enableFeature enableGIL "gil") ] ++ optionals enableOptimizations [ "--enable-optimizations" ] ++ optionals (sqlite != null) [ @@ -604,6 +611,14 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { inherit src; name = "python${pythonVersion}-${version}-doc"; + patches = optionals (pythonAtLeast "3.9" && pythonOlder "3.10") [ + # https://github.com/python/cpython/issues/98366 + (fetchpatch { + url = "https://github.com/python/cpython/commit/5612471501b05518287ed61c1abcb9ed38c03942.patch"; + hash = "sha256-p41hJwAiyRgyVjCVQokMSpSFg/VDDrqkCSxsodVb6vY="; + }) + ]; + dontConfigure = true; dontBuild = true; diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 12050f319fc0..5d4ae2117146 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -93,9 +93,9 @@ in { major = "3"; minor = "13"; patch = "0"; - suffix = "a3"; + suffix = "a5"; }; - hash = "sha256-IHhMgwTrHGnID5ZuvfB3W+LjfiPfO2JGHuwSqF3Pfq0="; + hash = "sha256-Hom1NVGD58iYpaAbL2AXKP5J/bidnJeB8TNghHqu+mI="; inherit (darwin) configd; inherit passthruFun; }; diff --git a/pkgs/development/interpreters/spidermonkey/115.nix b/pkgs/development/interpreters/spidermonkey/115.nix index 433a16f5da2e..1649bf3d9959 100644 --- a/pkgs/development/interpreters/spidermonkey/115.nix +++ b/pkgs/development/interpreters/spidermonkey/115.nix @@ -1,4 +1,4 @@ import ./common.nix { - version = "115.2.0"; - hash = "sha512-3ztO/ZYH6OtJMnF3YMhl6zGsepYkbLQ4UZDDMxbJWV4Hk6HzxF67lnSpuk/OmNg/cbBjvvCe8wfZLRzXjTDYEg=="; + version = "115.9.1"; + hash = "sha512-nMrt4vzaE6B/mKIRC7j5nHMkYB1mv/MR8wcKZpV2oVmP4dfeLQBdcl0fRNvjk0qcD9C3lQ9gaGBH1M6NnYEjEA=="; } diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index c71b24107f6b..7c14141554fb 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -114,8 +114,9 @@ stdenv.mkDerivation (finalAttrs: { pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [ bash gnum4 # install glib-gettextize and m4 macros for other apps to use - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils + ] ++ lib.optionals stdenv.isLinux [ libselinux util-linuxMinimal # for libmount ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ @@ -158,7 +159,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dgtk_doc=${lib.boolToString buildDocs}" "-Dnls=enabled" "-Ddevbindir=${placeholder "dev"}/bin" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!lib.meta.availableOn stdenv.hostPlatform elfutils) [ "-Dlibelf=disabled" ] ++ lib.optionals (!stdenv.isDarwin) [ "-Dman=true" # broken on Darwin diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 814b6042544c..72ec69bc177b 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -111,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "An OpenType text shaping engine"; homepage = "https://harfbuzz.github.io/"; - changelog = "https://github.com/harfbuzz/harfbuzz/raw/${version}/NEWS"; + changelog = "https://github.com/harfbuzz/harfbuzz/raw/${finalAttrs.version}/NEWS"; maintainers = [ maintainers.eelco ]; license = licenses.mit; platforms = platforms.unix ++ platforms.windows; diff --git a/pkgs/development/libraries/java/commons/compress/default.nix b/pkgs/development/libraries/java/commons/compress/default.nix index 7827c1788dca..4a226a22c4de 100644 --- a/pkgs/development/libraries/java/commons/compress/default.nix +++ b/pkgs/development/libraries/java/commons/compress/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchurl }: stdenv.mkDerivation rec { - version = "1.26.0"; + version = "1.26.1"; pname = "commons-compress"; src = fetchurl { url = "mirror://apache/commons/compress/binaries/${pname}-${version}-bin.tar.gz"; - sha256 = "sha256-AXdkqMrzTtURpPXKOmXxo0RnfFtflcDf6mmVmqVFz5k="; + sha256 = "sha256-PVZ4hltIprOeT3UEH3+xJ+TcZLekHV7cuw16rMmx/Rk="; }; installPhase = '' diff --git a/pkgs/development/libraries/java/commons/logging/default.nix b/pkgs/development/libraries/java/commons/logging/default.nix index 71832498c34a..085efc6e52b5 100644 --- a/pkgs/development/libraries/java/commons/logging/default.nix +++ b/pkgs/development/libraries/java/commons/logging/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "commons-logging"; - version = "1.2"; + version = "1.3.0"; src = fetchurl { url = "mirror://apache/commons/logging/binaries/commons-logging-${version}-bin.tar.gz"; - sha256 = "1gc70pmcv0x6ibl89jglmr22f8zpr63iaifi49nrq399qw2qhx9z"; + sha256 = "sha256-ij6jOi1Y/iQ/9Ht41nKtmOdZCvf0NmNseFGxBpyq1fg="; }; installPhase = '' diff --git a/pkgs/development/libraries/java/lombok/default.nix b/pkgs/development/libraries/java/lombok/default.nix index a2eca1ca9c23..f08c860f57f6 100644 --- a/pkgs/development/libraries/java/lombok/default.nix +++ b/pkgs/development/libraries/java/lombok/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "lombok"; - version = "1.18.30"; + version = "1.18.32"; src = fetchurl { url = "https://projectlombok.org/downloads/lombok-${version}.jar"; - sha256 = "sha256-1+4SLu4erutFGCqJ/zb8LdCGhY0bL1S2Fcb+97odYBI="; + sha256 = "sha256-l1dGdOKiX1Z6MTc2rOAN+Hh9RD3jFkB9V/yHfZ8Zpl0="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/development/libraries/libredwg/default.nix b/pkgs/development/libraries/libredwg/default.nix index 7759917d9750..6eb06a1ebe67 100644 --- a/pkgs/development/libraries/libredwg/default.nix +++ b/pkgs/development/libraries/libredwg/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , autoreconfHook , writeShellScript , pkg-config @@ -18,24 +17,16 @@ let in stdenv.mkDerivation rec { pname = "libredwg"; - version = "0.12.5.6313"; + version = "0.13.3"; src = fetchFromGitHub { owner = "LibreDWG"; repo = pname; rev = version; - hash = "sha256-TM+cZ7N5PD6UG9cvy0XFa0sNYc3apbAJvEMh3husjRk="; + hash = "sha256-FlBHwNsqVSBE8dTDewoKkCbs8Jd/4d69MPpEFzg6Ruc="; fetchSubmodules = true; }; - patches = [ - (fetchpatch { - name = "CVE-2023-26157.patch"; - url = "https://github.com/LibreDWG/libredwg/commit/c8cf03ce4c2315b146caf582ea061c0460193bcc.patch"; - hash = "sha256-EEF3YYPW+6SvXRiAw3zz6tWU9w/qmGtc09Tf8wn7hVc="; - }) - ]; - postPatch = let printVersion = writeShellScript "print-version" '' echo -n ${lib.escapeShellArg version} @@ -43,8 +34,6 @@ stdenv.mkDerivation rec { in '' # avoid git dependency cp ${printVersion} build-aux/git-version-gen - # failing to build otherwise since glibc-2.38 - sed '1i#include <string.h>' -i programs/dwg2SVG.c ''; preConfigure = lib.optionalString (stdenv.isDarwin && enablePython) '' @@ -64,8 +53,8 @@ stdenv.mkDerivation rec { # prevent python tests from running when not building with python configureFlags = lib.optional (!enablePython) "--disable-python"; - # example_r13.dxf roundtrip fail: expect 5286, got 5285 entities - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + # FAIL: alive.test + doCheck = !stdenv.isLinux; # the "xmlsuite" test requires the libxml2 c library as well as the python module nativeCheckInputs = lib.optionals enablePython [ libxml2 libxml2.dev ]; diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index 6b36dc03627e..e18bc6450206 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - doCheck = true; + doCheck = !stdenv.isDarwin; postInstall = glib.flattenInclude; diff --git a/pkgs/development/libraries/science/math/magma/generic.nix b/pkgs/development/libraries/science/math/magma/generic.nix index a2ccc2e1c5b5..757a1b77dafc 100644 --- a/pkgs/development/libraries/science/math/magma/generic.nix +++ b/pkgs/development/libraries/science/math/magma/generic.nix @@ -14,7 +14,7 @@ , fetchurl , gfortran , gpuTargets ? [ ] # Non-CUDA targets, that is HIP -, rocmPackages +, rocmPackages_5 , lapack , lib , libpthreadstubs @@ -44,6 +44,9 @@ let inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder; inherit (cudaFlags) cudaCapabilities; + # move to newer ROCm version once supported + rocmPackages = rocmPackages_5; + # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements # of the first list *from* the second list. That means: # lists.subtractLists a b = b - a diff --git a/pkgs/development/libraries/udns/default.nix b/pkgs/development/libraries/udns/default.nix index 518ed432b723..27b60937752c 100644 --- a/pkgs/development/libraries/udns/default.nix +++ b/pkgs/development/libraries/udns/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl }: # this expression is mostly based on debian's packaging -# https://tracker.debian.org/media/packages/u/udns/rules-0.4-1 +# https://tracker.debian.org/media/packages/u/udns/rules-0.5-1 stdenv.mkDerivation rec { pname = "udns"; - version = "0.4"; + version = "0.5"; configurePhase = "./configure --enable-ipv6"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://www.corpit.ru/mjt/udns/${pname}-${version}.tar.gz"; - sha256 = "0447fv1hmb44nnchdn6p5pd9b44x8p5jn0ahw6crwbqsg7f0hl8i"; + sha256 = "sha256-A1v8EuOBnQq6j0DugiCpdLfpspwyWdMQlwzEstHCA8A="; }; # udns uses a very custom build and hardcodes a .so name in a few places. diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix index 112aacf93e0e..76a07212c785 100644 --- a/pkgs/development/libraries/wolfssl/default.nix +++ b/pkgs/development/libraries/wolfssl/default.nix @@ -14,13 +14,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "wolfssl-${variant}"; - version = "5.6.6"; + version = "5.7.0"; src = fetchFromGitHub { owner = "wolfSSL"; repo = "wolfssl"; rev = "refs/tags/v${finalAttrs.version}-stable"; - hash = "sha256-HXl8GgngC1J8Dlt7fXBrVRa+IV7thVr+MIpeuf3Khcg="; + hash = "sha256-4j1GqeZJn5UWx56DjGjge05jlzBbIGn4IXxcaIBxON4="; }; postPatch = '' diff --git a/pkgs/development/libraries/zookeeper_mt/default.nix b/pkgs/development/libraries/zookeeper_mt/default.nix index ce539d9eb1c0..0d95e8f34b71 100644 --- a/pkgs/development/libraries/zookeeper_mt/default.nix +++ b/pkgs/development/libraries/zookeeper_mt/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz"; - hash = "sha512-V1SFPtSytFZMyiR/cgwLA9zPUK5xuarP3leQCQiSfelUHnYMB+R6ZQfSHMHD9t+URvLc+KRFSriLTzethspkpA=="; + hash = "sha512-G6Yw9HBF43QCw8FTLnJ7boCjUYwaQVQAT4wXqUowSlzox1cUPH5+8ZYMBxToJCbr0ppmz22t0uKsHRUI/IDAPQ=="; }; sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c"; diff --git a/pkgs/development/perl-modules/Tirex/default.nix b/pkgs/development/perl-modules/Tirex/default.nix new file mode 100644 index 000000000000..655610e898f2 --- /dev/null +++ b/pkgs/development/perl-modules/Tirex/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPerlPackage +, fetchFromGitHub +, fetchpatch +, GD +, IPCShareLite +, JSON +, LWP +, mapnik +, nix-update-script +}: + +buildPerlPackage rec { + pname = "Tirex"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "openstreetmap"; + repo = "tirex"; + rev = "refs/tags/v${version}"; + hash = "sha256-p2P19tifA/AvJatTzboyhtt7W1SwKJQzqpU4oDalfhU="; + }; + + patches = [ + # https://github.com/openstreetmap/tirex/pull/54 + (fetchpatch { + url = "https://github.com/openstreetmap/tirex/commit/da0c5db926bc0939c53dd902a969b689ccf9edde.patch"; + hash = "sha256-bnL1ZGy8ZNSZuCRbZn59qRVLg3TL0GjFYnhRKroeVO0="; + }) + ]; + + buildInputs = [ + GD + IPCShareLite + JSON + LWP + mapnik + ] ++ mapnik.buildInputs; + + installPhase = '' + install -m 755 -d $out/usr/libexec + make install DESTDIR=$out INSTALLOPTS="" + mv $out/$out/lib $out/$out/share $out + rmdir $out/$out $out/nix/store $out/nix + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Tools for running a map tile server"; + homepage = "https://wiki.openstreetmap.org/wiki/Tirex"; + maintainers = with lib.maintainers; [ jglukasik ]; + license = with lib.licenses; [ gpl2Only ]; + }; +} diff --git a/pkgs/development/python-modules/aiodhcpwatcher/default.nix b/pkgs/development/python-modules/aiodhcpwatcher/default.nix index 4ce243fbec38..b96e7eb29fbc 100644 --- a/pkgs/development/python-modules/aiodhcpwatcher/default.nix +++ b/pkgs/development/python-modules/aiodhcpwatcher/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "aiodhcpwatcher"; - version = "0.8.1"; + version = "0.8.2"; pyproject = true; src = fetchFromGitHub { owner = "bdraco"; repo = "aiodhcpwatcher"; rev = "v${version}"; - hash = "sha256-t0roU91WblymcY69ieRq9zjlCq+gdJ0eDCkIoNQNjsc="; + hash = "sha256-yvmCp8luR26yFYun/YY/tt+peaAL4nOR9cC6lpMiJhk="; }; postPatch = '' diff --git a/pkgs/development/python-modules/aiooss2/default.nix b/pkgs/development/python-modules/aiooss2/default.nix index 2d30e0422ef3..0c1abce558a8 100644 --- a/pkgs/development/python-modules/aiooss2/default.nix +++ b/pkgs/development/python-modules/aiooss2/default.nix @@ -15,8 +15,8 @@ buildPythonPackage rec { pname = "aiooss2"; - version = "0.2.9"; - format = "pyproject"; + version = "0.2.10"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "karajan1001"; repo = "aiooss2"; rev = "refs/tags/${version}"; - hash = "sha256-LdH04pRioxpHY1amRO90l9l5540IsDxmQcrEUVSq8dk="; + hash = "sha256-xlbOLqillSpN6DHYn7bqTL7qMlicYCXGxO30Z/tiKJY="; }; pythonRelaxDeps = [ @@ -32,13 +32,13 @@ buildPythonPackage rec { "oss2" ]; - nativeBuildInputs = [ + build-system = [ pythonRelaxDepsHook setuptools setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp oss2 ]; diff --git a/pkgs/development/python-modules/aiopinboard/default.nix b/pkgs/development/python-modules/aiopinboard/default.nix new file mode 100644 index 000000000000..33d4d82ea218 --- /dev/null +++ b/pkgs/development/python-modules/aiopinboard/default.nix @@ -0,0 +1,60 @@ +{ lib +, aiohttp +, aresponses +, arrow +, buildPythonPackage +, certifi +, fetchFromGitHub +, frozenlist +, poetry-core +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "aiopinboard"; + version = "2024.01.0"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = "aiopinboard"; + rev = "refs/tags/${version}"; + hash = "sha256-/N9r17e0ZvPmcqW/XtRyAENKCGRzWqeOSKPpWHHYomg="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + arrow + certifi + frozenlist + yarl + ]; + + nativeCheckInputs = [ + aresponses + pytest-aiohttp + pytestCheckHook + ]; + + + pythonImportsCheck = [ + "aiopinboard" + ]; + + meta = with lib; { + description = "Library to interact with the Pinboard API"; + homepage = "https://github.com/bachya/aiopinboard"; + changelog = "https://github.com/bachya/aiopinboard/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aiopvapi/default.nix b/pkgs/development/python-modules/aiopvapi/default.nix index d759a4db6a28..c39e5303c917 100644 --- a/pkgs/development/python-modules/aiopvapi/default.nix +++ b/pkgs/development/python-modules/aiopvapi/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "aiopvapi"; - version = "3.0.2"; + version = "3.1.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,14 +18,14 @@ buildPythonPackage rec { owner = "sander76"; repo = "aio-powerview-api"; rev = "refs/tags/v${version}"; - hash = "sha256-NfSGu4M0NWfCDc37zRwUjYtZz5jOtw3pYgF6fIsB/Yo="; + hash = "sha256-nJjYGPxpnbq/8XFmLKbMU71buFdaNUj7PQES5FnlN3o="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp ]; diff --git a/pkgs/development/python-modules/albumentations/default.nix b/pkgs/development/python-modules/albumentations/default.nix index 6b6d4d08f715..17e9c7fc7974 100644 --- a/pkgs/development/python-modules/albumentations/default.nix +++ b/pkgs/development/python-modules/albumentations/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "albumentations"; - version = "1.4.1"; + version = "1.4.2"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-VWxTqVi9Js5IT1RQWNdVr1XbE6gLiu9pRrh63LOKVUU="; + hash = "sha256-lznWLJocXdfwnhAZ33V5ZdlFCAsNa0u/rjfkjmHBQOg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-python-commons-test/default.nix b/pkgs/development/python-modules/allure-python-commons-test/default.nix index f023cbb3a429..52a38b647a69 100644 --- a/pkgs/development/python-modules/allure-python-commons-test/default.nix +++ b/pkgs/development/python-modules/allure-python-commons-test/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "allure-python-commons-test"; - version = "2.13.2"; + version = "2.13.3"; format = "setuptools"; disabled = pythonOlder "3.4"; src = fetchPypi { inherit pname version; - hash = "sha256-Xh6NtqiuTg7UxKqJ7/p45rCUQGWiGDEaNAslzeYtgfg="; + hash = "sha256-DGPxOoUGecpqKugrVR9iAa1VCBoInzUGTEY4GQB13SE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/argilla/default.nix b/pkgs/development/python-modules/argilla/default.nix index 0057b9b2f894..f4886e311f85 100644 --- a/pkgs/development/python-modules/argilla/default.nix +++ b/pkgs/development/python-modules/argilla/default.nix @@ -65,7 +65,7 @@ }: let pname = "argilla"; - version = "1.25.0"; + version = "1.26.0"; optional-dependencies = { server = [ fastapi @@ -126,7 +126,7 @@ buildPythonPackage { owner = "argilla-io"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-KU67tu14pX1nCRl9k/Na9EqelO3Uz7It1dpFBU2IjZA="; + hash = "sha256-+8oN3afbpBQU2tRb2Oq12IlmoCg4O1LUHtt4hl2FOEI="; }; pythonRelaxDeps = [ diff --git a/pkgs/development/python-modules/asdf-transform-schemas/default.nix b/pkgs/development/python-modules/asdf-transform-schemas/default.nix index d00e43e756a3..7adc1705569e 100644 --- a/pkgs/development/python-modules/asdf-transform-schemas/default.nix +++ b/pkgs/development/python-modules/asdf-transform-schemas/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "asdf-transform-schemas"; - version = "0.4.0"; + version = "0.5.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -17,14 +17,14 @@ buildPythonPackage rec { src = fetchPypi { pname = "asdf_transform_schemas"; inherit version; - hash = "sha256-3n/cP+41+5V/wylXh3oOnX3U0uhRvWMaclnxHCvSlMo="; + hash = "sha256-gs9MeCV1c0qJUyfyX/WDzpSZ1+K4Nv6IgLLXlhxrRis="; }; - nativeBuildInputs = [ + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ asdf-standard ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources diff --git a/pkgs/development/python-modules/asf-search/default.nix b/pkgs/development/python-modules/asf-search/default.nix index 8ce547ee08d8..e454101b2512 100644 --- a/pkgs/development/python-modules/asf-search/default.nix +++ b/pkgs/development/python-modules/asf-search/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "asf-search"; - version = "7.0.6"; + version = "7.0.7"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "asfadmin"; repo = "Discovery-asf_search"; rev = "refs/tags/v${version}"; - hash = "sha256-mumnr3jeiinSLagBfYuMVcdUcM5HkUPD8iwvu9YychA="; + hash = "sha256-4DqZGDg9VZsBWaVb3WpAegZVW1lk/5f9AR5Gxgik1gQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/aws-lambda-builders/default.nix b/pkgs/development/python-modules/aws-lambda-builders/default.nix index 341c66620c39..1119435b48c2 100644 --- a/pkgs/development/python-modules/aws-lambda-builders/default.nix +++ b/pkgs/development/python-modules/aws-lambda-builders/default.nix @@ -7,15 +7,16 @@ , pyelftools , pytestCheckHook , pythonOlder +, setuptools , six }: buildPythonPackage rec { pname = "aws-lambda-builders"; version = "1.47.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "awslabs"; @@ -26,10 +27,14 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "version=read_version()," 'version="${version}",' + --replace-fail "version=read_version()," 'version="${version}",' ''; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ six ]; @@ -57,11 +62,17 @@ buildPythonPackage rec { "TestPythonPipWorkflow" "TestRubyWorkflow" "TestRustCargo" + "test_with_mocks" # Tests which are passing locally but not on Hydra "test_copy_dependencies_action_1_multiple_files" "test_move_dependencies_action_1_multiple_files" ]; + disabledTestPaths = [ + # Dotnet binary needed + "tests/integration/workflows/dotnet_clipackage/test_dotnet.py" + ]; + pythonImportsCheck = [ "aws_lambda_builders" ]; diff --git a/pkgs/development/python-modules/axis/default.nix b/pkgs/development/python-modules/axis/default.nix index 09303d3ad048..4f9e456de6aa 100644 --- a/pkgs/development/python-modules/axis/default.nix +++ b/pkgs/development/python-modules/axis/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "axis"; - version = "56"; + version = "58"; pyproject = true; disabled = pythonOlder "3.11"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "Kane610"; repo = "axis"; rev = "refs/tags/v${version}"; - hash = "sha256-vHdLDqNCErP5Wf9HYJP0X2S3mFbXB7ouBxoKwBtfVL4="; + hash = "sha256-6Mxthf37PtJSWsi+Ok0zBezTJLPwVoc8S1ZdQE57BEI="; }; postPatch = '' @@ -31,11 +31,11 @@ buildPythonPackage rec { --replace-fail "wheel==0.40.0" "wheel" ''; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ async-timeout attrs httpx diff --git a/pkgs/development/python-modules/bluecurrent-api/default.nix b/pkgs/development/python-modules/bluecurrent-api/default.nix index 7873cb62696a..26c631706a17 100644 --- a/pkgs/development/python-modules/bluecurrent-api/default.nix +++ b/pkgs/development/python-modules/bluecurrent-api/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , pythonOlder , fetchPypi -, pythonRelaxDepsHook , setuptools , pytz , websockets @@ -13,26 +12,21 @@ buildPythonPackage rec { pname = "bluecurrent-api"; - version = "1.2.1"; + version = "1.2.3"; pyproject = true; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.11"; src = fetchPypi { inherit pname version; - hash = "sha256-vr6mehGRXHW+fP2luLpD14igCdIgJI5NXzaa+bEife0="; + hash = "sha256-mWRTSMS68+J1Z4PYOFF/UvofSqV1wv0gjiTACEWDfNg="; }; - nativeBuildInputs = [ - pythonRelaxDepsHook + build-system = [ setuptools ]; - pythonRemoveDeps = [ - "asyncio" - ]; - - propagatedBuildInputs = [ + dependencies = [ pytz websockets ]; diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix index 2c20e8ff7fb7..f82da30ff50f 100644 --- a/pkgs/development/python-modules/borb/default.nix +++ b/pkgs/development/python-modules/borb/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "borb"; - version = "2.1.21"; + version = "2.1.22"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-gnsPsvchvcUlWwmhDIazuc8/83ZRKc29VKhIDFSoFlE="; + hash = "sha256-T+uSq/KF3p4zJJhQeompJIJ6BWhYFK9Ko9w0sZFtFhE="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/boto3-stubs/default.nix b/pkgs/development/python-modules/boto3-stubs/default.nix index dd2eaf5d78f5..a3d2f9a99e62 100644 --- a/pkgs/development/python-modules/boto3-stubs/default.nix +++ b/pkgs/development/python-modules/boto3-stubs/default.nix @@ -365,14 +365,14 @@ buildPythonPackage rec { pname = "boto3-stubs"; - version = "1.34.67"; + version = "1.34.69"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ClKKx4AgcKf5VSSCufiQn3MzxqNIq2he0UQH872kK+Q="; + hash = "sha256-k/tPhkDNAacOnTyUOVxn+2GX9eZiPS858YNXtbmtvfw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/botocore-stubs/default.nix b/pkgs/development/python-modules/botocore-stubs/default.nix index 8a07d01a7a09..5b2d19b7e463 100644 --- a/pkgs/development/python-modules/botocore-stubs/default.nix +++ b/pkgs/development/python-modules/botocore-stubs/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "botocore-stubs"; - version = "1.34.67"; + version = "1.34.69"; pyproject = true; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "botocore_stubs"; inherit version; - hash = "sha256-ventoBzkmDwt3pQ68lRo6lb2dxUapTOqo5du41xuN7c="; + hash = "sha256-RjJI/R1ue2igxXvddY0Exr0MXCw7+oGv351k8JMLWbw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dbf/default.nix b/pkgs/development/python-modules/dbf/default.nix index 7858cf4a4ef6..eb64e3795937 100644 --- a/pkgs/development/python-modules/dbf/default.nix +++ b/pkgs/development/python-modules/dbf/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { ]; checkPhase = '' - ${python.interpreter} dbf/test.py + ${python.interpreter} -m dbf.test ''; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/dbt-semantic-interfaces/default.nix b/pkgs/development/python-modules/dbt-semantic-interfaces/default.nix index a51cb07f099c..894dbed29f26 100644 --- a/pkgs/development/python-modules/dbt-semantic-interfaces/default.nix +++ b/pkgs/development/python-modules/dbt-semantic-interfaces/default.nix @@ -5,6 +5,7 @@ , dbt-postgres , fetchFromGitHub , hatchling +, pythonRelaxDepsHook , hypothesis , importlib-metadata , jinja2 @@ -31,8 +32,13 @@ buildPythonPackage rec { hash = "sha256-uvwcnOKjwxEmA+/QRGSRofpoE4jZzmE02mGSDLINrJw="; }; + pythonRelaxDeps = [ + "importlib-metadata" + ]; + nativeBuildInputs = [ hatchling + pythonRelaxDepsHook ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/demoji/default.nix b/pkgs/development/python-modules/demoji/default.nix new file mode 100644 index 000000000000..f8ce40a77de1 --- /dev/null +++ b/pkgs/development/python-modules/demoji/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pythonOlder +, pytestCheckHook +, ujson +}: + +buildPythonPackage rec { + pname = "demoji"; + version = "1.1.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "bsolomon1124"; + repo = "demoji"; + rev = "refs/tags/v${version}"; + hash = "sha256-ojy4JiM6xvP9J40Z5uFCMUZvZtLZ1le2p/2/NfAUAtk="; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace-fail "pytest-runner" "" + ''; + + build-system = [ + setuptools + ]; + + passthru.optional-dependencies = { + ujson = [ + ujson + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "demoji" + ]; + + meta = with lib; { + description = "Module to find/replace/remove emojis in text strings"; + homepage = "https://github.com/bsolomon1124/demoji"; + changelog = "https://github.com/bsolomon1124/demoji/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/diffusers/default.nix b/pkgs/development/python-modules/diffusers/default.nix index 4580f8b10ab7..39464efe47fd 100644 --- a/pkgs/development/python-modules/diffusers/default.nix +++ b/pkgs/development/python-modules/diffusers/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { pname = "diffusers"; - version = "0.27.1"; + version = "0.27.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -48,7 +48,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = "diffusers"; rev = "refs/tags/v${version}"; - hash = "sha256-GwFibsxMhWqirFn5cG9GfDZAtVWRx+BCqDBiQV6wuYU="; + hash = "sha256-aRnbU3jN40xaCsoMFyRt1XB+hyIYMJP2b/T1yZho90c="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dirigera/default.nix b/pkgs/development/python-modules/dirigera/default.nix index fdbb4863293b..a2856ba209ea 100644 --- a/pkgs/development/python-modules/dirigera/default.nix +++ b/pkgs/development/python-modules/dirigera/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "dirigera"; - version = "1.0.10"; + version = "1.0.11"; pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "Leggin"; repo = "dirigera"; rev = "refs/tags/v${version}"; - hash = "sha256-FuytNb+AiimKZPhX7qaxKvM4Y9NofvrzMGLW1PPu3Cw="; + hash = "sha256-kZlmfoGbvSv13+UqCE73ToLfrzzQ9AOxefRTxUvxMCg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dploot/default.nix b/pkgs/development/python-modules/dploot/default.nix index 0bfddf7d8588..ece3ef403a04 100644 --- a/pkgs/development/python-modules/dploot/default.nix +++ b/pkgs/development/python-modules/dploot/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "dploot"; - version = "2.6.0"; + version = "2.6.2"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-3PxPlN3jZglGFg6rHD1GIl+kUpUe/Fp1Zqcd/OEthLE="; + hash = "sha256-Fko8zsIjVG1Cmeiect239HGCStJ8VccGTE102cTIr58="; }; pythonRelaxDeps = true; diff --git a/pkgs/development/python-modules/dtschema/default.nix b/pkgs/development/python-modules/dtschema/default.nix index cb4fa7fcdf47..4647dbbb3002 100644 --- a/pkgs/development/python-modules/dtschema/default.nix +++ b/pkgs/development/python-modules/dtschema/default.nix @@ -12,8 +12,8 @@ buildPythonPackage rec { pname = "dtschema"; - version = "2023.04"; - format = "setuptools"; + version = "2024.02"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "devicetree-org"; repo = "dt-schema"; rev = "refs/tags/v${version}"; - sha256 = "sha256-w9TsRdiDTdExft7rdb2hYcvxP6hxOFZKI3hITiNSwgw="; + sha256 = "sha256-UJU8b9BzuuUSHRjnA6hOd1bMPNOlk4LNtrQV5aZmGhI="; }; patches = [ diff --git a/pkgs/development/python-modules/dtschema/fix_libfdt_name.patch b/pkgs/development/python-modules/dtschema/fix_libfdt_name.patch index eb1ec34a95d6..093b13023fb3 100644 --- a/pkgs/development/python-modules/dtschema/fix_libfdt_name.patch +++ b/pkgs/development/python-modules/dtschema/fix_libfdt_name.patch @@ -1,13 +1,13 @@ -diff --git a/setup.py b/setup.py -index 62db8af..4a980c1 100755 ---- a/setup.py -+++ b/setup.py -@@ -52,7 +52,7 @@ setuptools.setup( - 'ruamel.yaml>0.15.69', - 'jsonschema>=4.1.2', - 'rfc3987', -- 'pylibfdt', -+ 'libfdt', - ], +diff --git a/pyproject.toml b/pyproject.toml +index 2192a68..6a7ba95 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -27,7 +27,7 @@ dependencies = [ + "ruamel.yaml>0.15.69", + "jsonschema>=4.1.2,<4.18", + "rfc3987", +- "pylibfdt", ++ "libfdt", + ] - classifiers=[ + [project.scripts] diff --git a/pkgs/development/python-modules/dvc-data/default.nix b/pkgs/development/python-modules/dvc-data/default.nix index b589a77ad940..d4a9573f9a9b 100644 --- a/pkgs/development/python-modules/dvc-data/default.nix +++ b/pkgs/development/python-modules/dvc-data/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "dvc-data"; - version = "3.14.1"; + version = "3.15.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "iterative"; repo = "dvc-data"; rev = "refs/tags/${version}"; - hash = "sha256-El61CO+1FtSUERiE6Cb1fH+TtKzr+UvdPXknYncDWhs="; + hash = "sha256-pr5RtVlGKKtpcmmCNGqcLiBFzJcajpqtPjBbzeCCHF8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dvc/default.nix b/pkgs/development/python-modules/dvc/default.nix index 2189c2a75523..885e4915d1af 100644 --- a/pkgs/development/python-modules/dvc/default.nix +++ b/pkgs/development/python-modules/dvc/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { pname = "dvc"; - version = "3.48.3"; + version = "3.48.4"; pyproject = true; disabled = pythonOlder "3.8"; @@ -66,7 +66,7 @@ buildPythonPackage rec { owner = "iterative"; repo = "dvc"; rev = "refs/tags/${version}"; - hash = "sha256-NY3fwo7063hrgYK0a7/PLlPORxhqGgowNtLWo/CN+PY="; + hash = "sha256-vO+i0BU8mQuLfgb1rcGRmlb8gpHsRxgdwuJHRERA4Pw="; }; pythonRelaxDeps = [ diff --git a/pkgs/development/python-modules/dvclive/default.nix b/pkgs/development/python-modules/dvclive/default.nix index f233461939c5..7090433431a9 100644 --- a/pkgs/development/python-modules/dvclive/default.nix +++ b/pkgs/development/python-modules/dvclive/default.nix @@ -32,23 +32,23 @@ buildPythonPackage rec { pname = "dvclive"; - version = "3.44.0"; + version = "3.45.0"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "iterative"; - repo = pname; + repo = "dvclive"; rev = "refs/tags/${version}"; - hash = "sha256-B5SH6Id3ZbiE/0g6RBYvES4Ao+uOHWMKB56J3Rn9p6s="; + hash = "sha256-76PjBPr3m1y5osW024dkhuvuXl2FiZ5oxlJ1Ucq8msI="; }; - nativeBuildInputs = [ + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ dvc dvc-render dvc-studio-client diff --git a/pkgs/development/python-modules/editdistpy/default.nix b/pkgs/development/python-modules/editdistpy/default.nix index 5c86f3773bff..a785e1b05b67 100644 --- a/pkgs/development/python-modules/editdistpy/default.nix +++ b/pkgs/development/python-modules/editdistpy/default.nix @@ -2,10 +2,16 @@ , buildPythonPackage , fetchFromGitHub +, pytestCheckHook + , pythonOlder , setuptools , cython_3 + +, symspellpy +, numpy +, editdistpy }: buildPythonPackage rec { @@ -27,9 +33,27 @@ buildPythonPackage rec { cython_3 ]; - # for tests need symspellpy package, symspellpy is not in nixpkgs... + # error: infinite recursion encountered doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + symspellpy + numpy + ]; + + preCheck = '' + rm -r editdistpy + ''; + + passthru.tests = { + check = editdistpy.overridePythonAttrs ( + _: { + doCheck = true; + } + ); + }; + pythonImportsCheck = [ "editdistpy" ]; diff --git a/pkgs/development/python-modules/energyflow/default.nix b/pkgs/development/python-modules/energyflow/default.nix index 41657d403018..7308d0289023 100644 --- a/pkgs/development/python-modules/energyflow/default.nix +++ b/pkgs/development/python-modules/energyflow/default.nix @@ -10,13 +10,13 @@ buildPythonPackage rec { pname = "energyflow"; - version = "1.3.2"; + version = "1.3.3"; src = fetchFromGitHub { owner = "pkomiske"; repo = "EnergyFlow"; - rev = "v${version}"; - hash = "sha256-fjT8c0ZTjdufP334upPzRVdTJDIBs84I7PkFu4CMcQw="; + rev = "refs/tags/v${version}"; + hash = "sha256-Ioyk0IpyxcDdL2+3zkUa6yydavyphoh4do7GCz5nG60="; }; postPatch = '' diff --git a/pkgs/development/python-modules/flask-migrate/default.nix b/pkgs/development/python-modules/flask-migrate/default.nix index a7a5da621630..804eed53ab04 100644 --- a/pkgs/development/python-modules/flask-migrate/default.nix +++ b/pkgs/development/python-modules/flask-migrate/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "flask-migrate"; - version = "4.0.5"; + version = "4.0.7"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "miguelgrinberg"; repo = "Flask-Migrate"; rev = "refs/tags/v${version}"; - hash = "sha256-fdnoX7ypTpH2mQ+7Xuhzdh706Of7PIVhHQGVbe0jv1s="; + hash = "sha256-TnihrZ+JQ1XCBlFp6k8lrNpZr4P2/Z6AmFwWZbabz+8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/flask-session-captcha/default.nix b/pkgs/development/python-modules/flask-session-captcha/default.nix index c70a6baf7e6a..539fd49c613b 100644 --- a/pkgs/development/python-modules/flask-session-captcha/default.nix +++ b/pkgs/development/python-modules/flask-session-captcha/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "flask-session-captcha"; - version = "1.4.0"; + version = "1.4.1"; pyproject = true; src = fetchFromGitHub { owner = "Tethik"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-eLdpLw1I4t9H0ek3AR9Cteb7Gfxo/LepM287p34Zw3s="; + hash = "sha256-0g8nnnmTfcb9VqrtJ6kkfCFm+AYVrPZNWUPNQSjVTgQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/githubkit/default.nix b/pkgs/development/python-modules/githubkit/default.nix index 081d8786cd42..ad737eb7b3bc 100644 --- a/pkgs/development/python-modules/githubkit/default.nix +++ b/pkgs/development/python-modules/githubkit/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "githubkit"; - version = "0.11.2"; + version = "0.11.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "yanyongyu"; repo = "githubkit"; rev = "refs/tags/v${version}"; - hash = "sha256-/xFBA30MZq8t0rYFympzgaymqZ/bFEpOoko7dDJLI7A="; + hash = "sha256-GRuEzRqDfhLCanuQnCkMXmDnfNkLFb35Gixl9pWmA8w="; }; pythonRelaxDeps = [ @@ -34,15 +34,15 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace "--cov=githubkit --cov-append --cov-report=term-missing" "" + --replace-fail "--cov=githubkit --cov-append --cov-report=term-missing" "" ''; - nativeBuildInputs = [ + build-systems = [ poetry-core pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ hishel httpx pydantic diff --git a/pkgs/development/python-modules/google-cloud-asset/default.nix b/pkgs/development/python-modules/google-cloud-asset/default.nix index 9adf04e4344f..ab3466c621c7 100644 --- a/pkgs/development/python-modules/google-cloud-asset/default.nix +++ b/pkgs/development/python-modules/google-cloud-asset/default.nix @@ -19,21 +19,21 @@ buildPythonPackage rec { pname = "google-cloud-asset"; - version = "3.25.0"; + version = "3.25.1"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-JiPKFOew9Pd2NuY7wDlFQ/N06m9IRutWO+d/YJspry0="; + hash = "sha256-xKiqk55Ccm6DaB2aG5xo08nVqL69q8hvro+BPaY0/m4="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ grpc-google-iam-v1 google-api-core google-cloud-access-context-manager diff --git a/pkgs/development/python-modules/google-cloud-container/default.nix b/pkgs/development/python-modules/google-cloud-container/default.nix index c30f659da4b9..0125fbe66c12 100644 --- a/pkgs/development/python-modules/google-cloud-container/default.nix +++ b/pkgs/development/python-modules/google-cloud-container/default.nix @@ -14,21 +14,21 @@ buildPythonPackage rec { pname = "google-cloud-container"; - version = "2.43.0"; + version = "2.44.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-RfGhQv1wr5fMMHleMamwSKQ2opv3nppGSvUe4UdFiT0="; + hash = "sha256-heNvRcepXqayn/impyP5h4L+eOJjGV1hMrZyg96aZKU="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-api-core libcst proto-plus diff --git a/pkgs/development/python-modules/google-cloud-datacatalog/default.nix b/pkgs/development/python-modules/google-cloud-datacatalog/default.nix index 17f57f943099..4248a857bb48 100644 --- a/pkgs/development/python-modules/google-cloud-datacatalog/default.nix +++ b/pkgs/development/python-modules/google-cloud-datacatalog/default.nix @@ -15,21 +15,21 @@ buildPythonPackage rec { pname = "google-cloud-datacatalog"; - version = "3.18.3"; + version = "3.19.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-d4MTAZgseV5iI83A7lSkbe/SEgX9ZfQ0pLHfYBStfp4="; + hash = "sha256-Oo0O94fw7dRwPn4nyRobX4W9vgTWFgkTLsdyaffVJpI="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-api-core grpc-google-iam-v1 libcst diff --git a/pkgs/development/python-modules/google-cloud-netapp/default.nix b/pkgs/development/python-modules/google-cloud-netapp/default.nix index 902593045eb4..6f9162b757a7 100644 --- a/pkgs/development/python-modules/google-cloud-netapp/default.nix +++ b/pkgs/development/python-modules/google-cloud-netapp/default.nix @@ -14,21 +14,21 @@ buildPythonPackage rec { pname = "google-cloud-netapp"; - version = "0.3.8"; + version = "0.3.9"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-va5Ql8GPMLszgjjSkI6am6IGQnEqvi+YSBcTFeu254U="; + hash = "sha256-Vohliy9W+fkY4YmSIvw6WiWVlLBk+Fo9CvZG/VKeU1o="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-api-core google-auth proto-plus diff --git a/pkgs/development/python-modules/google-cloud-pubsub/default.nix b/pkgs/development/python-modules/google-cloud-pubsub/default.nix index 4cb37332c09c..c4517465a55c 100644 --- a/pkgs/development/python-modules/google-cloud-pubsub/default.nix +++ b/pkgs/development/python-modules/google-cloud-pubsub/default.nix @@ -17,21 +17,21 @@ buildPythonPackage rec { pname = "google-cloud-pubsub"; - version = "2.20.2"; + version = "2.20.3"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-I2BG6oYCMMeI5NTqLQ8SKZzfHZSscexC7RoM4boo1m8="; + hash = "sha256-dq8PF5UJ5DHSu+P1H0JiVng9yVm49FjBNwyxnW974LE="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-api-core grpc-google-iam-v1 grpcio diff --git a/pkgs/development/python-modules/google-cloud-secret-manager/default.nix b/pkgs/development/python-modules/google-cloud-secret-manager/default.nix index 69009eb54678..e3e5939e1b60 100644 --- a/pkgs/development/python-modules/google-cloud-secret-manager/default.nix +++ b/pkgs/development/python-modules/google-cloud-secret-manager/default.nix @@ -13,21 +13,21 @@ buildPythonPackage rec { pname = "google-cloud-secret-manager"; - version = "2.18.3"; + version = "2.19.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-HbL0CTJFNuNPmFCB04njl0yjo2aN94RcrQvgOrjA+n0="; + hash = "sha256-u5GENYNaFOuUeF9NTZCHvc8bbeMGQy1+2qfWLn94DDA="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-api-core grpc-google-iam-v1 proto-plus diff --git a/pkgs/development/python-modules/google-generativeai/default.nix b/pkgs/development/python-modules/google-generativeai/default.nix index f51df97381ee..dfcc2e06034a 100644 --- a/pkgs/development/python-modules/google-generativeai/default.nix +++ b/pkgs/development/python-modules/google-generativeai/default.nix @@ -8,14 +8,15 @@ , pythonOlder , pythonRelaxDepsHook , pydantic +, setuptools , tqdm , typing-extensions }: buildPythonPackage rec { pname = "google-generativeai"; - version = "0.4.0"; - format = "setuptools"; + version = "0.4.1"; + pyproject = true; disabled = pythonOlder "3.9"; @@ -23,18 +24,19 @@ buildPythonPackage rec { owner = "google"; repo = "generative-ai-python"; rev = "refs/tags/v${version}"; - hash = "sha256-SrWAjvSqfHGMOe1hM0R4CBTOn+NsQtzR6b0hVn75LqY="; + hash = "sha256-+PRsxwy8Um6wCku9s7h8ERKEhcFsomEYAwYg+vpAGyg="; }; pythonRelaxDeps = [ "google-ai-generativelanguage" ]; - nativeBuildInputs = [ + build-system = [ pythonRelaxDepsHook + setuptools ]; - propagatedBuildInputs = [ + dependencies = [ google-ai-generativelanguage google-auth google-api-core diff --git a/pkgs/development/python-modules/gto/default.nix b/pkgs/development/python-modules/gto/default.nix index 35653c3f0291..79347e1ce3d8 100644 --- a/pkgs/development/python-modules/gto/default.nix +++ b/pkgs/development/python-modules/gto/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "gto"; - version = "1.7.0"; + version = "1.7.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -32,14 +32,14 @@ buildPythonPackage rec { owner = "iterative"; repo = "gto"; rev = "refs/tags/${version}"; - hash = "sha256-dovCItMhPKRSPfbTzM5dbz8hdygqrLdUi6gS4+G10ks="; + hash = "sha256-fUi+/PW05EvgTnoEv1Im1BjZ07VzpZhyW0EjhLUqJGI="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace ', "setuptools_scm_git_archive==1.4.1"' "" + --replace-fail ', "setuptools_scm_git_archive==1.4.1"' "" substituteInPlace setup.cfg \ - --replace " --cov=gto --cov-report=term-missing --cov-report=xml" "" + --replace-fail " --cov=gto --cov-report=term-missing --cov-report=xml" "" ''; nativeBuildInputs = [ @@ -88,10 +88,10 @@ buildPythonPackage rec { meta = with lib; { description = "Module for Git Tag Operations"; - mainProgram = "gto"; homepage = "https://github.com/iterative/gto"; changelog = "https://github.com/iterative/gto/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; + mainProgram = "gto"; }; } diff --git a/pkgs/development/python-modules/gymnasium/default.nix b/pkgs/development/python-modules/gymnasium/default.nix index 6e9e33913fb7..ca7ba30927ab 100644 --- a/pkgs/development/python-modules/gymnasium/default.nix +++ b/pkgs/development/python-modules/gymnasium/default.nix @@ -20,6 +20,7 @@ , pygame , pytestCheckHook , scipy +, stdenv }: buildPythonPackage rec { @@ -60,6 +61,12 @@ buildPythonPackage rec { scipy ]; + # if `doCheck = true` on Darwin, `jaxlib` is evaluated, which is both + # marked as broken and throws an error during evaluation if the package is evaluated anyway. + # disabling checks on Darwin avoids this and allows the package to be built. + # if jaxlib is ever fixed on Darwin, remove this. + doCheck = !stdenv.isDarwin; + disabledTestPaths = [ # mujoco is required for those tests but the mujoco python bindings are not packaged in nixpkgs. "tests/envs/mujoco/test_mujoco_custom_env.py" diff --git a/pkgs/development/python-modules/hass-nabucasa/default.nix b/pkgs/development/python-modules/hass-nabucasa/default.nix index c7d916bbf45f..9ee4c0e3f968 100644 --- a/pkgs/development/python-modules/hass-nabucasa/default.nix +++ b/pkgs/development/python-modules/hass-nabucasa/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "hass-nabucasa"; - version = "0.78.0-unstable-2024-03-09"; + version = "0.79.0"; pyproject = true; disabled = pythonOlder "3.11"; @@ -30,8 +30,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "nabucasa"; repo = "hass-nabucasa"; - rev = "f4c189fa388aa7a76ebd0d88e73f7e9421088d8f"; - hash = "sha256-UU/vsHclA8UeciC3YiPG9M/dXu6MnAxO5ElGAo5c6EA="; + rev = "refs/tags/${version}"; + hash = "sha256-7VhafefF7imvnhdFo6K+18h5kmXvIatKerJ+Qn5zwdQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/hologram/default.nix b/pkgs/development/python-modules/hologram/default.nix index 005834fc99b8..30f50456bad9 100644 --- a/pkgs/development/python-modules/hologram/default.nix +++ b/pkgs/development/python-modules/hologram/default.nix @@ -5,6 +5,7 @@ , jsonschema , pytestCheckHook , python-dateutil +, pythonRelaxDepsHook , setuptools , wheel }: @@ -31,6 +32,7 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ + pythonRelaxDepsHook setuptools wheel ]; @@ -44,6 +46,10 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonRelaxDeps = [ + "python-dateutil" + ]; + pythonImportsCheck = [ "hologram" ]; diff --git a/pkgs/development/python-modules/html2text/default.nix b/pkgs/development/python-modules/html2text/default.nix index 2d814e4ebfac..bda7879eab0a 100644 --- a/pkgs/development/python-modules/html2text/default.nix +++ b/pkgs/development/python-modules/html2text/default.nix @@ -3,29 +3,36 @@ , fetchFromGitHub , pythonOlder , pytestCheckHook +, setuptools }: buildPythonPackage rec { pname = "html2text"; version = "2024.2.26"; - format = "setuptools"; - disabled = pythonOlder "3.5"; + pyproject = true; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "Alir3z4"; - repo = pname; + repo = "html2text"; rev = "refs/tags/${version}"; sha256 = "sha256-1CLkTFR+/XQ428WjMF7wliyAG6CB+n8JSsLDdLHPO7I="; }; + nativeBuildInputs = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "html2text" ]; meta = with lib; { + changelog = "https://github.com/Alir3z4/html2text/blob/${src.rev}/ChangeLog.rst"; description = "Turn HTML into equivalent Markdown-structured text"; - mainProgram = "html2text"; homepage = "https://github.com/Alir3z4/html2text/"; license = licenses.gpl3Only; + mainProgram = "html2text"; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/hyperscan/default.nix b/pkgs/development/python-modules/hyperscan/default.nix index 51ea23baf4a2..0d568e15f25b 100644 --- a/pkgs/development/python-modules/hyperscan/default.nix +++ b/pkgs/development/python-modules/hyperscan/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "hyperscan"; - version = "0.7.0"; + version = "0.7.7"; pyproject = true; src = fetchFromGitHub { owner = "darvid"; repo = "python-hyperscan"; rev = "refs/tags/v${version}"; - hash = "sha256-XIsYBu2YPbSIZGIhJjPap1ymg7cr0+ozwZtpOj8GFm8="; + hash = "sha256-TNiGh89SnGi0WAqfYudsj7GaVhOifi8ZcmTrMtVbk+c="; }; buildInputs = [ diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix index 998510ec8162..2c99b43f9487 100644 --- a/pkgs/development/python-modules/hypothesis/default.nix +++ b/pkgs/development/python-modules/hypothesis/default.nix @@ -79,6 +79,14 @@ buildPythonPackage rec { "tests/cover" ]; + disabledTests = if (pythonOlder "3.10") then [ + # not sure why these tests fail with only 3.9 + # FileNotFoundError: [Errno 2] No such file or directory: 'git' + "test_observability" + "test_assume_has_status_reason" + "test_observability_captures_stateful_reprs" + ] else null; + pythonImportsCheck = [ "hypothesis" ]; diff --git a/pkgs/development/python-modules/jedi-language-server/default.nix b/pkgs/development/python-modules/jedi-language-server/default.nix index 1803138aabdc..fdc1d1a5a9b1 100644 --- a/pkgs/development/python-modules/jedi-language-server/default.nix +++ b/pkgs/development/python-modules/jedi-language-server/default.nix @@ -11,12 +11,11 @@ , pytestCheckHook , python-lsp-jsonrpc , pythonOlder -, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "jedi-language-server"; - version = "0.41.1-unstable-2023-10-04"; + version = "0.41.3"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -24,17 +23,12 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "pappasam"; repo = pname; - rev = "c4c470cff67e54593a626b22d1b6b05e56fde3a3"; - hash = "sha256-qFBni97B/GkabbznnZtWTG4dCHFkOx5UQjuevxq+Uvo="; + rev = "v${version}"; + hash = "sha256-+k4WOoEbVe7mlPyPj0ttBM+kmjq8V739yHi36BDYK2U="; }; - pythonRelaxDeps = [ - "pygls" - ]; - nativeBuildInputs = [ poetry-core - pythonRelaxDepsHook ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/jsonargparse/default.nix b/pkgs/development/python-modules/jsonargparse/default.nix index 04b290ff5507..55cf2a95d773 100644 --- a/pkgs/development/python-modules/jsonargparse/default.nix +++ b/pkgs/development/python-modules/jsonargparse/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { pname = "jsonargparse"; - version = "4.27.6"; + version = "4.27.7"; pyproject = true; disabled = pythonOlder "3.11"; @@ -34,7 +34,7 @@ buildPythonPackage rec { owner = "omni-us"; repo = "jsonargparse"; rev = "refs/tags/v${version}"; - hash = "sha256-N34DRWty3QiXDPpHGUvLpQXtU4TQHxI32rizcwQdHBU="; + hash = "sha256-JWa08jCdtP9xwLaTYw0024DogDC0WQvKZ8xRDTEhsvE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/leather/default.nix b/pkgs/development/python-modules/leather/default.nix index d3b446b9c331..138a412017fe 100644 --- a/pkgs/development/python-modules/leather/default.nix +++ b/pkgs/development/python-modules/leather/default.nix @@ -4,7 +4,7 @@ , six , cssselect , lxml -, nose +, pytestCheckHook }: buildPythonPackage rec { @@ -22,15 +22,9 @@ buildPythonPackage rec { nativeCheckInputs = [ cssselect lxml - nose + pytestCheckHook ]; - checkPhase = '' - runHook preCheck - nosetests - runHook postCheck - ''; - meta = with lib; { homepage = "http://leather.rtfd.io"; description = "Python charting library"; diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index f1637617f85a..7204e502d8ec 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "libtmux"; - version = "0.32.0"; + version = "0.35.0"; pyproject = true; src = fetchFromGitHub { owner = "tmux-python"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-8x98yYgA8dY9btFePDTB61gsRZeOVpnErkgJRVlYYFY="; + hash = "sha256-1Xt2sl4L56TnveufD2j9k6eQQ+HllDxagv1APrErQYc="; }; postPatch = '' @@ -64,6 +64,6 @@ buildPythonPackage rec { homepage = "https://libtmux.git-pull.com/"; changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ otavio ]; }; } diff --git a/pkgs/development/python-modules/litellm/default.nix b/pkgs/development/python-modules/litellm/default.nix index e309fd66bcdb..c65bf018ed04 100644 --- a/pkgs/development/python-modules/litellm/default.nix +++ b/pkgs/development/python-modules/litellm/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { pname = "litellm"; - version = "1.32.7"; + version = "1.33.7"; pyproject = true; disabled = pythonOlder "3.8"; @@ -42,7 +42,7 @@ buildPythonPackage rec { owner = "BerriAI"; repo = "litellm"; rev = "refs/tags/v${version}"; - hash = "sha256-rftiF6D3yyF1gRVz8Pny6Y/0mJnRYVhAsFt8YP+j1aY="; + hash = "sha256-o2MqZ9d2YDe0eQtao9OO9Ysl3cKTGiHqaYknOvcyCT4="; }; postPatch = '' diff --git a/pkgs/development/python-modules/lmcloud/default.nix b/pkgs/development/python-modules/lmcloud/default.nix index d640125560d0..9712527f86a7 100644 --- a/pkgs/development/python-modules/lmcloud/default.nix +++ b/pkgs/development/python-modules/lmcloud/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "lmcloud"; - version = "1.0.0"; + version = "1.1.4"; pyproject = true; disabled = pythonOlder "3.11"; @@ -20,14 +20,14 @@ buildPythonPackage rec { owner = "zweckj"; repo = "lmcloud"; rev = "refs/tags/v${version}"; - hash = "sha256-Eu4vStCabPCLsrT7Z+iCaUN3cKowH1dJjDO5x++LFNM="; + hash = "sha256-uiyZGFfSJrTjw0CvHrCor4Ef5hdkMbEHGHQH3+NxYWE="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ authlib bleak httpx diff --git a/pkgs/development/python-modules/marimo/default.nix b/pkgs/development/python-modules/marimo/default.nix index d02f85896200..8873ac724c68 100644 --- a/pkgs/development/python-modules/marimo/default.nix +++ b/pkgs/development/python-modules/marimo/default.nix @@ -19,14 +19,14 @@ buildPythonPackage rec { pname = "marimo"; - version = "0.3.3"; + version = "0.3.4"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-l5QehU/LqEWb7ybKxace4sm6C9mcNlaHNOp55ExglpQ="; + hash = "sha256-nCH8JmeU81aJHHGJ1DOOCL9iarBXTBGauQKyHpU66Rk="; }; build-system = [ diff --git a/pkgs/development/python-modules/marshmallow-dataclass/default.nix b/pkgs/development/python-modules/marshmallow-dataclass/default.nix index 2883b6b31add..7b5b2932407a 100644 --- a/pkgs/development/python-modules/marshmallow-dataclass/default.nix +++ b/pkgs/development/python-modules/marshmallow-dataclass/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "marshmallow-dataclass"; - version = "8.6.0"; + version = "8.6.1"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "lovasoa"; repo = "marshmallow_dataclass"; rev = "refs/tags/v${version}"; - hash = "sha256-+1bMo5D+7kbkZHcAvmgC1WxNk6Ba04iLccMqTKrxt80="; + hash = "sha256-IHHYYtQrdSAtZxbd/YV9J+c4B23HLr9gr01OE6Tgj94="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/mkdocs-material/default.nix b/pkgs/development/python-modules/mkdocs-material/default.nix index 0aeb5cbe3421..021c9645e321 100644 --- a/pkgs/development/python-modules/mkdocs-material/default.nix +++ b/pkgs/development/python-modules/mkdocs-material/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "mkdocs-material"; - version = "9.5.13"; + version = "9.5.14"; pyproject = true; disabled = pythonOlder "3.7"; @@ -41,7 +41,7 @@ buildPythonPackage rec { owner = "squidfunk"; repo = "mkdocs-material"; rev = "refs/tags/${version}"; - hash = "sha256-SFLCNFJNlyJ09d4VsWsxdw7Ctyv1pFHXdqPgBflH294="; + hash = "sha256-VqfjqsTEi5C33MSb83ku37i0hgDyujrdaZbeqpMOvko="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/oauthenticator/default.nix b/pkgs/development/python-modules/oauthenticator/default.nix index de26b60caac2..45914454052e 100644 --- a/pkgs/development/python-modules/oauthenticator/default.nix +++ b/pkgs/development/python-modules/oauthenticator/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "oauthenticator"; - version = "16.2.1"; + version = "16.3.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-qJrreq2GhJxrX9keZOYVzjihs0RCymad+MGErW5ecPc="; + hash = "sha256-QMddGJUfafXoBxMCjlx1lH45a4Bab3AP4j8Px7JxYaQ="; }; postPatch = '' @@ -30,11 +30,11 @@ buildPythonPackage rec { --replace-fail " --cov=oauthenticator" "" ''; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ jupyterhub ]; diff --git a/pkgs/development/python-modules/oelint-parser/default.nix b/pkgs/development/python-modules/oelint-parser/default.nix index 57750768e4db..ab9f362de4e6 100644 --- a/pkgs/development/python-modules/oelint-parser/default.nix +++ b/pkgs/development/python-modules/oelint-parser/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "oelint-parser"; - version = "3.3.1"; + version = "3.4.0"; format = "setuptools"; src = fetchPypi { inherit version; pname = "oelint_parser"; - hash = "sha256-+u0whEnzA5XZlqgTpQtGH25/krLLvNPycWXzBUedMRc="; + hash = "sha256-knMxVBibaX3wK7VNBODHeLeAbBOXHKNbyxjItiNcIfw="; }; buildInputs = [ pip ]; @@ -33,7 +33,7 @@ buildPythonPackage rec { meta = with lib; { description = "Alternative parser for bitbake recipes"; homepage = "https://github.com/priv-kweihmann/oelint-parser"; - changelog = "https://github.com/priv-kweihmann/oelint-parser/releases/tag/v${version}"; + changelog = "https://github.com/priv-kweihmann/oelint-parser/releases/tag/${version}"; license = licenses.bsd2; maintainers = with maintainers; [ otavio ]; }; diff --git a/pkgs/development/python-modules/ondilo/default.nix b/pkgs/development/python-modules/ondilo/default.nix index c766e2cb158d..1c5a25e048f4 100644 --- a/pkgs/development/python-modules/ondilo/default.nix +++ b/pkgs/development/python-modules/ondilo/default.nix @@ -5,23 +5,28 @@ , pythonOlder , requests , requests-oauthlib +, setuptools }: buildPythonPackage rec { pname = "ondilo"; - version = "0.3.0"; - format = "setuptools"; + version = "0.4.0"; + pyproject = true; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "JeromeHXP"; - repo = pname; - rev = version; - hash = "sha256-MI6K+41I/IVi+GRBdmRIHbljULDFLAwpo3W8tdxCOBM="; + repo = "ondilo"; + rev = "refs/tags/${version}"; + hash = "sha256-BieWdPakQts0QxzQzJYlP6a7ieZ40rAyYqhy8zEvU38="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ oauthlib requests requests-oauthlib @@ -37,6 +42,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python package to access Ondilo ICO APIs"; homepage = "https://github.com/JeromeHXP/ondilo"; + changelog = "https://github.com/JeromeHXP/ondilo/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; diff --git a/pkgs/development/python-modules/packageurl-python/default.nix b/pkgs/development/python-modules/packageurl-python/default.nix index 34954e499fb8..430cd58024dd 100644 --- a/pkgs/development/python-modules/packageurl-python/default.nix +++ b/pkgs/development/python-modules/packageurl-python/default.nix @@ -3,20 +3,25 @@ , fetchPypi , pytestCheckHook , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "packageurl-python"; - version = "0.14.0"; - format = "setuptools"; + version = "0.15.0"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-/wkUfN2q6eXFn/yxLfjsDht3S0UJk5nyjDaxo9/fUuI="; + hash = "sha256-8hmyzmNIGFonvWpy5v3J+YTmyfoVfv+ny5PjQcSc3MI="; }; + build-system = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/param/default.nix b/pkgs/development/python-modules/param/default.nix index 638a3182ca1b..b80f6199ad56 100644 --- a/pkgs/development/python-modules/param/default.nix +++ b/pkgs/development/python-modules/param/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "param"; - version = "2.0.2"; + version = "2.1.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "holoviz"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-kVuab6+l4KOtSvj6aI9zsQJ91tfCDJkHrSTcRL9SViY="; + hash = "sha256-9264KfRDuHsvDyIpGKs2VTPcTZOZIFLKe7xuplkfzf4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pastescript/default.nix b/pkgs/development/python-modules/pastescript/default.nix index 65da03e73d97..3d42c40c1230 100644 --- a/pkgs/development/python-modules/pastescript/default.nix +++ b/pkgs/development/python-modules/pastescript/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pastescript"; - version = "3.4.0"; + version = "3.5.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "PasteScript"; inherit version; - hash = "sha256-k0jvBlr/Is8ViMEt+wIMx1HGSC4hb4o8dRL6QKQ/kNw="; + hash = "sha256-zRtgbNReloT/20SL1tmq70IN0u/n5rYsbTc6Rv9DyDU="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/paypalrestsdk/default.nix b/pkgs/development/python-modules/paypalrestsdk/default.nix index 43061b4eeab2..ed6e60a19044 100644 --- a/pkgs/development/python-modules/paypalrestsdk/default.nix +++ b/pkgs/development/python-modules/paypalrestsdk/default.nix @@ -1,23 +1,23 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchPypi - -# build-system , setuptools - -# dependencies , pyopenssl +, pythonOlder , requests , six }: buildPythonPackage rec { pname = "paypalrestsdk"; - version = "1.13.2"; + version = "1.13.3"; pyproject = true; + disabled = pythonOlder "3.7"; + src = fetchPypi { inherit pname version; - sha256 = "sha256-kZUfNtsw1oW5ceFASYSRo1bPHfjv9xZWYDrKTtcs81o="; + hash = "sha256-2sI2SSqawSYKdgAUouVqs4sJ2BQylbXollRTWbYf7dY="; }; build-system = [ @@ -30,15 +30,21 @@ buildPythonPackage rec { six ]; - doCheck = false; # no tests + # Module has no tests + doCheck = false; pythonImportsCheck = [ "paypalrestsdk" ]; - meta = { - homepage = "https://developer.paypal.com/"; + meta = with lib; { description = "Python APIs to create, process and manage payment"; - license = "PayPal SDK License"; + homepage = "https://github.com/paypal/PayPal-Python-SDK"; + changelog = "https://github.com/paypal/PayPal-Python-SDK/blob/master/CHANGELOG.md"; + license = { + fullName = "PayPal SDK License"; + url = "https://github.com/paypal/PayPal-Python-SDK/blob/master/LICENSE"; + }; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pebble/default.nix b/pkgs/development/python-modules/pebble/default.nix index 756c7c294690..b576c7d4c1fc 100644 --- a/pkgs/development/python-modules/pebble/default.nix +++ b/pkgs/development/python-modules/pebble/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pebble"; - version = "5.0.6"; + version = "5.0.7"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Pebble"; inherit version; - hash = "sha256-5/fs/QEHq3zsnzu0EahWxNfVUiAtTpqLA46aZK4x/Yw="; + hash = "sha256-J4TBR3ZvBjiM6nhAhLFL7JP9uqeTgw8ZgxVaozCipuQ="; }; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/phonopy/default.nix b/pkgs/development/python-modules/phonopy/default.nix index 6afa9e1f5ff6..fc39ba10083f 100644 --- a/pkgs/development/python-modules/phonopy/default.nix +++ b/pkgs/development/python-modules/phonopy/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "phonopy"; - version = "2.21.2"; + version = "2.22.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-3DCfMI41J/H9RjKj0376NnADp2VzHKnGcvgYoLnluTY="; + hash = "sha256-9opygqCRxKGNQo52cS7BiUYdmknIk9ygubPgpylcy8o="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/podman/default.nix b/pkgs/development/python-modules/podman/default.nix index e3174a0a93ac..92a73abb4538 100644 --- a/pkgs/development/python-modules/podman/default.nix +++ b/pkgs/development/python-modules/podman/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "podman"; - version = "4.9.0"; + version = "5.0.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -24,10 +24,10 @@ buildPythonPackage rec { owner = "containers"; repo = "podman-py"; rev = "refs/tags/v${version}"; - hash = "sha256-fLuWOfv4kW5a9h658s8pBgXsBfcYdkXNp9+bWtgKHv8="; + hash = "sha256-3tbhTg060/K4ejT/xjItSu9zf05LR/d0vkg4XDsspEE="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/prisma/default.nix b/pkgs/development/python-modules/prisma/default.nix index 7d1a74a7f5b9..ac0b85d0ad54 100644 --- a/pkgs/development/python-modules/prisma/default.nix +++ b/pkgs/development/python-modules/prisma/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "prisma"; - version = "0.12.0"; + version = "0.13.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -26,14 +26,14 @@ buildPythonPackage rec { owner = "RobertCraigie"; repo = "prisma-client-py"; rev = "refs/tags/v${version}"; - hash = "sha256-vmcYBUPDhFbxgWyrF+AjoXwAAH2R/tJYttFD+41bPbA="; + hash = "sha256-j9HJZTt4VTq29Q+nynYmRWKx02GVdyA+iZzxZwspXn8="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ click httpx jinja2 diff --git a/pkgs/development/python-modules/pyamg/default.nix b/pkgs/development/python-modules/pyamg/default.nix index 4180edaebde3..6c33a2d9ca24 100644 --- a/pkgs/development/python-modules/pyamg/default.nix +++ b/pkgs/development/python-modules/pyamg/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pyamg"; - version = "5.0.1"; - format = "setuptools"; + version = "5.1.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-XwSKAXQzQ64NTIYjBgBzhs+5sURTxHrf2tJ363mkbVA="; + hash = "sha256-+Q+d55W04pWJ7dLrRG0R3bRmZ46+gj7TKfzzV1nqOQw="; }; nativeBuildInputs = [ @@ -54,6 +54,6 @@ buildPythonPackage rec { homepage = "https://github.com/pyamg/pyamg"; changelog = "https://github.com/pyamg/pyamg/blob/v${version}/changelog.md"; license = licenses.mit; - maintainers = [ ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pyenphase/default.nix b/pkgs/development/python-modules/pyenphase/default.nix index 53add2582f9e..549d0b8e8263 100644 --- a/pkgs/development/python-modules/pyenphase/default.nix +++ b/pkgs/development/python-modules/pyenphase/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "pyenphase"; - version = "1.19.2"; + version = "1.20.0"; pyproject = true; disabled = pythonOlder "3.11"; @@ -27,19 +27,19 @@ buildPythonPackage rec { owner = "pyenphase"; repo = "pyenphase"; rev = "refs/tags/v${version}"; - hash = "sha256-opzoIYNsFERS5R40vm64o92PYz4+1e3ACFv3W6+EYsc="; + hash = "sha256-/TyQ6oSA361at1VSr6dLefOOmbZP4otBgb/JDA2sNWo="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace " --cov=pyenphase --cov-report=term-missing:skip-covered" "" + --replace-fail " --cov=pyenphase --cov-report=term-missing:skip-covered" "" ''; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ awesomeversion envoy-utils httpx diff --git a/pkgs/development/python-modules/pylacus/default.nix b/pkgs/development/python-modules/pylacus/default.nix new file mode 100644 index 000000000000..1f2790ad2031 --- /dev/null +++ b/pkgs/development/python-modules/pylacus/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pylacus"; + version = "1.8.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ail-project"; + repo = "PyLacus"; + rev = "refs/tags/v${version}"; + hash = "sha256-wXdQe/4Xw/D0MRFqNfSKimJ99aCE7M7k1neT/+t7ixY="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + requests + ]; + + # Tests require network access + doCheck = false; + + pythonImportsCheck = [ + "pylacus" + ]; + + meta = with lib; { + description = "Module to enqueue and query a remote Lacus instance"; + homepage = "https://github.com/ail-project/PyLacus"; + changelog = "https://github.com/ail-project/PyLacus/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pylsp-rope/default.nix b/pkgs/development/python-modules/pylsp-rope/default.nix index fd4d1f9ba5f5..22776d4dc6af 100644 --- a/pkgs/development/python-modules/pylsp-rope/default.nix +++ b/pkgs/development/python-modules/pylsp-rope/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pylsp-rope"; - version = "0.1.15"; + version = "0.1.16"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-0f0WzJcVOfH1abJnvZCLM5/W1JfVxSDAH+Z1ADA6kUQ="; + hash = "sha256-1oC2iMYKQCV6iELsgIpuDeFZakelMA8irs/caVVQIKc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pytedee-async/default.nix b/pkgs/development/python-modules/pytedee-async/default.nix index a5f7b2549185..cdb89a843c13 100644 --- a/pkgs/development/python-modules/pytedee-async/default.nix +++ b/pkgs/development/python-modules/pytedee-async/default.nix @@ -1,14 +1,14 @@ { lib +, aiohttp , buildPythonPackage , fetchFromGitHub -, setuptools , pythonOlder -, aiohttp +, setuptools }: buildPythonPackage rec { pname = "pytedee-async"; - version = "0.2.16"; + version = "0.2.17"; pyproject = true; disabled = pythonOlder "3.9"; @@ -17,14 +17,14 @@ buildPythonPackage rec { owner = "zweckj"; repo = "pytedee_async"; rev = "refs/tags/v${version}"; - hash = "sha256-MoAh5YYaZLF99fTFgErXunaLGT9hgInaZTjlDJcpSEw="; + hash = "sha256-5mCHCzoDJ6+ao2guhAtVjvPaAS6Hutn+NwaQIjWDlgo="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp ]; diff --git a/pkgs/development/python-modules/python-docs-theme/default.nix b/pkgs/development/python-modules/python-docs-theme/default.nix index 316f55e4a89d..364f40f7ce26 100644 --- a/pkgs/development/python-modules/python-docs-theme/default.nix +++ b/pkgs/development/python-modules/python-docs-theme/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "python-docs-theme"; - version = "2024.2"; + version = "2024.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "python"; repo = "python-docs-theme"; rev = "refs/tags/${version}"; - hash = "sha256-5qn/bROc3wekTyYq+e7rLpJjeI8IBByKvrOE4Kw0fjQ="; + hash = "sha256-caQqoXKdKA0W5qLphYbTxrP8Qx5teJD5+MSyaifyf/A="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/requests-gssapi/default.nix b/pkgs/development/python-modules/requests-gssapi/default.nix new file mode 100644 index 000000000000..ac762c7c20b3 --- /dev/null +++ b/pkgs/development/python-modules/requests-gssapi/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchPypi +, gssapi +, pytestCheckHook +, pythonOlder +, requests +, setuptools +}: + +buildPythonPackage rec { + pname = "requests-gssapi"; + version = "1.2.3"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-IHhFCJgUAfcVPJM+7QlTOJM6QIGNplolnb8tgNzLFQ4="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + gssapi + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportCheck = [ + "requests_gssapi" + ]; + + meta = with lib; { + description = "A GSSAPI authentication handler for python-requests"; + homepage = "https://github.com/pythongssapi/requests-gssapi"; + changelog = "https://github.com/pythongssapi/requests-gssapi/blob/v${version}/HISTORY.rst"; + license = licenses.isc; + maintainers = with maintainers; [ javimerino ]; + }; +} diff --git a/pkgs/development/python-modules/scikit-hep-testdata/default.nix b/pkgs/development/python-modules/scikit-hep-testdata/default.nix index 1d448c0b45de..58e8ceadd0d4 100644 --- a/pkgs/development/python-modules/scikit-hep-testdata/default.nix +++ b/pkgs/development/python-modules/scikit-hep-testdata/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "scikit-hep-testdata"; - version = "0.4.40"; + version = "0.4.42"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "scikit-hep"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-6PUAam7eDWQOMS3SVIVJXvqQLBE187yUbkiyFZ+ojcU="; + hash = "sha256-2zUo/uGIQl0wSFWWxoTmttzUNq9rFGJRYr95PQJH/I8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/scmrepo/default.nix b/pkgs/development/python-modules/scmrepo/default.nix index 3e41c4c12dc4..e902cac51101 100644 --- a/pkgs/development/python-modules/scmrepo/default.nix +++ b/pkgs/development/python-modules/scmrepo/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "scmrepo"; - version = "3.3.0"; + version = "3.3.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "iterative"; repo = "scmrepo"; rev = "refs/tags/${version}"; - hash = "sha256-vAfqCr1/3S0yZ0wPDxSZ6b6NrcJxt7Lj7oCsTzAXX1k="; + hash = "sha256-swv5uWsyM4mEXlurizUewnbdAOtjWgvzCO9IPfz2ZPE="; }; build-system = [ diff --git a/pkgs/development/python-modules/sqlalchemy-continuum/default.nix b/pkgs/development/python-modules/sqlalchemy-continuum/default.nix index fa0d3ad6cade..7801b029e1f2 100644 --- a/pkgs/development/python-modules/sqlalchemy-continuum/default.nix +++ b/pkgs/development/python-modules/sqlalchemy-continuum/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "sqlalchemy-continuum"; - version = "1.4.0"; + version = "1.4.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "SQLAlchemy-Continuum"; inherit version; - hash = "sha256-Rk+aWxBjUrXuRPE5MSyzWMWS0l7qrjU3wOrHLC+vteU="; + hash = "sha256-4BZGzfv9azGiGwrrprv/ZhJY1b6Ed8dQDKs6HHSEjm4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/sshfs/default.nix b/pkgs/development/python-modules/sshfs/default.nix index c9550c57715b..37eb7a94e11f 100644 --- a/pkgs/development/python-modules/sshfs/default.nix +++ b/pkgs/development/python-modules/sshfs/default.nix @@ -15,11 +15,11 @@ buildPythonPackage rec { pname = "sshfs"; version = "2023.10.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "fsspec"; - repo = pname; + repo = "sshfs"; rev = "refs/tags/${version}"; hash = "sha256-6MueDHR+jZFDZg4zufEVhBtSwcgDd7KnW9gJp2hDu0A="; }; diff --git a/pkgs/development/python-modules/syncedlyrics/default.nix b/pkgs/development/python-modules/syncedlyrics/default.nix index 82b859632ae9..a53740b37253 100644 --- a/pkgs/development/python-modules/syncedlyrics/default.nix +++ b/pkgs/development/python-modules/syncedlyrics/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "syncedlyrics"; - version = "0.8.0"; + version = "0.9.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,10 +20,10 @@ buildPythonPackage rec { owner = "rtcq"; repo = "syncedlyrics"; rev = "refs/tags/v${version}"; - hash = "sha256-ro9HzI8N7Ry4xh91mO1Vyy3CScEi3FifweOO01/Ti0w="; + hash = "sha256-Q0Hu403Hxr4iDuZfGQjgTSuNMVgsqd9zLRl9Vc1YzyQ="; }; - nativeBuildInputs = [ + build-system = [ poetry-core pythonRelaxDepsHook ]; @@ -32,7 +32,7 @@ buildPythonPackage rec { "rapidfuzz" ]; - propagatedBuildInputs = [ + dependencies = [ requests rapidfuzz beautifulsoup4 diff --git a/pkgs/development/python-modules/tagoio-sdk/default.nix b/pkgs/development/python-modules/tagoio-sdk/default.nix index b5bcc619eed8..626872794e03 100644 --- a/pkgs/development/python-modules/tagoio-sdk/default.nix +++ b/pkgs/development/python-modules/tagoio-sdk/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "tagoio-sdk"; - version = "4.2.1"; + version = "4.3.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "tago-io"; repo = "sdk-python"; rev = "refs/tags/v${version}"; - hash = "sha256-R7qJIgL8/zejIuT6YMnC3bdm8lKLBTK5eVjVDEjvRKs="; + hash = "sha256-37/fg2vbwYPhYPvSJ2YxWAPrfspqTE3thIL/VR1+AkI="; }; pythonRelaxDeps = [ diff --git a/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix b/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix index 24a7848417f6..34ce22a46136 100644 --- a/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix +++ b/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "tencentcloud-sdk-python"; - version = "3.0.1112"; + version = "3.0.1114"; pyproject = true; disabled = pythonOlder "3.9"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "TencentCloud"; repo = "tencentcloud-sdk-python"; rev = "refs/tags/${version}"; - hash = "sha256-icfRs0+ljMx7YoViRKPyPK8Kp8Zx3dp0aiKxw8yYrUs="; + hash = "sha256-OqkXHnXoQE2BF2Lon9+3pPVvqXK9YQnoDewoQ13Aa1Q="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index 0d58dc7a4b71..ac2af381ff02 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { pname = "transformers"; - version = "4.39.0"; + version = "4.39.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -62,7 +62,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = "transformers"; rev = "refs/tags/v${version}"; - hash = "sha256-iOypG9WRvZ3Y9wwW/wGlHGdQx246TGqvvml9qyI2vFk="; + hash = "sha256-OzuiKzhgI9eRTPq3l7x4aw3fxvCe4080pK1RKzcC1RQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-dateutil/default.nix b/pkgs/development/python-modules/types-dateutil/default.nix index ff98f62dcdf6..c02934519ca8 100644 --- a/pkgs/development/python-modules/types-dateutil/default.nix +++ b/pkgs/development/python-modules/types-dateutil/default.nix @@ -1,19 +1,24 @@ { lib , buildPythonPackage , fetchPypi +, setuptools }: buildPythonPackage rec { pname = "types-dateutil"; - version = "2.8.19.20240311"; - format = "setuptools"; + version = "2.9.0.20240316"; + pyproject = true; src = fetchPypi { pname = "types-python-dateutil"; inherit version; - hash = "sha256-UReCJ7vUy+w13Jrf+/Wdgy8g4JhC19y4xzsWm4eAt8s="; + hash = "sha256-XS8uJAuGkF5AlE3Xh9ttqSY/Deq+8Qdt2u15c1HsAgI="; }; + nativeBuildInputs = [ + setuptools + ]; + pythonImportsCheck = [ "dateutil-stubs" ]; diff --git a/pkgs/development/python-modules/wunsen/default.nix b/pkgs/development/python-modules/wunsen/default.nix new file mode 100644 index 000000000000..5fc6ea2d3803 --- /dev/null +++ b/pkgs/development/python-modules/wunsen/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +, pythonOlder + +, unittestCheckHook + +, hatchling + +, khanaa +}: + +buildPythonPackage rec { + pname = "wunsen"; + version = "0.0.3"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "cakimpei"; + repo = "wunsen"; + rev = "refs/tags/v${version}"; + hash = "sha256-lMEhtcWG+S3vAz+Y/qDxhaZslsO0pbs5xUn5QgZNs2U="; + }; + + build-system = [ + hatchling + ]; + + dependencies = [ + khanaa + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "tests" ]; + + pythonImportsCheck = [ "wunsen" ]; + + meta = with lib; + { + description = "Transliterate/transcribe other languages into Thai Topics"; + homepage = "https://github.com/cakimpei/wunsen"; + changelog = "https://github.com/cakimpei/wunsen/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ vizid ]; + }; +} diff --git a/pkgs/development/python-modules/yolink-api/default.nix b/pkgs/development/python-modules/yolink-api/default.nix index e1e43b34a7ae..b52b2268a400 100644 --- a/pkgs/development/python-modules/yolink-api/default.nix +++ b/pkgs/development/python-modules/yolink-api/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "yolink-api"; - version = "0.3.9"; + version = "0.4.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -20,14 +20,14 @@ buildPythonPackage rec { owner = "YoSmart-Inc"; repo = "yolink-api"; rev = "refs/tags/v${version}"; - hash = "sha256-RXO++8Dh0hLkjXev/WDhPixLHKXlqRabbrPW6Hs/xoM="; + hash = "sha256-YDfwF9ldL43yrhz1TibTatkZIccYTpNODdjqBkzeh1s="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp aiomqtt pydantic diff --git a/pkgs/development/rocm-modules/6/clang-ocl/default.nix b/pkgs/development/rocm-modules/6/clang-ocl/default.nix new file mode 100644 index 000000000000..7d366e53ae56 --- /dev/null +++ b/pkgs/development/rocm-modules/6/clang-ocl/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-device-libs +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "clang-ocl"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "clang-ocl"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-uMSvcVJj+me2E+7FsXZ4l4hTcK6uKEegXpkHGcuist0="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + ]; + + buildInputs = [ rocm-device-libs ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "OpenCL compilation with clang compiler"; + homepage = "https://github.com/ROCm/clang-ocl"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix new file mode 100644 index 000000000000..05acf86478d3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -0,0 +1,189 @@ +{ lib +, stdenv +, callPackage +, fetchFromGitHub +, fetchpatch +, rocmUpdateScript +, makeWrapper +, cmake +, perl +, clang +, hip-common +, hipcc +, rocm-device-libs +, rocm-comgr +, rocm-runtime +, roctracer +, rocminfo +, rocm-smi +, numactl +, libGL +, libxml2 +, libX11 +, python3Packages +}: + +let + wrapperArgs = [ + "--prefix PATH : $out/bin" + "--prefix LD_LIBRARY_PATH : ${rocm-runtime}" + "--set HIP_PLATFORM amd" + "--set HIP_PATH $out" + "--set HIP_CLANG_PATH ${clang}/bin" + "--set DEVICE_LIB_PATH ${rocm-device-libs}/amdgcn/bitcode" + "--set HSA_PATH ${rocm-runtime}" + "--set ROCM_PATH $out" + ]; +in stdenv.mkDerivation (finalAttrs: { + pname = "clr"; + version = "6.0.2"; + + outputs = [ + "out" + "icd" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "clr"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-ZMpA7vCW2CcpGdBLZfPimMHcgjhN1PHuewJiYwZMgGY="; + }; + + nativeBuildInputs = [ + makeWrapper + cmake + perl + python3Packages.python + python3Packages.cppheaderparser + ]; + + buildInputs = [ + numactl + libGL + libxml2 + libX11 + ]; + + propagatedBuildInputs = [ + rocm-device-libs + rocm-comgr + rocm-runtime + rocminfo + ]; + + cmakeFlags = [ + "-DCMAKE_POLICY_DEFAULT_CMP0072=NEW" # Prefer newer OpenGL libraries + "-DCLR_BUILD_HIP=ON" + "-DCLR_BUILD_OCL=ON" + "-DHIP_COMMON_DIR=${hip-common}" + "-DHIPCC_BIN_DIR=${hipcc}/bin" + "-DHIP_PLATFORM=amd" + "-DPROF_API_HEADER_PATH=${roctracer.src}/inc/ext" + "-DROCM_PATH=${rocminfo}" + + # Temporarily set variables to work around upstream CMakeLists issue + # Can be removed once https://github.com/ROCm/rocm-cmake/issues/121 is fixed + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DCMAKE_INSTALL_LIBDIR=lib" + ]; + + patches = [ + (fetchpatch { + name = "add-missing-operators.patch"; + url = "https://github.com/ROCm/clr/commit/86bd518981b364c138f9901b28a529899d8654f3.patch"; + hash = "sha256-lbswri+zKLxif0hPp4aeJDeVfadhWZz4z+m+G2XcCPI="; + }) + (fetchpatch { + name = "static-functions.patch"; + url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch"; + hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; + }) + ]; + + postPatch = '' + patchShebangs hipamd/*.sh + patchShebangs hipamd/src + + # We're not on Windows so these are never installed to hipcc... + substituteInPlace hipamd/CMakeLists.txt \ + --replace "install(PROGRAMS \''${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)" "" \ + --replace "install(PROGRAMS \''${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)" "" + + substituteInPlace hipamd/src/hip_embed_pch.sh \ + --replace "\''$LLVM_DIR/bin/clang" "${clang}/bin/clang" + ''; + + postInstall = '' + patchShebangs $out/bin + + # hipcc.bin and hipconfig.bin is mysteriously never installed + cp -a ${hipcc}/bin/{hipcc.bin,hipconfig.bin} $out/bin + + wrapProgram $out/bin/hipcc.bin ${lib.concatStringsSep " " wrapperArgs} + wrapProgram $out/bin/hipconfig.bin ${lib.concatStringsSep " " wrapperArgs} + wrapProgram $out/bin/hipcc.pl ${lib.concatStringsSep " " wrapperArgs} + wrapProgram $out/bin/hipconfig.pl ${lib.concatStringsSep " " wrapperArgs} + + # Just link rocminfo, it's easier + ln -s ${rocminfo}/bin/* $out/bin + + # Replace rocm-opencl-icd functionality + mkdir -p $icd/etc/OpenCL/vendors + echo "$out/lib/libamdocl64.so" > $icd/etc/OpenCL/vendors/amdocl64.icd + + # add version info to output (downstream rocmPackages look for this) + mkdir $out/.info + echo "${finalAttrs.version}" > $out/.info/version + ''; + + passthru = { + # All known and valid general GPU targets + # We cannot use this for each ROCm library, as each defines their own supported targets + # See: https://github.com/ROCm/ROCm/blob/77cbac4abab13046ee93d8b5bf410684caf91145/README.md#library-target-matrix + gpuTargets = lib.forEach [ + "803" + "900" + "906" + "908" + "90a" + "940" + "941" + "942" + "1010" + "1012" + "1030" + "1100" + "1101" + "1102" + ] (target: "gfx${target}"); + + updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + page = "tags?per_page=1"; + filter = ".[0].name | split(\"-\") | .[1]"; + }; + + impureTests = { + rocm-smi = callPackage ./test-rocm-smi.nix { + inherit rocm-smi; + clr = finalAttrs.finalPackage; + }; + opencl-example = callPackage ./test-opencl-example.nix { + clr = finalAttrs.finalPackage; + }; + }; + }; + + meta = with lib; { + description = "AMD Common Language Runtime for hipamd, opencl, and rocclr"; + homepage = "https://github.com/ROCm/clr"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/clr/test-opencl-example.nix b/pkgs/development/rocm-modules/6/clr/test-opencl-example.nix new file mode 100644 index 000000000000..24fc483847d3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/clr/test-opencl-example.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, makeImpureTest +, fetchFromGitHub +, clr +, cmake +, pkg-config +, glew +, freeglut +, opencl-headers +, ocl-icd +}: + +let + + examples = stdenv.mkDerivation { + pname = "amd-app-samples"; + version = "2018-06-10"; + + src = fetchFromGitHub { + owner = "OpenCL"; + repo = "AMD_APP_samples"; + rev = "54da6ca465634e78fc51fc25edf5840467ee2411"; + hash = "sha256-qARQpUiYsamHbko/I1gPZE9pUGJ+3396Vk2n7ERSftA="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ glew freeglut opencl-headers ocl-icd ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + # Example path is bin/x86_64/Release/cl/Reduction/Reduction + cp -r bin/*/*/*/*/* $out/bin/ + + runHook postInstall + ''; + + cmakeFlags = [ "-DBUILD_CPP_CL=OFF" ]; + + meta = with lib; { + description = "Samples from the AMD APP SDK (with OpenCRun support) "; + homepage = "https://github.com/OpenCL/AMD_APP_samples"; + license = licenses.bsd2; + platforms = platforms.linux; + maintainers = lib.teams.rocm.members; + }; + }; + +in +makeImpureTest { + name = "opencl-example"; + testedPackage = "rocmPackages_6.clr"; + + sandboxPaths = [ "/sys" "/dev/dri" "/dev/kfd" ]; + + nativeBuildInputs = [ examples ]; + + OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors"; + + testScript = '' + # Examples load resources from current directory + cd ${examples}/bin + echo OCL_ICD_VENDORS=$OCL_ICD_VENDORS + pwd + + HelloWorld | grep HelloWorld + ''; + + meta = with lib; { + maintainers = teams.rocm.members; + }; +} diff --git a/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix b/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix new file mode 100644 index 000000000000..6f2d3c788289 --- /dev/null +++ b/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix @@ -0,0 +1,23 @@ +{ lib +, makeImpureTest +, clinfo +, clr +, rocm-smi +}: + +makeImpureTest { + name = "rocm-smi"; + testedPackage = "rocmPackages_6.clr"; + nativeBuildInputs = [ clinfo rocm-smi ]; + OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors"; + + testScript = '' + # Test fails if the number of platforms is 0 + clinfo | grep -E 'Number of platforms * [1-9]' + rocm-smi | grep -A1 GPU + ''; + + meta = with lib; { + maintainers = teams.rocm.members; + }; +} diff --git a/pkgs/development/rocm-modules/6/composable_kernel/default.nix b/pkgs/development/rocm-modules/6/composable_kernel/default.nix new file mode 100644 index 000000000000..ac360482f4af --- /dev/null +++ b/pkgs/development/rocm-modules/6/composable_kernel/default.nix @@ -0,0 +1,94 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, openmp +, clang-tools-extra +, git +, gtest +, buildTests ? false +, buildExamples ? false +, gpuTargets ? [ ] # gpuTargets = [ "gfx803" "gfx900" "gfx1030" ... ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "composable_kernel"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildExamples [ + "example" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "composable_kernel"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-NCqMganmNyQfz3X+KQOrfrimnrgd3HbAGK5DeC4+J+o="; + }; + + nativeBuildInputs = [ + git + cmake + rocm-cmake + clr + clang-tools-extra + ]; + + buildInputs = [ openmp ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DGOOGLETEST_DIR=${gtest.src}" # Custom linker names + ]; + + # No flags to build selectively it seems... + postPatch = lib.optionalString (!buildTests) '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(test)" "" + '' + lib.optionalString (!buildExamples) '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(example)" "" + '' + '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(profiler)" "" + '' + ; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/test_* $test/bin + '' + lib.optionalString buildExamples '' + mkdir -p $example/bin + mv $out/bin/example_* $example/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + # Times out otherwise + requiredSystemFeatures = [ "big-parallel" ]; + + meta = with lib; { + description = "Performance portable programming model for machine learning tensor operators"; + homepage = "https://github.com/ROCm/composable_kernel"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/default.nix b/pkgs/development/rocm-modules/6/default.nix new file mode 100644 index 000000000000..e4e745f74b56 --- /dev/null +++ b/pkgs/development/rocm-modules/6/default.nix @@ -0,0 +1,524 @@ +{ stdenv +, callPackage +, recurseIntoAttrs +, symlinkJoin +, fetchFromGitHub +, cudaPackages +, python3Packages +, elfutils +, boost179 +, opencv +, ffmpeg_4 +, libjpeg_turbo +, rapidjson-unstable +}: + +let + rocmUpdateScript = callPackage ./update.nix { }; +in rec { + ## ROCm ## + llvm = recurseIntoAttrs (callPackage ./llvm/default.nix { inherit rocmUpdateScript rocm-device-libs rocm-runtime rocm-thunk clr; }); + + rocm-core = callPackage ./rocm-core { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + rocm-cmake = callPackage ./rocm-cmake { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + rocm-thunk = callPackage ./rocm-thunk { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + rocm-smi = python3Packages.callPackage ./rocm-smi { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + # Eventually will be in the LLVM repo + rocm-device-libs = callPackage ./rocm-device-libs { + inherit rocmUpdateScript rocm-cmake; + stdenv = llvm.rocmClangStdenv; + }; + + rocm-runtime = callPackage ./rocm-runtime { + inherit rocmUpdateScript rocm-device-libs rocm-thunk; + stdenv = llvm.rocmClangStdenv; + }; + + # Eventually will be in the LLVM repo + rocm-comgr = callPackage ./rocm-comgr { + inherit rocmUpdateScript rocm-cmake rocm-device-libs; + stdenv = llvm.rocmClangStdenv; + }; + + rocminfo = callPackage ./rocminfo { + inherit rocmUpdateScript rocm-cmake rocm-runtime; + stdenv = llvm.rocmClangStdenv; + }; + + clang-ocl = callPackage ./clang-ocl { + inherit rocmUpdateScript rocm-cmake rocm-device-libs; + stdenv = llvm.rocmClangStdenv; + }; + + # Unfree + hsa-amd-aqlprofile-bin = callPackage ./hsa-amd-aqlprofile-bin { + stdenv = llvm.rocmClangStdenv; + }; + + # Broken, too many errors + rdc = callPackage ./rdc { + inherit rocmUpdateScript rocm-smi rocm-runtime stdenv; + # stdenv = llvm.rocmClangStdenv; + }; + + rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { inherit stdenv; }; + + hip-common = callPackage ./hip-common { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + # Eventually will be in the LLVM repo + hipcc = callPackage ./hipcc { + inherit rocmUpdateScript; + stdenv = llvm.rocmClangStdenv; + }; + + # Replaces hip, opencl-runtime, and rocclr + clr = callPackage ./clr { + inherit rocmUpdateScript hip-common hipcc rocm-device-libs rocm-comgr rocm-runtime roctracer rocminfo rocm-smi; + inherit (llvm) clang; + stdenv = llvm.rocmClangStdenv; + }; + + hipify = callPackage ./hipify { + inherit rocmUpdateScript; + inherit (llvm) clang; + stdenv = llvm.rocmClangStdenv; + }; + + # Needs GCC + rocprofiler = callPackage ./rocprofiler { + inherit rocmUpdateScript clr rocm-core rocm-thunk rocm-device-libs roctracer rocdbgapi rocm-smi hsa-amd-aqlprofile-bin stdenv; + inherit (llvm) clang; + }; + + # Needs GCC + roctracer = callPackage ./roctracer { + inherit rocmUpdateScript rocm-device-libs rocm-runtime clr stdenv; + }; + + rocgdb = callPackage ./rocgdb { + inherit rocmUpdateScript; + elfutils = elfutils.override { enableDebuginfod = true; }; + stdenv = llvm.rocmClangStdenv; + }; + + rocdbgapi = callPackage ./rocdbgapi { + inherit rocmUpdateScript rocm-cmake rocm-comgr rocm-runtime; + stdenv = llvm.rocmClangStdenv; + }; + + rocr-debug-agent = callPackage ./rocr-debug-agent { + inherit rocmUpdateScript clr rocdbgapi; + stdenv = llvm.rocmClangStdenv; + }; + + rocprim = callPackage ./rocprim { + inherit rocmUpdateScript rocm-cmake clr; + stdenv = llvm.rocmClangStdenv; + }; + + rocsparse = callPackage ./rocsparse { + inherit rocmUpdateScript rocm-cmake rocprim clr; + stdenv = llvm.rocmClangStdenv; + }; + + rocthrust = callPackage ./rocthrust { + inherit rocmUpdateScript rocm-cmake rocprim clr; + stdenv = llvm.rocmClangStdenv; + }; + + rocrand = callPackage ./rocrand { + inherit rocmUpdateScript rocm-cmake clr; + stdenv = llvm.rocmClangStdenv; + }; + + hiprand = rocrand; # rocrand includes hiprand + + rocfft = callPackage ./rocfft { + inherit rocmUpdateScript rocm-cmake rocrand rocfft clr; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + rccl = callPackage ./rccl { + inherit rocmUpdateScript rocm-cmake rocm-smi clr hipify; + stdenv = llvm.rocmClangStdenv; + }; + + hipcub = callPackage ./hipcub { + inherit rocmUpdateScript rocm-cmake rocprim clr; + stdenv = llvm.rocmClangStdenv; + }; + + hipsparse = callPackage ./hipsparse { + inherit rocmUpdateScript rocm-cmake rocsparse clr; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + hipfort = callPackage ./hipfort { + inherit rocmUpdateScript rocm-cmake; + stdenv = llvm.rocmClangStdenv; + }; + + hipfft = callPackage ./hipfft { + inherit rocmUpdateScript rocm-cmake rocfft clr; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + tensile = python3Packages.callPackage ./tensile { + inherit rocmUpdateScript rocminfo; + stdenv = llvm.rocmClangStdenv; + }; + + rocblas = callPackage ./rocblas { + inherit rocblas rocmUpdateScript rocm-cmake clr tensile; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + rocsolver = callPackage ./rocsolver { + inherit rocmUpdateScript rocm-cmake rocblas rocsparse clr; + stdenv = llvm.rocmClangStdenv; + }; + + rocwmma = callPackage ./rocwmma { + inherit rocmUpdateScript rocm-cmake rocm-smi rocblas clr; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + rocalution = callPackage ./rocalution { + inherit rocmUpdateScript rocm-cmake rocprim rocsparse rocrand rocblas clr; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + rocmlir = callPackage ./rocmlir { + inherit rocmUpdateScript rocm-cmake rocminfo clr; + stdenv = llvm.rocmClangStdenv; + }; + + rocmlir-rock = rocmlir.override { + buildRockCompiler = true; + }; + + hipsolver = callPackage ./hipsolver { + inherit rocmUpdateScript rocm-cmake rocblas rocsolver clr; + stdenv = llvm.rocmClangStdenv; + }; + + hipblas = callPackage ./hipblas { + inherit rocmUpdateScript rocm-cmake rocblas rocsolver clr; + stdenv = llvm.rocmClangStdenv; + }; + + # hipBlasLt - Very broken with Tensile at the moment, only supports GFX9 + # hipTensor - Only supports GFX9 + + miopengemm= throw '' + 'miopen-opencl' has been deprecated. + It is still available for some time as part of rocmPackages_5. + ''; # Added 2024-3-3; + + composable_kernel = callPackage ./composable_kernel { + inherit rocmUpdateScript rocm-cmake clr; + inherit (llvm) openmp clang-tools-extra; + stdenv = llvm.rocmClangStdenv; + }; + + half = callPackage ./half { + inherit rocmUpdateScript rocm-cmake; + stdenv = llvm.rocmClangStdenv; + }; + + miopen = callPackage ./miopen { + inherit rocmUpdateScript rocm-cmake rocblas clang-ocl composable_kernel rocm-comgr clr rocm-docs-core half roctracer; + inherit (llvm) clang-tools-extra; + stdenv = llvm.rocmClangStdenv; + rocmlir = rocmlir-rock; + boost = boost179.override { enableStatic = true; }; + }; + + 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; + stdenv = llvm.rocmClangStdenv; + rocmlir = rocmlir-rock; + }; + + rpp = callPackage ./rpp { + inherit rocmUpdateScript rocm-cmake rocm-docs-core clr half; + inherit (llvm) openmp; + stdenv = llvm.rocmClangStdenv; + }; + + rpp-hip = rpp.override { + useOpenCL = false; + useCPU = false; + }; + + rpp-opencl = rpp.override { + useOpenCL = true; + useCPU = false; + }; + + rpp-cpu = rpp.override { + useOpenCL = false; + useCPU = true; + }; + + mivisionx = callPackage ./mivisionx { + inherit rocmUpdateScript rocm-cmake rocm-device-libs clr rpp rocblas miopen migraphx half rocm-docs-core; + inherit (llvm) clang openmp; + opencv = opencv.override { enablePython = true; }; + ffmpeg = ffmpeg_4; + rapidjson = rapidjson-unstable; + stdenv = llvm.rocmClangStdenv; + + # Unfortunately, rocAL needs a custom libjpeg-turbo until further notice + # See: https://github.com/ROCm/MIVisionX/issues/1051 + libjpeg_turbo = libjpeg_turbo.overrideAttrs { + version = "2.0.6.1"; + + src = fetchFromGitHub { + owner = "rrawther"; + repo = "libjpeg-turbo"; + rev = "640d7ee1917fcd3b6a5271aa6cf4576bccc7c5fb"; + sha256 = "sha256-T52whJ7nZi8jerJaZtYInC2YDN0QM+9tUDqiNr6IsNY="; + }; + }; + }; + + mivisionx-hip = mivisionx.override { + rpp = rpp-hip; + useOpenCL = false; + useCPU = false; + }; + + mivisionx-opencl = mivisionx.override { + rpp = rpp-opencl; + miopen = miopen-opencl; + useOpenCL = true; + useCPU = false; + }; + + mivisionx-cpu = mivisionx.override { + rpp = rpp-cpu; + useOpenCL = false; + useCPU = true; + }; + + ## Meta ## + # Emulate common ROCm meta layout + # These are mainly for users. I strongly suggest NOT using these in nixpkgs derivations + # Don't put these into `propagatedBuildInputs` unless you want PATH/PYTHONPATH issues! + # See: https://rocm.docs.amd.com/en/docs-5.7.1/_images/image.004.png + # See: https://rocm.docs.amd.com/en/docs-5.7.1/deploy/linux/os-native/package_manager_integration.html + meta = rec { + rocm-developer-tools = symlinkJoin { + name = "rocm-developer-tools-meta"; + + paths = [ + hsa-amd-aqlprofile-bin + rocm-core + rocr-debug-agent + roctracer + rocdbgapi + rocprofiler + rocgdb + rocm-language-runtime + ]; + }; + + rocm-ml-sdk = symlinkJoin { + name = "rocm-ml-sdk-meta"; + + paths = [ + rocm-core + miopen-hip + rocm-hip-sdk + rocm-ml-libraries + ]; + }; + + rocm-ml-libraries = symlinkJoin { + name = "rocm-ml-libraries-meta"; + + paths = [ + llvm.clang + llvm.mlir + llvm.openmp + rocm-core + miopen-hip + rocm-hip-libraries + ]; + }; + + rocm-hip-sdk = symlinkJoin { + name = "rocm-hip-sdk-meta"; + + paths = [ + rocprim + rocalution + hipfft + rocm-core + hipcub + hipblas + rocrand + rocfft + rocsparse + rccl + rocthrust + rocblas + hipsparse + hipfort + rocwmma + hipsolver + rocsolver + rocm-hip-libraries + rocm-hip-runtime-devel + ]; + }; + + rocm-hip-libraries = symlinkJoin { + name = "rocm-hip-libraries-meta"; + + paths = [ + rocblas + hipfort + rocm-core + rocsolver + rocalution + rocrand + hipblas + rocfft + hipfft + rccl + rocsparse + hipsparse + hipsolver + rocm-hip-runtime + ]; + }; + + rocm-openmp-sdk = symlinkJoin { + name = "rocm-openmp-sdk-meta"; + + paths = [ + rocm-core + llvm.clang + llvm.mlir + llvm.openmp # openmp-extras-devel (https://github.com/ROCm/aomp) + rocm-language-runtime + ]; + }; + + rocm-opencl-sdk = symlinkJoin { + name = "rocm-opencl-sdk-meta"; + + paths = [ + rocm-core + rocm-runtime + clr + clr.icd + rocm-thunk + rocm-opencl-runtime + ]; + }; + + rocm-opencl-runtime = symlinkJoin { + name = "rocm-opencl-runtime-meta"; + + paths = [ + rocm-core + clr + clr.icd + rocm-language-runtime + ]; + }; + + rocm-hip-runtime-devel = symlinkJoin { + name = "rocm-hip-runtime-devel-meta"; + + paths = [ + clr + rocm-core + hipify + rocm-cmake + llvm.clang + llvm.mlir + llvm.openmp + rocm-thunk + rocm-runtime + rocm-hip-runtime + ]; + }; + + rocm-hip-runtime = symlinkJoin { + name = "rocm-hip-runtime-meta"; + + paths = [ + rocm-core + rocminfo + clr + rocm-language-runtime + ]; + }; + + rocm-language-runtime = symlinkJoin { + name = "rocm-language-runtime-meta"; + + paths = [ + rocm-runtime + rocm-core + rocm-comgr + llvm.openmp # openmp-extras-runtime (https://github.com/ROCm/aomp) + ]; + }; + + rocm-all = symlinkJoin { + name = "rocm-all-meta"; + + paths = [ + rocm-developer-tools + rocm-ml-sdk + rocm-ml-libraries + rocm-hip-sdk + rocm-hip-libraries + rocm-openmp-sdk + rocm-opencl-sdk + rocm-opencl-runtime + rocm-hip-runtime-devel + rocm-hip-runtime + rocm-language-runtime + ]; + }; + }; +} diff --git a/pkgs/development/rocm-modules/6/half/default.nix b/pkgs/development/rocm-modules/6/half/default.nix new file mode 100644 index 000000000000..77f37790a890 --- /dev/null +++ b/pkgs/development/rocm-modules/6/half/default.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "half"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "half"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-wvl8ny7pbY9hUGGtJ70R7/4YIsahgI7qcVzUnxmUfZM="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "C++ library for half precision floating point arithmetics"; + homepage = "https://github.com/ROCm/half"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.unix; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hip-common/default.nix b/pkgs/development/rocm-modules/6/hip-common/default.nix new file mode 100644 index 000000000000..8b0a4fc5add2 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hip-common/default.nix @@ -0,0 +1,44 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hip-common"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "HIP"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-51u3By0R4LKoWiklNacFP6HILL845jxpN6FD7rQB+zQ="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out + mv * $out + + runHook postInstall + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "C++ Heterogeneous-Compute Interface for Portability"; + homepage = "https://github.com/ROCm/HIP"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipblas/default.nix b/pkgs/development/rocm-modules/6/hipblas/default.nix new file mode 100644 index 000000000000..5989aff90a7d --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipblas/default.nix @@ -0,0 +1,99 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, gfortran +, rocblas +, rocsolver +, gtest +, lapack-reference +, buildTests ? false +, buildBenchmarks ? false +, buildSamples ? false +}: + +# Can also use cuBLAS +stdenv.mkDerivation (finalAttrs: { + pname = "hipblas"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipBLAS"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-Fq7o2sMmHlHIv9UKJw+u/h9K/ZhKVJWwosYTdYIsscA="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + gfortran + ]; + + buildInputs = [ + rocblas + rocsolver + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + lapack-reference + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ] ++ lib.optionals buildSamples [ + "-DBUILD_CLIENTS_SAMPLES=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/hipblas-test $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/hipblas-bench $benchmark/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv $out/bin/example-* $sample/bin + '' + lib.optionalString (buildTests || buildBenchmarks || buildSamples) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm BLAS marshalling library"; + homepage = "https://github.com/ROCm/hipBLAS"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipcc/default.nix b/pkgs/development/rocm-modules/6/hipcc/default.nix new file mode 100644 index 000000000000..96bc914e3a67 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipcc/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, lsb-release +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hipcc"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "HIPCC"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-/LRQN+RSMBPk2jS/tdp3psUL/B0RJZQhRri7e67KsG4="; + }; + + nativeBuildInputs = [ cmake ]; + + postPatch = '' + substituteInPlace src/hipBin_amd.h \ + --replace "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release" + ''; + + postInstall = '' + rm -r $out/hip/bin + ln -s $out/bin $out/hip/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Compiler driver utility that calls clang or nvcc"; + homepage = "https://github.com/ROCm/HIPCC"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipcub/default.nix b/pkgs/development/rocm-modules/6/hipcub/default.nix new file mode 100644 index 000000000000..8f6f97ed5f20 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipcub/default.nix @@ -0,0 +1,90 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocprim +, clr +, gtest +, gbenchmark +, buildTests ? false +, buildBenchmarks ? false +, gpuTargets ? [ ] +}: + +# CUB can also be used as a backend instead of rocPRIM. +stdenv.mkDerivation (finalAttrs: { + pname = "hipcub"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipCUB"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-8QzVgj0JSb86zEG3sj5AAt9pG3frw+xrjEOTo7xCIrc="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ]; + + buildInputs = [ + rocprim + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals buildBenchmarks [ + gbenchmark + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DHIP_ROOT_DIR=${clr}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_TEST=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_BENCHMARK=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/test_* $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/benchmark_* $benchmark/bin + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Thin wrapper library on top of rocPRIM or CUB"; + homepage = "https://github.com/ROCm/hipCUB"; + license = with licenses; [ bsd3 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipfft/default.nix b/pkgs/development/rocm-modules/6/hipfft/default.nix new file mode 100644 index 000000000000..dca6337e6de8 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipfft/default.nix @@ -0,0 +1,110 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, git +, rocfft +, gtest +, boost +, fftw +, fftwFloat +, openmp +, buildTests ? false +, buildBenchmarks ? false +, buildSamples ? false +, gpuTargets ? [ ] +}: + +# Can also use cuFFT +stdenv.mkDerivation (finalAttrs: { + pname = "hipfft"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipFFT"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-DjjNQryJdl7RmaMQRQPWkleweEWMIwH/xXU84GGjoC0="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + clr + git + cmake + rocm-cmake + ]; + + buildInputs = [ + rocfft + ] ++ lib.optionals (buildTests || buildBenchmarks || buildSamples) [ + gtest + boost + fftw + fftwFloat + openmp + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip" + "-DHIP_ROOT_DIR=${clr}" + "-DHIP_PATH=${clr}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_RIDER=ON" + ] ++ lib.optionals buildSamples [ + "-DBUILD_CLIENTS_SAMPLES=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/hipfft-test $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/hipfft-rider $benchmark/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv clients/staging/hipfft_* $sample/bin + patchelf $sample/bin/hipfft_* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "FFT marshalling library"; + homepage = "https://github.com/ROCm/hipFFT"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipfort/default.nix b/pkgs/development/rocm-modules/6/hipfort/default.nix new file mode 100644 index 000000000000..73f583f1fe1d --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipfort/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, gfortran +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hipfort"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipfort"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-3PIqSDyDlY0oVSEx20EPlKGYNkc9xPZtIG3Sbw69esE="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + gfortran + ]; + + cmakeFlags = [ + "-DHIPFORT_COMPILER=${gfortran}/bin/gfortran" + "-DHIPFORT_AR=${gfortran.cc}/bin/gcc-ar" + "-DHIPFORT_RANLIB=${gfortran.cc}/bin/gcc-ranlib" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + postPatch = '' + patchShebangs bin + + substituteInPlace bin/hipfc bin/mymcpu \ + --replace "/bin/cat" "cat" + + substituteInPlace bin/CMakeLists.txt \ + --replace "/bin/mkdir" "mkdir" \ + --replace "/bin/cp" "cp" \ + --replace "/bin/sed" "sed" \ + --replace "/bin/chmod" "chmod" \ + --replace "/bin/ln" "ln" + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Fortran interfaces for ROCm libraries"; + homepage = "https://github.com/ROCm/hipfort"; + license = with licenses; [ mit ]; # mitx11 + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipify/default.nix b/pkgs/development/rocm-modules/6/hipify/default.nix new file mode 100644 index 000000000000..29109a701856 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipify/default.nix @@ -0,0 +1,47 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, clang +, libxml2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hipify"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "HIPIFY"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-nNyWrPPhUwT7FyASzc3kf5NCTzeqvHybVOc+6hBzkA4="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libxml2 ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "\''${LLVM_TOOLS_BINARY_DIR}/clang" "${clang}/bin/clang" + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + postInstall = '' + patchShebangs $out/bin + ''; + + meta = with lib; { + description = "Convert CUDA to Portable C++ Code"; + homepage = "https://github.com/ROCm/HIPIFY"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipsolver/default.nix b/pkgs/development/rocm-modules/6/hipsolver/default.nix new file mode 100644 index 000000000000..43971dc23ebf --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipsolver/default.nix @@ -0,0 +1,100 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, gfortran +, rocblas +, rocsolver +, gtest +, lapack-reference +, buildTests ? false +, buildBenchmarks ? false +, buildSamples ? false +}: + +# Can also use cuSOLVER +stdenv.mkDerivation (finalAttrs: { + pname = "hipsolver"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipSOLVER"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-iMfaOv4TdTkmaRHCZOuqUfjO081J6on71+s8nIwwV00="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + gfortran + ]; + + buildInputs = [ + rocblas + rocsolver + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + lapack-reference + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ] ++ lib.optionals buildSamples [ + "-DBUILD_CLIENTS_SAMPLES=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/hipsolver-test $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/hipsolver-bench $benchmark/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv clients/staging/example-* $sample/bin + patchelf $sample/bin/example-* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm SOLVER marshalling library"; + homepage = "https://github.com/ROCm/hipSOLVER"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hipsparse/default.nix b/pkgs/development/rocm-modules/6/hipsparse/default.nix new file mode 100644 index 000000000000..ba5854e01f39 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hipsparse/default.nix @@ -0,0 +1,136 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocsparse +, clr +, gfortran +, git +, gtest +, openmp +, buildTests ? false +, buildSamples ? false +, gpuTargets ? [ ] +}: + +# This can also use cuSPARSE as a backend instead of rocSPARSE +stdenv.mkDerivation (finalAttrs: { + pname = "hipsparse"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "hipSPARSE"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-fi5b0IF++OiezpM3JuUkhwpmW2apeFH4r5g6CcFseNY="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + gfortran + ]; + + buildInputs = [ + rocsparse + git + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals (buildTests || buildSamples) [ + openmp + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DBUILD_CLIENTS_SAMPLES=${if buildSamples then "ON" else "OFF"}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ]; + + # We have to manually generate the matrices + # CMAKE_MATRICES_DIR seems to be reset in clients/tests/CMakeLists.txt + postPatch = lib.optionalString buildTests '' + mkdir -p matrices + + ln -s ${rocsparse.passthru.matrices.matrix-01}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-02}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-03}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-04}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-05}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-06}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-07}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-08}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-09}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-10}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-11}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-12}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-13}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-14}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-15}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-16}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-17}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-18}/*.mtx matrices + ln -s ${rocsparse.passthru.matrices.matrix-19}/*.mtx matrices + + # Not used by the original cmake, causes an error + rm matrices/*_b.mtx + + echo "deps/convert.cpp -> deps/mtx2csr" + hipcc deps/convert.cpp -O3 -o deps/mtx2csr + + for mat in $(ls -1 matrices | cut -d "." -f 1); do + echo "mtx2csr: $mat.mtx -> $mat.bin" + deps/mtx2csr matrices/$mat.mtx matrices/$mat.bin + unlink matrices/$mat.mtx + done + + substituteInPlace clients/tests/CMakeLists.txt \ + --replace "\''${PROJECT_BINARY_DIR}/matrices" "/build/source/matrices" + ''; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/hipsparse-test $test/bin + mv /build/source/matrices $test + rmdir $out/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv clients/staging/example_* $sample/bin + patchelf --set-rpath $out/lib:${lib.makeLibraryPath ( + finalAttrs.buildInputs ++ [ clr gfortran.cc ])} $sample/bin/example_* + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm SPARSE marshalling library"; + homepage = "https://github.com/ROCm/hipSPARSE"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix b/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix new file mode 100644 index 000000000000..b88485b5fa37 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix @@ -0,0 +1,48 @@ +{ lib +, stdenv +, fetchurl +, callPackage +, dpkg +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hsa-amd-aqlprofile-bin"; + version = "6.0.2"; + + src = let + version = finalAttrs.version; + dotless = builtins.replaceStrings ["."] ["0"] version; + incremental = "115"; + osRelease = "22.04"; + in fetchurl { + url = "https://repo.radeon.com/rocm/apt/${version}/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.${dotless}.${dotless}-${incremental}~${osRelease}_amd64.deb"; + hash = "sha256-0XeKUKaof5pSMS/UgLwumBDBYgyH/pCex9jViUKENXY="; + }; + + nativeBuildInputs = [ dpkg ]; + dontPatch = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -a opt/rocm-${finalAttrs.version}/* $out + chmod +x $out/lib/libhsa-amd-aqlprofile64.so.1.* + chmod +x $out/lib/hsa-amd-aqlprofile/librocprofv2_att.so + + runHook postInstall + ''; + + passthru.updateScript = (callPackage ./update.nix { }) { inherit (finalAttrs) version; }; + + meta = with lib; { + description = "AQLPROFILE library for AMD HSA runtime API extension support"; + homepage = "https://rocm.docs.amd.com/en/latest/"; + license = with licenses; [ unfree ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/update.nix b/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/update.nix new file mode 100644 index 000000000000..7fdcfad85924 --- /dev/null +++ b/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/update.nix @@ -0,0 +1,57 @@ +{ lib +, writeScript +}: + +{ version }: + +let + prefix = "hsa-amd-aqlprofile"; + extVersion = lib.strings.concatStrings (lib.strings.intersperse "0" (lib.versions.splitVersion version)); + major = lib.versions.major version; + minor = lib.versions.minor version; + patch = lib.versions.patch version; + + updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl common-updater-scripts + apt="https://repo.radeon.com/rocm/apt" + pool="pool/main/h/${prefix}/" + url="$apt/latest/$pool" + res="$(curl -sL "$url")" + deb="${prefix}$(echo "$res" | grep -o -P "(?<=href=\"${prefix}).*(?=\">)" | tail -1)" + patch="${patch}" + + # Try up to 10 patch versions + for i in {1..10}; do + ((patch++)) + extVersion="$(echo "$deb" | grep -o -P "(?<=\.....).*(?=\..*-)")" + + if (( ''${#extVersion} == 6 )) && (( $extVersion <= ${extVersion} )); then + url="https://repo.radeon.com/rocm/apt/${major}.${minor}.$patch/pool/main/h/${prefix}/" + res="$(curl -sL "$url")" + deb="${prefix}$(echo "$res" | grep -o -P "(?<=href=\"${prefix}).*(?=\">)" | tail -1)" + else + break + fi + done + + extVersion="$(echo $deb | grep -o -P "(?<=\.....).*(?=\..*-)")" + version="$(echo $extVersion | sed "s/0/./1" | sed "s/0/./1")" + IFS='.' read -a version_arr <<< "$version" + + if (( ''${version_arr[0]} > 6 )); then + echo "'rocmPackages_6.${prefix}-bin' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${prefix}-bin'." 1>&2 + exit 1 + fi + + if (( ''${#extVersion} == 6 )); then + repoVersion="$version" + + if (( ''${version:4:1} == 0 )); then + repoVersion=''${version:0:3} + fi + + update-source-version rocmPackages_6.${prefix}-bin "$version" "" "$apt/$repoVersion/$pool$deb" --ignore-same-hash + fi + ''; +in [ updateScript ] diff --git a/pkgs/development/rocm-modules/6/llvm/base.nix b/pkgs/development/rocm-modules/6/llvm/base.nix new file mode 100644 index 000000000000..95f57b052045 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/base.nix @@ -0,0 +1,175 @@ +{ lib +, stdenv +, gcc12Stdenv +, fetchFromGitHub +, rocmUpdateScript +, pkg-config +, cmake +, ninja +, git +, doxygen +, sphinx +, lit +, libxml2 +, libxcrypt +, libedit +, libffi +, mpfr +, zlib +, ncurses +, python3Packages +, buildDocs ? true +, buildMan ? true +, buildTests ? true +, targetName ? "llvm" +, targetDir ? "llvm" +, targetProjects ? [ ] +, targetRuntimes ? [ ] +, llvmTargetsToBuild ? [ "NATIVE" ] # "NATIVE" resolves into x86 or aarch64 depending on stdenv +, extraPatches ? [ ] +, extraNativeBuildInputs ? [ ] +, extraBuildInputs ? [ ] +, extraCMakeFlags ? [ ] +, extraPostPatch ? "" +, checkTargets ? [( + lib.optionalString buildTests ( + if targetDir == "runtimes" + then "check-runtimes" + else "check-all" + ) +)] +, extraPostInstall ? "" +, hardeningDisable ? [ ] +, requiredSystemFeatures ? [ ] +, extraLicenses ? [ ] +, isBroken ? false +}: + +let stdenv' = stdenv; in +let stdenv = + if stdenv'.cc.cc.isGNU or false && lib.versionAtLeast stdenv'.cc.cc.version "13.0" + then gcc12Stdenv + else stdenv'; +in + +let + llvmNativeTarget = + if stdenv.isx86_64 then "X86" + else if stdenv.isAarch64 then "AArch64" + else throw "Unsupported ROCm LLVM platform"; + inferNativeTarget = t: if t == "NATIVE" then llvmNativeTarget else t; + llvmTargetsToBuild' = [ "AMDGPU" ] ++ builtins.map inferNativeTarget llvmTargetsToBuild; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocm-llvm-${targetName}"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ] ++ lib.optionals buildMan [ + "man" + "info" # Avoid `attribute 'info' missing` when using with wrapCC + ]; + + patches = extraPatches; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "llvm-project"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-uGxalrwMNCOSqSFVrYUBi3ijkMEFFTrzFImmvZKQf6I="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + ninja + git + python3Packages.python + ] ++ lib.optionals (buildDocs || buildMan) [ + doxygen + sphinx + python3Packages.recommonmark + ] ++ lib.optionals (buildTests && !finalAttrs.passthru.isLLVM) [ + lit + ] ++ extraNativeBuildInputs; + + buildInputs = [ + libxml2 + libxcrypt + libedit + libffi + mpfr + ] ++ extraBuildInputs; + + propagatedBuildInputs = lib.optionals finalAttrs.passthru.isLLVM [ + zlib + ncurses + ]; + + sourceRoot = "${finalAttrs.src.name}/${targetDir}"; + + cmakeFlags = [ + "-DLLVM_TARGETS_TO_BUILD=${builtins.concatStringsSep ";" llvmTargetsToBuild'}" + ] ++ lib.optionals (finalAttrs.passthru.isLLVM && targetProjects != [ ]) [ + "-DLLVM_ENABLE_PROJECTS=${lib.concatStringsSep ";" targetProjects}" + ] ++ lib.optionals ((finalAttrs.passthru.isLLVM || targetDir == "runtimes") && targetRuntimes != [ ]) [ + "-DLLVM_ENABLE_RUNTIMES=${lib.concatStringsSep ";" targetRuntimes}" + ] ++ lib.optionals finalAttrs.passthru.isLLVM [ + "-DLLVM_INSTALL_UTILS=ON" + "-DLLVM_INSTALL_GTEST=ON" + ] ++ lib.optionals (buildDocs || buildMan) [ + "-DLLVM_INCLUDE_DOCS=ON" + "-DLLVM_BUILD_DOCS=ON" + # "-DLLVM_ENABLE_DOXYGEN=ON" Way too slow, only uses one core + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_HTML=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" + ] ++ lib.optionals buildTests [ + "-DLLVM_INCLUDE_TESTS=ON" + "-DLLVM_BUILD_TESTS=ON" + "-DLLVM_EXTERNAL_LIT=${lit}/bin/.lit-wrapped" + ] ++ extraCMakeFlags; + + postPatch = lib.optionalString finalAttrs.passthru.isLLVM '' + patchShebangs lib/OffloadArch/make_generated_offload_arch_h.sh + '' + lib.optionalString (buildTests && finalAttrs.passthru.isLLVM) '' + # FileSystem permissions tests fail with various special bits + rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test + rm unittests/Support/Path.cpp + + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "Path.cpp" "" + '' + extraPostPatch; + + doCheck = buildTests; + checkTarget = lib.concatStringsSep " " checkTargets; + + postInstall = lib.optionalString buildMan '' + mkdir -p $info + '' + extraPostInstall; + + passthru = { + isLLVM = targetDir == "llvm"; + isClang = targetDir == "clang" || builtins.elem "clang" targetProjects; + + updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + }; + + inherit hardeningDisable requiredSystemFeatures; + + meta = with lib; { + description = "ROCm fork of the LLVM compiler infrastructure"; + homepage = "https://github.com/ROCm/llvm-project"; + license = with licenses; [ ncsa ] ++ extraLicenses; + maintainers = with maintainers; [ acowley lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = isBroken || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/llvm/default.nix b/pkgs/development/rocm-modules/6/llvm/default.nix new file mode 100644 index 000000000000..9c8919165a51 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/default.nix @@ -0,0 +1,58 @@ +{ # stdenv FIXME: Try changing back to this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943 + gcc12Stdenv +, callPackage +, rocmUpdateScript +, wrapBintoolsWith +, overrideCC +, rocm-device-libs +, rocm-runtime +, rocm-thunk +, clr +}: + +let + ## Stage 1 ## + # Projects + llvm = callPackage ./stage-1/llvm.nix { inherit rocmUpdateScript; stdenv = gcc12Stdenv; }; + clang-unwrapped = callPackage ./stage-1/clang-unwrapped.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; + lld = callPackage ./stage-1/lld.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; + + # Runtimes + runtimes = callPackage ./stage-1/runtimes.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; + + ## Stage 2 ## + # Helpers + bintools-unwrapped = callPackage ./stage-2/bintools-unwrapped.nix { inherit llvm lld; }; + bintools = wrapBintoolsWith { bintools = bintools-unwrapped; }; + rStdenv = callPackage ./stage-2/rstdenv.nix { inherit llvm clang-unwrapped lld runtimes bintools; stdenv = gcc12Stdenv; }; +in rec { + inherit + llvm + clang-unwrapped + lld + bintools; + + # Runtimes + libc = callPackage ./stage-2/libc.nix { inherit rocmUpdateScript; stdenv = rStdenv; }; + libunwind = callPackage ./stage-2/libunwind.nix { inherit rocmUpdateScript; stdenv = rStdenv; }; + libcxxabi = callPackage ./stage-2/libcxxabi.nix { inherit rocmUpdateScript; stdenv = rStdenv; }; + libcxx = callPackage ./stage-2/libcxx.nix { inherit rocmUpdateScript; stdenv = rStdenv; }; + compiler-rt = callPackage ./stage-2/compiler-rt.nix { inherit rocmUpdateScript llvm; stdenv = rStdenv; }; + + ## Stage 3 ## + # Helpers + clang = callPackage ./stage-3/clang.nix { inherit llvm lld clang-unwrapped bintools libc libunwind libcxxabi libcxx compiler-rt; stdenv = gcc12Stdenv; }; + rocmClangStdenv = overrideCC gcc12Stdenv clang; + + # Projects + clang-tools-extra = callPackage ./stage-3/clang-tools-extra.nix { inherit rocmUpdateScript llvm clang-unwrapped; stdenv = rocmClangStdenv; }; + libclc = callPackage ./stage-3/libclc.nix { inherit rocmUpdateScript llvm clang; stdenv = rocmClangStdenv; }; + lldb = callPackage ./stage-3/lldb.nix { inherit rocmUpdateScript clang; stdenv = rocmClangStdenv; }; + mlir = callPackage ./stage-3/mlir.nix { inherit rocmUpdateScript clr; stdenv = rocmClangStdenv; }; + polly = callPackage ./stage-3/polly.nix { inherit rocmUpdateScript; stdenv = rocmClangStdenv; }; + flang = callPackage ./stage-3/flang.nix { inherit rocmUpdateScript clang-unwrapped mlir; stdenv = rocmClangStdenv; }; + openmp = callPackage ./stage-3/openmp.nix { inherit rocmUpdateScript llvm clang-unwrapped clang rocm-device-libs rocm-runtime rocm-thunk; stdenv = rocmClangStdenv; }; + + # Runtimes + pstl = callPackage ./stage-3/pstl.nix { inherit rocmUpdateScript; stdenv = rocmClangStdenv; }; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-1/clang-unwrapped.nix b/pkgs/development/rocm-modules/6/llvm/stage-1/clang-unwrapped.nix new file mode 100644 index 000000000000..5a61732ffd2d --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-1/clang-unwrapped.nix @@ -0,0 +1,47 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, llvm +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + targetName = "clang-unwrapped"; + targetDir = "clang"; + extraBuildInputs = [ llvm ]; + + extraCMakeFlags = [ + "-DCLANG_INCLUDE_DOCS=ON" + "-DCLANG_INCLUDE_TESTS=ON" + ]; + + extraPostPatch = '' + # Looks like they forgot to add finding libedit to the standalone build + ln -s ../cmake/Modules/FindLibEdit.cmake cmake/modules + + substituteInPlace CMakeLists.txt \ + --replace "include(CheckIncludeFile)" "include(CheckIncludeFile)''\nfind_package(LibEdit)" + + # `No such file or directory: '/build/source/clang/tools/scan-build/bin/scan-build'` + rm test/Analysis/scan-build/*.test + rm test/Analysis/scan-build/rebuild_index/rebuild_index.test + + # `does not depend on a module exporting 'baz.h'` + rm test/Modules/header-attribs.cpp + + # We do not have HIP or the ROCm stack available yet + rm test/Driver/hip-options.hip + + # ???? `ld: cannot find crti.o: No such file or directory` linker issue? + rm test/Interpreter/dynamic-library.cpp + + # `fatal error: 'stdio.h' file not found` + rm test/OpenMP/amdgcn_emit_llvm.c + ''; + + extraPostInstall = '' + mv bin/clang-tblgen $out/bin + ''; + + requiredSystemFeatures = [ "big-parallel" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-1/lld.nix b/pkgs/development/rocm-modules/6/llvm/stage-1/lld.nix new file mode 100644 index 000000000000..5ca8bca25a33 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-1/lld.nix @@ -0,0 +1,14 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, llvm +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildMan = false; # No man pages to build + targetName = "lld"; + targetDir = targetName; + extraBuildInputs = [ llvm ]; + checkTargets = [ "check-${targetName}" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-1/llvm.nix b/pkgs/development/rocm-modules/6/llvm/stage-1/llvm.nix new file mode 100644 index 000000000000..f601e96f0a35 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-1/llvm.nix @@ -0,0 +1,10 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix { + inherit stdenv rocmUpdateScript; + requiredSystemFeatures = [ "big-parallel" ]; + isBroken = stdenv.isAarch64; # https://github.com/ROCm/ROCm/issues/1831#issuecomment-1278205344 +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-1/runtimes.nix b/pkgs/development/rocm-modules/6/llvm/stage-1/runtimes.nix new file mode 100644 index 000000000000..0364a02e6e59 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-1/runtimes.nix @@ -0,0 +1,31 @@ +{ lib +, stdenv +, callPackage +, rocmUpdateScript +, llvm +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; + buildMan = false; + buildTests = false; + targetName = "runtimes"; + targetDir = targetName; + + targetRuntimes = [ + "libunwind" + "libcxxabi" + "libcxx" + "compiler-rt" + ]; + + extraBuildInputs = [ llvm ]; + + extraCMakeFlags = [ + "-DLIBCXX_INCLUDE_BENCHMARKS=OFF" + "-DLIBCXX_CXX_ABI=libcxxabi" + ]; + + extraLicenses = [ lib.licenses.mit ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/1000-libcxx-failing-tests.list b/pkgs/development/rocm-modules/6/llvm/stage-2/1000-libcxx-failing-tests.list new file mode 100644 index 000000000000..e005d6c928c2 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/1000-libcxx-failing-tests.list @@ -0,0 +1,171 @@ +../libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp +../libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp +../libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp +../libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp +../libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp +../libcxx/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp +../libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +../libcxx/test/libcxx/localization/locales/locale/locale.types/locale.facet/no_allocation.pass.cpp +../libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp +../libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp +../libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp +../libcxx/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp +../libcxx/test/std/containers/associative/map/map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_allocator_requirements.pass.cpp +../libcxx/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/containers/associative/set/insert_and_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp +../libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp +../libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp +../libcxx/test/std/containers/sequences/vector.bool/ctor_exceptions.pass.cpp +../libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp +../libcxx/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp +../libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_allocator_requirements.pass.cpp +../libcxx/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/containers/unord/unord.set/insert_and_emplace_allocator_requirements.pass.cpp +../libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp +../libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp +../libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/copy_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/copy.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/move_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/move.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/status.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/symlink_status.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp +../libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp +../libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp +../libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp +../libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp +../libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp +../libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp +../libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp +../libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp +../libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp +../libcxx/test/std/strings/basic.string/string.cons/substr_rvalue.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.assign/copy.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.cons/copy.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp +../libcxx/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp +../libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp +../libcxx/test/std/utilities/any/any.nonmembers/make_any.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp +../libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp +../libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate_at_least.pass.cpp +../libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_throw.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +../libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp +../libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/bintools-unwrapped.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/bintools-unwrapped.nix new file mode 100644 index 000000000000..ef40dd4d3824 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/bintools-unwrapped.nix @@ -0,0 +1,28 @@ +{ runCommand +, llvm +, lld +}: + +runCommand "rocm-llvm-binutils-${llvm.version}" { preferLocalBuild = true; } '' + mkdir -p $out/bin + + for prog in ${lld}/bin/*; do + ln -s $prog $out/bin/$(basename $prog) + done + + for prog in ${llvm}/bin/*; do + ln -sf $prog $out/bin/$(basename $prog) + done + + ln -s ${llvm}/bin/llvm-ar $out/bin/ar + ln -s ${llvm}/bin/llvm-as $out/bin/as + ln -s ${llvm}/bin/llvm-dwp $out/bin/dwp + ln -s ${llvm}/bin/llvm-nm $out/bin/nm + ln -s ${llvm}/bin/llvm-objcopy $out/bin/objcopy + ln -s ${llvm}/bin/llvm-objdump $out/bin/objdump + ln -s ${llvm}/bin/llvm-ranlib $out/bin/ranlib + ln -s ${llvm}/bin/llvm-readelf $out/bin/readelf + ln -s ${llvm}/bin/llvm-size $out/bin/size + ln -s ${llvm}/bin/llvm-strip $out/bin/strip + ln -s ${lld}/bin/lld $out/bin/ld +'' diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/compiler-rt.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/compiler-rt.nix new file mode 100644 index 000000000000..3b8e41705e1a --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/compiler-rt.nix @@ -0,0 +1,63 @@ +{ lib +, stdenv +, callPackage +, rocmUpdateScript +, llvm +, glibc +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; # No documentation to build + buildMan = false; # No man pages to build + targetName = "compiler-rt"; + targetDir = "runtimes"; + + targetRuntimes = [ + "libunwind" + "libcxxabi" + "libcxx" + targetName + ]; + + extraCMakeFlags = [ + "-DCOMPILER_RT_INCLUDE_TESTS=ON" + "-DCOMPILER_RT_USE_LLVM_UNWINDER=ON" + "-DCOMPILER_RT_CXX_LIBRARY=libcxx" + "-DCOMPILER_RT_CAN_EXECUTE_TESTS=OFF" # We can't run most of these + + # Workaround having to build combined + "-DLIBUNWIND_INCLUDE_DOCS=OFF" + "-DLIBUNWIND_INCLUDE_TESTS=OFF" + "-DLIBUNWIND_USE_COMPILER_RT=ON" + "-DLIBUNWIND_INSTALL_LIBRARY=OFF" + "-DLIBUNWIND_INSTALL_HEADERS=OFF" + "-DLIBCXXABI_INCLUDE_TESTS=OFF" + "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" + "-DLIBCXXABI_USE_COMPILER_RT=ON" + "-DLIBCXXABI_INSTALL_LIBRARY=OFF" + "-DLIBCXXABI_INSTALL_HEADERS=OFF" + "-DLIBCXX_INCLUDE_DOCS=OFF" + "-DLIBCXX_INCLUDE_TESTS=OFF" + "-DLIBCXX_USE_COMPILER_RT=ON" + "-DLIBCXX_CXX_ABI=libcxxabi" + "-DLIBCXX_INSTALL_LIBRARY=OFF" + "-DLIBCXX_INSTALL_HEADERS=OFF" + ]; + + extraPostPatch = '' + # `No such file or directory: 'ldd'` + substituteInPlace ../compiler-rt/test/lit.common.cfg.py \ + --replace "'ldd'," "'${glibc.bin}/bin/ldd'," + + # We can run these + substituteInPlace ../compiler-rt/test/CMakeLists.txt \ + --replace "endfunction()" "endfunction()''\nadd_subdirectory(builtins)''\nadd_subdirectory(shadowcallstack)" + + # Could not launch llvm-config in /build/source/runtimes/build/bin + mkdir -p build/bin + ln -s ${llvm}/bin/llvm-config build/bin + ''; + + extraLicenses = [ lib.licenses.mit ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/libc.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/libc.nix new file mode 100644 index 000000000000..7e7cf9c2a608 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/libc.nix @@ -0,0 +1,26 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildMan = false; # No man pages to build + targetName = "libc"; + targetDir = "runtimes"; + targetRuntimes = [ targetName ]; + + extraPostPatch = '' + # `Failed to match ... against ...` `Match value not within tolerance value of MPFR result:` + # We need a better way, but I don't know enough sed magic and patching `CMakeLists.txt` isn't working... + substituteInPlace ../libc/test/src/math/log10_test.cpp \ + --replace "i < N" "i < 0" \ + --replace "test(mpfr::RoundingMode::Nearest);" "" \ + --replace "test(mpfr::RoundingMode::Downward);" "" \ + --replace "test(mpfr::RoundingMode::Upward);" "" \ + --replace "test(mpfr::RoundingMode::TowardZero);" "" + ''; + + checkTargets = [ "check-${targetName}" ]; + hardeningDisable = [ "fortify" ]; # Prevent `error: "Assumed value of MB_LEN_MAX wrong"` +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/libcxx.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/libcxx.nix new file mode 100644 index 000000000000..473227242765 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/libcxx.nix @@ -0,0 +1,42 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildMan = false; # No man pages to build + targetName = "libcxx"; + targetDir = "runtimes"; + + targetRuntimes = [ + "libunwind" + "libcxxabi" + targetName + ]; + + extraCMakeFlags = [ + "-DLIBCXX_INCLUDE_DOCS=ON" + "-DLIBCXX_INCLUDE_TESTS=ON" + "-DLIBCXX_USE_COMPILER_RT=ON" + "-DLIBCXX_CXX_ABI=libcxxabi" + + # Workaround having to build combined + "-DLIBUNWIND_INCLUDE_DOCS=OFF" + "-DLIBUNWIND_INCLUDE_TESTS=OFF" + "-DLIBUNWIND_USE_COMPILER_RT=ON" + "-DLIBUNWIND_INSTALL_LIBRARY=OFF" + "-DLIBUNWIND_INSTALL_HEADERS=OFF" + "-DLIBCXXABI_INCLUDE_TESTS=OFF" + "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" + "-DLIBCXXABI_USE_COMPILER_RT=ON" + "-DLIBCXXABI_INSTALL_LIBRARY=OFF" + "-DLIBCXXABI_INSTALL_HEADERS=OFF" + ]; + + # Most of these can't find `bash` or `mkdir`, might just be hard-coded paths, or PATH is altered + extraPostPatch = '' + chmod +w -R ../libcxx/test/{libcxx,std} + cat ${./1000-libcxx-failing-tests.list} | xargs -d \\n rm + ''; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/libcxxabi.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/libcxxabi.nix new file mode 100644 index 000000000000..e15ec777ff61 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/libcxxabi.nix @@ -0,0 +1,37 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; # No documentation to build + buildMan = false; # No man pages to build + targetName = "libcxxabi"; + targetDir = "runtimes"; + + targetRuntimes = [ + "libunwind" + targetName + "libcxx" + ]; + + extraCMakeFlags = [ + "-DLIBCXXABI_INCLUDE_TESTS=ON" + "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" + "-DLIBCXXABI_USE_COMPILER_RT=ON" + + # Workaround having to build combined + "-DLIBUNWIND_INCLUDE_DOCS=OFF" + "-DLIBUNWIND_INCLUDE_TESTS=OFF" + "-DLIBUNWIND_USE_COMPILER_RT=ON" + "-DLIBUNWIND_INSTALL_LIBRARY=OFF" + "-DLIBUNWIND_INSTALL_HEADERS=OFF" + "-DLIBCXX_INCLUDE_DOCS=OFF" + "-DLIBCXX_INCLUDE_TESTS=OFF" + "-DLIBCXX_USE_COMPILER_RT=ON" + "-DLIBCXX_CXX_ABI=libcxxabi" + "-DLIBCXX_INSTALL_LIBRARY=OFF" + "-DLIBCXX_INSTALL_HEADERS=OFF" + ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/libunwind.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/libunwind.nix new file mode 100644 index 000000000000..3d599e0d4b32 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/libunwind.nix @@ -0,0 +1,26 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildMan = false; # No man pages to build + targetName = "libunwind"; + targetDir = "runtimes"; + targetRuntimes = [ targetName ]; + + extraCMakeFlags = [ + "-DLIBUNWIND_INCLUDE_DOCS=ON" + "-DLIBUNWIND_INCLUDE_TESTS=ON" + "-DLIBUNWIND_USE_COMPILER_RT=ON" + ]; + + extraPostPatch = '' + # `command had no output on stdout or stderr` (Says these unsupported tests) + chmod +w -R ../libunwind/test + rm ../libunwind/test/floatregister.pass.cpp + rm ../libunwind/test/unwind_leaffunction.pass.cpp + rm ../libunwind/test/libunwind_02.pass.cpp + ''; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-2/rstdenv.nix b/pkgs/development/rocm-modules/6/llvm/stage-2/rstdenv.nix new file mode 100644 index 000000000000..3820d45a2b81 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-2/rstdenv.nix @@ -0,0 +1,36 @@ +{ stdenv +, overrideCC +, wrapCCWith +, llvm +, clang-unwrapped +, lld +, runtimes +, bintools +}: + +overrideCC stdenv (wrapCCWith rec { + inherit bintools; + libcxx = runtimes; + cc = clang-unwrapped; + gccForLibs = stdenv.cc.cc; + + extraPackages = [ + llvm + lld + ]; + + nixSupport.cc-cflags = [ + "-resource-dir=$out/resource-root" + "-fuse-ld=lld" + "-rtlib=compiler-rt" + "-unwindlib=libunwind" + "-Wno-unused-command-line-argument" + ]; + + extraBuildCommands = '' + clang_version=`${cc}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"` + mkdir -p $out/resource-root + ln -s ${cc}/lib/clang/$clang_version/include $out/resource-root + ln -s ${runtimes}/lib $out/resource-root + ''; +}) diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/0000-mlir-fix-debugtranslation.patch b/pkgs/development/rocm-modules/6/llvm/stage-3/0000-mlir-fix-debugtranslation.patch new file mode 100644 index 000000000000..f4221a088136 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/0000-mlir-fix-debugtranslation.patch @@ -0,0 +1,36 @@ +From f1d1e10ec7e1061bf0b90abbc1e298d9438a5e74 Mon Sep 17 00:00:00 2001 +From: Scott Linder <Scott.Linder@amd.com> +Date: Mon, 11 Sep 2023 18:37:37 +0000 +Subject: [PATCH] [HeterogeneousDWARF] Update MLIR DI Metadata handling + +Pass a default DW_MSPACE_LLVM_none to satisfy new API + +Change-Id: I50df461f00b5510a715f55f61107122318102d22 +--- + lib/Target/LLVMIR/DebugTranslation.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/Target/LLVMIR/DebugTranslation.cpp b/lib/Target/LLVMIR/DebugTranslation.cpp +index 2053f5bcef06aa6..635ee5d7e5fefdc 100644 +--- a/lib/Target/LLVMIR/DebugTranslation.cpp ++++ b/lib/Target/LLVMIR/DebugTranslation.cpp +@@ -148,7 +148,8 @@ llvm::DIDerivedType *DebugTranslation::translateImpl(DIDerivedTypeAttr attr) { + /*File=*/nullptr, /*Line=*/0, + /*Scope=*/nullptr, translate(attr.getBaseType()), attr.getSizeInBits(), + attr.getAlignInBits(), attr.getOffsetInBits(), +- /*DWARFAddressSpace=*/std::nullopt, /*Flags=*/llvm::DINode::FlagZero); ++ /*DWARFAddressSpace=*/std::nullopt, llvm::dwarf::DW_MSPACE_LLVM_none, ++ /*Flags=*/llvm::DINode::FlagZero); + } + + llvm::DIFile *DebugTranslation::translateImpl(DIFileAttr attr) { +@@ -185,7 +186,8 @@ DebugTranslation::translateImpl(DILocalVariableAttr attr) { + llvmCtx, translate(attr.getScope()), getMDStringOrNull(attr.getName()), + translate(attr.getFile()), attr.getLine(), translate(attr.getType()), + attr.getArg(), +- /*Flags=*/llvm::DINode::FlagZero, attr.getAlignInBits(), ++ /*Flags=*/llvm::DINode::FlagZero, llvm::dwarf::DW_MSPACE_LLVM_none, ++ attr.getAlignInBits(), + /*Annotations=*/nullptr); + } + diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/1000-openmp-failing-tests.list b/pkgs/development/rocm-modules/6/llvm/stage-3/1000-openmp-failing-tests.list new file mode 100644 index 000000000000..e53b21b3c535 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/1000-openmp-failing-tests.list @@ -0,0 +1,122 @@ +runtime/test/tasking/hidden_helper_task/gtid.cpp +runtime/test/ompt/parallel/parallel_if0.c +runtime/test/ompt/parallel/serialized.c +runtime/test/ompt/teams/parallel_team.c +runtime/test/ompt/teams/serial_teams.c +runtime/test/ompt/teams/serialized.c +runtime/test/ompt/teams/team.c +libomptarget/test/api/assert.c +libomptarget/test/api/omp_device_managed_memory.c +libomptarget/test/api/omp_device_memory.c +libomptarget/test/api/omp_get_device_num.c +libomptarget/test/api/omp_host_pinned_memory.c +libomptarget/test/api/omp_host_pinned_memory_alloc.c +libomptarget/test/api/omp_target_memcpy_async1.c +libomptarget/test/api/omp_target_memcpy_async2.c +libomptarget/test/api/omp_target_memcpy_rect_async1.c +libomptarget/test/api/omp_target_memcpy_rect_async2.c +libomptarget/test/mapping/array_section_implicit_capture.c +libomptarget/test/mapping/data_absent_at_exit.c +libomptarget/test/mapping/data_member_ref.cpp +libomptarget/test/mapping/declare_mapper_api.cpp +libomptarget/test/mapping/declare_mapper_target.cpp +libomptarget/test/mapping/declare_mapper_target_data.cpp +libomptarget/test/mapping/declare_mapper_target_data_enter_exit.cpp +libomptarget/test/mapping/firstprivate_aligned.cpp +libomptarget/test/mapping/has_device_addr.cpp +libomptarget/test/mapping/implicit_device_ptr.c +libomptarget/test/mapping/is_device_ptr.cpp +libomptarget/test/mapping/lambda_mapping.cpp +libomptarget/test/mapping/low_alignment.c +libomptarget/test/mapping/map_back_race.cpp +libomptarget/test/mapping/power_of_two_alignment.c +libomptarget/test/mapping/pr38704.c +libomptarget/test/mapping/prelock.cpp +libomptarget/test/mapping/present/target_data_at_exit.c +libomptarget/test/mapping/private_mapping.c +libomptarget/test/mapping/ptr_and_obj_motion.c +libomptarget/test/mapping/reduction_implicit_map.cpp +libomptarget/test/mapping/target_derefence_array_pointrs.cpp +libomptarget/test/mapping/target_map_for_member_data.cpp +libomptarget/test/mapping/target_update_array_extension.c +libomptarget/test/mapping/target_use_device_addr.c +libomptarget/test/offloading/atomic-compare-signedness.c +libomptarget/test/offloading/bug47654.cpp +libomptarget/test/offloading/bug49021.cpp +libomptarget/test/offloading/bug49779.cpp +libomptarget/test/offloading/bug50022.cpp +libomptarget/test/offloading/bug51781.c +libomptarget/test/offloading/bug51982.c +libomptarget/test/offloading/bug53727.cpp +libomptarget/test/offloading/complex_reduction.cpp +libomptarget/test/offloading/cuda_no_devices.c +libomptarget/test/offloading/d2d_memcpy.c +libomptarget/test/offloading/dynamic_module.c +libomptarget/test/offloading/dynamic_module_load.c +libomptarget/test/offloading/global_constructor.cpp +libomptarget/test/offloading/lone_target_exit_data.c +libomptarget/test/offloading/memory_manager.cpp +libomptarget/test/offloading/parallel_offloading_map.cpp +libomptarget/test/offloading/static_linking.c +libomptarget/test/offloading/std_complex_arithmetic.cpp +libomptarget/test/offloading/target-teams-atomic.c +libomptarget/test/offloading/target_constexpr_mapping.cpp +libomptarget/test/offloading/target_critical_region.cpp +libomptarget/test/offloading/target_depend_nowait.cpp +libomptarget/test/offloading/target_nowait_target.cpp +libomptarget/test/offloading/taskloop_offload_nowait.cpp +libomptarget/test/offloading/test_libc.cpp +libomptarget/test/ompt/veccopy.c +libomptarget/test/ompt/veccopy_disallow_both.c +libomptarget/test/ompt/veccopy_emi.c +libomptarget/test/ompt/veccopy_emi_map.c +libomptarget/test/ompt/veccopy_map.c +libomptarget/test/ompt/veccopy_no_device_init.c +libomptarget/test/ompt/veccopy_wrong_return.c +libomptarget/test/api/is_initial_device.c +libomptarget/test/mapping/declare_mapper_nested_default_mappers_array_subscript.cpp +libomptarget/test/mapping/declare_mapper_nested_default_mappers_ptr_subscript.cpp +libomptarget/test/mapping/declare_mapper_nested_default_mappers_var.cpp +libomptarget/test/mapping/target_pointers_members_map.cpp +libomptarget/test/api/omp_dynamic_shared_memory_mixed.c +libomptarget/test/api/omp_env_vars.c +libomptarget/test/api/omp_get_mapped_ptr.c +libomptarget/test/api/omp_get_num_devices.c +libomptarget/test/api/omp_get_num_devices_with_empty_target.c +libomptarget/test/mapping/alloc_fail.c +libomptarget/test/mapping/array_section_use_device_ptr.c +libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp +libomptarget/test/mapping/declare_mapper_nested_mappers.cpp +libomptarget/test/mapping/declare_mapper_target_update.cpp +libomptarget/test/mapping/delete_inf_refcount.c +libomptarget/test/mapping/lambda_by_value.cpp +libomptarget/test/mapping/ompx_hold/omp_target_disassociate_ptr.c +libomptarget/test/mapping/ompx_hold/struct.c +libomptarget/test/mapping/ompx_hold/target-data.c +libomptarget/test/mapping/ompx_hold/target.c +libomptarget/test/mapping/present/target.c +libomptarget/test/mapping/present/target_array_extension.c +libomptarget/test/mapping/present/target_data.c +libomptarget/test/mapping/present/target_data_array_extension.c +libomptarget/test/mapping/present/target_enter_data.c +libomptarget/test/mapping/present/target_exit_data_delete.c +libomptarget/test/mapping/present/target_exit_data_release.c +libomptarget/test/mapping/present/target_update.c +libomptarget/test/mapping/present/target_update_array_extension.c +libomptarget/test/mapping/present/zero_length_array_section.c +libomptarget/test/mapping/present/zero_length_array_section_exit.c +libomptarget/test/mapping/target_data_array_extension_at_exit.c +libomptarget/test/mapping/target_has_device_addr.c +libomptarget/test/mapping/target_implicit_partial_map.c +libomptarget/test/mapping/target_wrong_use_device_addr.c +libomptarget/test/offloading/host_as_target.c +libomptarget/test/offloading/info.c +libomptarget/test/offloading/offloading_success.c +libomptarget/test/offloading/offloading_success.cpp +libomptarget/test/offloading/wtime.c +libomptarget/test/unified_shared_memory/api.c +libomptarget/test/unified_shared_memory/associate_ptr.c +libomptarget/test/unified_shared_memory/close_enter_exit.c +libomptarget/test/unified_shared_memory/close_manual.c +libomptarget/test/unified_shared_memory/close_member.c +libomptarget/test/unified_shared_memory/close_modifier.c diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/1001-mlir-failing-tests.list b/pkgs/development/rocm-modules/6/llvm/stage-3/1001-mlir-failing-tests.list new file mode 100644 index 000000000000..0b3d2d22592d --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/1001-mlir-failing-tests.list @@ -0,0 +1,11 @@ +./test/Target/LLVMIR/openmp-llvm.mlir +./test/mlir-spirv-cpu-runner/double.mlir +./test/mlir-spirv-cpu-runner/simple_add.mlir +./test/mlir-vulkan-runner/addf.mlir +./test/mlir-vulkan-runner/addi.mlir +./test/mlir-vulkan-runner/addi8.mlir +./test/mlir-vulkan-runner/mulf.mlir +./test/mlir-vulkan-runner/smul_extended.mlir +./test/mlir-vulkan-runner/subf.mlir +./test/mlir-vulkan-runner/time.mlir +./test/mlir-vulkan-runner/umul_extended.mlir diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/clang-tools-extra.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/clang-tools-extra.nix new file mode 100644 index 000000000000..d18673ecb3db --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/clang-tools-extra.nix @@ -0,0 +1,42 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, llvm +, clang-unwrapped +, gtest +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildTests = false; # `invalid operands to binary expression ('std::basic_stringstream<char>' and 'const llvm::StringRef')` + targetName = "clang-tools-extra"; + + targetProjects = [ + "clang" + "clang-tools-extra" + ]; + + extraBuildInputs = [ gtest ]; + + extraCMakeFlags = [ + "-DLLVM_INCLUDE_DOCS=OFF" + "-DLLVM_INCLUDE_TESTS=OFF" + "-DCLANG_INCLUDE_DOCS=OFF" + "-DCLANG_INCLUDE_TESTS=ON" + "-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=ON" + ]; + + extraPostInstall = '' + # Remove LLVM and Clang + for path in `find ${llvm} ${clang-unwrapped}`; do + if [ $path != ${llvm} ] && [ $path != ${clang-unwrapped} ]; then + rm -f $out''${path#${llvm}} $out''${path#${clang-unwrapped}} || true + fi + done + + # Cleanup empty directories + find $out -type d -empty -delete + ''; + + requiredSystemFeatures = [ "big-parallel" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/clang.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/clang.nix new file mode 100644 index 000000000000..91f34265f85f --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/clang.nix @@ -0,0 +1,73 @@ +{ stdenv +, wrapCCWith +, llvm +, lld +, clang-unwrapped +, bintools +, libc +, libunwind +, libcxxabi +, libcxx +, compiler-rt +}: + +wrapCCWith rec { + inherit libcxx bintools; + + # We do this to avoid HIP pathing problems, and mimic a monolithic install + cc = stdenv.mkDerivation (finalAttrs: { + inherit (clang-unwrapped) version; + pname = "rocm-llvm-clang"; + dontUnpack = true; + + installPhase = '' + runHook preInstall + + clang_version=`${clang-unwrapped}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"` + mkdir -p $out/{bin,include/c++/v1,lib/{cmake,clang/$clang_version/{include,lib}},libexec,share} + + for path in ${llvm} ${clang-unwrapped} ${lld} ${libc} ${libunwind} ${libcxxabi} ${libcxx} ${compiler-rt}; do + cp -as $path/* $out + chmod +w $out/{*,include/c++/v1,lib/{clang/$clang_version/include,cmake}} + rm -f $out/lib/libc++.so + done + + ln -s $out/lib/* $out/lib/clang/$clang_version/lib + ln -sf $out/include/* $out/lib/clang/$clang_version/include + + runHook postInstall + ''; + + passthru.isClang = true; + }); + + extraPackages = [ + llvm + lld + libc + libunwind + libcxxabi + compiler-rt + ]; + + nixSupport.cc-cflags = [ + "-resource-dir=$out/resource-root" + "-fuse-ld=lld" + "-rtlib=compiler-rt" + "-unwindlib=libunwind" + "-Wno-unused-command-line-argument" + ]; + + extraBuildCommands = '' + clang_version=`${cc}/bin/clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"` + mkdir -p $out/resource-root + ln -s ${cc}/lib/clang/$clang_version/{include,lib} $out/resource-root + + # Not sure why, but hardening seems to make things break + echo "" > $out/nix-support/add-hardening.sh + + # GPU compilation uses builtin `lld` + substituteInPlace $out/bin/{clang,clang++} \ + --replace "-MM) dontLink=1 ;;" "-MM | --cuda-device-only) dontLink=1 ;;''\n--cuda-host-only | --cuda-compile-host-device) dontLink=0 ;;" + ''; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/flang.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/flang.nix new file mode 100644 index 000000000000..421663dcb1b7 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/flang.nix @@ -0,0 +1,31 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, clang-unwrapped +, mlir +, graphviz +, python3Packages +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + targetName = "flang"; + targetDir = targetName; + + extraNativeBuildInputs = [ + graphviz + python3Packages.sphinx-markdown-tables + ]; + + extraBuildInputs = [ mlir ]; + + extraCMakeFlags = [ + "-DCLANG_DIR=${clang-unwrapped}/lib/cmake/clang" + "-DMLIR_TABLEGEN_EXE=${mlir}/bin/mlir-tblgen" + "-DCLANG_TABLEGEN_EXE=${clang-unwrapped}/bin/clang-tblgen" + "-DFLANG_INCLUDE_TESTS=OFF" # `The dependency target "Bye" of target ...` + ]; + + # `flang/lib/Semantics/check-omp-structure.cpp:1905:1: error: no member named 'v' in 'Fortran::parser::OmpClause::OmpxDynCgroupMem'` + isBroken = true; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/libclc.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/libclc.nix new file mode 100644 index 000000000000..1fd72ee67188 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/libclc.nix @@ -0,0 +1,36 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, llvm +, clang +, spirv-llvm-translator +}: + +let + spirv = (spirv-llvm-translator.override { inherit llvm; }); +in callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; # No documentation to build + buildMan = false; # No man pages to build + targetName = "libclc"; + targetDir = targetName; + extraBuildInputs = [ spirv ]; + + # `spirv-mesa3d` isn't compiling with LLVM 15.0.0, it does with LLVM 14.0.0 + # Try removing the `spirv-mesa3d` and `clspv` patches next update + # `clspv` tests fail, unresolved calls + extraPostPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "find_program( LLVM_CLANG clang PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \ + "find_program( LLVM_CLANG clang PATHS \"${clang}/bin\" NO_DEFAULT_PATH )" \ + --replace "find_program( LLVM_SPIRV llvm-spirv PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \ + "find_program( LLVM_SPIRV llvm-spirv PATHS \"${spirv}/bin\" NO_DEFAULT_PATH )" \ + --replace " spirv-mesa3d-" "" \ + --replace " spirv64-mesa3d-" "" \ + --replace "NOT \''${t} MATCHES" \ + "NOT \''${ARCH} STREQUAL \"clspv\" AND NOT \''${ARCH} STREQUAL \"clspv64\" AND NOT \''${t} MATCHES" + ''; + + checkTargets = [ ]; + isBroken = true; # ROCm 5.7.0 doesn't have IR/AttributeMask.h yet...? +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/lldb.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/lldb.nix new file mode 100644 index 000000000000..9b7d25e06d9d --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/lldb.nix @@ -0,0 +1,39 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, clang +, xz +, swig +, lua5_3 +, graphviz +, gtest +, python3Packages +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildTests = false; # FIXME: Bad pathing for clang executable in tests, using relative path most likely + targetName = "lldb"; + targetDir = targetName; + extraNativeBuildInputs = [ python3Packages.sphinx-automodapi ]; + + extraBuildInputs = [ + xz + swig + lua5_3 + graphviz + gtest + ]; + + extraCMakeFlags = [ + "-DLLDB_EXTERNAL_CLANG_RESOURCE_DIR=${clang}/resource-root/lib/clang/$clang_version" + "-DLLDB_INCLUDE_TESTS=ON" + "-DLLDB_INCLUDE_UNITTESTS=ON" + ]; + + extraPostPatch = '' + export clang_version=`clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"` + ''; + + checkTargets = [ "check-${targetName}" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/mlir.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/mlir.nix new file mode 100644 index 000000000000..6de685ea2771 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/mlir.nix @@ -0,0 +1,57 @@ +{ stdenv +, callPackage +, rocmUpdateScript +, clr +, vulkan-headers +, vulkan-loader +, glslang +, shaderc +, lit +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; # No decent way to hack this to work + buildMan = false; # No man pages to build + targetName = "mlir"; + targetDir = targetName; + + # Fix `DebugTranslation.cpp:139:10: error: no matching function for call to 'get'` + # We patch at a different source root, so we modify the patch and include it locally + # https://github.com/ROCm/llvm-project/commit/f1d1e10ec7e1061bf0b90abbc1e298d9438a5e74.patch + extraPatches = [ ./0000-mlir-fix-debugtranslation.patch ]; + extraNativeBuildInputs = [ clr ]; + + extraBuildInputs = [ + vulkan-headers + vulkan-loader + glslang + shaderc + ]; + + extraCMakeFlags = [ + "-DMLIR_INCLUDE_DOCS=ON" + "-DMLIR_INCLUDE_TESTS=ON" + "-DMLIR_ENABLE_ROCM_RUNNER=ON" + "-DMLIR_ENABLE_SPIRV_CPU_RUNNER=ON" + "-DMLIR_ENABLE_VULKAN_RUNNER=ON" + "-DROCM_TEST_CHIPSET=gfx000" # CPU runner + ]; + + extraPostPatch = '' + # `add_library cannot create target "llvm_gtest" because an imported target with the same name already exists` + substituteInPlace CMakeLists.txt \ + --replace "EXISTS \''${UNITTEST_DIR}/googletest/include/gtest/gtest.h" "FALSE" + + # Mainly `No such file or directory` + cat ${./1001-mlir-failing-tests.list} | xargs -d \\n rm + ''; + + extraPostInstall = '' + mkdir -p $out/bin + mv bin/mlir-tblgen $out/bin + ''; + + checkTargets = [ "check-${targetName}" ]; + requiredSystemFeatures = [ "big-parallel" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix new file mode 100644 index 000000000000..5fd7b6fd9aa3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, callPackage +, rocmUpdateScript +, llvm +, clang +, clang-unwrapped +, rocm-device-libs +, rocm-runtime +, rocm-thunk +, perl +, elfutils +, libdrm +, numactl +, lit +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + targetName = "openmp"; + targetDir = targetName; + extraNativeBuildInputs = [ perl ]; + + extraBuildInputs = [ + rocm-device-libs + rocm-runtime + rocm-thunk + elfutils + libdrm + numactl + ]; + + extraCMakeFlags = [ + "-DCMAKE_MODULE_PATH=/build/source/llvm/cmake/modules" # For docs + "-DCLANG_TOOL=${clang}/bin/clang" + "-DCLANG_OFFLOAD_BUNDLER_TOOL=${clang-unwrapped}/bin/clang-offload-bundler" + "-DPACKAGER_TOOL=${clang-unwrapped}/bin/clang-offload-packager" + "-DOPENMP_LLVM_TOOLS_DIR=${llvm}/bin" + "-DOPENMP_LLVM_LIT_EXECUTABLE=${lit}/bin/.lit-wrapped" + "-DDEVICELIBS_ROOT=${rocm-device-libs.src}" + ]; + + extraPostPatch = '' + # We can't build this target at the moment + substituteInPlace libomptarget/DeviceRTL/CMakeLists.txt \ + --replace "gfx1010" "" + + # No idea what's going on here... + cat ${./1000-openmp-failing-tests.list} | xargs -d \\n rm + ''; + + checkTargets = [ "check-${targetName}" ]; + extraLicenses = [ lib.licenses.mit ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/polly.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/polly.nix new file mode 100644 index 000000000000..e001f33dfd43 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/polly.nix @@ -0,0 +1,18 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + targetName = "polly"; + targetDir = targetName; + + extraPostPatch = '' + # `add_library cannot create target "llvm_gtest" because an imported target with the same name already exists` + substituteInPlace CMakeLists.txt \ + --replace "NOT TARGET gtest" "FALSE" + ''; + + checkTargets = [ "check-${targetName}" ]; +} diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/pstl.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/pstl.nix new file mode 100644 index 000000000000..dc7d7cd6ccbf --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/pstl.nix @@ -0,0 +1,15 @@ +{ stdenv +, callPackage +, rocmUpdateScript +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + buildDocs = false; # No documentation to build + buildMan = false; # No man pages to build + buildTests = false; # Too many errors + targetName = "pstl"; + targetDir = "runtimes"; + targetRuntimes = [ targetName ]; + checkTargets = [ "check-${targetName}" ]; +} diff --git a/pkgs/development/rocm-modules/6/migraphx/default.nix b/pkgs/development/rocm-modules/6/migraphx/default.nix new file mode 100644 index 000000000000..4cc2e4bd24b3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/migraphx/default.nix @@ -0,0 +1,171 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, pkg-config +, cmake +, rocm-cmake +, clr +, clang-tools-extra +, openmp +, rocblas +, rocmlir +, composable_kernel +, miopen +, protobuf +, half +, nlohmann_json +, msgpack +, sqlite +, oneDNN_2 +, blaze +, cppcheck +, rocm-device-libs +, texliveSmall +, doxygen +, sphinx +, docutils +, ghostscript +, python3Packages +, buildDocs ? false +, buildTests ? false +, gpuTargets ? clr.gpuTargets +}: + +let + latex = lib.optionalAttrs buildDocs (texliveSmall.withPackages (ps: with ps; [ + latexmk + tex-gyre + fncychap + wrapfig + capt-of + framed + needspace + tabulary + varwidth + titlesec + epstopdf + ])); +in stdenv.mkDerivation (finalAttrs: { + pname = "migraphx"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ] ++ lib.optionals buildTests [ + "test" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "AMDMIGraphX"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-VDYUSpWYAdJ63SKVCO26DVAC3RtZM7otqN0sYUA6DBQ="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + rocm-cmake + clr + clang-tools-extra + python3Packages.python + ] ++ lib.optionals buildDocs [ + latex + doxygen + sphinx + docutils + ghostscript + python3Packages.sphinx-rtd-theme + python3Packages.breathe + ]; + + buildInputs = [ + openmp + rocblas + rocmlir + composable_kernel + miopen + protobuf + half + nlohmann_json + msgpack + sqlite + oneDNN_2 + blaze + cppcheck + python3Packages.pybind11 + python3Packages.onnx + ]; + + cmakeFlags = [ + "-DMIGRAPHX_ENABLE_GPU=ON" + "-DMIGRAPHX_ENABLE_CPU=ON" + "-DMIGRAPHX_ENABLE_FPGA=ON" + "-DMIGRAPHX_ENABLE_MLIR=OFF" # LLVM or rocMLIR mismatch? + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ]; + + postPatch = '' + # We need to not use hipcc and define the CXXFLAGS manually due to `undefined hidden symbol: tensorflow:: ...` + export CXXFLAGS+="--rocm-path=${clr} --rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode" + patchShebangs tools + + # `error: '__clang_hip_runtime_wrapper.h' file not found [clang-diagnostic-error]` + substituteInPlace CMakeLists.txt \ + --replace "set(MIGRAPHX_TIDY_ERRORS ALL)" "" + + # JIT library was removed from composable_kernel... + # https://github.com/ROCm/composable_kernel/issues/782 + substituteInPlace src/targets/gpu/CMakeLists.txt \ + --replace " COMPONENTS jit_library" "" \ + --replace " composable_kernel::jit_library" "" \ + --replace "if(WIN32)" "if(TRUE)" + '' + lib.optionalString (!buildDocs) '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(doc)" "" + '' + lib.optionalString (!buildTests) '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(test)" "" + ''; + + # Unfortunately, it seems like we have to call make on this manually + preInstall = lib.optionalString buildDocs '' + export HOME=$(mktemp -d) + make -j$NIX_BUILD_CORES doc + cd ../doc/pdf + make -j$NIX_BUILD_CORES + cd - + ''; + + postInstall = lib.optionalString buildDocs '' + mv ../doc/html $out/share/doc/migraphx + mv ../doc/pdf/MIGraphX.pdf $out/share/doc/migraphx + '' + lib.optionalString buildTests '' + mkdir -p $test/bin + mv bin/test_* $test/bin + patchelf $test/bin/test_* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "AMD's graph optimization engine"; + homepage = "https://github.com/ROCm/AMDMIGraphX"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = true; + }; +}) diff --git a/pkgs/development/rocm-modules/6/miopen/default.nix b/pkgs/development/rocm-modules/6/miopen/default.nix new file mode 100644 index 000000000000..f78bcb602e69 --- /dev/null +++ b/pkgs/development/rocm-modules/6/miopen/default.nix @@ -0,0 +1,234 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, rocmUpdateScript +, runCommand +, pkg-config +, cmake +, rocm-cmake +, rocblas +, rocmlir +, clr +, clang-tools-extra +, clang-ocl +, composable_kernel +, frugally-deep +, rocm-docs-core +, half +, boost +, sqlite +, bzip2 +, lbzip2 +, nlohmann_json +, texliveSmall +, doxygen +, sphinx +, zlib +, gtest +, rocm-comgr +, roctracer +, python3Packages +, buildDocs ? false # Needs internet because of rocm-docs-core +, buildTests ? false +}: + +let + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "MIOpen"; + rev = "rocm-${version}"; + hash = "sha256-mbOdlSb0ESKi9hMkq3amv70Xkp/YKnZYre24d/y5TD0="; + fetchLFS = true; + leaveDotGit = true; + + # If you're reading this, it's gonna take a bit of time. + # fetchSubModules doesn't work with postFetch??? + # fetchLFS isn't actually fetching the LFS files... + postFetch = '' + export HOME=$(mktemp -d) + cd $out + + # We need more history to fetch LFS files + git remote add origin $url + git fetch origin + git clean -fdx + git checkout rocm-${version} + + # We need to do this manually since using leaveDotGit and fetchSubmodules errors + git submodule update --init + + # Fetch the LFS files + git lfs install + git lfs fetch --all + git lfs checkout + + # Remove the defunct .git folder + rm -rf .git + ''; + }; + + latex = lib.optionalAttrs buildDocs (texliveSmall.withPackages (ps: with ps; [ + latexmk + tex-gyre + fncychap + wrapfig + capt-of + framed + needspace + tabulary + varwidth + titlesec + ])); + + gfx900 = runCommand "miopen-gfx900.kdb" { preferLocalBuild = true; } '' + ${lbzip2}/bin/lbzip2 -ckd ${src}/src/kernels/gfx900.kdb.bz2 > $out + ''; + + gfx906 = runCommand "miopen-gfx906.kdb" { preferLocalBuild = true; } '' + ${lbzip2}/bin/lbzip2 -ckd ${src}/src/kernels/gfx906.kdb.bz2 > $out + ''; + + gfx908 = runCommand "miopen-gfx908.kdb" { preferLocalBuild = true; } '' + ${lbzip2}/bin/lbzip2 -ckd ${src}/src/kernels/gfx908.kdb.bz2 > $out + ''; + + gfx90a = runCommand "miopen-gfx90a.kdb" { preferLocalBuild = true; } '' + ${lbzip2}/bin/lbzip2 -ckd ${src}/src/kernels/gfx90a.kdb.bz2 > $out + ''; + + gfx1030 = runCommand "miopen-gfx1030.kdb" { preferLocalBuild = true; } '' + ${lbzip2}/bin/lbzip2 -ckd ${src}/src/kernels/gfx1030.kdb.bz2 > $out + ''; +in stdenv.mkDerivation (finalAttrs: { + inherit version src; + pname = "miopen"; + + # Find zstd and add to target. Mainly for torch. + patches = [ + (fetchpatch { + url = "https://github.com/ROCm/MIOpen/commit/e608b4325646afeabb5e52846997b926d2019d19.patch"; + hash = "sha256-oxa3qlIC2bzbwGxrQOZXoY/S7CpLsMrnWRB7Og0tk0M="; + }) + (fetchpatch { + url = "https://github.com/ROCm/MIOpen/commit/3413d2daaeb44b7d6eadcc03033a5954a118491e.patch"; + hash = "sha256-ST4snUcTmmSI1Ogx815KEX9GdMnmubsavDzXCGJkiKs="; + }) + ]; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ] ++ lib.optionals buildTests [ + "test" + ]; + + nativeBuildInputs = [ + pkg-config + cmake + rocm-cmake + clr + clang-tools-extra + ]; + + buildInputs = [ + rocblas + rocmlir + clang-ocl + composable_kernel + half + boost + sqlite + bzip2 + nlohmann_json + frugally-deep + roctracer + ] ++ lib.optionals buildDocs [ + latex + doxygen + sphinx + rocm-docs-core + python3Packages.sphinx-rtd-theme + python3Packages.breathe + python3Packages.myst-parser + ] ++ lib.optionals buildTests [ + zlib + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_FLAGS=-Wno-#warnings" # <half> -> <half/half.hpp> + "-DUNZIPPER=${bzip2}/bin/bunzip2" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DMIOPEN_BACKEND=HIP" + ] ++ lib.optionals buildTests [ + "-DBUILD_TESTS=ON" + "-DMIOPEN_TEST_ALL=ON" + ]; + + postPatch = '' + patchShebangs test src/composable_kernel fin utils install_deps.cmake + + substituteInPlace CMakeLists.txt \ + --replace "unpack_db(\"\''${CMAKE_SOURCE_DIR}/src/kernels/\''${FILE_NAME}.kdb.bz2\")" "" \ + --replace "MIOPEN_HIP_COMPILER MATCHES \".*clang\\\\+\\\\+$\"" "true" \ + --replace "set(MIOPEN_TIDY_ERRORS ALL)" "" # error: missing required key 'key' + + substituteInPlace test/gtest/CMakeLists.txt \ + --replace "include(googletest)" "" + + ln -sf ${gfx900} src/kernels/gfx900.kdb + ln -sf ${gfx906} src/kernels/gfx906.kdb + ln -sf ${gfx908} src/kernels/gfx908.kdb + ln -sf ${gfx90a} src/kernels/gfx90a.kdb + ln -sf ${gfx1030} src/kernels/gfx1030.kdb + ''; + + # Unfortunately, it seems like we have to call make on these manually + postBuild = lib.optionalString buildDocs '' + python -m sphinx -T -E -b html -d _build/doctrees -D language=en ../docs _build/html + '' + lib.optionalString buildTests '' + make -j$NIX_BUILD_CORES check + ''; + + postInstall = '' + rm $out/bin/install_precompiled_kernels.sh + ln -sf ${gfx900} $out/share/miopen/db/gfx900.kdb + ln -sf ${gfx906} $out/share/miopen/db/gfx906.kdb + ln -sf ${gfx908} $out/share/miopen/db/gfx908.kdb + ln -sf ${gfx90a} $out/share/miopen/db/gfx90a.kdb + ln -sf ${gfx1030} $out/share/miopen/db/gfx1030.kdb + '' + lib.optionalString buildDocs '' + mv ../doc/html $out/share/doc/miopen-hip + '' + lib.optionalString buildTests '' + mkdir -p $test/bin + mv bin/test_* $test/bin + patchelf --set-rpath $out/lib:${lib.makeLibraryPath (finalAttrs.buildInputs ++ + [ clr rocm-comgr ])} $test/bin/* + ''; + + requiredSystemFeatures = [ "big-parallel" ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Machine intelligence library for ROCm"; + homepage = "https://github.com/ROCm/MIOpen"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/mivisionx/default.nix b/pkgs/development/rocm-modules/6/mivisionx/default.nix new file mode 100644 index 000000000000..e3e6172709fe --- /dev/null +++ b/pkgs/development/rocm-modules/6/mivisionx/default.nix @@ -0,0 +1,142 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-device-libs +, clr +, pkg-config +, rpp +, rocblas +, miopen +, migraphx +, clang +, openmp +, protobuf +, qtcreator +, opencv +, ffmpeg +, boost +, libjpeg_turbo +, half +, lmdb +, rapidjson +, rocm-docs-core +, python3Packages +, useOpenCL ? false +, useCPU ? false +, buildDocs ? false # Needs internet +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "mivisionx-" + ( + if (!useOpenCL && !useCPU) then "hip" + else if (!useOpenCL && !useCPU) then "opencl" + else "cpu" + ); + + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "MIVisionX"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-d32lcJq24MXeIWbNbo6putWaol5kF2io6cz4ZuL+DbE="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + pkg-config + ] ++ lib.optionals buildDocs [ + rocm-docs-core + python3Packages.python + ]; + + buildInputs = [ + miopen + migraphx + rpp + rocblas + openmp + half + protobuf + qtcreator + opencv + ffmpeg + boost + libjpeg_turbo + lmdb + rapidjson + python3Packages.pybind11 + python3Packages.numpy + python3Packages.torchWithRocm + ]; + + cmakeFlags = [ + "-DROCM_PATH=${clr}" + "-DAMDRPP_PATH=${rpp}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DCMAKE_INSTALL_PREFIX_PYTHON=lib" + # "-DAMD_FP16_SUPPORT=ON" `error: typedef redefinition with different types ('__half' vs 'half_float::half')` + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals (!useOpenCL && !useCPU) [ + "-DBACKEND=HIP" + ] ++ lib.optionals (useOpenCL && !useCPU) [ + "-DBACKEND=OCL" + ] ++ lib.optionals useCPU [ + "-DBACKEND=CPU" + ]; + + postPatch = '' + # We need to not use hipcc and define the CXXFLAGS manually due to `undefined hidden symbol: tensorflow:: ...` + export CXXFLAGS+="--rocm-path=${clr} --rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode" + patchShebangs rocAL/rocAL_pybind/examples + + # Properly find miopen + substituteInPlace amd_openvx_extensions/CMakeLists.txt \ + --replace "miopen PATHS \''${ROCM_PATH} QUIET" "miopen PATHS ${miopen} QUIET" \ + --replace "\''${ROCM_PATH}/include/miopen/config.h" "${miopen}/include/miopen/config.h" + + # Properly find turbojpeg + substituteInPlace amd_openvx/cmake/FindTurboJpeg.cmake \ + --replace "\''${TURBO_JPEG_PATH}/include" "${libjpeg_turbo.dev}/include" \ + --replace "\''${TURBO_JPEG_PATH}/lib" "${libjpeg_turbo.out}/lib" + + # Fix bad paths + substituteInPlace rocAL/rocAL/rocAL_hip/CMakeLists.txt amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt amd_openvx/openvx/hipvx/CMakeLists.txt \ + --replace "COMPILER_FOR_HIP \''${ROCM_PATH}/llvm/bin/clang++" "COMPILER_FOR_HIP ${clang}/bin/clang++" + ''; + + postBuild = lib.optionalString buildDocs '' + python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en ../docs _build/html + ''; + + postInstall = lib.optionalString (!useOpenCL && !useCPU) '' + patchelf $out/lib/rocal_pybind*.so --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" + chmod +x $out/lib/rocal_pybind*.so + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Set of comprehensive computer vision and machine intelligence libraries, utilities, and applications"; + homepage = "https://github.com/ROCm/MIVisionX"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rccl/default.nix b/pkgs/development/rocm-modules/6/rccl/default.nix new file mode 100644 index 000000000000..cdbbd70440c2 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rccl/default.nix @@ -0,0 +1,91 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-smi +, clr +, perl +, hipify +, gtest +, chrpath +, buildTests ? false +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rccl"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rccl"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-Oyml47yGEB7fALxBcDjqFngS38cnI39sDj94/JV7wE0="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + perl + hipify + ]; + + buildInputs = [ + rocm-smi + gtest + ] ++ lib.optionals buildTests [ + chrpath + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DBUILD_BFD=OFF" # Can't get it to detect bfd.h + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_TESTS=ON" + ]; + + postPatch = '' + patchShebangs src tools + + # Really strange behavior, `#!/usr/bin/env perl` should work... + substituteInPlace CMakeLists.txt \ + --replace "\''$ \''${hipify-perl_executable}" "${perl}/bin/perl ${hipify}/bin/hipify-perl" + ''; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/* $test/bin + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm communication collectives library"; + homepage = "https://github.com/ROCm/rccl"; + license = with licenses; [ bsd2 bsd3 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rdc/default.nix b/pkgs/development/rocm-modules/6/rdc/default.nix new file mode 100644 index 000000000000..6591e55a0cc7 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rdc/default.nix @@ -0,0 +1,125 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-smi +, rocm-runtime +, libcap +, grpc +, protobuf +, openssl +, doxygen +, graphviz +, texliveSmall +, gtest +, buildDocs ? true +, buildTests ? false +}: + +let + latex = lib.optionalAttrs buildDocs (texliveSmall.withPackages (ps: with ps; [ + changepage + latexmk + varwidth + multirow + hanging + adjustbox + collectbox + stackengine + enumitem + alphalph + wasysym + sectsty + tocloft + newunicodechar + etoc + helvetic + wasy + courier + ])); +in stdenv.mkDerivation (finalAttrs: { + pname = "rdc"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ] ++ lib.optionals buildTests [ + "test" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rdc"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-QugcajxILmDeQiWG5uAUO41Wut45irg2Ynufgn1bmps="; + }; + + nativeBuildInputs = [ + cmake + protobuf + ] ++ lib.optionals buildDocs [ + doxygen + graphviz + latex + ]; + + buildInputs = [ + rocm-smi + rocm-runtime + libcap + grpc + openssl + ] ++ lib.optionals buildTests [ + gtest + ]; + + cmakeFlags = [ + "-DCMAKE_VERBOSE_MAKEFILE=OFF" + "-DRDC_INSTALL_PREFIX=${placeholder "out"}" + "-DBUILD_ROCRTEST=ON" + "-DRSMI_INC_DIR=${rocm-smi}/include" + "-DRSMI_LIB_DIR=${rocm-smi}/lib" + "-DGRPC_ROOT=${grpc}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DCMAKE_INSTALL_LIBEXECDIR=libexec" + "-DCMAKE_INSTALL_DOCDIR=doc" + ] ++ lib.optionals buildTests [ + "-DBUILD_TESTS=ON" + ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "file(STRINGS /etc/os-release LINUX_DISTRO LIMIT_COUNT 1 REGEX \"NAME=\")" "set(LINUX_DISTRO \"NixOS\")" + ''; + + postInstall = '' + find $out/bin -executable -type f -exec \ + patchelf {} --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" \; + '' + lib.optionalString buildTests '' + mkdir -p $test + mv $out/bin/rdctst_tests $test/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Simplifies administration and addresses infrastructure challenges in cluster and datacenter environments"; + homepage = "https://github.com/ROCm/rdc"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + # broken = versions.minor finalAttrs.version != versions.minor rocm-smi.version || versionAtLeast finalAttrs.version "7.0.0"; + broken = true; # Too many errors, unsure how to fix + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocalution/default.nix b/pkgs/development/rocm-modules/6/rocalution/default.nix new file mode 100644 index 000000000000..056cbb9b358c --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocalution/default.nix @@ -0,0 +1,115 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocblas +, rocsparse +, rocprim +, rocrand +, clr +, git +, openmp +, openmpi +, gtest +, buildTests ? false +, buildBenchmarks ? false +, buildSamples ? false +, gpuTargets ? [ ] # gpuTargets = [ "gfx803" "gfx900:xnack-" "gfx906:xnack-" ... ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocalution"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocALUTION"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-mrN+CI2mqaMi8oKxui7HAIE2qSn50aNaFipkWwYMtbc="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + git + ]; + + buildInputs = [ + rocblas + rocsparse + rocprim + rocrand + openmp + openmpi + ] ++ lib.optionals buildTests [ + gtest + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DROCM_PATH=${clr}" + "-DHIP_ROOT_DIR=${clr}" + "-DSUPPORT_HIP=ON" + "-DSUPPORT_OMP=ON" + "-DSUPPORT_MPI=ON" + "-DBUILD_CLIENTS_SAMPLES=${if buildSamples then "ON" else "OFF"}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/rocalution-test $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/rocalution-bench $benchmark/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv clients/staging/* $sample/bin + rm $sample/bin/rocalution-test || true + rm $sample/bin/rocalution-bench || true + + patchelf --set-rpath \ + $out/lib:${lib.makeLibraryPath (finalAttrs.buildInputs ++ [ clr ])} \ + $sample/bin/* + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Iterative sparse solvers for ROCm"; + homepage = "https://github.com/ROCm/rocALUTION"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix new file mode 100644 index 000000000000..296167bb6f28 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -0,0 +1,209 @@ +{ rocblas +, lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, runCommand +, cmake +, rocm-cmake +, clr +, python3 +, tensile +, msgpack +, libxml2 +, gtest +, gfortran +, openmp +, amd-blis +, python3Packages +, buildTensile ? true +, buildTests ? false +, buildBenchmarks ? false +, tensileLogic ? "asm_full" +, tensileCOVersion ? "default" +, tensileSepArch ? true +, tensileLazyLib ? true +, tensileLibFormat ? "msgpack" +, gpuTargets ? [ "all" ] +}: + +let + # NOTE: Update the default GPU targets on every update + gfx80 = (rocblas.override { + gpuTargets = [ + "gfx803" + ]; + }).overrideAttrs { pname = "rocblas-tensile-gfx80"; }; + + gfx90 = (rocblas.override { + gpuTargets = [ + "gfx900" + "gfx906:xnack-" + "gfx908:xnack-" + "gfx90a:xnack+" + "gfx90a:xnack-" + ]; + }).overrideAttrs { pname = "rocblas-tensile-gfx90"; }; + + gfx94 = (rocblas.override { + gpuTargets = [ + "gfx940" + "gfx941" + "gfx942" + ]; + }).overrideAttrs { pname = "rocblas-tensile-gfx94"; }; + + gfx10 = (rocblas.override { + gpuTargets = [ + "gfx1010" + "gfx1012" + "gfx1030" + ]; + }).overrideAttrs { pname = "rocblas-tensile-gfx10"; }; + + gfx11 = (rocblas.override { + gpuTargets = [ + "gfx1100" + "gfx1101" + "gfx1102" + ]; + }).overrideAttrs { pname = "rocblas-tensile-gfx11"; }; + + # Unfortunately, we have to do two full builds, otherwise we get overlapping _fallback.dat files + fallbacks = rocblas.overrideAttrs { pname = "rocblas-tensile-fallbacks"; }; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocblas"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocBLAS"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-G68d/gvBbTdNx8xR3xY+OkBm5Yxq1NFjxby9BbpOcUk="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ]; + + buildInputs = [ + python3 + ] ++ lib.optionals buildTensile [ + msgpack + libxml2 + python3Packages.msgpack + python3Packages.joblib + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + gfortran + openmp + amd-blis + ] ++ lib.optionals (buildTensile || buildTests || buildBenchmarks) [ + python3Packages.pyyaml + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-Dpython=python3" + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + "-DBUILD_WITH_TENSILE=${if buildTensile then "ON" else "OFF"}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals buildTensile [ + "-DVIRTUALENV_HOME_DIR=/build/source/tensile" + "-DTensile_TEST_LOCAL_PATH=/build/source/tensile" + "-DTensile_ROOT=/build/source/tensile/${python3.sitePackages}/Tensile" + "-DTensile_LOGIC=${tensileLogic}" + "-DTensile_CODE_OBJECT_VERSION=${tensileCOVersion}" + "-DTensile_SEPARATE_ARCHITECTURES=${if tensileSepArch then "ON" else "OFF"}" + "-DTensile_LAZY_LIBRARY_LOADING=${if tensileLazyLib then "ON" else "OFF"}" + "-DTensile_LIBRARY_FORMAT=${tensileLibFormat}" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + "-DCMAKE_CXX_FLAGS=-I${amd-blis}/include/blis" + ]; + + postPatch = lib.optionalString (finalAttrs.pname != "rocblas") '' + # Return early and install tensile files manually + substituteInPlace library/src/CMakeLists.txt \ + --replace "set_target_properties( TensileHost PROPERTIES OUTPUT_NAME" "return()''\nset_target_properties( TensileHost PROPERTIES OUTPUT_NAME" + '' + lib.optionalString (buildTensile && finalAttrs.pname == "rocblas") '' + # Link the prebuilt Tensile files + mkdir -p build/Tensile/library + + for path in ${gfx80} ${gfx90} ${gfx94} ${gfx10} ${gfx11} ${fallbacks}; do + ln -s $path/lib/rocblas/library/* build/Tensile/library + done + + unlink build/Tensile/library/TensileManifest.txt + '' + lib.optionalString buildTensile '' + # Tensile REALLY wants to write to the nix directory if we include it normally + cp -a ${tensile} tensile + chmod +w -R tensile + + # Rewrap Tensile + substituteInPlace tensile/bin/{.t*,.T*,*} \ + --replace "${tensile}" "/build/source/tensile" + + substituteInPlace CMakeLists.txt \ + --replace "include(virtualenv)" "" \ + --replace "virtualenv_install(\''${Tensile_TEST_LOCAL_PATH})" "" + ''; + + postInstall = lib.optionalString (finalAttrs.pname == "rocblas") '' + ln -sf ${fallbacks}/lib/rocblas/library/TensileManifest.txt $out/lib/rocblas/library + '' + lib.optionalString (finalAttrs.pname != "rocblas") '' + mkdir -p $out/lib/rocblas/library + rm -rf $out/share + '' + lib.optionalString (finalAttrs.pname != "rocblas" && finalAttrs.pname != "rocblas-tensile-fallbacks") '' + rm Tensile/library/{TensileManifest.txt,*_fallback.dat} + mv Tensile/library/* $out/lib/rocblas/library + '' + lib.optionalString (finalAttrs.pname == "rocblas-tensile-fallbacks") '' + mv Tensile/library/{TensileManifest.txt,*_fallback.dat} $out/lib/rocblas/library + '' + lib.optionalString buildTests '' + mkdir -p $test/bin + cp -a $out/bin/* $test/bin + rm $test/bin/*-bench || true + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + cp -a $out/bin/* $benchmark/bin + rm $benchmark/bin/*-test || true + '' + lib.optionalString (buildTests || buildBenchmarks ) '' + rm -rf $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + requiredSystemFeatures = [ "big-parallel" ]; + + meta = with lib; { + description = "BLAS implementation for ROCm platform"; + homepage = "https://github.com/ROCm/rocBLAS"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocdbgapi/default.nix b/pkgs/development/rocm-modules/6/rocdbgapi/default.nix new file mode 100644 index 000000000000..9d1006c32945 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocdbgapi/default.nix @@ -0,0 +1,111 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, git +, rocm-comgr +, rocm-runtime +, hwdata +, texliveSmall +, doxygen +, graphviz +, buildDocs ? true +}: + +let + latex = lib.optionalAttrs buildDocs (texliveSmall.withPackages (ps: with ps; [ + changepage + latexmk + varwidth + multirow + hanging + adjustbox + collectbox + stackengine + enumitem + alphalph + wasysym + sectsty + tocloft + newunicodechar + etoc + helvetic + wasy + courier + ])); +in stdenv.mkDerivation (finalAttrs: { + pname = "rocdbgapi"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCdbgapi"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-+CxaTmxRt/RicqQddqIEHs8vvAPCMKXkWg7kbZvnUsQ="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + git + ] ++ lib.optionals buildDocs [ + latex + doxygen + graphviz + ]; + + buildInputs = [ + rocm-comgr + rocm-runtime + hwdata + ]; + + cmakeFlags = [ + "-DPCI_IDS_PATH=${hwdata}/share/hwdata" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + # Unfortunately, it seems like we have to call make on this manually + postBuild = lib.optionalString buildDocs '' + export HOME=$(mktemp -d) + make -j$NIX_BUILD_CORES doc + ''; + + postInstall = '' + substituteInPlace $out/lib/cmake/amd-dbgapi/amd-dbgapi-config.cmake \ + --replace "/build/source/build/" "" + + substituteInPlace $out/lib/cmake/amd-dbgapi/amd-dbgapi-targets.cmake \ + --replace "/build/source/build" "$out" + '' + lib.optionalString buildDocs '' + mv $out/share/html/amd-dbgapi $doc/share/doc/amd-dbgapi/html + rmdir $out/share/html + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Debugger support for control of execution and inspection state"; + homepage = "https://github.com/ROCm/ROCdbgapi"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocfft/default.nix b/pkgs/development/rocm-modules/6/rocfft/default.nix new file mode 100644 index 000000000000..9fd1f02398b3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocfft/default.nix @@ -0,0 +1,169 @@ +{ rocfft +, lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, clr +, python3 +, rocm-cmake +, sqlite +, boost +, fftw +, fftwFloat +, gtest +, openmp +, rocrand +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocfft"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocFFT"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-6Gjsy14GeR08VqnNmFhu8EyYDnQ+VZRlg+u9MAAWfHc="; + }; + + nativeBuildInputs = [ + cmake + clr + python3 + rocm-cmake + ]; + + buildInputs = [ sqlite ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DSQLITE_USE_SYSTEM_PACKAGE=ON" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ]; + + passthru = { + test = stdenv.mkDerivation { + pname = "${finalAttrs.pname}-test"; + inherit (finalAttrs) version src; + + sourceRoot = "${finalAttrs.src.name}/clients/tests"; + + nativeBuildInputs = [ + cmake + clr + rocm-cmake + ]; + + buildInputs = [ + boost + fftw + fftwFloat + finalAttrs.finalPackage + gtest + openmp + rocrand + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + ]; + + postInstall = '' + rm -r "$out/lib/fftw" + rmdir "$out/lib" + ''; + }; + + benchmark = stdenv.mkDerivation { + pname = "${finalAttrs.pname}-benchmark"; + inherit (finalAttrs) version src; + + sourceRoot = "${finalAttrs.src.name}/clients/rider"; + + nativeBuildInputs = [ + cmake + clr + rocm-cmake + ]; + + buildInputs = [ + boost + finalAttrs.finalPackage + openmp + (python3.withPackages (ps: with ps; [ + pandas + scipy + ])) + rocrand + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + ]; + + postInstall = '' + cp -a ../../../scripts/perf "$out/bin" + ''; + }; + + samples = stdenv.mkDerivation { + pname = "${finalAttrs.pname}-samples"; + inherit (finalAttrs) version src; + + sourceRoot = "${finalAttrs.src.name}/clients/samples"; + + nativeBuildInputs = [ + cmake + clr + rocm-cmake + ]; + + buildInputs = [ + boost + finalAttrs.finalPackage + openmp + rocrand + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + ]; + + installPhase = '' + runHook preInstall + mkdir "$out" + cp -a bin "$out" + runHook postInstall + ''; + }; + + updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + }; + + requiredSystemFeatures = [ "big-parallel" ]; + + meta = with lib; { + description = "FFT implementation for ROCm"; + homepage = "https://github.com/ROCm/rocFFT"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ kira-bruneau ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocgdb/default.nix b/pkgs/development/rocm-modules/6/rocgdb/default.nix new file mode 100644 index 000000000000..919b3e70f6e0 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocgdb/default.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, pkg-config +, texinfo +, bison +, flex +, zlib +, elfutils +, gmp +, ncurses +, expat +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocgdb"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCgdb"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-XeX/k8gfo9HgcUSIjs35C7IqCmFhvBOqQJSOoPF6HK4="; + }; + + nativeBuildInputs = [ + pkg-config + texinfo # For makeinfo + bison + flex + ]; + + buildInputs = [ + zlib + elfutils + gmp + ncurses + expat + ]; + + # `-Wno-format-nonliteral` doesn't work + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm source-level debugger for Linux, based on GDB"; + homepage = "https://github.com/ROCm/ROCgdb"; + license = with licenses; [ gpl2 gpl3 bsd3 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-cmake/default.nix b/pkgs/development/rocm-modules/6/rocm-cmake/default.nix new file mode 100644 index 000000000000..cd3fd9c035da --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-cmake/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocm-cmake"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocm-cmake"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-qSjWT0KOQ5oDV06tfnKN+H/JzdoOnR9KY0c+SjvDepM="; + }; + + nativeBuildInputs = [ cmake ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "CMake modules for common build tasks for the ROCm stack"; + homepage = "https://github.com/ROCm/rocm-cmake"; + license = licenses.mit; + maintainers = teams.rocm.members; + platforms = platforms.unix; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-comgr/default.nix b/pkgs/development/rocm-modules/6/rocm-comgr/default.nix new file mode 100644 index 000000000000..c610b63abf68 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-comgr/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-device-libs +, libxml2 +}: + +let + llvmNativeTarget = + if stdenv.isx86_64 then "X86" + else if stdenv.isAarch64 then "AArch64" + else throw "Unsupported ROCm LLVM platform"; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocm-comgr"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCm-CompilerSupport"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-9HuNU/k+kPJMlzqOTM20gm6SAOWJe9tpAZXEj4erdmI="; + }; + + sourceRoot = "${finalAttrs.src.name}/lib/comgr"; + + nativeBuildInputs = [ + cmake + rocm-cmake + ]; + + buildInputs = [ + rocm-device-libs + libxml2 + ]; + + cmakeFlags = [ "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86" ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "APIs for compiling and inspecting AMDGPU code objects"; + homepage = "https://github.com/ROCm/ROCm-CompilerSupport/tree/amd-stg-open/lib/comgr"; + license = licenses.ncsa; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-core/default.nix b/pkgs/development/rocm-modules/6/rocm-core/default.nix new file mode 100644 index 000000000000..2601918d9165 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-core/default.nix @@ -0,0 +1,38 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocm-core"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocm-core"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-sgL1UMt3o01zA8v41dyCG1fAsK/PkTRsHQJOvlNatZ4="; + }; + + nativeBuildInputs = [ cmake ]; + cmakeFlags = [ "-DROCM_VERSION=${finalAttrs.version}" ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + page = "tags?per_page=1"; + filter = ".[0].name | split(\"-\") | .[1]"; + }; + + meta = with lib; { + description = "Utility for getting the ROCm release version"; + homepage = "https://github.com/ROCm/rocm-core"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-device-libs/cmake.patch b/pkgs/development/rocm-modules/6/rocm-device-libs/cmake.patch new file mode 100644 index 000000000000..500ff37a9905 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-device-libs/cmake.patch @@ -0,0 +1,43 @@ +diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake +index 07c60eb..c736b3e 100644 +--- a/cmake/Packages.cmake ++++ b/cmake/Packages.cmake +@@ -12,24 +12,29 @@ set_target_properties(${target} PROPERTIES + IMPORTED_LOCATION \"${target_path}\")") + endforeach() + configure_file(AMDDeviceLibsConfig.cmake.in +- ${PACKAGE_PREFIX}/AMDDeviceLibsConfig.cmake ++ lib/cmake/AMDDeviceLibs/AMDDeviceLibsConfig.cmake + @ONLY) + + + set(install_path_suffix "amdgcn/bitcode") + + # Generate the install-tree package. +-# We do not know the absolute path to the intall tree until we are installed, +-# so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use +-# relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE. +-set(AMD_DEVICE_LIBS_PREFIX_CODE " ++if(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}") ++ set(AMD_DEVICE_LIBS_PREFIX_CODE "set(AMD_DEVICE_LIBS_PREFIX \"${CMAKE_INSTALL_PREFIX}\")") ++else() ++ # We do not know the absolute path to the install tree until we are installed, ++ # so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use ++ # relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE. ++ set(AMD_DEVICE_LIBS_PREFIX_CODE " + # Derive absolute install prefix from config file path. + get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") +-string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}") +-foreach(p ${count}) +- set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE} ++ string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}") ++ foreach(p ${count}) ++ set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE} + get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${AMD_DEVICE_LIBS_PREFIX}\" PATH)") +-endforeach() ++ endforeach() ++endif() ++ + set(AMD_DEVICE_LIBS_TARGET_CODE) + foreach(target ${AMDGCN_LIB_LIST}) + get_target_property(target_name ${target} ARCHIVE_OUTPUT_NAME) diff --git a/pkgs/development/rocm-modules/6/rocm-device-libs/default.nix b/pkgs/development/rocm-modules/6/rocm-device-libs/default.nix new file mode 100644 index 000000000000..defcf2e60ecb --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-device-libs/default.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, libxml2 +}: + +let + llvmNativeTarget = + if stdenv.isx86_64 then "X86" + else if stdenv.isAarch64 then "AArch64" + else throw "Unsupported ROCm LLVM platform"; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocm-device-libs"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCm-Device-Libs"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-7XG7oSkJ3EPWTYGea0I50eB1/DPMD5agmjctxZYTbLQ="; + }; + + patches = [ ./cmake.patch ]; + + nativeBuildInputs = [ + cmake + rocm-cmake + ]; + + buildInputs = [ libxml2 ]; + cmakeFlags = [ "-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}" ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Set of AMD-specific device-side language runtime libraries"; + homepage = "https://github.com/ROCm/ROCm-Device-Libs"; + license = licenses.ncsa; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-docs-core/default.nix b/pkgs/development/rocm-modules/6/rocm-docs-core/default.nix new file mode 100644 index 000000000000..2462ac62110e --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-docs-core/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, gitUpdater +, buildPythonPackage +, setuptools +, beautifulsoup4 +, gitpython +, pydata-sphinx-theme +, pygithub +, sphinx +, breathe +, myst-parser +, sphinx-book-theme +, sphinx-copybutton +, sphinx-design +, sphinx-external-toc +, sphinx-notfound-page +, pyyaml +, fastjsonschema +}: + +# FIXME: Move to rocmPackages_common +buildPythonPackage rec { + pname = "rocm-docs-core"; + version = "0.34.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocm-docs-core"; + rev = "v${version}"; + hash = "sha256-p75g68Dn0RrjX9vYY+AWNu0qOKTLsBCnOZekMO0Usho="; + }; + + buildInputs = [ setuptools ]; + + propagatedBuildInputs = [ + beautifulsoup4 + gitpython + pydata-sphinx-theme + pygithub + sphinx + breathe + myst-parser + sphinx-book-theme + sphinx-copybutton + sphinx-design + sphinx-external-toc + sphinx-notfound-page + pyyaml + fastjsonschema + ]; + + pythonImportsCheck = [ "rocm_docs" ]; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + meta = with lib; { + description = "ROCm Documentation Python package for ReadTheDocs build standardization"; + homepage = "https://github.com/ROCm/rocm-docs-core"; + license = with licenses; [ mit cc-by-40 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix new file mode 100644 index 000000000000..8c3d0cdc976d --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix @@ -0,0 +1,74 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, pkg-config +, cmake +, xxd +, rocm-device-libs +, rocm-thunk +, libelf +, libdrm +, numactl +, valgrind +, libxml2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocm-runtime"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCR-Runtime"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-xNMG954HI9SOfvYYB/62fhmm9mmR4I10uHP2nqn9EgI="; + }; + + sourceRoot = "${finalAttrs.src.name}/src"; + + nativeBuildInputs = [ + pkg-config + cmake + xxd + ]; + + buildInputs = [ + rocm-thunk + libelf + libdrm + numactl + valgrind + libxml2 + ]; + + postPatch = '' + patchShebangs image/blit_src/create_hsaco_ascii_file.sh + patchShebangs core/runtime/trap_handler/create_trap_handler_header.sh + patchShebangs core/runtime/blit_shaders/create_blit_shader_header.sh + + substituteInPlace CMakeLists.txt \ + --replace 'hsa/include/hsa' 'include/hsa' + + # We compile clang before rocm-device-libs, so patch it in afterwards + # Replace object version: https://github.com/ROCm/ROCR-Runtime/issues/166 (TODO: Remove on LLVM update?) + substituteInPlace image/blit_src/CMakeLists.txt \ + --replace '-cl-denorms-are-zero' '-cl-denorms-are-zero --rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode' \ + --replace '-mcode-object-version=4' '-mcode-object-version=5' + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Platform runtime for ROCm"; + homepage = "https://github.com/ROCm/ROCR-Runtime"; + license = with licenses; [ ncsa ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch b/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch new file mode 100644 index 000000000000..2634ea46a1f8 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch @@ -0,0 +1,89 @@ +diff --git a/rocm_smi-backward-compat.cmake b/rocm_smi-backward-compat.cmake +index aa8fd9c..59afce5 100644 +--- a/rocm_smi-backward-compat.cmake ++++ b/rocm_smi-backward-compat.cmake +@@ -72,7 +72,12 @@ function(generate_wrapper_header) + set(include_guard "${include_guard}COMGR_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") + #set #include statement + get_filename_component(file_name ${header_file} NAME) +- set(include_statements "${include_statements}#include \"../../../${CMAKE_INSTALL_INCLUDEDIR}/${ROCM_SMI}/${file_name}\"\n") ++ if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(include_dir "${CMAKE_INSTALL_INCLUDEDIR}") ++ else() ++ set(include_dir "../../../${CMAKE_INSTALL_INCLUDEDIR}") ++ endif() ++ set(include_statements "${include_statements}#include \"${include_dir}/${ROCM_SMI}/${file_name}\"\n") + configure_file(${RSMI_WRAPPER_DIR}/header.hpp.in ${RSMI_WRAPPER_INC_DIR}/${file_name}) + unset(include_guard) + unset(include_statements) +@@ -90,7 +95,12 @@ function(generate_wrapper_header) + set(include_guard "${include_guard}COMGR_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") + #set #include statement + get_filename_component(file_name ${header_file} NAME) +- set(include_statements "${include_statements}#include \"../../../${CMAKE_INSTALL_INCLUDEDIR}/${OAM_TARGET_NAME}/${file_name}\"\n") ++ if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(include_dir "${CMAKE_INSTALL_INCLUDEDIR}") ++ else() ++ set(include_dir "../../../${CMAKE_INSTALL_INCLUDEDIR}") ++ endif() ++ set(include_statements "${include_statements}#include \"${include_dir}/${OAM_TARGET_NAME}/${file_name}\"\n") + configure_file(${RSMI_WRAPPER_DIR}/header.hpp.in ${OAM_WRAPPER_INC_DIR}/${file_name}) + unset(include_guard) + unset(include_statements) +@@ -123,11 +133,16 @@ function(create_library_symlink) + set(library_files "${LIB_RSMI}") + endif() + ++ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) ++ set(install_libdir "${CMAKE_INSTALL_LIBDIR}") ++ else() ++ set(install_libdir "../../${CMAKE_INSTALL_LIBDIR}") ++ endif() + foreach(file_name ${library_files}) + add_custom_target(link_${file_name} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink +- ../../${CMAKE_INSTALL_LIBDIR}/${file_name} ${RSMI_WRAPPER_LIB_DIR}/${file_name}) ++ ${install_libdir}/${file_name} ${RSMI_WRAPPER_LIB_DIR}/${file_name}) + endforeach() + + file(MAKE_DIRECTORY ${OAM_WRAPPER_LIB_DIR}) +@@ -151,11 +166,16 @@ function(create_library_symlink) + set(library_files "${LIB_OAM}") + endif() + ++ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) ++ set(install_libdir "${CMAKE_INSTALL_LIBDIR}") ++ else() ++ set(install_libdir "../../${CMAKE_INSTALL_LIBDIR}") ++ endif() + foreach(file_name ${library_files}) + add_custom_target(link_${file_name} ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink +- ../../${CMAKE_INSTALL_LIBDIR}/${file_name} ${OAM_WRAPPER_LIB_DIR}/${file_name}) ++ ${install_libdir}/${file_name} ${OAM_WRAPPER_LIB_DIR}/${file_name}) + endforeach() + + endfunction() +diff --git a/rocm_smi/CMakeLists.txt b/rocm_smi/CMakeLists.txt +index c594eeb..d3ed39d 100755 +--- a/rocm_smi/CMakeLists.txt ++++ b/rocm_smi/CMakeLists.txt +@@ -105,10 +105,15 @@ endif () + #file reorganization changes + #rocm_smi.py moved to libexec/rocm_smi. so creating rocm-smi symlink + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) ++if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBEXECDIR}) ++ set(install_libexecdir "${CMAKE_INSTALL_LIBEXECDIR}") ++else() ++ set(install_libexecdir "../${CMAKE_INSTALL_LIBEXECDIR}") ++endif() + add_custom_target(link-rocm-smi ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink +- ../${CMAKE_INSTALL_LIBEXECDIR}/${ROCM_SMI}/rocm_smi.py ${CMAKE_CURRENT_BINARY_DIR}/bin/rocm-smi) ++ ${install_libexecdir}/${ROCM_SMI}/rocm_smi.py ${CMAKE_CURRENT_BINARY_DIR}/bin/rocm-smi) + + ## Add the install directives for the runtime library. + install(TARGETS ${ROCM_SMI_TARGET} diff --git a/pkgs/development/rocm-modules/6/rocm-smi/default.nix b/pkgs/development/rocm-modules/6/rocm-smi/default.nix new file mode 100644 index 000000000000..aeb38e4ad8de --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-smi/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, wrapPython +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocm-smi"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocm_smi_lib"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-fS52hpTv1WEycwkGZLXjz383WJWzyk8RvJRshEQSG/A="; + }; + + patches = [ ./cmake.patch ]; + + nativeBuildInputs = [ + cmake + wrapPython + ]; + + cmakeFlags = [ + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + postInstall = '' + wrapPythonProgramsIn $out + mv $out/libexec/rocm_smi/.rsmiBindings.py-wrapped $out/libexec/rocm_smi/rsmiBindings.py + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "System management interface for AMD GPUs supported by ROCm"; + homepage = "https://github.com/ROCm/rocm_smi_lib"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = [ "x86_64-linux" ]; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocm-thunk/default.nix b/pkgs/development/rocm-modules/6/rocm-thunk/default.nix new file mode 100644 index 000000000000..99a1d3c542d1 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocm-thunk/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, pkg-config +, cmake +, libdrm +, numactl +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocm-thunk"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "ROCT-Thunk-Interface"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-F6Qi+A9DuSx2e4WSfp4cnniKr0CkCZcZqsKwQmmZHhk="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + ]; + + buildInputs = [ + libdrm + numactl + ]; + + cmakeFlags = [ + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Radeon open compute thunk interface"; + homepage = "https://github.com/ROCm/ROCT-Thunk-Interface"; + license = with licenses; [ bsd2 mit ]; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocminfo/default.nix b/pkgs/development/rocm-modules/6/rocminfo/default.nix new file mode 100644 index 000000000000..cb1df3f1fd43 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocminfo/default.nix @@ -0,0 +1,63 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-runtime +, busybox +, python3 +, gnugrep + # rocminfo requires that the calling user have a password and be in + # the video group. If we let rocm_agent_enumerator rely upon + # rocminfo's output, then it, too, has those requirements. Instead, + # we can specify the GPU targets for this system (e.g. "gfx803" for + # Polaris) such that no system call is needed for downstream + # compilers to determine the desired target. +, defaultTargets ? [] +}: + +stdenv.mkDerivation (finalAttrs: { + version = "6.0.2"; + pname = "rocminfo"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocminfo"; + rev = "rocm-${finalAttrs.version}"; + sha256 = "sha256-k0QeCyQcarGbAh4ft8Y7JBK6l2nWxDUc20XoYmtrMMs="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + ]; + + buildInputs = [ rocm-runtime ]; + propagatedBuildInputs = [ python3 ]; + cmakeFlags = [ "-DROCRTST_BLD_TYPE=Release" ]; + + prePatch = '' + patchShebangs rocm_agent_enumerator + sed 's,lsmod | grep ,${busybox}/bin/lsmod | ${gnugrep}/bin/grep ,' -i rocminfo.cc + ''; + + postInstall = lib.optionalString (defaultTargets != [ ]) '' + echo '${lib.concatStringsSep "\n" defaultTargets}' > $out/bin/target.lst + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm Application for Reporting System Info"; + homepage = "https://github.com/ROCm/rocminfo"; + license = licenses.ncsa; + maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; + platforms = platforms.linux; + broken = stdenv.isAarch64 || versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocmlir/default.nix b/pkgs/development/rocm-modules/6/rocmlir/default.nix new file mode 100644 index 000000000000..d8747009a10e --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocmlir/default.nix @@ -0,0 +1,136 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocminfo +, ninja +, clr +, git +, libxml2 +, libedit +, zstd +, zlib +, ncurses +, python3Packages +, buildRockCompiler ? false +, buildTests ? false # `argument of type 'NoneType' is not iterable` +}: + +# Theoretically, we could have our MLIR have an output +# with the source and built objects so that we can just +# use it as the external LLVM repo for this +let + suffix = + if buildRockCompiler + then "-rock" + else ""; + + llvmNativeTarget = + if stdenv.isx86_64 then "X86" + else if stdenv.isAarch64 then "AArch64" + else throw "Unsupported ROCm LLVM platform"; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocmlir${suffix}"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals (!buildRockCompiler) [ + "external" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocMLIR"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-AypY0vL8Ij1zLycwpG2EPWWl4utp4ejXpAK0Jj/UvrA="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + ninja + clr + python3Packages.python + python3Packages.tomli + ]; + + buildInputs = [ + git + libxml2 + libedit + ]; + + propagatedBuildInputs = [ + zstd + zlib + ncurses + ]; + + cmakeFlags = [ + "-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}" + "-DLLVM_ENABLE_ZSTD=ON" + "-DLLVM_ENABLE_ZLIB=ON" + "-DLLVM_ENABLE_TERMINFO=ON" + "-DROCM_PATH=${clr}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals buildRockCompiler [ + "-DBUILD_FAT_LIBROCKCOMPILER=ON" + ] ++ lib.optionals (!buildRockCompiler) [ + "-DROCM_TEST_CHIPSET=gfx000" + ]; + + postPatch = '' + patchShebangs mlir + patchShebangs external/llvm-project/mlir/lib/Dialect/GPU/AmdDeviceLibsIncGen.py + + # remove when no longer required + substituteInPlace mlir/test/{e2e/generateE2ETest.py,fusion/e2e/generate-fusion-tests.py} \ + --replace-fail "\"/opt/rocm/bin" "\"${rocminfo}/bin" + + substituteInPlace mlir/utils/performance/common/CMakeLists.txt \ + --replace-fail "/opt/rocm" "${clr}" + ''; + + dontBuild = true; + doCheck = true; + + # Certain libs aren't being generated, try enabling tests next update + checkTarget = if buildRockCompiler + then "librockCompiler" + else if buildTests + then "check-rocmlir" + else "check-rocmlir-build-only"; + + postInstall = let + libPath = lib.makeLibraryPath [ zstd zlib ncurses clr stdenv.cc.cc ]; + in lib.optionals (!buildRockCompiler) '' + mkdir -p $external/lib + cp -a external/llvm-project/llvm/lib/{*.a*,*.so*} $external/lib + patchelf --set-rpath $external/lib:$out/lib:${libPath} $external/lib/*.so* + patchelf --set-rpath $out/lib:$external/lib:${libPath} $out/{bin/*,lib/*.so*} + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + page = "tags?per_page=2"; + filter = ".[1].name | split(\"-\") | .[1]"; + }; + + meta = with lib; { + description = "MLIR-based convolution and GEMM kernel generator"; + homepage = "https://github.com/ROCm/rocMLIR"; + license = with licenses; [ asl20 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocprim/default.nix b/pkgs/development/rocm-modules/6/rocprim/default.nix new file mode 100644 index 000000000000..e9996cae61e7 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocprim/default.nix @@ -0,0 +1,86 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, gtest +, gbenchmark +, buildTests ? false +, buildBenchmarks ? false +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocprim"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocPRIM"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-nWvq26qRPZ6Au1rc5cR74TKArcdUFg7O9djFi8SvMeM="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ]; + + buildInputs = lib.optionals buildTests [ + gtest + ] ++ lib.optionals buildBenchmarks [ + gbenchmark + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_TEST=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_BENCHMARK=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/test_* $test/bin + mv $out/bin/rocprim $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/benchmark_* $benchmark/bin + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm parallel primitives"; + homepage = "https://github.com/ROCm/rocPRIM"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocprofiler/0000-dont-install-tests-hsaco.patch b/pkgs/development/rocm-modules/6/rocprofiler/0000-dont-install-tests-hsaco.patch new file mode 100644 index 000000000000..70550d0119a9 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocprofiler/0000-dont-install-tests-hsaco.patch @@ -0,0 +1,15 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 46efbd5..ca2cc3b 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -127,10 +127,6 @@ function(generate_hsaco TARGET_ID INPUT_FILE OUTPUT_FILE) + DEPENDS ${INPUT_FILE} clang + COMMENT "Building ${OUTPUT_FILE}..." + VERBATIM) +- install( +- FILES ${PROJECT_BINARY_DIR}/${OUTPUT_FILE} +- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests-v1 +- COMPONENT tests) + set(HSACO_TARGET_LIST + ${HSACO_TARGET_LIST} ${PROJECT_BINARY_DIR}/${OUTPUT_FILE} + PARENT_SCOPE) diff --git a/pkgs/development/rocm-modules/6/rocprofiler/0001-fix-shell-scripts.patch b/pkgs/development/rocm-modules/6/rocprofiler/0001-fix-shell-scripts.patch new file mode 100644 index 000000000000..6dfc8e0d6e55 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocprofiler/0001-fix-shell-scripts.patch @@ -0,0 +1,109 @@ +diff --git a/bin/rocprofv2 b/bin/rocprofv2 +index d0445e7..6079af8 100755 +--- a/bin/rocprofv2 ++++ b/bin/rocprofv2 +@@ -7,7 +7,8 @@ if [ -n "${ROCP_PRELOAD}" ]; then LD_PRELOAD="${ROCP_PRELOAD}"; fi + + CURRENT_DIR="$( dirname -- "$0"; )"; + ROCPROFV2_DIR=$(dirname -- $(realpath ${BASH_SOURCE[0]})); +-ROCM_DIR=$( dirname -- "$ROCPROFV2_DIR"; ) ++ROCPROFILER_DIR=$( dirname -- "$ROCPROFV2_DIR"; ) ++ROCM_DIR=@rocmtoolkit_merged@ + PLUGIN_LIST=("ctf" "perfetto" "file" "att" "cli") + RUN_FROM_BUILD=0 + if [[ $ROCPROFV2_DIR == *"/build"* ]]; then +@@ -15,7 +16,7 @@ if [[ $ROCPROFV2_DIR == *"/build"* ]]; then + ROCM_DIR=$ROCPROFV2_DIR + fi + +-export ROCPROFILER_METRICS_PATH=$ROCM_DIR/libexec/rocprofiler/counters/derived_counters.xml ++export ROCPROFILER_METRICS_PATH=$ROCPROFILER_DIR/libexec/rocprofiler/counters/derived_counters.xml + export LD_LIBRARY_PATH=$ROCM_DIR/lib:$LD_LIBRARY_PATH + + # Define color code +@@ -83,7 +84,7 @@ while [ 1 ]; do + exit 1 + fi + elif [[ "$1" == "--list-counters" ]]; then +- export LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so ++ export LD_PRELOAD=$LD_PRELOAD:$ROC_DIR/lib/rocprofiler/librocprofiler_tool.so + eval $ROCM_DIR/libexec/rocprofiler/ctrl + exit 1 + elif [[ "$1" == "-i" || "$1" == "--input" ]]; then +@@ -221,7 +222,7 @@ while [ 1 ]; do + if [ $RUN_FROM_BUILD == 1 ]; then + ATT_PATH=$ROCM_DIR/plugin/att/att/att.py + else +- ATT_PATH=$ROCM_DIR/libexec/rocprofiler/att/att.py ++ ATT_PATH=$ROCPROFILER_DIR/libexec/rocprofiler/att/att.py + export ROCPROFV2_ATT_LIB_PATH=$ROCM_DIR/lib/hsa-amd-aqlprofile/librocprofv2_att.so + fi + ATT_ARGV=$3 +@@ -294,13 +295,13 @@ if [ -n "$PMC_LINES" ] && [ ! -n "$ATT_ARGV" ]; then + export OUTPUT_PATH=$FINAL_PATH + fi + let COUNTER=COUNTER+1 +- LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so $* ++ LD_PRELOAD=$LD_PRELOAD:$ROCPROFILER_DIR/lib/rocprofiler/librocprofiler_tool.so $* + if [ -n "$OUTPUT_PATH" ]; then + echo -e "\nThe output path for the following counters: $OUTPUT_PATH" + fi + done + else +- LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so $* ++ LD_PRELOAD=$LD_PRELOAD:$ROCPROFILER_DIR/lib/rocprofiler/librocprofiler_tool.so $* + fi + + get_pmc_results_txt_path() { +diff --git a/bin/rpl_run.sh b/bin/rpl_run.sh +index 6b236ed..a9c233c 100755 +--- a/bin/rpl_run.sh ++++ b/bin/rpl_run.sh +@@ -25,16 +25,17 @@ + ROCPROF_ARGS="$*" + time_stamp=`date +%y%m%d_%H%M%S` + BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]})) +-ROOT_DIR=$(dirname $BIN_DIR) ++ROCPROFILER_DIR=$(dirname $BIN_DIR) ++ROOT_DIR=@rocmtoolkit_merged@ + RUN_DIR=`pwd` + TMP_DIR="/tmp" + DATA_DIR="rpl_data_${time_stamp}_$$" + +-RPL_PATH=$ROOT_DIR/lib ++RPL_PATH=$ROCPROFILER_DIR/lib + TLIB_PATH=$RPL_PATH/rocprofiler + TTLIB_PATH=$ROOT_DIR/lib/roctracer + ROCM_LIB_PATH=$ROOT_DIR/lib +-PROF_BIN_DIR=$ROOT_DIR/libexec/rocprofiler ++PROF_BIN_DIR=$ROCPROFILER_DIR/libexec/rocprofiler + + # check if rocprof is supportd on this gpu arch + V1_SUPPORTED_GPU_ARCHS=("gfx80x","gfx90x","gfx10xx","gfx94x") +@@ -80,7 +81,7 @@ unset ROCP_PROXY_QUEUE + # Disable AQL-profile read API + export AQLPROFILE_READ_API=0 + # ROC Profiler package path +-export ROCP_PACKAGE_DIR=$ROOT_DIR ++export ROCP_PACKAGE_DIR=$ROCPROFILER_DIR + # enabled SPM KFD mode + export ROCP_SPM_KFD_MODE=1 + +@@ -400,7 +401,7 @@ unset_v1_envs() { + + ################################################################################################ + # main +-echo "RPL: on '$time_stamp' from '$ROOT_DIR' in '$RUN_DIR'" ++echo "RPL: on '$time_stamp' from '$ROCPROFILER_DIR' in '$RUN_DIR'" + # Parsing arguments + if [ -z "$1" ] ; then + usage +@@ -633,7 +634,7 @@ elif [ "$input_type" = "txt" -o "$input_type" = "none" ] ; then + else + echo "<metric></metric>" > $RES_DIR/input.xml + fi +- input_list=`/bin/ls $RES_DIR/input*.xml` ++ input_list=`ls $RES_DIR/input*.xml` + export ROCPROFILER_SESS=$RES_DIR + else + fatal "Bad input file type '$INPUT_FILE'" diff --git a/pkgs/development/rocm-modules/6/rocprofiler/0002-include-stdint-in-version.patch b/pkgs/development/rocm-modules/6/rocprofiler/0002-include-stdint-in-version.patch new file mode 100644 index 000000000000..4e4aaad463d1 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocprofiler/0002-include-stdint-in-version.patch @@ -0,0 +1,12 @@ +diff --git a/src/tools/versioning/version.cpp b/src/tools/versioning/version.cpp +index 11bdd00..339743c 100644 +--- a/src/tools/versioning/version.cpp ++++ b/src/tools/versioning/version.cpp +@@ -1,6 +1,7 @@ + #include <rocm-core/rocm_version.h> + #include <iostream> + #include <sstream> ++#include <stdint.h> + + + int main() { diff --git a/pkgs/development/rocm-modules/6/rocprofiler/default.nix b/pkgs/development/rocm-modules/6/rocprofiler/default.nix new file mode 100644 index 000000000000..ca6291992d85 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocprofiler/default.nix @@ -0,0 +1,140 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, symlinkJoin +, substituteAll +, cmake +, clang +, clr +, rocm-core +, rocm-thunk +, rocm-device-libs +, roctracer +, rocdbgapi +, rocm-smi +, hsa-amd-aqlprofile-bin +, numactl +, libpciaccess +, libxml2 +, elfutils +, mpi +, systemd +, gtest +, python3Packages +, gpuTargets ? clr.gpuTargets +}: + +let + rocmtoolkit-merged = symlinkJoin { + name = "rocmtoolkit-merged"; + + paths = [ + rocm-core + rocm-thunk + rocm-device-libs + roctracer + rocdbgapi + rocm-smi + hsa-amd-aqlprofile-bin + clr + ]; + + postBuild = '' + rm -rf $out/nix-support + ''; + }; +in stdenv.mkDerivation (finalAttrs: { + pname = "rocprofiler"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocprofiler"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-yzgw9g5cHAZpdbU44+1ScZyUcZ2I4GGfjbm9GSqCClk="; + }; + + patches = [ + # These just simply won't build + ./0000-dont-install-tests-hsaco.patch + + # Fix bad paths + (substituteAll { + src = ./0001-fix-shell-scripts.patch; + rocmtoolkit_merged = rocmtoolkit-merged; + }) + + # Fix for missing uint32_t not defined + ./0002-include-stdint-in-version.patch + ]; + + nativeBuildInputs = [ + cmake + clang + clr + python3Packages.lxml + python3Packages.cppheaderparser + python3Packages.pyyaml + python3Packages.barectf + python3Packages.pandas + ]; + + buildInputs = [ + numactl + libpciaccess + libxml2 + elfutils + mpi + systemd + gtest + ]; + + propagatedBuildInputs = [ rocmtoolkit-merged ]; + + cmakeFlags = [ + "-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip" + "-DHIP_ROOT_DIR=${clr}" + "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + postPatch = '' + patchShebangs . + + substituteInPlace tests-v2/featuretests/profiler/CMakeLists.txt \ + --replace "--build-id=sha1" "--build-id=sha1 --rocm-path=${clr} --rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode" + + substituteInPlace test/CMakeLists.txt \ + --replace "\''${ROCM_ROOT_DIR}/amdgcn/bitcode" "${rocm-device-libs}/amdgcn/bitcode" + ''; + + postInstall = '' + # Why do these not already have the executable bit set? + chmod +x $out/lib/rocprofiler/librocprof-tool.so + chmod +x $out/share/rocprofiler/tests-v1/test/ocl/SimpleConvolution + + # Why do these have the executable bit set? + chmod -x $out/libexec/rocprofiler/counters/basic_counters.xml + chmod -x $out/libexec/rocprofiler/counters/derived_counters.xml + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Profiling with perf-counters and derived metrics"; + homepage = "https://github.com/ROCm/rocprofiler"; + license = with licenses; [ mit ]; # mitx11 + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor clr.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix b/pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix new file mode 100644 index 000000000000..625a8ef5a364 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, clr +, git +, rocdbgapi +, elfutils +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocr-debug-agent"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocr_debug_agent"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-8Q800T7mwBy8/rujVNyCQ0ZpZ9uPKKk+Sv9ibpWou/8="; + }; + + nativeBuildInputs = [ + cmake + clr + git + ]; + + buildInputs = [ + rocdbgapi + elfutils + ]; + + cmakeFlags = [ + "-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip" + "-DHIP_ROOT_DIR=${clr}" + "-DHIP_PATH=${clr}" + ]; + + # Weird install target + postInstall = '' + rm -rf $out/src + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Library that provides some debugging functionality for ROCr"; + homepage = "https://github.com/ROCm/rocr_debug_agent"; + license = with licenses; [ ncsa ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocrand/default.nix b/pkgs/development/rocm-modules/6/rocrand/default.nix new file mode 100644 index 000000000000..f09ff3b12059 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocrand/default.nix @@ -0,0 +1,88 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, clr +, gtest +, gbenchmark +, buildTests ? false +, buildBenchmarks ? false +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocrand"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocRAND"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-BBkcYOP+zh3OQTxuSkeiJizwnE9Gr5Jbhx0e8SU/mmU="; + fetchSubmodules = true; # For inline hipRAND + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ]; + + buildInputs = lib.optionals buildTests [ + gtest + ] ++ lib.optionals buildBenchmarks [ + gbenchmark + ]; + + cmakeFlags = [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DHIP_ROOT_DIR=${clr}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_TEST=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_BENCHMARK=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/test_* $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/benchmark_* $benchmark/bin + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Generate pseudo-random and quasi-random numbers"; + homepage = "https://github.com/ROCm/rocRAND"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocsolver/default.nix b/pkgs/development/rocm-modules/6/rocsolver/default.nix new file mode 100644 index 000000000000..42334d396b04 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocsolver/default.nix @@ -0,0 +1,100 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocblas +, rocsparse +, clr +, fmt +, gtest +, gfortran +, lapack-reference +, buildTests ? false +, buildBenchmarks ? false +, gpuTargets ? [ ] # gpuTargets = [ "gfx803" "gfx900" "gfx906:xnack-" ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocsolver"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocSOLVER"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-tglQpwCSFABRuEDiJrzQVFIdx9p85E2MiUYN0aoTAXo="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + gfortran + ]; + + buildInputs = [ + rocblas + rocsparse + fmt + ] ++ lib.optionals buildTests [ + gtest + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + lapack-reference + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DCMAKE_CXX_FLAGS=-Wno-switch" # Way too many warnings + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_CLIENTS_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/rocsolver-test $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/rocsolver-bench $benchmark/bin + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rmdir $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + requiredSystemFeatures = [ "big-parallel" ]; + + meta = with lib; { + description = "ROCm LAPACK implementation"; + homepage = "https://github.com/ROCm/rocSOLVER"; + license = with licenses; [ bsd2 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + timeout = 14400; # 4 hours + maxSilent = 14400; # 4 hours + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocsparse/default.nix b/pkgs/development/rocm-modules/6/rocsparse/default.nix new file mode 100644 index 000000000000..2a1043b33c05 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocsparse/default.nix @@ -0,0 +1,149 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchzip +, rocmUpdateScript +, cmake +, rocm-cmake +, rocprim +, clr +, gfortran +, git +, gtest +, boost +, python3Packages +, buildTests ? false +, buildBenchmarks ? false # Seems to depend on tests +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocsparse"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocSPARSE"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-nTYnEHkTtq0jBeMj4HXpqkJu8LQc+Z6mpjhMP7tJAHQ="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + gfortran + ]; + + buildInputs = [ + rocprim + git + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + gtest + boost + python3Packages.python + python3Packages.pyyaml + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + "-DBUILD_CLIENTS_TESTS=ON" + "-DCMAKE_MATRICES_DIR=/build/source/matrices" + "-Dpython=python3" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_CLIENTS_BENCHMARKS=ON" + ]; + + # We have to manually generate the matrices + postPatch = lib.optionalString (buildTests || buildBenchmarks) '' + mkdir -p matrices + + ln -s ${finalAttrs.passthru.matrices.matrix-01}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-02}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-03}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-04}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-05}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-06}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-07}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-08}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-09}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-10}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-11}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-12}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-13}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-14}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-15}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-16}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-17}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-18}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-19}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-20}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-21}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-22}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-23}/*.mtx matrices + ln -s ${finalAttrs.passthru.matrices.matrix-24}/*.mtx matrices + + # Not used by the original cmake, causes an error + rm matrices/*_b.mtx + + echo "deps/convert.cpp -> deps/mtx2csr" + hipcc deps/convert.cpp -O3 -o deps/mtx2csr + + for mat in $(ls -1 matrices | cut -d "." -f 1); do + echo "mtx2csr: $mat.mtx -> $mat.csr" + deps/mtx2csr matrices/$mat.mtx matrices/$mat.csr + unlink matrices/$mat.mtx + done + ''; + + postInstall = lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + cp -a $out/bin/* $benchmark/bin + rm $benchmark/bin/rocsparse-test + '' + lib.optionalString (buildTests || buildBenchmarks) '' + mkdir -p $test/bin + mv $out/bin/* $test/bin + rm $test/bin/rocsparse-bench || true + mv /build/source/matrices $test + rmdir $out/bin + ''; + + passthru = { + matrices = import ./deps.nix { + inherit fetchzip; + mirror1 = "https://sparse.tamu.edu/MM"; + mirror2 = "https://www.cise.ufl.edu/research/sparse/MM"; + }; + + updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + }; + + meta = with lib; { + description = "ROCm SPARSE implementation"; + homepage = "https://github.com/ROCm/rocSPARSE"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocsparse/deps.nix b/pkgs/development/rocm-modules/6/rocsparse/deps.nix new file mode 100644 index 000000000000..cef880ab3232 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocsparse/deps.nix @@ -0,0 +1,222 @@ +{ fetchzip +, mirror1 +, mirror2 +}: + +{ + matrix-01 = fetchzip { + sha256 = "sha256-AHur5ZIDZTFRrO2GV0ieXrffq4KUiGWiZ59pv0fUtEQ="; + + urls = [ + "${mirror1}/SNAP/amazon0312.tar.gz" + "${mirror2}/SNAP/amazon0312.tar.gz" + ]; + }; + + matrix-02 = fetchzip { + sha256 = "sha256-0rSxaN4lQcdaCLsvlgicG70FXUxXeERPiEmQ4MzbRdE="; + + urls = [ + "${mirror1}/Muite/Chebyshev4.tar.gz" + "${mirror2}/Muite/Chebyshev4.tar.gz" + ]; + }; + + matrix-03 = fetchzip { + sha256 = "sha256-hDzDWDUnHEyFedX/tMNq83ZH8uWyM4xtZYUUAD3rizo="; + + urls = [ + "${mirror1}/FEMLAB/sme3Dc.tar.gz" + "${mirror2}/FEMLAB/sme3Dc.tar.gz" + ]; + }; + + matrix-04 = fetchzip { + sha256 = "sha256-GmN2yOt/MoX01rKe05aTyB3ypUP4YbQGOITZ0BqPmC0="; + + urls = [ + "${mirror1}/Williams/webbase-1M.tar.gz" + "${mirror2}/Williams/webbase-1M.tar.gz" + ]; + }; + + matrix-05 = fetchzip { + sha256 = "sha256-gQNjfVyWzNM9RwImJGhkhahRmZz74LzDs1oijL7mI7k="; + + urls = [ + "${mirror1}/Williams/mac_econ_fwd500.tar.gz" + "${mirror2}/Williams/mac_econ_fwd500.tar.gz" + ]; + }; + + matrix-06 = fetchzip { + sha256 = "sha256-87cdZjntNcTuz5BtO59irhcuRbPllWSbhCEX3Td02qc="; + + urls = [ + "${mirror1}/Williams/mc2depi.tar.gz" + "${mirror2}/Williams/mc2depi.tar.gz" + ]; + }; + + matrix-07 = fetchzip { + sha256 = "sha256-WRamuJX3D8Tm+k0q67RjUDG3DeNAxhKiaPkk5afY5eU="; + + urls = [ + "${mirror1}/Bova/rma10.tar.gz" + "${mirror2}/Bova/rma10.tar.gz" + ]; + }; + + matrix-08 = fetchzip { + sha256 = "sha256-5dhkm293Mc3lzakKxHy5W5XIn4Rw+gihVh7gyrjEHXo="; + + urls = [ + "${mirror1}/JGD_BIBD/bibd_22_8.tar.gz" + "${mirror2}/JGD_BIBD/bibd_22_8.tar.gz" + ]; + }; + + matrix-09 = fetchzip { + sha256 = "sha256-czjLWCjXAjZCk5TGYHaEkwSAzQu3TQ3QyB6eNKR4G88="; + + urls = [ + "${mirror1}/Hamm/scircuit.tar.gz" + "${mirror2}/Hamm/scircuit.tar.gz" + ]; + }; + + matrix-10 = fetchzip { + sha256 = "sha256-bYuLnJViAIcIejAkh69/bsNAVIDU4wfTLtD+nmHd6FM="; + + urls = [ + "${mirror1}/Sandia/ASIC_320k.tar.gz" + "${mirror2}/Sandia/ASIC_320k.tar.gz" + ]; + }; + + matrix-11 = fetchzip { + sha256 = "sha256-aDwn8P1khYjo2Agbq5m9ZBInJUxf/knJNvyptt0fak0="; + + urls = [ + "${mirror1}/GHS_psdef/bmwcra_1.tar.gz" + "${mirror2}/GHS_psdef/bmwcra_1.tar.gz" + ]; + }; + + matrix-12 = fetchzip { + sha256 = "sha256-8OJqA/byhlAZd869TPUzZFdsOiwOoRGfKyhM+RMjXoY="; + + urls = [ + "${mirror1}/HB/nos1.tar.gz" + "${mirror2}/HB/nos1.tar.gz" + ]; + }; + + matrix-13 = fetchzip { + sha256 = "sha256-FS0rKqmg+uHwsM/yGfQLBdd7LH/rUrdutkNGBD/Mh1I="; + + urls = [ + "${mirror1}/HB/nos2.tar.gz" + "${mirror2}/HB/nos2.tar.gz" + ]; + }; + + matrix-14 = fetchzip { + sha256 = "sha256-DANnlrNJikrI7Pst9vRedtbuxepyHmCIu2yhltc4Qcs="; + + urls = [ + "${mirror1}/HB/nos3.tar.gz" + "${mirror2}/HB/nos3.tar.gz" + ]; + }; + + matrix-15 = fetchzip { + sha256 = "sha256-21mUgqjWGUfYgiWwSrKh9vH8Vdt3xzcefmqYNYRpxiY="; + + urls = [ + "${mirror1}/HB/nos4.tar.gz" + "${mirror2}/HB/nos4.tar.gz" + ]; + }; + + matrix-16 = fetchzip { + sha256 = "sha256-FOuXvGqBBFNkVS6cexmkluret54hCfCOdK+DOZllE4c="; + + urls = [ + "${mirror1}/HB/nos5.tar.gz" + "${mirror2}/HB/nos5.tar.gz" + ]; + }; + + matrix-17 = fetchzip { + sha256 = "sha256-+7NI1rA/qQxYPpjXKHvAaCZ+LSaAJ4xuJvMRMBEUYxg="; + + urls = [ + "${mirror1}/HB/nos6.tar.gz" + "${mirror2}/HB/nos6.tar.gz" + ]; + }; + + matrix-18 = fetchzip { + sha256 = "sha256-q3NxJjbwGGcFiQ9nhWfUKgZmdVwCfPmgQoqy0AqOsNc="; + + urls = [ + "${mirror1}/HB/nos7.tar.gz" + "${mirror2}/HB/nos7.tar.gz" + ]; + }; + + matrix-19 = fetchzip { + sha256 = "sha256-0GAN6qmVfD+tprIigzuUUUwm5KVhkN9X65wMEvFltDY="; + + urls = [ + "${mirror1}/DNVS/shipsec1.tar.gz" + "${mirror2}/DNVS/shipsec1.tar.gz" + ]; + }; + + matrix-20 = fetchzip { + sha256 = "sha256-f28Du/Urxsiq5NkRmRO10Zz9vvGRjEchquzHzbZpZ7U="; + + urls = [ + "${mirror1}/Cote/mplate.tar.gz" + "${mirror2}/Cote/mplate.tar.gz" + ]; + }; + + matrix-21 = fetchzip { + sha256 = "sha256-O+Wy0NfCU1hVUOfNR1dJpvDHLBwwa301IRJDrQJnhak="; + + urls = [ + "${mirror1}/Bai/qc2534.tar.gz" + "${mirror2}/Bai/qc2534.tar.gz" + ]; + }; + + matrix-22 = fetchzip { + sha256 = "sha256-oxMnt8U5Cf1ILWcBdU6W9jdSMMm+U6bIVl8nm3n3+OA="; + + urls = [ + "${mirror1}/Chevron/Chevron2.tar.gz" + "${mirror2}/Chevron/Chevron2.tar.gz" + ]; + }; + + matrix-23 = fetchzip { + sha256 = "sha256-MFD9BxFI/3IS7yatW121BAI04fbqrXpgYDT5UKjeKcU="; + + urls = [ + "${mirror1}/Chevron/Chevron3.tar.gz" + "${mirror2}/Chevron/Chevron3.tar.gz" + ]; + }; + + matrix-24 = fetchzip { + sha256 = "sha256-ikS8O51pe1nt3BNyhvfvqCbVL0+bg/da9bqGqeBDkTg="; + + urls = [ + "${mirror1}/Chevron/Chevron4.tar.gz" + "${mirror2}/Chevron/Chevron4.tar.gz" + ]; + }; +} diff --git a/pkgs/development/rocm-modules/6/rocthrust/default.nix b/pkgs/development/rocm-modules/6/rocthrust/default.nix new file mode 100644 index 000000000000..e34e3ada6b99 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocthrust/default.nix @@ -0,0 +1,87 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocprim +, clr +, gtest +, buildTests ? false +, buildBenchmarks ? false +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocthrust"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildTests [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocThrust"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-Zk7FxcedaDUbx9RCX8aWN0xZO/B5cOs/l5MDqZKQpJo="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + rocprim + clr + ]; + + buildInputs = lib.optionals buildTests [ + gtest + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DHIP_ROOT_DIR=${clr}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildTests [ + "-DBUILD_TEST=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DBUILD_BENCHMARKS=ON" + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + "-DCMAKE_CXX_FLAGS=-Wno-deprecated-builtins" # Too much spam + ]; + + postInstall = lib.optionalString buildTests '' + mkdir -p $test/bin + mv $out/bin/{test_*,*.hip} $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/benchmark_* $benchmark/bin + '' + lib.optionalString (buildTests || buildBenchmarks) '' + rm -rf $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "ROCm parallel algorithm library"; + homepage = "https://github.com/ROCm/rocThrust"; + license = with licenses; [ asl20 ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/roctracer/default.nix b/pkgs/development/rocm-modules/6/roctracer/default.nix new file mode 100644 index 000000000000..2523a9ab5330 --- /dev/null +++ b/pkgs/development/rocm-modules/6/roctracer/default.nix @@ -0,0 +1,103 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, clr +, rocm-device-libs +, libxml2 +, doxygen +, graphviz +, gcc-unwrapped +, libbacktrace +, rocm-runtime +, python3Packages +, buildDocs ? false # Nothing seems to be generated, so not making the output +, buildTests ? false +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "roctracer"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals buildDocs [ + "doc" + ] ++ lib.optionals buildTests [ + "test" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "roctracer"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-a6/N6W3JXVI0VZRGxlS3cVENC3VTP1w9UFnd0+EWAuo="; + }; + + nativeBuildInputs = [ + cmake + clr + ] ++ lib.optionals buildDocs [ + doxygen + graphviz + ]; + + buildInputs = [ + libxml2 + libbacktrace + python3Packages.python + python3Packages.cppheaderparser + ]; + + cmakeFlags = [ + "-DCMAKE_MODULE_PATH=${clr}/hip/cmake" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ]; + + env.NIX_CFLAGS_COMPILE = toString [ + # Needed with GCC 12 + "-Wno-error=array-bounds" + ]; + + postPatch = '' + export HIP_DEVICE_LIB_PATH=${rocm-device-libs}/amdgcn/bitcode + '' + lib.optionalString (!buildTests) '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory(test)" "" + ''; + + # Tests always fail, probably need GPU + # doCheck = buildTests; + + postInstall = lib.optionalString buildDocs '' + mkdir -p $doc + '' + lib.optionalString buildTests '' + mkdir -p $test/bin + # Not sure why this is an install target + find $out/test -executable -type f -exec mv {} $test/bin \; + rm $test/bin/{*.sh,*.py} + patchelf --set-rpath $out/lib:${lib.makeLibraryPath ( + finalAttrs.buildInputs ++ [ clr gcc-unwrapped.lib rocm-runtime ])} $test/bin/* + rm -rf $out/test + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Tracer callback/activity library"; + homepage = "https://github.com/ROCm/roctracer"; + license = with licenses; [ mit ]; # mitx11 + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor clr.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rocwmma/0000-dont-fetch-googletest.patch b/pkgs/development/rocm-modules/6/rocwmma/0000-dont-fetch-googletest.patch new file mode 100644 index 000000000000..fa47a3c42249 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocwmma/0000-dont-fetch-googletest.patch @@ -0,0 +1,35 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0d00883..86ce282 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -30,30 +30,6 @@ cmake_dependent_option( ROCWMMA_BUILD_VALIDATION_TESTS "Build validation tests" + cmake_dependent_option( ROCWMMA_BUILD_BENCHMARK_TESTS "Build benchmarking tests" OFF "ROCWMMA_BUILD_TESTS" OFF ) + cmake_dependent_option( ROCWMMA_BUILD_EXTENDED_TESTS "Build extended test parameter coverage" OFF "ROCWMMA_BUILD_TESTS" OFF ) + +-# Test/benchmark requires additional dependencies +-include( FetchContent ) +- +-FetchContent_Declare( +- googletest +- GIT_REPOSITORY https://github.com/google/googletest.git +- GIT_TAG release-1.12.1 +-) +-FetchContent_GetProperties(googletest) +-if(NOT googletest_POPULATED) +- +- # Fetch the content using default details +- FetchContent_Populate(googletest) +- # Save the shared libs setting, then force to static libs +- set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) +- set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) +- +- # Add gtest targets as static libs +- add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}) +- +- # Restore shared libs setting +- set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE INTERNAL "Build SHARED libraries" FORCE) +-endif() +- + set(ROCWMMA_TEST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) + set(ROCWMMA_COMMON_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hip_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rocwmma_gtest_main.cpp) diff --git a/pkgs/development/rocm-modules/6/rocwmma/default.nix b/pkgs/development/rocm-modules/6/rocwmma/default.nix new file mode 100644 index 000000000000..da7791f51a3a --- /dev/null +++ b/pkgs/development/rocm-modules/6/rocwmma/default.nix @@ -0,0 +1,105 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-smi +, clr +, openmp +, gtest +, rocblas +, buildTests ? false # Will likely fail building because wavefront shifts are not supported for certain archs +, buildExtendedTests ? false +, buildBenchmarks ? false +, buildSamples ? false +, gpuTargets ? [ ] # gpuTargets = [ "gfx908:xnack-" "gfx90a:xnack-" "gfx90a:xnack+" ... ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocwmma"; + version = "6.0.2"; + + outputs = [ + "out" + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + "test" + ] ++ lib.optionals buildBenchmarks [ + "benchmark" + ] ++ lib.optionals buildSamples [ + "sample" + ]; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocWMMA"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-vbC4OuCmEpD38lVq0uXNw86iS4KkL6isOVq6vmlu1oM="; + }; + + patches = lib.optionals (buildTests || buildBenchmarks) [ + ./0000-dont-fetch-googletest.patch + ]; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ]; + + buildInputs = [ + openmp + ] ++ lib.optionals (buildTests || buildBenchmarks) [ + rocm-smi + gtest + rocblas + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_COMPILER=hipcc" + "-DROCWMMA_BUILD_TESTS=${if buildTests || buildBenchmarks then "ON" else "OFF"}" + "-DROCWMMA_BUILD_SAMPLES=${if buildSamples then "ON" else "OFF"}" + # Manually define CMAKE_INSTALL_<DIR> + # See: https://github.com/NixOS/nixpkgs/pull/197838 + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_INCLUDEDIR=include" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals buildExtendedTests [ + "-DROCWMMA_BUILD_EXTENDED_TESTS=ON" + ] ++ lib.optionals buildBenchmarks [ + "-DROCWMMA_BUILD_BENCHMARK_TESTS=ON" + "-DROCWMMA_BENCHMARK_WITH_ROCBLAS=ON" + ]; + + postInstall = lib.optionalString (buildTests || buildBenchmarks) '' + mkdir -p $test/bin + mv $out/bin/{*_test,*-validate} $test/bin + '' + lib.optionalString buildBenchmarks '' + mkdir -p $benchmark/bin + mv $out/bin/*-bench $benchmark/bin + '' + lib.optionalString buildSamples '' + mkdir -p $sample/bin + mv $out/bin/sgemmv $sample/bin + mv $out/bin/simple_gemm $sample/bin + mv $out/bin/simple_dlrm $sample/bin + '' + lib.optionalString (buildTests || buildBenchmarks || buildSamples) '' + rm -rf $out/bin + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Mixed precision matrix multiplication and accumulation"; + homepage = "https://github.com/ROCm/rocWMMA"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/rpp/default.nix b/pkgs/development/rocm-modules/6/rpp/default.nix new file mode 100644 index 000000000000..239c99017d02 --- /dev/null +++ b/pkgs/development/rocm-modules/6/rpp/default.nix @@ -0,0 +1,88 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, cmake +, rocm-cmake +, rocm-docs-core +, half +, clr +, openmp +, boost +, python3Packages +, buildDocs ? false # Needs internet +, useOpenCL ? false +, useCPU ? false +, gpuTargets ? [ ] +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rpp-" + ( + if (!useOpenCL && !useCPU) then "hip" + else if (!useOpenCL && !useCPU) then "opencl" + else "cpu" + ); + + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rpp"; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-AquAVoEqlsBVxd41hG2sVo9UoSS+255eCQzIfGkC/Tk="; + }; + + nativeBuildInputs = [ + cmake + rocm-cmake + clr + ] ++ lib.optionals buildDocs [ + rocm-docs-core + python3Packages.python + ]; + + buildInputs = [ + half + openmp + boost + ]; + + cmakeFlags = [ + "-DROCM_PATH=${clr}" + ] ++ lib.optionals (gpuTargets != [ ]) [ + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + ] ++ lib.optionals (!useOpenCL && !useCPU) [ + "-DCMAKE_C_COMPILER=hipcc" + "-DCMAKE_CXX_COMPILER=hipcc" + "-DBACKEND=HIP" + ] ++ lib.optionals (useOpenCL && !useCPU) [ + "-DBACKEND=OCL" + ] ++ lib.optionals useCPU [ + "-DBACKEND=CPU" + ]; + + postPatch = lib.optionalString (!useOpenCL && !useCPU) '' + # Bad path + substituteInPlace CMakeLists.txt \ + --replace "COMPILER_FOR_HIP \''${ROCM_PATH}/llvm/bin/clang++" "COMPILER_FOR_HIP ${clr}/bin/hipcc" + ''; + + postBuild = lib.optionalString buildDocs '' + python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en ../docs _build/html + ''; + + passthru.updateScript = rocmUpdateScript { + name = finalAttrs.pname; + owner = finalAttrs.src.owner; + repo = finalAttrs.src.repo; + }; + + meta = with lib; { + description = "Comprehensive high-performance computer vision library for AMD processors"; + homepage = "https://github.com/ROCm/rpp"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0"; + }; +}) diff --git a/pkgs/development/rocm-modules/6/tensile/default.nix b/pkgs/development/rocm-modules/6/tensile/default.nix new file mode 100644 index 000000000000..af33fd789e84 --- /dev/null +++ b/pkgs/development/rocm-modules/6/tensile/default.nix @@ -0,0 +1,65 @@ +{ lib +, stdenv +, fetchFromGitHub +, rocmUpdateScript +, buildPythonPackage +, pytestCheckHook +, setuptools +, pyyaml +, msgpack +, pandas +, joblib +, filelock +, rocminfo +}: + +buildPythonPackage rec { + pname = "tensile"; + version = "6.0.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "Tensile"; + rev = "rocm-${version}"; + hash = "sha256-B9/2Iw1chwDL6it1CKC8W8v4Qac/J2z9nwlpwjnllDc="; + }; + + buildInputs = [ setuptools ]; + + propagatedBuildInputs = [ + pyyaml + msgpack + pandas + joblib + ]; + + doCheck = false; # Too many errors, not sure how to set this up properly + + nativeCheckInputs = [ + pytestCheckHook + filelock + rocminfo + ]; + + preCheck = '' + export ROCM_PATH=${rocminfo} + ''; + + pythonImportsCheck = [ "Tensile" ]; + + passthru.updateScript = rocmUpdateScript { + name = pname; + owner = src.owner; + repo = src.repo; + }; + + meta = with lib; { + description = "GEMMs and tensor contractions"; + homepage = "https://github.com/ROCm/Tensile"; + license = with licenses; [ mit ]; + maintainers = teams.rocm.members; + platforms = platforms.linux; + broken = versions.minor version != versions.minor stdenv.cc.version || versionAtLeast version "7.0.0"; + }; +} diff --git a/pkgs/development/rocm-modules/6/update.nix b/pkgs/development/rocm-modules/6/update.nix new file mode 100644 index 000000000000..4d531e6bb176 --- /dev/null +++ b/pkgs/development/rocm-modules/6/update.nix @@ -0,0 +1,33 @@ +{ lib +, writeScript +}: + +{ name ? "" +, owner ? "" +, repo ? "" +, page ? "releases/latest" +, filter ? ".tag_name | split(\"-\") | .[1]" +}: + +let + pname = + if lib.hasPrefix "rocm-llvm-" name + then "llvm.${lib.removePrefix "rocm-llvm-" name}" + else name; + + updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl jq common-updater-scripts + version="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ + -sL "https://api.github.com/repos/${owner}/${repo}/${page}" | jq '${filter}' --raw-output)" + + IFS='.' read -a version_arr <<< "$version" + + if (( ''${version_arr[0]} > 6 )); then + echo "'rocmPackages_6.${pname}' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." 1>&2 + exit 1 + fi + + update-source-version rocmPackages_6.${pname} "$version" --ignore-same-hash + ''; +in [ updateScript ] diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index 0d6a22f427a5..c1732d180d5a 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "checkov"; - version = "3.2.42"; + version = "3.2.43"; pyproject = true; src = fetchFromGitHub { owner = "bridgecrewio"; repo = "checkov"; rev = "refs/tags/${version}"; - hash = "sha256-2ZhG7j9kV5E1I1xRzUKSONZ32T1oaDZ7linXjfFrvRg="; + hash = "sha256-XzkMhI/+dOU0NJs9XW+jwbI6fZfC6cHFq0xFNw57kc8="; }; patches = [ diff --git a/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-aws.nix b/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-aws.nix index 5aa610fafa85..92a35d9b3bc3 100644 --- a/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-aws.nix +++ b/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-aws.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "tflint-ruleset-aws"; - version = "0.29.0"; + version = "0.30.0"; src = fetchFromGitHub { owner = "terraform-linters"; repo = pname; rev = "v${version}"; - hash = "sha256-tqHlvJyLRhREKnuMUP479xuD0PjdCZfIMj4L44skiSE="; + hash = "sha256-mgYvzxIzh/HibPM+BQoJ7dKqEifMcuoqfOIZU4KcRC4="; }; - vendorHash = "sha256-vEkrDwsetW4HtbcgkhcaK42v/CKfRlIoHgYzjoTavqk="; + vendorHash = "sha256-JaOVNWF4JMXwGo+JVyknGZrd/M6F9c2PTgGadCqoRsk="; # upstream Makefile also does a go test $(go list ./... | grep -v integration) preCheck = '' diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 5ab92dbe8b18..8e55c5884bbd 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; - version = "1.110.0"; + version = "1.113.0"; pyproject = true; disabled = python3.pythonOlder "3.8"; @@ -19,10 +19,10 @@ python3.pkgs.buildPythonApplication rec { owner = "aws"; repo = "aws-sam-cli"; rev = "refs/tags/v${version}"; - hash = "sha256-FJHHEsdi2uGP9/GxrANsVEuxZiS4M4BPBGoARQBQpkA="; + hash = "sha256-9DHqjhJfWkMJxu2gccbbuzoW9IxDqCBoi8slWnugeJM="; }; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ pythonRelaxDepsHook setuptools ]; @@ -42,7 +42,7 @@ python3.pkgs.buildPythonApplication rec { "tzlocal" ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ aws-lambda-builders aws-sam-translator boto3 diff --git a/pkgs/development/tools/bearer/default.nix b/pkgs/development/tools/bearer/default.nix index dde5aefb80d9..7e1ccc646b3a 100644 --- a/pkgs/development/tools/bearer/default.nix +++ b/pkgs/development/tools/bearer/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "bearer"; - version = "1.43.0"; + version = "1.43.1"; src = fetchFromGitHub { owner = "bearer"; repo = "bearer"; rev = "refs/tags/v${version}"; - hash = "sha256-oOQdFbctIwCvpccUipX+5dBvkUxlRiQE9ju/UCqSku0="; + hash = "sha256-T5JiGoiVs6crbWiOPbjLpcHRdIovHAVUDAaa4e3ZDPc="; }; vendorHash = "sha256-g0AnL6r3dUfCIAytTknAD5aCPBsohDUMNfMAYKBebi4="; diff --git a/pkgs/development/tools/build-managers/moon/default.nix b/pkgs/development/tools/build-managers/moon/default.nix index b45d061fcabf..192c7944fcd6 100644 --- a/pkgs/development/tools/build-managers/moon/default.nix +++ b/pkgs/development/tools/build-managers/moon/default.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "moon"; - version = "1.22.8"; + version = "1.22.10"; src = fetchFromGitHub { owner = "moonrepo"; repo = pname; rev = "v${version}"; - hash = "sha256-hKVC9xnzlucsja57O9p2ZAbE4YVrroKlQ0WMTWOumbE="; + hash = "sha256-BJ3Src412WS1uWt04OaRIjhtZt+8vh15Ve/+c2qZFdU="; }; - cargoHash = "sha256-22nov28oq3KhILiwQUXaknTzcf8MlrAEHiyv31ivvBc="; + cargoHash = "sha256-G/vZT/iOQtpr0gtT0pjRXIhhpPrjnR/kBg6fVAMuDB0="; env = { RUSTFLAGS = "-C strip=symbols"; diff --git a/pkgs/development/tools/build-managers/xmake/default.nix b/pkgs/development/tools/build-managers/xmake/default.nix index 82d2fe7cf346..441ed8067cec 100644 --- a/pkgs/development/tools/build-managers/xmake/default.nix +++ b/pkgs/development/tools/build-managers/xmake/default.nix @@ -12,11 +12,11 @@ stdenv.mkDerivation rec { pname = "xmake"; - version = "2.8.8"; + version = "2.8.9"; src = fetchurl { url = "https://github.com/xmake-io/xmake/releases/download/v${version}/xmake-v${version}.tar.gz"; - hash = "sha256-UJFlQJleO59K1xr3Gy0Zh751SkaNGzGZxE5CWyMv0KM="; + hash = "sha256-X3k8OTNG74Dkfwg63k08L9/ESGWKeRf9o1zNe9K5Ebg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix b/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix index df123a100f8d..997eff21adf6 100644 --- a/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix +++ b/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "cirrus-cli"; - version = "0.112.3"; + version = "0.113.0"; src = fetchFromGitHub { owner = "cirruslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-jQ+ke42H55n/ssWFVCWouojSOd/hvkDcmlGUb/a9thQ="; + sha256 = "sha256-ws1OFcAz41uBgRIjLVU19nRdIIgdGnnBs6xthztyDmE="; }; - vendorHash = "sha256-tHEbHExdbWeZm3+rwRYpRILyPYEYdeVJ91Qr/yNIKV8="; + vendorHash = "sha256-NPtQM4nm8QiHY2wSd7VHx6T5LRb7EB39x+xFzHOUcNs="; ldflags = [ "-X github.com/cirruslabs/cirrus-cli/internal/version.Version=v${version}" diff --git a/pkgs/development/tools/continuous-integration/woodpecker/common.nix b/pkgs/development/tools/continuous-integration/woodpecker/common.nix index 583bd244e0cf..214e1c35b276 100644 --- a/pkgs/development/tools/continuous-integration/woodpecker/common.nix +++ b/pkgs/development/tools/continuous-integration/woodpecker/common.nix @@ -1,7 +1,7 @@ { lib, fetchzip }: let - version = "2.4.0"; - srcHash = "sha256-QQJ3VGt7iPlAIGb10VS7Jev9rCsAU4L/o8UURitP7b8="; + version = "2.4.1"; + srcHash = "sha256-03y0xLXgdvw1NAtH2FDW91wp13ohimqjz3kl2mWc11E="; # The tarball contains vendored dependencies vendorHash = null; in diff --git a/pkgs/development/tools/database/dblab/default.nix b/pkgs/development/tools/database/dblab/default.nix index cc4f6a9cfd8e..52a0aefdcc93 100644 --- a/pkgs/development/tools/database/dblab/default.nix +++ b/pkgs/development/tools/database/dblab/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "dblab"; - version = "0.21.0"; + version = "0.22.0"; src = fetchFromGitHub { owner = "danvergara"; repo = "dblab"; rev = "v${version}"; - hash = "sha256-3Bmus2yVTwvy0CpoNE1mzVvocpBnRoI11Sf+x2JXhgM="; + hash = "sha256-eIkHaNFvXU9GGyYOH8lqzvwQQ6pz8zWeO4xY9jP25dU="; }; - vendorHash = "sha256-vf0CeiLBVqMGV2oqxRHzhvL7SoT9zcg8P5c63z3UR3g="; + vendorHash = "sha256-WzyH3Ja/Znk/9aavIoBQRpJVnGb5o/ded0g92MTa4M4="; ldflags = [ "-s -w -X main.version=${version}" ]; diff --git a/pkgs/development/tools/devbox/default.nix b/pkgs/development/tools/devbox/default.nix index 38649859cea7..3b25558a4266 100644 --- a/pkgs/development/tools/devbox/default.nix +++ b/pkgs/development/tools/devbox/default.nix @@ -5,13 +5,13 @@ }: buildGoModule rec { pname = "devbox"; - version = "0.9.1"; + version = "0.10.1"; src = fetchFromGitHub { owner = "jetpack-io"; repo = pname; rev = version; - hash = "sha256-3KZWXVwvzy3mZkh6pGZpeQQp2aU4V9TyBcJXU4Au4Rs="; + hash = "sha256-iKWOGp5Clk+YFXHv/5k+7DZMA9TQzyIQoTlQs4IMbu4="; }; ldflags = [ @@ -23,7 +23,7 @@ buildGoModule rec { # integration tests want file system access doCheck = false; - vendorHash = "sha256-8G1JX4vdpDAicx6A9Butl8XTjszlHMbh34pJVQyzEs4="; + vendorHash = "sha256-QnmU8+J+5IIajfVQ5XPrtuo2ELB7AD56KsHsT8wLDws="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/development/tools/dump_syms/default.nix b/pkgs/development/tools/dump_syms/default.nix index d5adee1fcb96..67454a738278 100644 --- a/pkgs/development/tools/dump_syms/default.nix +++ b/pkgs/development/tools/dump_syms/default.nix @@ -17,7 +17,7 @@ let pname = "dump_syms"; - version = "2.3.0"; + version = "2.3.1"; in rustPlatform.buildRustPackage { inherit pname version; @@ -26,10 +26,10 @@ rustPlatform.buildRustPackage { owner = "mozilla"; repo = pname; rev = "v${version}"; - hash = "sha256-F+yXFT6PsHpluxyF+aUiuLTLqlsjfQ5tk/JjcHgJkQ8="; + hash = "sha256-mSup3AMYsPu/Az6QXhdCFSxGcIpel4zNN0g/95gPDS0="; }; - cargoSha256 = "sha256-I5CfrLWVTUwOtZrje3eATFen5u9MEH79Rk30ZNhaG98="; + cargoSha256 = "sha256-INzCyF/tvCp4L6Btrw8AGTBAgdFiBlywzO3+SSE4beI="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/development/tools/electron/binary/default.nix b/pkgs/development/tools/electron/binary/default.nix index a9fbf9d1de3d..2411316a4a0b 100644 --- a/pkgs/development/tools/electron/binary/default.nix +++ b/pkgs/development/tools/electron/binary/default.nix @@ -4,141 +4,7 @@ let mkElectron = callPackage ./generic.nix { }; in rec { - electron-bin = electron_26-bin; - - electron_10-bin = mkElectron "10.4.7" { - x86_64-linux = "e3ea75fcedce588c6b59cfa3a6e46ba67b789e14dc2e5b9dfe1ddf3f82b0f995"; - x86_64-darwin = "8f01e020563b7fce68dc2e3d4bbf419320d13b088e89eb64f9645e9d73ad88fb"; - i686-linux = "dd7fde9b3993538333ec701101554050b27d0b680196d0883ab563e8e696fc79"; - armv7l-linux = "56f11ed14f8a620650d31c21ebd095ce59ef4286c98276802b18f9cc85560ddd"; - aarch64-linux = "0550584518c8e98fe1113706c10fd7456ec519f7aa6867fbff17c8913327d758"; - headers = "01x6a0r2jawjpl09ixgzap3g0z6znj34hsnnhzanavkbds0ri4k6"; - }; - - electron_11-bin = mkElectron "11.5.0" { - x86_64-linux = "613ef8ac00c5abda425dfa48778a68f58a2e9c7c1f82539bb1a41afabbd6193f"; - x86_64-darwin = "32937dca29fc397f0b15dbab720ed3edb88eee24f00f911984b307bf12dc8fd5"; - i686-linux = "cd154c56d02d7b1f16e2bcd5650bddf0de9141fdbb8248adc64f6d607e5fb725"; - armv7l-linux = "3f5a41037aaad658051d8bc8b04e8dece72b729dd1a1ed8311b365daa8deea76"; - aarch64-linux = "f698a7743962f553fe36673f1c85bccbd918efba8f6dca3a3df39d41c8e2de3e"; - aarch64-darwin = "749fb6bd676e174de66845b8ac959985f30a773dcb2c05553890bd99b94c9d60"; - headers = "1zkdgpjrh1dc9j8qyrrrh49v24960yhvwi2c530qbpf2azgqj71b"; - }; - - electron_12-bin = mkElectron "12.2.3" { - armv7l-linux = "4de83c34987ac7b3b2d0c8c84f27f9a34d9ea2764ae1e54fb609a95064e7e71a"; - aarch64-linux = "d29d234c09ba810d89ed1fba9e405b6975916ea208d001348379f89b50d1835c"; - x86_64-linux = "deae6d0941762147716b8298476080d961df2a32d0f6f57b244cbe3a2553cd24"; - i686-linux = "11b4f159cd3b89d916cc05b5231c2cde53f0c6fb5be8e881824fde00daa5e8c2"; - x86_64-darwin = "5af34f1198ce9fd17e9fa581f57a8ad2c9333187fb617fe943f30b8cde9e6231"; - aarch64-darwin = "0db2c021a047a4cd5b28eea16490e16bc82592e3f8a4b96fbdc72a292ce13f50"; - headers = "1idam1xirxqxqg4g7n33kdx2skk0r351m00g59a8yx9z82g06ah9"; - }; - - electron_13-bin = mkElectron "13.6.9" { - armv7l-linux = "e70cf80ac17850f3291c19a89235c59a7a6e0c791e7965805872ce584479c419"; - aarch64-linux = "cb570f77e46403a75b99740c41b297154f057dc3b9aa75fd235dccc5619972cf"; - x86_64-linux = "5e29701394041ba2acd8a9bb042d77967c399b8fe007d7ffbd1d3e6bfdb9eb8a"; - i686-linux = "7c31b60ee0e1d9966b8cf977528ace91e10ce25bb289a46eabbcf6087bee50e6"; - x86_64-darwin = "3393f0e87f30be325b76fb2275fe2d5614d995457de77fe00fa6eef2d60f331e"; - aarch64-darwin = "8471777eafc6fb641148a9c6acff2ea41c02a989d4d0a3a460322672d85169df"; - headers = "0vvizddmhprprbdf6bklasz6amwc254bpc9j0zlx23d1pgyxpnhc"; - }; - - electron_14-bin = mkElectron "14.2.9" { - armv7l-linux = "02ae6cd9ec9c2dcb2f550923576a0c851fff3e796a5048dd3806947c541fd564"; - aarch64-linux = "631ba0f716d0272931418de42468114360bd21ec72875605fc32d67620743d2c"; - x86_64-linux = "0a62a41e8ac4592aba347c82f9c40f3fb4c84c7d00b6bb9501d02375cd49cb7d"; - i686-linux = "55e395a209d4a90e2dcd20a78af4724355feaba86411a39e66b977ed39de4d05"; - x86_64-darwin = "1df5b4c4414ade75c6cbfe13d3024702b8ae7c77f3f07b8955b2459fde6a5842"; - aarch64-darwin = "17089e54830976c4216d26e7e2e15ad2224e3b288d94973fed7e67e9b1c213b3"; - headers = "181b2agnf4b5s81p2rdnd6wkw9c2ri4cv1x0wwf7rj60axvzvydm"; - }; - - electron_15-bin = mkElectron "15.5.7" { - armv7l-linux = "58efcdbdd4fc88b4f9d051a0af25a9d38709d870694c9447358fcbddd2c6cdf4"; - aarch64-linux = "994becc7d1b6ded8131cb15d2c80cd0ff443e40784adc25e55acae0c61e06697"; - x86_64-linux = "ecafc973ba31248defad83d5f618b13278a271f5ba8f220509ec21153f5939b0"; - i686-linux = "841f3ba960272692123134bd203b1de657aff0694fa85b2ccc59daffcebc0eb3"; - x86_64-darwin = "c71390382371715bed1e667e2cc2525dd10784519edc4351fe2db82b5ba4f217"; - aarch64-darwin = "55c476877d5d7040a114cc5821f7dced4d65c6110bb205b02c472420b4f4a1d9"; - headers = "00ic356iss1pshb7r06xriqkh9zn75nd1i6cgxcm6al43bxn6vq1"; - }; - - electron_16-bin = mkElectron "16.2.8" { - armv7l-linux = "93ba85035ab57537c3388c7b22a7ba66f9c49368aa8fea9816000c3f0f72e513"; - aarch64-linux = "29024df822cca9a2bbb2b71d82f2ddf5af5cada80c0bd38e8ede420700297c6a"; - x86_64-linux = "68dd612c503a82f9c0ad147e5f1d94213685bfc8fba6c4346fb542ec6fcd14e7"; - i686-linux = "f00ac4d64bb0c4f6c4c6b317a2a7e5731eb6150f2768ccca2526b41cce612df6"; - x86_64-darwin = "d40b00dbf2ef0e42f70b5269255101d3978e709dc3f0b6dbe0c7725fc828b3e1"; - aarch64-darwin = "8b68d24e4902c42b934d1b4de2c0e675039d4289a2e9a4caccc6ad13c3faa5ef"; - headers = "0b09whq5m7qbwy09ni29c23yip3k40sm88sa7ya5i1ysvp5p1v3c"; - }; - - electron_17-bin = mkElectron "17.4.11" { - armv7l-linux = "2f148ad481fe0e06dade070caecf23b7e1564b1b27d775c9350c7a5245998af2"; - aarch64-linux = "53618dc3fc6c04a4b4a44261987969850ad6ae56c8a5dbf21167cf0db7fc99bf"; - x86_64-linux = "c40cc41da8f7958b4edbef953e9b0b4e830689467d1f1993c4d298677e6d0047"; - i686-linux = "9654be64612f157a89928166f220792b5ab76240081a40594d01f763902d1007"; - x86_64-darwin = "abd190e66826500fd5082f083d2795aca08503eff4b38cacf43d575933c99b85"; - aarch64-darwin = "3fa2de3e6f67cc23051c23151c6aaac4d00c7595dda2adca4199242f44ab66bd"; - headers = "1k4aay9p65vi2gkdwk2f9r3lvxn20wkf0krr5arivg1kpi03bzf6"; - }; - - electron_18-bin = mkElectron "18.3.15" { - armv7l-linux = "2cc18781bdc5069878e544603fd66bccb9e8bf098f0250637cb5643cdc23d8bb"; - aarch64-linux = "8fc93d852acc6722d6c4f62a74bc62d56abacb27c2b4ab644415b73e45c2e6b5"; - x86_64-linux = "482101648dbf22e0e2c6be16cf36a9abf57028024abee56e23c143207d6ecdec"; - i686-linux = "1a417ec687b6591800b7123fe60207984fb686156ca3b90dfd56e4ad0c1da4aa"; - x86_64-darwin = "12927ceba4a56abaa96b28eb028f7e92e3b557c45c8b4e03a2178e7494d67ad5"; - aarch64-darwin = "e588cbef49094a7a9d6f104f35a92a74a800a7bdadc52862d243c5e8524ed01b"; - headers = "1rxslb022i45jd84fl311w5v0ski391s3i43kl75zyk4kha7japs"; - }; - - electron_19-bin = mkElectron "19.1.9" { - armv7l-linux = "90b4afbf03dde52953ada2d7082fed9a8954e7547d1d93c6286ba04f9ef68987"; - aarch64-linux = "473e07a6db8a92d4627ef1012dda590c5a04fb3d9804cc5237b033fdb6f52211"; - x86_64-linux = "fd320675f1647e03d96764a906c51c567bf0bcbe0301550e4559d66dd76796df"; - x86_64-darwin = "891545c70cbaed8c09b80c43587d5b517a592a2476de978ac1c6dd96cab8868f"; - aarch64-darwin = "3d38b7f867e32d71bb75e8ba5616835cc5cfac130a70313f5de252040636bc1d"; - headers = "06x325qksh9p4r8q9y3sqwhnk6vmvnjr1qb3f656a646vhjhp4bb"; - }; - - electron_20-bin = mkElectron "20.3.12" { - armv7l-linux = "3319634fe22a8938e5bbabd5b7158ac5691df359aec5f6959bf0ad9fcc0d2af0"; - aarch64-linux = "fb25d52f9416bb626fc9e2b02f06d032653cfa1d96918dd13643bbd3ffcb4529"; - x86_64-linux = "3d21d14e528980327a328f6bab3195ed7bfa1cab97ab7d3dbb023e657f663244"; - x86_64-darwin = "e6c8126a9e40c9b348ab4950b53472de13b66add5ba07ea0f3278ad202b35879"; - aarch64-darwin = "e94465a1e233df6b1bebd565fdc5bb5cc180e87dd7945933ee0f9355bcdbdded"; - headers = "0268rcqvwzjhxz32kd7djfw9dda93cm8xvzqyik0065hwgxwhcn1"; - }; - - electron_21-bin = mkElectron "21.4.4" { - armv7l-linux = "220d9a4fe374f01dd99fe0db5670698d2b1a5c371aaa7fe04385efefb0bbacbe"; - aarch64-linux = "b9214c775f4a767d534890d37de4625ace178b7b38ac0c0d56d87ac8e32bb7e5"; - x86_64-linux = "9a61c8f0ad986dfc3b45d52814ff60fc1190f47a337156ecddee1d8ec34dc086"; - x86_64-darwin = "78ad44ffac3bd2cae4fd4fea14d8ebf9087700b5074eacdb1764527c9d9baa1b"; - aarch64-darwin = "08a362473cdd3db2e8ce21e100680b90968150741809740db75cde4d4dd2af90"; - headers = "03mb1v5xzn2lp317r0mik9dx2nnxc7m26imygk13dgmafydd6aah"; - }; - - electron_22-bin = mkElectron "22.3.27" { - armv7l-linux = "9f8372606e5ede83cf1c73a3d8ff07047e4e3ef614aa89a76cd497dc06cf119d"; - aarch64-linux = "60279395a5ce4eaf3c08f1e717771b203830902d3fe3a7c311bc37deb1a0e15e"; - x86_64-linux = "631d8eb08098c48ce2b29421e74c69ac0312b1e42f445d8a805414ba1242bf3a"; - x86_64-darwin = "01f053d08cb2855acb14f0465f4e36324a41bd13b3b2ead142970a56df3e9db1"; - aarch64-darwin = "2b87e9f766692caaa16d7750bfab2f609c0eab906f55996c7d438d8e18ac8867"; - headers = "0hxp7jn30jncffw5xn8imk1hww56af34npp8ma58ha3qdm89146q"; - }; - - electron_23-bin = mkElectron "23.3.13" { - armv7l-linux = "b88424ef80d59ebafe1ded3a48d2f92160921e5973eaad64775173825212a8a9"; - aarch64-linux = "d353329f796798404a09a1f7271a6d824ced5dbe015e5c1d8e809aaa701a3907"; - x86_64-linux = "2f9ab1c3bbacaa74b64f4f6ad92423302cc6b69a135ff1438a84233611e2f440"; - x86_64-darwin = "ee6ccd4ce6c2c7bf3a0fd90b2b6347970df1663d8e48eabfc12136f9d8e2c479"; - aarch64-darwin = "d1091c1444b9dadc39b505808d241269cd988532e7576f506acbf6d9d4e2aa80"; - headers = "04k25z0d6xs2ar5mbbnr0phcs97kvxg28df3njhaniws6wf6qcmg"; - }; + electron-bin = electron_29-bin; electron_24-bin = mkElectron "24.8.6" { armv7l-linux = "8f46901667a904a62df7043991f20dc1c2a00370a42159976855458562cda8fc"; @@ -149,24 +15,6 @@ rec { headers = "009p1ffh2cyn98fcmprrjzq79jysp7h565v4f54wvjxjsq2nkr97"; }; - electron_25-bin = mkElectron "25.9.0" { - armv7l-linux = "dab54628685fc08f9a060de6bb5c9a7910eb2f6d0118ceb257447ace42378b36"; - aarch64-linux = "7f80fe6016aca69ded956cdd5b64f35a34c1a92a6c16d945465ba00708a4556c"; - x86_64-linux = "c762b14eb72749b9b400f3b7fff565b6722e0974c1cfb4b6d71b9df9fa364d07"; - x86_64-darwin = "9b676a67c6ae62b2b8972281934405861539e0c0f1dd5bf892e013d325927746"; - aarch64-darwin = "098d3673fbca3421021477f0639cb40a54856b35b8af4fa979d0defa1ba75801"; - headers = "0wcqz4vgkyz1zcd0ybx1ywzv9kz96hdxwk9an98v87nb1gfhk05c"; - }; - - electron_26-bin = mkElectron "26.3.0" { - armv7l-linux = "c444d805381a8125eb16f24369bbc370751c1f6bfaa0d4613a7a94ad797f5059"; - aarch64-linux = "740b779bf3a2032fedb6c1902e537f61e88c5e245a4e8815ec8cf471ff38aceb"; - x86_64-linux = "38e2a68361566faa2e7f2a4639cfedee3a5889d5f64018b2ad055c8f40516312"; - x86_64-darwin = "ea9434ad717f12771f8c508b664ed8d18179b397910ce81f4b6e21efce90b754"; - aarch64-darwin = "97cb2d00d06f331b4c028fa96373abdd7b5a71c2aa31b56cdf67d391f889f384"; - headers = "00r11n0i0j7brkjbb8b0b4df6kgkwdplic4l50y9l4a7sbg6i43m"; - }; - electron_27-bin = mkElectron "27.0.0" { armv7l-linux = "81070012b0abbd763c59301044585be7a0f0092d80f9a8507744720e267dae2e"; aarch64-linux = "202c5c6817081739e7bf15127c17c84ce2e553457c69a17557dec0928d40f354"; diff --git a/pkgs/development/tools/github-commenter/default.nix b/pkgs/development/tools/github-commenter/default.nix index 1e6c3e7ed057..50a12e0eb0a8 100644 --- a/pkgs/development/tools/github-commenter/default.nix +++ b/pkgs/development/tools/github-commenter/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "github-commenter"; - version = "0.27.0"; + version = "0.28.0"; src = fetchFromGitHub { owner = "cloudposse"; repo = pname; rev = version; - hash = "sha256-LF8ydXe+wAES0l5Lip6+30PXThGpciQgsclTE0YGxqg="; + hash = "sha256-x3/ae22ub9Us3mvSmvq9ohlkujvZCUfSrmZeQNvIWzE="; }; - vendorHash = "sha256-SzXouH7xVZ/J8sReT1m9UBAA567crgxoUiYqJIEFBlw="; + vendorHash = "sha256-DS2cTYQasIKmyqHS3kTpNMA4fuLxSv4n7ZQjeRWE0gI="; meta = with lib; { description = "Command line utility for creating GitHub comments on Commits, Pull Request Reviews or Issues"; diff --git a/pkgs/development/tools/goconst/default.nix b/pkgs/development/tools/goconst/default.nix index e564d8bcb3c4..d080a4fe3754 100644 --- a/pkgs/development/tools/goconst/default.nix +++ b/pkgs/development/tools/goconst/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "goconst"; - version = "1.7.0"; + version = "1.7.1"; excludedPackages = [ "tests" ]; @@ -10,7 +10,7 @@ buildGoModule rec { owner = "jgautheron"; repo = "goconst"; rev = "v${version}"; - sha256 = "sha256-yhvZucbFldjTPVdo0epNPFMgmvz0JFPF7Gra0t11zXU="; + sha256 = "sha256-GpOZJ5/5aNw1o8fk2RSAx200v6AZ+pbNu/25i8OSS1Y="; }; vendorHash = null; diff --git a/pkgs/development/tools/heroku/default.nix b/pkgs/development/tools/heroku/default.nix index d2257d7af25d..da7b0b196893 100644 --- a/pkgs/development/tools/heroku/default.nix +++ b/pkgs/development/tools/heroku/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation { pname = "heroku"; - version = "8.10.0"; + version = "8.11.0"; src = fetchzip { - url = "https://cli-assets.heroku.com/versions/8.10.0/25f0948/heroku-v8.10.0-25f0948-linux-x64.tar.xz"; - hash = "sha256-t2EQeOc6gi5lb7xrAc3WSqwUaczXN5pZXl0QkZ0Gk74="; + url = "https://cli-assets.heroku.com/versions/8.11.0/a525d5e/heroku-v8.11.0-a525d5e-linux-x64.tar.xz"; + hash = "sha256-0G/ZRffPUHQy5iU64x92pjLd6pFCfEABugnSfYiUXHQ="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/development/tools/kafkactl/default.nix b/pkgs/development/tools/kafkactl/default.nix index f184eeb653a4..9bb202fee67b 100644 --- a/pkgs/development/tools/kafkactl/default.nix +++ b/pkgs/development/tools/kafkactl/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "kafkactl"; - version = "4.0.0"; + version = "5.0.6"; src = fetchFromGitHub { owner = "deviceinsight"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-GtveC2W9y/mBuiZjpxCXjCE6WO0ub4wX85Is6MUTvlw="; + hash = "sha256-pAi60t0mtRlAL+z6s5moWwxw0hC6CeiljjjFyzyN+nI="; }; - vendorHash = "sha256-B7kP1ksH7t/1PQrI8mSgIEGdH02RhgN4A1z4S0UJG/g="; + vendorHash = "sha256-7ibev9Po8is+PXH0BC8ZLiTMJsPMR6VUwjNA/c1y/g0="; doCheck = false; diff --git a/pkgs/development/tools/lazygit/default.nix b/pkgs/development/tools/lazygit/default.nix index 97233ab11582..4ed99c20ebf7 100644 --- a/pkgs/development/tools/lazygit/default.nix +++ b/pkgs/development/tools/lazygit/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "lazygit"; - version = "0.40.2"; + version = "0.41.0"; src = fetchFromGitHub { owner = "jesseduffield"; repo = pname; rev = "v${version}"; - hash = "sha256-xj5WKAduaJWA3NhWuMsF5EXF91+NTGAXkbdhpeFqLxE="; + hash = "sha256-Ok6QnXw3oDeSzBekft8cDXM/YsADgF1NZznfNoGNvck="; }; vendorHash = null; @@ -25,7 +25,7 @@ buildGoModule rec { homepage = "https://github.com/jesseduffield/lazygit"; changelog = "https://github.com/jesseduffield/lazygit/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ Br1ght0ne equirosa paveloom ]; + maintainers = with maintainers; [ Br1ght0ne equirosa paveloom starsep ]; mainProgram = "lazygit"; }; } diff --git a/pkgs/development/tools/ls-lint/default.nix b/pkgs/development/tools/ls-lint/default.nix index b71f31067829..6deb41082e46 100644 --- a/pkgs/development/tools/ls-lint/default.nix +++ b/pkgs/development/tools/ls-lint/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "ls-lint"; - version = "2.2.2"; + version = "2.2.3"; src = fetchFromGitHub { owner = "loeffel-io"; repo = "ls-lint"; rev = "v${version}"; - sha256 = "sha256-twXaiPccc6DZdzKdvB+BzHbRuwgDy05C3jNg7Ur8yrA="; + sha256 = "sha256-blhb7+SmB3p6udGcbA8eCpSaqlTCca8J0Y/8riNRjW0="; }; - vendorHash = "sha256-uyNOcIjrICr76Q8izXGRMhofDcjQrzbB/ISHTqRY5fI="; + vendorHash = "sha256-qXx83jtkVzN+ydXjW4Nkz49rhSLbAS2597iuYUDsEo4="; meta = with lib; { description = "An extremely fast file and directory name linter"; diff --git a/pkgs/development/tools/mars-mips/default.nix b/pkgs/development/tools/mars-mips/default.nix index 80f80ca73418..66b9684175c3 100644 --- a/pkgs/development/tools/mars-mips/default.nix +++ b/pkgs/development/tools/mars-mips/default.nix @@ -1,25 +1,42 @@ -{ lib, stdenvNoCC, fetchurl, makeWrapper, copyDesktopItems, makeDesktopItem, unzip, imagemagick, jre }: +{ lib +, stdenv +, fetchurl +, makeBinaryWrapper +, copyDesktopItems +, makeDesktopItem +, desktopToDarwinBundle +, unzip +, imagemagick +, jre +}: -stdenvNoCC.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "mars-mips"; version = "4.5"; src = fetchurl { - url = "https://courses.missouristate.edu/KenVollmar/MARS/MARS_${lib.replaceStrings ["."] ["_"] version}_Aug2014/Mars${lib.replaceStrings ["."] ["_"] version}.jar"; - sha256 = "15kh1fahkkbbf4wvb6ijzny4fi5dh4pycxyzp5325dm2ddkhnd5c"; + url = "https://courses.missouristate.edu/KenVollmar/MARS/MARS_${lib.replaceStrings ["."] ["_"] finalAttrs.version}_Aug2014/Mars${lib.replaceStrings ["."] ["_"] finalAttrs.version}.jar"; + hash = "sha256-rDQLZ2uitiJGud935i+BrURHvP0ymrU5cWvNCZULcJY="; }; dontUnpack = true; - nativeBuildInputs = [ makeWrapper copyDesktopItems unzip imagemagick ]; + nativeBuildInputs = [ + makeBinaryWrapper + copyDesktopItems + unzip + imagemagick + ] ++ lib.optionals stdenv.isDarwin [ + desktopToDarwinBundle + ]; desktopItems = [ (makeDesktopItem { - name = pname; + name = "mars"; desktopName = "MARS"; - exec = "mars-mips"; - icon = "mars-mips"; - comment = "An IDE for programming in MIPS assembly language"; + exec = "Mars"; + icon = "mars"; + comment = finalAttrs.meta.description; categories = [ "Development" "IDE" ]; }) ]; @@ -27,25 +44,28 @@ stdenvNoCC.mkDerivation rec { installPhase = '' runHook preInstall - export JAR=$out/share/java/${pname}/${pname}.jar - install -D $src $JAR - makeWrapper ${jre}/bin/java $out/bin/${pname} \ + export JAR=$out/share/java/mars/Mars.jar + install -Dm444 $src $JAR + makeWrapper ${jre}/bin/java $out/bin/Mars \ --add-flags "-jar $JAR" - unzip ${src} images/MarsThumbnail.gif - mkdir -p $out/share/pixmaps - convert images/MarsThumbnail.gif $out/share/pixmaps/mars-mips.png + unzip $src images/MarsThumbnail.gif + for size in 16 24 32 48 64 128 256 512 + do + mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps + convert -resize "$size"x"$size" images/MarsThumbnail.gif $out/share/icons/hicolor/"$size"x"$size"/apps/mars.png + done runHook postInstall ''; - meta = with lib; { + meta = { description = "An IDE for programming in MIPS assembly language intended for educational-level use"; - mainProgram = "mars-mips"; + mainProgram = "Mars"; homepage = "https://courses.missouristate.edu/KenVollmar/MARS/"; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.mit; - maintainers = with maintainers; [ emilytrau ]; - platforms = platforms.all; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ emilytrau ]; + platforms = lib.platforms.all; }; -} +}) diff --git a/pkgs/development/tools/misc/linuxkit/default.nix b/pkgs/development/tools/misc/linuxkit/default.nix index 118b49b10f84..ebad2ed30f3b 100644 --- a/pkgs/development/tools/misc/linuxkit/default.nix +++ b/pkgs/development/tools/misc/linuxkit/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "linuxkit"; - version = "1.0.1"; + version = "1.2.0"; src = fetchFromGitHub { owner = "linuxkit"; repo = "linuxkit"; rev = "v${version}"; - sha256 = "sha256-8x9oJaYb/mN2TUaVrGOYi5/6TETD78jif0SwCSc0kyo="; + sha256 = "sha256-PrHGIP74mDt+mJDRaCsroiJ4QEW4/tzgsZI2JlZ8TEA="; }; vendorHash = null; diff --git a/pkgs/development/tools/misc/slint-lsp/default.nix b/pkgs/development/tools/misc/slint-lsp/default.nix index 7eb9cd05b97b..126167b475e6 100644 --- a/pkgs/development/tools/misc/slint-lsp/default.nix +++ b/pkgs/development/tools/misc/slint-lsp/default.nix @@ -25,14 +25,14 @@ let in rustPlatform.buildRustPackage rec { pname = "slint-lsp"; - version = "1.5.0"; + version = "1.5.1"; src = fetchCrate { inherit pname version; - sha256 = "sha256-IkXjO4XGRT19kJRp+1tgPR8nyIVulV412HgS4rVuFhc="; + sha256 = "sha256-wqAcHBHWtYavAakHLhHHCI+Yercgdtzo1EAOilsZOK0="; }; - cargoHash = "sha256-vXip1m34kF4Jdz4FQa58/hepJRVnDyS5xGUja4+O7Lo="; + cargoHash = "sha256-XjVXhXoGEhxWc+LZa0EsPiw3Gq2pg03YjKONTptSQvA="; nativeBuildInputs = [ cmake pkg-config fontconfig ]; buildInputs = rpathLibs ++ [ xorg.libxcb.dev ] diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix index 5dc67a627a55..3cae7fc017d4 100644 --- a/pkgs/development/tools/misc/strace/default.nix +++ b/pkgs/development/tools/misc/strace/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "strace"; - version = "6.7"; + version = "6.8"; src = fetchurl { url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-IJAgHho/8yhG9P5CHBFjsV9EC7OOMTVdCfgtOUmSKvc="; + sha256 = "sha256-umlQqWgkzfk6WE+gTwpzOJbSprxfCtn/5QXZtB6XAUk="; }; depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/development/tools/misc/terser/default.nix b/pkgs/development/tools/misc/terser/default.nix index 3c484b5372fb..2b9052ad79e6 100644 --- a/pkgs/development/tools/misc/terser/default.nix +++ b/pkgs/development/tools/misc/terser/default.nix @@ -2,16 +2,16 @@ buildNpmPackage rec { pname = "terser"; - version = "5.29.1"; + version = "5.29.2"; src = fetchFromGitHub { owner = "terser"; repo = "terser"; rev = "v${version}"; - hash = "sha256-1E5sXNKekkxv40FwGBR20LEWbM63SyKOZ7h1pcCqLKA="; + hash = "sha256-VGQ/mgMeeNA0koYgmb6PAZqBdVljgqY3MwuG0RLllCU="; }; - npmDepsHash = "sha256-X37hDDyi0eEWdVoy3vU6+efXgEaLRK81LjfDEWqSFC0="; + npmDepsHash = "sha256-8wKvV3vSzF6WdHzox1LXVi2FmeZf7qSo2rg93uCN3fI="; meta = with lib; { description = "JavaScript parser, mangler and compressor toolkit for ES6+"; diff --git a/pkgs/development/tools/parsing/re-flex/default.nix b/pkgs/development/tools/parsing/re-flex/default.nix index c75245541287..524a900ec422 100644 --- a/pkgs/development/tools/parsing/re-flex/default.nix +++ b/pkgs/development/tools/parsing/re-flex/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "re-flex"; - version = "4.1.0"; + version = "4.1.2"; src = fetchFromGitHub { owner = "Genivia"; repo = "RE-flex"; rev = "v${version}"; - hash = "sha256-pjYiCRKaskJg1IuCxNBUQ9FY2abGi4HEZxsfZ5ctjNY="; + hash = "sha256-w1aH04VGe9nPvwGdbTEsAcIPb7oC739LZjTI/1Ck7bU="; }; outputs = [ "out" "bin" "dev" ]; diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix b/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix index 57152c24fe4a..53c06662793c 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix @@ -51,6 +51,7 @@ tree-sitter-jsonnet = lib.importJSON ./tree-sitter-jsonnet.json; tree-sitter-julia = lib.importJSON ./tree-sitter-julia.json; tree-sitter-just = lib.importJSON ./tree-sitter-just.json; + tree-sitter-koka = lib.importJSON ./tree-sitter-koka.json; tree-sitter-kotlin = lib.importJSON ./tree-sitter-kotlin.json; tree-sitter-latex = lib.importJSON ./tree-sitter-latex.json; tree-sitter-ledger = lib.importJSON ./tree-sitter-ledger.json; diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-koka.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-koka.json new file mode 100644 index 000000000000..56153f9ac2a5 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-koka.json @@ -0,0 +1,12 @@ +{ + "url": "https://github.com/mtoohey31/tree-sitter-koka", + "rev": "96d070c3700692858035f3524cc0ad944cef2594", + "date": "2024-01-21T20:56:11-05:00", + "path": "/nix/store/n0cy7vhsiw6i2s9i2hzwcm0ddj7d4ffi-tree-sitter-koka", + "sha256": "1bxmflc8ynqpdkzwc74fqqcjhzkggkzxbzhbx0ji4g7kfknc0ldk", + "hash": "sha256-s1HA7HTzPBIl6Av+1f98b34oGcaOHMb/bBdbjxh1ta8=", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 80d5f78845dd..c4d64cbd25aa 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -417,6 +417,10 @@ let orga = "gleam-lang"; repo = "tree-sitter-gleam"; }; + "tree-sitter-koka" = { + orga = "mtoohey31"; + repo = "tree-sitter-koka"; + }; }; allGrammars = diff --git a/pkgs/development/tools/protoc-gen-connect-go/default.nix b/pkgs/development/tools/protoc-gen-connect-go/default.nix index aae03af7cbf2..2b963d53c672 100644 --- a/pkgs/development/tools/protoc-gen-connect-go/default.nix +++ b/pkgs/development/tools/protoc-gen-connect-go/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "protoc-gen-connect-go"; - version = "1.15.0"; + version = "1.16.0"; src = fetchFromGitHub { owner = "connectrpc"; repo = "connect-go"; rev = "refs/tags/v${version}"; - hash = "sha256-0jQYZ4T3fE+TEQ/z9RooRqMtDCWHQUWzVCqEak6JKmQ="; + hash = "sha256-TtYqJCiXZh+ELYJ55D2g19kDYCESLLbMb5B/iaUMACc="; }; - vendorHash = "sha256-rQCKj1L0kQccxWCmR0+D4itypZqJ2YuBuzCkdOVLO/U="; + vendorHash = "sha256-+bWw4/ZqMeqnkXnV+vwq2mxgvew0KmLwNcu/xA2l4HI="; subPackages = [ "cmd/protoc-gen-connect-go" diff --git a/pkgs/development/tools/refurb/default.nix b/pkgs/development/tools/refurb/default.nix index e9dd2ecbd942..a51f15ce5b8e 100644 --- a/pkgs/development/tools/refurb/default.nix +++ b/pkgs/development/tools/refurb/default.nix @@ -5,14 +5,14 @@ python3Packages.buildPythonApplication rec { pname = "refurb"; - version = "1.28.0"; + version = "2.0.0"; format = "pyproject"; src = fetchFromGitHub { owner = "dosisod"; repo = "refurb"; rev = "refs/tags/v${version}"; - hash = "sha256-b7Id2Oyjw3NZno56IMDIq7fn5u9+jn42nuae8ix90fM="; + hash = "sha256-6MchaqRKJPmvwiDyhCK4kFyIYl2B+2dGL8H8X2ES+VQ="; }; postPatch = '' diff --git a/pkgs/development/tools/rust/cargo-deny/default.nix b/pkgs/development/tools/rust/cargo-deny/default.nix index 558b8ae486c2..f4bdb252d400 100644 --- a/pkgs/development/tools/rust/cargo-deny/default.nix +++ b/pkgs/development/tools/rust/cargo-deny/default.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-deny"; - version = "0.14.17"; + version = "0.14.18"; src = fetchFromGitHub { owner = "EmbarkStudios"; repo = "cargo-deny"; rev = version; - hash = "sha256-ccj9BvvEtTsiV6jfrmLsQGDfem9f8L7rfCY8lK4cC+Y="; + hash = "sha256-aVWr7YXGpRDItub4CaUg9LYxj9Nf0Pe1L0FUr9bJoG0="; }; - cargoHash = "sha256-pdVHBOxwhPgSl0+zoAobchxVkhtdx5/F/Rpp2uPx1K4="; + cargoHash = "sha256-AD4WFM0yAIKgi9y8015qxukAa3YBJmPnkUhV7qp0quk="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/development/tools/rust/cargo-outdated/default.nix b/pkgs/development/tools/rust/cargo-outdated/default.nix index 178c668fcd90..1df9d8d916de 100644 --- a/pkgs/development/tools/rust/cargo-outdated/default.nix +++ b/pkgs/development/tools/rust/cargo-outdated/default.nix @@ -13,14 +13,14 @@ rustPlatform.buildRustPackage rec { pname = "cargo-outdated"; - version = "0.14.0"; + version = "0.15.0"; src = fetchCrate { inherit pname version; - sha256 = "sha256-rbfCrq9AwjrynNSklR1un3BUGv0kblwIxy72lTjEDVc="; + sha256 = "sha256-+GPP8Mdoc3LsR2puNu3/pzKg4Umvjd7CxivkHC8YxgM="; }; - cargoHash = "sha256-kBolewLzKGq3rmSeWlLMDqKb4QQfWf3J6DnXTB0SV54="; + cargoHash = "sha256-Lkl7F5ZVlYLBeL3tubdMQ4/KbHYd2dD5IJAX9FO0XUg="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/development/tools/rust/cargo-pgrx/default.nix b/pkgs/development/tools/rust/cargo-pgrx/default.nix index 85fc916104ad..3aa7003b7567 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/default.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/default.nix @@ -1,39 +1,74 @@ -{ lib, stdenv, fetchCrate, rustPlatform, pkg-config, openssl, Security }: +{ lib +, darwin +, fetchCrate +, openssl +, pkg-config +, rustPlatform +, stdenv +}: let - pname = "cargo-pgrx"; - version = "0.11.2"; -in -rustPlatform.buildRustPackage rec { - inherit version pname; + generic = + { version + , hash + , cargoHash + }: + rustPlatform.buildRustPackage rec { + pname = "cargo-pgrx"; - src = fetchCrate { - inherit version pname; - hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM="; - }; + inherit version; + + src = fetchCrate { + inherit version pname hash; + }; + + inherit cargoHash; - cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI="; + nativeBuildInputs = lib.optionals stdenv.isLinux [ + pkg-config + ]; - nativeBuildInputs = [ pkg-config ]; + buildInputs = lib.optionals stdenv.isLinux [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; - buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + preCheck = '' + export PGRX_HOME=$(mktemp -d) + ''; - preCheck = '' - export PGRX_HOME=$(mktemp -d) - ''; + checkFlags = [ + # requires pgrx to be properly initialized with cargo pgrx init + "--skip=command::schema::tests::test_parse_managed_postmasters" + ]; - checkFlags = [ - # requires pgrx to be properly initialized with cargo pgrx init - "--skip=command::schema::tests::test_parse_managed_postmasters" - ]; + meta = with lib; { + description = "Build Postgres Extensions with Rust"; + homepage = "https://github.com/pgcentralfoundation/pgrx"; + changelog = "https://github.com/pgcentralfoundation/pgrx/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + mainProgram = "cargo-pgrx"; + }; + }; +in +{ + cargo-pgrx_0_10_2 = generic { + version = "0.10.2"; + hash = "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls="; + cargoHash = "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI="; + }; + + cargo-pgrx_0_11_2 = generic { + version = "0.11.2"; + hash = "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM="; + cargoHash = "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI="; + }; - meta = with lib; { - description = "Build Postgres Extensions with Rust!"; - mainProgram = "cargo-pgrx"; - homepage = "https://github.com/tcdi/pgrx"; - changelog = "https://github.com/tcdi/pgrx/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ happysalada ]; + cargo-pgrx_0_11_3 = generic { + version = "0.11.3"; + hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU="; + cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw="; }; } diff --git a/pkgs/development/tools/rye/Cargo.lock b/pkgs/development/tools/rye/Cargo.lock index 763afd5d39d3..4fa64e779282 100644 --- a/pkgs/development/tools/rye/Cargo.lock +++ b/pkgs/development/tools/rye/Cargo.lock @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "rye" -version = "0.30.0" +version = "0.31.0" dependencies = [ "age", "anyhow", diff --git a/pkgs/development/tools/rye/default.nix b/pkgs/development/tools/rye/default.nix index a5f14816dbff..ac748516386e 100644 --- a/pkgs/development/tools/rye/default.nix +++ b/pkgs/development/tools/rye/default.nix @@ -12,13 +12,13 @@ rustPlatform.buildRustPackage rec { pname = "rye"; - version = "0.30.0"; + version = "0.31.0"; src = fetchFromGitHub { owner = "mitsuhiko"; repo = "rye"; rev = "refs/tags/${version}"; - hash = "sha256-a4u8dBqp9zs4RW7tXN8HjGzvjYFyDUJzEFMxMoGhu4E="; + hash = "sha256-hPfMKp5FUbIKKKFfoS/pxseWmhqW8UOts7DOcRzgHWU="; }; cargoLock = { @@ -74,6 +74,7 @@ rustPlatform.buildRustPackage rec { "--skip=test_init_lib" "--skip=test_init_script" "--skip=test_lint_and_format" + "--skip=test_publish_outside_project" "--skip=test_version" ]; diff --git a/pkgs/development/tools/toxiproxy/default.nix b/pkgs/development/tools/toxiproxy/default.nix index 985d0be9a20d..22dd5d2f6eeb 100644 --- a/pkgs/development/tools/toxiproxy/default.nix +++ b/pkgs/development/tools/toxiproxy/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "toxiproxy"; - version = "2.6.0"; + version = "2.9.0"; src = fetchFromGitHub { owner = "Shopify"; repo = "toxiproxy"; rev = "v${version}"; - sha256 = "sha256-wa39RsopmENXNEI5kiNIYSLGi/qGwIEfNVKWhAgVOuE="; + sha256 = "sha256-zwKeJ8LMMSSHvE0x0/9j3wBdAJG43RiGcszKz0B3dG8="; }; - vendorHash = "sha256-m6jZOVlJI3GGqCsCkMAIB2jg1Nk8oAELyzL3y4b2nqA="; + vendorHash = "sha256-eSQvLsSWWypA5vXR/GiEf5j7TzzsL8ZFRPOeICsIrlY="; excludedPackages = [ "test/e2e" ]; @@ -25,7 +25,10 @@ buildGoModule rec { # Fixes tests on Darwin __darwinAllowLocalNetworking = true; - checkFlags = [ "-short" "-skip=TestVersionEndpointReturnsVersion" ]; + checkFlags = [ + "-short" + "-skip=TestVersionEndpointReturnsVersion|TestFullstreamLatencyBiasDown" + ]; postInstall = '' mv $out/bin/cli $out/bin/toxiproxy-cli diff --git a/pkgs/development/tools/zprint/default.nix b/pkgs/development/tools/zprint/default.nix index 6e76f0819fc1..0d8f66d436f8 100644 --- a/pkgs/development/tools/zprint/default.nix +++ b/pkgs/development/tools/zprint/default.nix @@ -7,11 +7,11 @@ buildGraalvmNativeImage rec { pname = "zprint"; - version = "1.2.8"; + version = "1.2.9"; src = fetchurl { url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}"; - sha256 = "sha256-o0yoW45a5r+sTGvjEqr5VZgQKm72qsPH/kbLTbMTgEM="; + sha256 = "sha256-4gSGD7Jiu1mqyPMoQrrPT60EFXs7ySfjpT9wSyhp3ig="; }; extraNativeImageBuildArgs = [ diff --git a/pkgs/development/web/shopify-themekit/default.nix b/pkgs/development/web/shopify-themekit/default.nix index 7b50c3e37aa3..5472f38fd727 100644 --- a/pkgs/development/web/shopify-themekit/default.nix +++ b/pkgs/development/web/shopify-themekit/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "shopify-themekit"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "Shopify"; repo = "themekit"; rev = "v${version}"; - sha256 = "sha256-HtgA+R6THZ49WYtGlHS1EzekjuuGgPe657Y6ewraD4o="; + sha256 = "sha256-A/t6yQW2xRFZYuYRyNN/0v4zdivch3tiv65a7TdHm2c="; }; - vendorHash = "sha256-8QpkYj0fQb4plzvk6yCrZho8rq9VBiLft/EO3cczciI="; + vendorHash = "sha256-o928qjp7+/U1W03esYTwVEfQ4A3TmPnmgmh4oWpqJoo="; ldflags = [ "-s" "-w" ]; |