From dce177b067b0a98245421b698cc176ab5f790db6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Jan 2023 11:54:19 +0000 Subject: [PATCH 01/66] python310Packages.coconut: 2.1.1 -> 2.2.0 --- pkgs/development/python-modules/coconut/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix index 2628c19cb46a..24f940e3c2ab 100644 --- a/pkgs/development/python-modules/coconut/default.nix +++ b/pkgs/development/python-modules/coconut/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "coconut"; - version = "2.1.1"; + version = "2.2.0"; src = fetchFromGitHub { owner = "evhub"; repo = "coconut"; rev = "refs/tags/v${version}"; - sha256 = "sha256-zDMcQPAYlxid3fcMT8kRzE+LN1dxUVWjkg8pdVtmwZg="; + sha256 = "sha256-+OrVNtre7kAfU5L7/6DadZxFNWVt5raF6HLGXHHpOvE="; }; propagatedBuildInputs = [ cpyparsing ipykernel mypy pygments prompt-toolkit watchdog ]; From 112a1cffabce7afb9fed5da89a87a80f50854c24 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Jan 2023 12:23:51 +0000 Subject: [PATCH 02/66] python310Packages.inquirer: 3.1.1 -> 3.1.2 --- pkgs/development/python-modules/inquirer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/inquirer/default.nix b/pkgs/development/python-modules/inquirer/default.nix index 8efdb1ab03b8..38c810ed477b 100644 --- a/pkgs/development/python-modules/inquirer/default.nix +++ b/pkgs/development/python-modules/inquirer/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "inquirer"; - version = "3.1.1"; + version = "3.1.2"; format = "pyproject"; src = fetchFromGitHub rec { owner = "magmax"; repo = "python-inquirer"; rev = "refs/tags/v${version}"; - sha256 = "sha256-gDJqD0IHshyGw9MmMtYjkkpvYklRLgPd6EtLVqi2I/o="; + sha256 = "sha256-7kq0sZzPeCX7TA5Cl2rg6Uw+9jLz335a+tOrO0+Cyas="; }; nativeBuildInputs = [ From 187e43489b5f4cbe319305cae9ca1acda01216f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 16 Jan 2023 14:21:27 +0100 Subject: [PATCH 03/66] python310Packages.inquirer: add changelog to meta - add pythonImportsCheck --- .../python-modules/inquirer/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/inquirer/default.nix b/pkgs/development/python-modules/inquirer/default.nix index 38c810ed477b..76078f7af51f 100644 --- a/pkgs/development/python-modules/inquirer/default.nix +++ b/pkgs/development/python-modules/inquirer/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, pythonOlder # native , poetry-core @@ -21,11 +22,13 @@ buildPythonPackage rec { version = "3.1.2"; format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub rec { owner = "magmax"; repo = "python-inquirer"; rev = "refs/tags/v${version}"; - sha256 = "sha256-7kq0sZzPeCX7TA5Cl2rg6Uw+9jLz335a+tOrO0+Cyas="; + hash = "sha256-7kq0sZzPeCX7TA5Cl2rg6Uw+9jLz335a+tOrO0+Cyas="; }; nativeBuildInputs = [ @@ -44,10 +47,16 @@ buildPythonPackage rec { pytestCheckHook ]; + + pythonImportsCheck = [ + "inquirer" + ]; + meta = with lib; { - homepage = "https://github.com/magmax/python-inquirer"; description = "A collection of common interactive command line user interfaces, based on Inquirer.js"; + homepage = "https://github.com/magmax/python-inquirer"; + changelog = "https://github.com/magmax/python-inquirer/releases/tag/v${version}"; license = licenses.mit; - maintainers = [ maintainers.mmahut ]; + maintainers = with maintainers; [ mmahut ]; }; } From 1f88480755058f929995b167d318cdbf5da89d86 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 26 Jan 2023 16:29:55 +0000 Subject: [PATCH 04/66] python310Packages.chart-studio: 5.11.0 -> 5.13.0 --- pkgs/development/python-modules/chart-studio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/chart-studio/default.nix b/pkgs/development/python-modules/chart-studio/default.nix index 966daaf1ea1e..c988ab49a75b 100644 --- a/pkgs/development/python-modules/chart-studio/default.nix +++ b/pkgs/development/python-modules/chart-studio/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "chart-studio"; - version = "5.11.0"; + version = "5.13.0"; # chart-studio was split from plotly src = fetchFromGitHub { owner = "plotly"; repo = "plotly.py"; rev = "refs/tags/v${version}"; - sha256 = "sha256-Reti8tvBpBxpfNjnZs8wWuS76oEWIKPCxzSdTEO+ykA="; + sha256 = "sha256-j4n5goW2Iu5Z1+Gta1Ar34WXaF8ryUKs5P+6Onhmyh0="; }; sourceRoot = "source/packages/python/chart-studio"; From f70071e41da960a1d68d3cef0cb1e2e4d0d93fbf Mon Sep 17 00:00:00 2001 From: dramforever Date: Thu, 9 Feb 2023 21:18:40 +0800 Subject: [PATCH 05/66] qemu: fix cross compilation, again The python dependencies were fixed for cross in #147692, but the changes are reversed #190560 due to concerns of accidentally mixing python versions. Compromise by using python3Packages.python. --- pkgs/applications/virtualization/qemu/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index e68cf7048b56..6d40ba2660e3 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, python3, zlib, pkg-config, glib, buildPackages +{ lib, stdenv, fetchurl, fetchpatch, python3Packages, zlib, pkg-config, glib, buildPackages , perl, pixman, vde2, alsa-lib, texinfo, flex , bison, lzo, snappy, libaio, libtasn1, gnutls, nettle, curl, ninja, meson, sigtool , makeWrapper, runtimeShell, removeReferencesTo @@ -51,7 +51,13 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ makeWrapper removeReferencesTo pkg-config flex bison meson ninja perl python3 python3.pkgs.sphinx python3.pkgs.sphinx-rtd-theme ] + nativeBuildInputs = [ + makeWrapper removeReferencesTo + pkg-config flex bison meson ninja perl + + # Don't change this to python3 and python3.pkgs.*, breaks cross-compilation + python3Packages.python python3Packages.sphinx python3Packages.sphinx-rtd-theme + ] ++ lib.optionals gtkSupport [ wrapGAppsHook ] ++ lib.optionals stdenv.isDarwin [ sigtool ]; From 08e6d08acea8ac91619c5be4223d44e49f6476a7 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sat, 4 Feb 2023 11:39:08 +0800 Subject: [PATCH 06/66] qemu: Remove --cpu= flag './configure --cpu=$(uname -m)' (essentially) breaks the case of riscv, where the configure script expects '--cpu=riscv', but 'uname -m' gives 'riscv{32,64}'. This eventually leads to user-mode emulation being disabled. Since the configure script can auto-detect the parameter based on compilers, remove this flag. Originally added in #147692, but apparently it's not needed and @NickCao couldn't remember why it was added. See also mailing list discussion at https://lore.kernel.org/qemu-devel/20230204112502.2558739-1-mjt@msgid.tls.msk.ru/T/ --- pkgs/applications/virtualization/qemu/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 6d40ba2660e3..c20a2c53d600 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -149,7 +149,6 @@ stdenv.mkDerivation rec { # have our patches and will be subtly broken because of that. "--meson=meson" "--cross-prefix=${stdenv.cc.targetPrefix}" - "--cpu=${stdenv.hostPlatform.uname.processor}" (lib.enableFeature guestAgentSupport "guest-agent") ] ++ lib.optional numaSupport "--enable-numa" ++ lib.optional seccompSupport "--enable-seccomp" From 5cbeee05f3c05c6049ab24b8ab083c328d91a94b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 9 Feb 2023 19:30:07 +0000 Subject: [PATCH 07/66] python310Packages.types-protobuf: 4.21.0.2 -> 4.21.0.5 --- pkgs/development/python-modules/types-protobuf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/types-protobuf/default.nix b/pkgs/development/python-modules/types-protobuf/default.nix index 862b8ff805c2..967d08fc0d7a 100644 --- a/pkgs/development/python-modules/types-protobuf/default.nix +++ b/pkgs/development/python-modules/types-protobuf/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-protobuf"; - version = "4.21.0.2"; + version = "4.21.0.5"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ffSD00rT/LH6f/8Qc1YNWWyawfQZz6hRsiDJqTOGyZg="; + sha256 = "sha256-gZp8Z+aUduOcPwyYcbu57oIxNkXTF7ba62CslaMJ29M="; }; propagatedBuildInputs = [ From 4e51b4a5cbff4beaf0b88ed860ce675cd35b4cf2 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 8 Feb 2023 21:26:19 +0000 Subject: [PATCH 08/66] graalvm*-ce: refactor derivation to be stand-alone First step to separate the main GraalVM derivation and each of its products in separate derivations, making them more composable. --- .../community-edition/buildGraalvm.nix | 132 ++++++++++++++++++ .../graalvm/community-edition/default.nix | 78 ++--------- .../graalvm11-ce-sources.json | 8 +- .../graalvm17-ce-sources.json | 8 +- pkgs/top-level/all-packages.nix | 4 +- 5 files changed, 153 insertions(+), 77 deletions(-) create mode 100644 pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix new file mode 100644 index 000000000000..9161f21c8559 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -0,0 +1,132 @@ +{ lib +, stdenv +, alsa-lib +, autoPatchelfHook +, cairo +, cups +, fontconfig +, glib +, gtk3 +, gtkSupport ? stdenv.isLinux +, makeWrapper +, unzip +, xorg +, zlib +}: +{ javaVersion +, meta ? { } +, ... } @ args: + +let + runtimeLibraryPath = lib.makeLibraryPath + ([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]); +in +stdenv.mkDerivation (args // { + pname = "graalvm${javaVersion}-ce"; + + unpackPhase = '' + runHook preUnpack + + mkdir -p "$out" + + # The tarball on Linux has the following directory structure: + # + # graalvm-ce-java11-20.3.0/* + # + # while on Darwin it looks like this: + # + # graalvm-ce-java11-20.3.0/Contents/Home/* + # + # We therefor use --strip-components=1 vs 3 depending on the platform. + tar xf "$src" -C "$out" --strip-components=${ + if stdenv.isLinux then "1" else "3" + } + + # Sanity check + if [ ! -d "$out/bin" ]; then + echo "The `bin` is directory missing after extracting the graalvm" + echo "tarball, please compare the directory structure of the" + echo "tarball with what happens in the unpackPhase (in particular" + echo "with regards to the `--strip-components` flag)." + exit 1 + fi + + runHook postUnpack + ''; + + dontStrip = true; + + nativeBuildInputs = [ unzip makeWrapper ] + ++ lib.optional stdenv.isLinux autoPatchelfHook; + + buildInputs = [ + alsa-lib # libasound.so wanted by lib/libjsound.so + fontconfig + stdenv.cc.cc.lib # libstdc++.so.6 + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXrender + xorg.libXtst + zlib + ]; + + postInstall = '' + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + + # copy-paste openjdk's preFixup + # Set JAVA_HOME automatically. + mkdir -p $out/nix-support + cat > $out/nix-support/setup-hook << EOF + if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi + EOF + ''; + + postFixup = lib.optionalString (stdenv.isLinux) '' + # Find all executables in any directory that contains '/bin/' + for bin in $(find "$out" -executable -type f -wholename '*/bin/*'); do + wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" + done + ''; + + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + + echo ${ + lib.escapeShellArg '' + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello World"); + } + } + '' + } > HelloWorld.java + $out/bin/javac HelloWorld.java + + # run on JVM with Graal Compiler + echo "Testing GraalVM" + $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' + + runHook postInstallCheck + ''; + + meta = with lib; ({ + inherit platforms; + homepage = "https://www.graalvm.org/"; + description = "High-Performance Polyglot VM"; + license = with licenses; [ upl gpl2Classpath bsd3 ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + mainProgram = "java"; + maintainers = with maintainers; [ + bandresen + hlolli + glittershark + babariviere + ericdallo + thiagokokada + ]; + } // meta); +}) diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index 17ecd5060ba2..3c2e7c5e41c7 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -1,75 +1,21 @@ -{ callPackage, Foundation }: -/* - Add new graal versions and products here and then see update.nix on how to - generate the sources. -*/ +{ stdenv, callPackage, fetchurl }: let - mkGraal = opts: callPackage (import ./mkGraal.nix opts) { - inherit Foundation; - }; - - /* - Looks a bit ugly but makes version update in the update script using sed - much easier - - Don't change these values! They will be updated by the update script, see ./update.nix. - */ - graalvm11-ce-release-version = "22.3.0"; - graalvm17-ce-release-version = "22.3.0"; - - products = [ - "graalvm-ce" - "native-image-installable-svm" - ]; - + buildGraalvm = callPackage (import ./buildGraalvm.nix) { }; + sources = javaVersion: builtins.fromJSON (builtins.readFile (./. + "/graalvm${javaVersion}-ce-sources.json")); in -{ - inherit mkGraal; - - graalvm11-ce = mkGraal rec { - config = { - x86_64-darwin = { - inherit products; - arch = "darwin-amd64"; - }; - x86_64-linux = { - inherit products; - arch = "linux-amd64"; - }; - aarch64-darwin = { - inherit products; - arch = "darwin-aarch64"; - }; - aarch64-linux = { - inherit products; - arch = "linux-aarch64"; - }; - }; - defaultVersion = graalvm11-ce-release-version; +rec { + graalvm11-ce = buildGraalvm rec { + version = "22.3.0"; javaVersion = "11"; + src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; + meta.platforms = builtins.attrNames (sources javaVersion); }; - graalvm17-ce = mkGraal rec { - config = { - x86_64-darwin = { - inherit products; - arch = "darwin-amd64"; - }; - x86_64-linux = { - inherit products; - arch = "linux-amd64"; - }; - aarch64-darwin = { - inherit products; - arch = "darwin-aarch64"; - }; - aarch64-linux = { - inherit products; - arch = "linux-aarch64"; - }; - }; - defaultVersion = graalvm17-ce-release-version; + graalvm17-ce = buildGraalvm rec { + version = "22.3.0"; javaVersion = "17"; + src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; + meta.platforms = builtins.attrNames (sources javaVersion); }; } diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json b/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json index c9145e9654f8..705750cfe7f0 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json +++ b/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json @@ -1,5 +1,5 @@ { - "darwin-aarch64": { + "aarch64-darwin": { "graalvm-ce|java11|22.3.0": { "sha256": "c9657e902c2ba674931c3cf233a38c4de3d5186ae5d70452f9df75ac0c4cacff", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-darwin-aarch64-22.3.0.tar.gz" @@ -9,7 +9,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-darwin-aarch64-22.3.0.jar" } }, - "darwin-amd64": { + "x86_64-darwin": { "graalvm-ce|java11|22.3.0": { "sha256": "b8b39d6a3e3a9ed6348c2776ff071fc64ca90f98999ee846e6ca7e5fdc746a8b", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-darwin-amd64-22.3.0.tar.gz" @@ -19,7 +19,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-darwin-amd64-22.3.0.jar" } }, - "linux-aarch64": { + "aarch64-linux": { "graalvm-ce|java11|22.3.0": { "sha256": "c6646149dad486a0b02c5fc10649786240f275efda65aa14a25d01d2f5bafe15", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-linux-aarch64-22.3.0.tar.gz" @@ -29,7 +29,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-linux-aarch64-22.3.0.jar" } }, - "linux-amd64": { + "x86_64-linux": { "graalvm-ce|java11|22.3.0": { "sha256": "d4200bcc43e5ad4e6949c1b1edc1e59f63066e3a2280d5bd82d0c9b1d67c3f2c", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-linux-amd64-22.3.0.tar.gz" diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json b/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json index dc2da450b699..93f598a66598 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json +++ b/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json @@ -1,5 +1,5 @@ { - "darwin-aarch64": { + "aarch64-darwin": { "graalvm-ce|java17|22.3.0": { "sha256": "dfc0c8998b8d00fcca87ef1c866c6e4985fd20b0beba3021f9677f9b166dfaf8", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-darwin-aarch64-22.3.0.tar.gz" @@ -9,7 +9,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-darwin-aarch64-22.3.0.jar" } }, - "darwin-amd64": { + "x86_64-darwin": { "graalvm-ce|java17|22.3.0": { "sha256": "422cd6abecfb8b40238460c09c42c5a018cb92fab4165de9691be2e3c3d0e8d1", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-darwin-amd64-22.3.0.tar.gz" @@ -19,7 +19,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-darwin-amd64-22.3.0.jar" } }, - "linux-aarch64": { + "aarch64-linux": { "graalvm-ce|java17|22.3.0": { "sha256": "e27249d9eef4504deb005cf14c6a028aad1adfa37209e12e9d7407710c08ed90", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-linux-aarch64-22.3.0.tar.gz" @@ -29,7 +29,7 @@ "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-linux-aarch64-22.3.0.jar" } }, - "linux-amd64": { + "x86_64-linux": { "graalvm-ce|java17|22.3.0": { "sha256": "3473d8b3b1bc682e95adfb3ac1d9a59b51b0f43e2b752f2a5b550e4ebfa2fd17", "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-linux-amd64-22.3.0.tar.gz" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24181c424147..b997e0662649 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14985,9 +14985,7 @@ with pkgs; openjdk_headless = jdk_headless; graalvmCEPackages = - recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { - inherit (darwin.apple_sdk.frameworks) Foundation; - }); + recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { }); graalvm11-ce = graalvmCEPackages.graalvm11-ce; graalvm17-ce = graalvmCEPackages.graalvm17-ce; buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { From 256195c07a7d4c191d0435919bb9c1f575b09339 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 8 Feb 2023 21:56:10 +0000 Subject: [PATCH 09/66] native-image-installable-svm: init at 22.3.0 Also refactor the buildGraalvm derivation, allowing it to compose with the other products. --- .../build-graalvm-native-image/default.nix | 2 +- .../community-edition/buildGraalvm.nix | 32 ++++++-- .../community-edition/buildGraalvmProduct.nix | 75 +++++++++++++++++++ .../graalvm/community-edition/default.nix | 70 ++++++++++++++++- 4 files changed, 169 insertions(+), 10 deletions(-) create mode 100644 pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index 64c6568e1bc2..019055332024 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -57,6 +57,6 @@ stdenv.mkDerivation (args // { # default to executable name mainProgram = executable; # need to have native-image-installable-svm available - broken = !(builtins.elem "native-image-installable-svm" graalvmDrv.products); + broken = !(builtins.any (p: (p.product or "") == "native-image-installable-svm") graalvmDrv.products); } // meta; }) diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 9161f21c8559..eb9ec0d72d84 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -9,17 +9,22 @@ , gtk3 , gtkSupport ? stdenv.isLinux , makeWrapper +, setJavaClassPath , unzip , xorg , zlib }: { javaVersion , meta ? { } +, products ? [ ] , ... } @ args: let runtimeLibraryPath = lib.makeLibraryPath ([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]); + mapProducts = key: default: (map (p: p.${key} or default) products); + mapProductsList = key: mapProducts key [ ]; + concatProducts = key: lib.concatStringsSep "\n" (mapProducts key ""); in stdenv.mkDerivation (args // { pname = "graalvm${javaVersion}-ce"; @@ -54,10 +59,20 @@ stdenv.mkDerivation (args // { runHook postUnpack ''; + postUnpack = '' + for product in ${toString products}; do + cp -Rv $product/* $out + done + ''; + dontStrip = true; nativeBuildInputs = [ unzip makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook; + ++ lib.optional stdenv.isLinux autoPatchelfHook + ++ mapProductsList "nativeBuildInputs"; + + propagatedBuildInputs = [ setJavaClassPath ] + ++ mapProductsList "propagatedBuildInputs"; buildInputs = [ alsa-lib # libasound.so wanted by lib/libjsound.so @@ -69,11 +84,12 @@ stdenv.mkDerivation (args // { xorg.libXrender xorg.libXtst zlib - ]; + ] ++ mapProductsList "buildInputs"; + preInstall = concatProducts "preInstall"; postInstall = '' # jni.h expects jni_md.h to be in the header search path. - ln -s $out/include/linux/*_md.h $out/include/ + ln -sf $out/include/linux/*_md.h $out/include/ # copy-paste openjdk's preFixup # Set JAVA_HOME automatically. @@ -81,17 +97,17 @@ stdenv.mkDerivation (args // { cat > $out/nix-support/setup-hook << EOF if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi EOF - ''; + '' + concatProducts "postInstall"; - postFixup = lib.optionalString (stdenv.isLinux) '' + preFixup = lib.optionalString (stdenv.isLinux) '' # Find all executables in any directory that contains '/bin/' for bin in $(find "$out" -executable -type f -wholename '*/bin/*'); do wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" done - ''; + '' + concatProducts "preFixup"; + postFixup = concatProducts "postFixup"; doInstallCheck = true; - installCheckPhase = '' runHook preInstallCheck @@ -110,6 +126,8 @@ stdenv.mkDerivation (args // { echo "Testing GraalVM" $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' + ${concatProducts "installCheckPhase"} + runHook postInstallCheck ''; diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix new file mode 100644 index 000000000000..9a469e04b254 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, autoPatchelfHook +, makeWrapper +, perl +, unzip +, zlib +}: +{ product +, javaVersion +, extraBuildInputs ? [ ] +, meta ? { } +, passthru ? { } +, ... } @ args: + +stdenv.mkDerivation (args // { + pname = "${product}-java${javaVersion}"; + + nativeBuildInputs = [ perl unzip makeWrapper ] + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; + + buildInputs = [ + stdenv.cc.cc.lib # libstdc++.so.6 + zlib + ] ++ extraBuildInputs; + + unpackPhase = '' + runHook preUnpack + + unpack_jar() { + local jar="$1" + unzip -q -o "$jar" -d "$out" + perl -ne 'use File::Path qw(make_path); + use File::Basename qw(dirname); + if (/^(.+) = (.+)$/) { + make_path dirname("$ENV{out}/$1"); + symlink $2, "$ENV{out}/$1"; + }' "$out/META-INF/symlinks" + perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) { + my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) + + ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) + + ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0); + chmod $mode, "$ENV{out}/$1"; + }' "$out/META-INF/permissions" + rm -rf "$out/META-INF" + } + + mkdir -p "$out" + + unpack_jar "$src" + + runHook postUnpack + ''; + + dontInstall = true; + dontBuild = true; + dontStrip = true; + + passthru = { inherit product; } // passthru; + + meta = with lib; ({ + homepage = "https://www.graalvm.org/"; + description = "High-Performance Polyglot VM (Product: ${product})"; + license = with licenses; [ upl gpl2Classpath bsd3 ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + maintainers = with maintainers; [ + bandresen + hlolli + glittershark + babariviere + ericdallo + thiagokokada + ]; + } // meta); +}) diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index 3c2e7c5e41c7..bccbe6f133a4 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -1,7 +1,15 @@ -{ stdenv, callPackage, fetchurl }: +{ lib +, stdenv +, callPackage +, fetchurl +, gcc +, glibc +, zlib +}: let - buildGraalvm = callPackage (import ./buildGraalvm.nix) { }; + buildGraalvm = callPackage ./buildGraalvm.nix { }; + buildGraalvmProduct = callPackage ./buildGraalvmProduct.nix { }; sources = javaVersion: builtins.fromJSON (builtins.readFile (./. + "/graalvm${javaVersion}-ce-sources.json")); in rec { @@ -10,6 +18,35 @@ rec { javaVersion = "11"; src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; meta.platforms = builtins.attrNames (sources javaVersion); + products = [ native-image-installable-svm-java11 ]; + }; + + native-image-installable-svm-java11 = buildGraalvmProduct rec { + product = "native-image-installable-svm"; + javaVersion = "11"; + version = "22.3.0"; + src = fetchurl (sources javaVersion).${stdenv.system}.${"${product}|java${javaVersion}|${version}"}; + postInstall = lib.optionalString stdenv.isLinux '' + wrapProgram $out/bin/native-image \ + --prefix PATH : ${lib.makeBinPath [ gcc ]} \ + ${lib.concatStringsSep " " + (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} + ''; + installCheckPhase = '' + echo "Ahead-Of-Time compilation" + $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld + ./helloworld | fgrep 'Hello World' + + ${lib.optionalString stdenv.isLinux '' + echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" + $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld + ./helloworld | fgrep 'Hello World' + + echo "Ahead-Of-Time compilation with --static" + $out/bin/native-image --static HelloWorld + ./helloworld | fgrep 'Hello World' + ''} + ''; }; graalvm17-ce = buildGraalvm rec { @@ -17,5 +54,34 @@ rec { javaVersion = "17"; src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; meta.platforms = builtins.attrNames (sources javaVersion); + products = [ native-image-installable-svm-java11 ]; + }; + + native-image-installable-svm-java17 = buildGraalvmProduct rec { + product = "native-image-installable-svm"; + javaVersion = "17"; + version = "22.3.0"; + src = fetchurl (sources javaVersion).${stdenv.system}.${"${product}|java${javaVersion}|${version}"}; + postInstall = lib.optionalString stdenv.isLinux '' + wrapProgram $out/bin/native-image \ + --prefix PATH : ${lib.makeBinPath [ gcc ]} \ + ${lib.concatStringsSep " " + (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} + ''; + installCheckPhase = '' + echo "Ahead-Of-Time compilation" + $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld + ./helloworld | fgrep 'Hello World' + + ${lib.optionalString stdenv.isLinux '' + echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" + $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld + ./helloworld | fgrep 'Hello World' + + echo "Ahead-Of-Time compilation with --static" + $out/bin/native-image --static HelloWorld + ./helloworld | fgrep 'Hello World' + ''} + ''; }; } From 58bfc885bf1ba5895f163971b1eb5fbcbdc0ff96 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 22:12:36 +0000 Subject: [PATCH 10/66] native-image-installable-svm: move it to its own file --- .../community-edition/buildGraalvmProduct.nix | 6 +- .../graalvm/community-edition/default.nix | 56 +++---------------- .../native-image-installable-svm.nix | 38 +++++++++++++ 3 files changed, 48 insertions(+), 52 deletions(-) create mode 100644 pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix index 9a469e04b254..a58b503a0d68 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -8,6 +8,7 @@ }: { product , javaVersion +, extraNativeBuildInputs ? [ ] , extraBuildInputs ? [ ] , meta ? { } , passthru ? { } @@ -17,7 +18,8 @@ stdenv.mkDerivation (args // { pname = "${product}-java${javaVersion}"; nativeBuildInputs = [ perl unzip makeWrapper ] - ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook + ++ extraNativeBuildInputs; buildInputs = [ stdenv.cc.cc.lib # libstdc++.so.6 @@ -45,8 +47,6 @@ stdenv.mkDerivation (args // { rm -rf "$out/META-INF" } - mkdir -p "$out" - unpack_jar "$src" runHook postUnpack diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index bccbe6f133a4..d933672f72d0 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -13,6 +13,8 @@ let sources = javaVersion: builtins.fromJSON (builtins.readFile (./. + "/graalvm${javaVersion}-ce-sources.json")); in rec { + inherit buildGraalvm buildGraalvmProduct; + graalvm11-ce = buildGraalvm rec { version = "22.3.0"; javaVersion = "11"; @@ -21,32 +23,10 @@ rec { products = [ native-image-installable-svm-java11 ]; }; - native-image-installable-svm-java11 = buildGraalvmProduct rec { - product = "native-image-installable-svm"; + native-image-installable-svm-java11 = callPackage ./native-image-installable-svm.nix rec { javaVersion = "11"; version = "22.3.0"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"${product}|java${javaVersion}|${version}"}; - postInstall = lib.optionalString stdenv.isLinux '' - wrapProgram $out/bin/native-image \ - --prefix PATH : ${lib.makeBinPath [ gcc ]} \ - ${lib.concatStringsSep " " - (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} - ''; - installCheckPhase = '' - echo "Ahead-Of-Time compilation" - $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld - ./helloworld | fgrep 'Hello World' - - ${lib.optionalString stdenv.isLinux '' - echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" - $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld - ./helloworld | fgrep 'Hello World' - - echo "Ahead-Of-Time compilation with --static" - $out/bin/native-image --static HelloWorld - ./helloworld | fgrep 'Hello World' - ''} - ''; + src = fetchurl (sources javaVersion).${stdenv.system}.${"native-image-installable-svm|java${javaVersion}|${version}"}; }; graalvm17-ce = buildGraalvm rec { @@ -54,34 +34,12 @@ rec { javaVersion = "17"; src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; meta.platforms = builtins.attrNames (sources javaVersion); - products = [ native-image-installable-svm-java11 ]; + products = [ native-image-installable-svm-java17 ]; }; - native-image-installable-svm-java17 = buildGraalvmProduct rec { - product = "native-image-installable-svm"; + native-image-installable-svm-java17 = callPackage ./native-image-installable-svm.nix rec { javaVersion = "17"; version = "22.3.0"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"${product}|java${javaVersion}|${version}"}; - postInstall = lib.optionalString stdenv.isLinux '' - wrapProgram $out/bin/native-image \ - --prefix PATH : ${lib.makeBinPath [ gcc ]} \ - ${lib.concatStringsSep " " - (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} - ''; - installCheckPhase = '' - echo "Ahead-Of-Time compilation" - $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld - ./helloworld | fgrep 'Hello World' - - ${lib.optionalString stdenv.isLinux '' - echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" - $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld - ./helloworld | fgrep 'Hello World' - - echo "Ahead-Of-Time compilation with --static" - $out/bin/native-image --static HelloWorld - ./helloworld | fgrep 'Hello World' - ''} - ''; + src = fetchurl (sources javaVersion).${stdenv.system}.${"native-image-installable-svm|java${javaVersion}|${version}"}; }; } diff --git a/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix b/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix new file mode 100644 index 000000000000..85205c6dbdb7 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix @@ -0,0 +1,38 @@ +{ lib +, stdenv +, graalvmCEPackages +, gcc +, glibc +, javaVersion +, src +, version +, zlib +}: + +graalvmCEPackages.buildGraalvmProduct rec { + inherit src javaVersion version; + product = "native-image-installable-svm"; + + postInstall = lib.optionalString stdenv.isLinux '' + wrapProgram $out/bin/native-image \ + --prefix PATH : ${lib.makeBinPath [ gcc ]} \ + ${lib.concatStringsSep " " + (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} + ''; + + installCheckPhase = '' + echo "Ahead-Of-Time compilation" + $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld + ./helloworld | fgrep 'Hello World' + + ${lib.optionalString stdenv.isLinux '' + echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" + $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld + ./helloworld | fgrep 'Hello World' + + echo "Ahead-Of-Time compilation with --static" + $out/bin/native-image --static HelloWorld + ./helloworld | fgrep 'Hello World' + ''} + ''; +} From 4f3ede68973fdc1635ad8799831076d2708e1ef8 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 22:13:18 +0000 Subject: [PATCH 11/66] buildGraalvm: add passthru --- .../community-edition/buildGraalvm.nix | 212 +++++++++--------- 1 file changed, 109 insertions(+), 103 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index eb9ec0d72d84..4d81674bdb8a 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -25,126 +25,132 @@ let mapProducts = key: default: (map (p: p.${key} or default) products); mapProductsList = key: mapProducts key [ ]; concatProducts = key: lib.concatStringsSep "\n" (mapProducts key ""); -in -stdenv.mkDerivation (args // { - pname = "graalvm${javaVersion}-ce"; - unpackPhase = '' - runHook preUnpack + graalvmXXX-ce = stdenv.mkDerivation (args // { + pname = "graalvm${javaVersion}-ce"; - mkdir -p "$out" + unpackPhase = '' + runHook preUnpack - # The tarball on Linux has the following directory structure: - # - # graalvm-ce-java11-20.3.0/* - # - # while on Darwin it looks like this: - # - # graalvm-ce-java11-20.3.0/Contents/Home/* - # - # We therefor use --strip-components=1 vs 3 depending on the platform. - tar xf "$src" -C "$out" --strip-components=${ - if stdenv.isLinux then "1" else "3" - } + mkdir -p "$out" - # Sanity check - if [ ! -d "$out/bin" ]; then - echo "The `bin` is directory missing after extracting the graalvm" - echo "tarball, please compare the directory structure of the" - echo "tarball with what happens in the unpackPhase (in particular" - echo "with regards to the `--strip-components` flag)." - exit 1 - fi + # The tarball on Linux has the following directory structure: + # + # graalvm-ce-java11-20.3.0/* + # + # while on Darwin it looks like this: + # + # graalvm-ce-java11-20.3.0/Contents/Home/* + # + # We therefor use --strip-components=1 vs 3 depending on the platform. + tar xf "$src" -C "$out" --strip-components=${ + if stdenv.isLinux then "1" else "3" + } - runHook postUnpack - ''; + # Sanity check + if [ ! -d "$out/bin" ]; then + echo "The `bin` is directory missing after extracting the graalvm" + echo "tarball, please compare the directory structure of the" + echo "tarball with what happens in the unpackPhase (in particular" + echo "with regards to the `--strip-components` flag)." + exit 1 + fi - postUnpack = '' - for product in ${toString products}; do - cp -Rv $product/* $out - done - ''; + runHook postUnpack + ''; - dontStrip = true; + postUnpack = '' + for product in ${toString products}; do + cp -Rv $product/* $out + done + ''; - nativeBuildInputs = [ unzip makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook - ++ mapProductsList "nativeBuildInputs"; + dontStrip = true; - propagatedBuildInputs = [ setJavaClassPath ] - ++ mapProductsList "propagatedBuildInputs"; + nativeBuildInputs = [ unzip makeWrapper ] + ++ lib.optional stdenv.isLinux autoPatchelfHook + ++ mapProductsList "nativeBuildInputs"; - buildInputs = [ - alsa-lib # libasound.so wanted by lib/libjsound.so - fontconfig - stdenv.cc.cc.lib # libstdc++.so.6 - xorg.libX11 - xorg.libXext - xorg.libXi - xorg.libXrender - xorg.libXtst - zlib - ] ++ mapProductsList "buildInputs"; + propagatedBuildInputs = [ setJavaClassPath ] + ++ mapProductsList "propagatedBuildInputs"; - preInstall = concatProducts "preInstall"; - postInstall = '' - # jni.h expects jni_md.h to be in the header search path. - ln -sf $out/include/linux/*_md.h $out/include/ + buildInputs = [ + alsa-lib # libasound.so wanted by lib/libjsound.so + fontconfig + stdenv.cc.cc.lib # libstdc++.so.6 + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXrender + xorg.libXtst + zlib + ] ++ mapProductsList "buildInputs"; - # copy-paste openjdk's preFixup - # Set JAVA_HOME automatically. - mkdir -p $out/nix-support - cat > $out/nix-support/setup-hook << EOF - if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi - EOF - '' + concatProducts "postInstall"; + preInstall = concatProducts "preInstall"; + postInstall = '' + # jni.h expects jni_md.h to be in the header search path. + ln -sf $out/include/linux/*_md.h $out/include/ - preFixup = lib.optionalString (stdenv.isLinux) '' - # Find all executables in any directory that contains '/bin/' - for bin in $(find "$out" -executable -type f -wholename '*/bin/*'); do - wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" - done - '' + concatProducts "preFixup"; - postFixup = concatProducts "postFixup"; + # copy-paste openjdk's preFixup + # Set JAVA_HOME automatically. + mkdir -p $out/nix-support + cat > $out/nix-support/setup-hook << EOF + if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi + EOF + '' + concatProducts "postInstall"; - doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck + preFixup = lib.optionalString (stdenv.isLinux) '' + # Find all executables in any directory that contains '/bin/' + for bin in $(find "$out" -executable -type f -wholename '*/bin/*'); do + wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" + done + '' + concatProducts "preFixup"; + postFixup = concatProducts "postFixup"; - echo ${ - lib.escapeShellArg '' - public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World"); + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + echo ${ + lib.escapeShellArg '' + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello World"); + } } - } - '' - } > HelloWorld.java - $out/bin/javac HelloWorld.java + '' + } > HelloWorld.java + $out/bin/javac HelloWorld.java - # run on JVM with Graal Compiler - echo "Testing GraalVM" - $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' + # run on JVM with Graal Compiler + echo "Testing GraalVM" + $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' - ${concatProducts "installCheckPhase"} + ${concatProducts "installCheckPhase"} - runHook postInstallCheck - ''; + runHook postInstallCheck + ''; - meta = with lib; ({ - inherit platforms; - homepage = "https://www.graalvm.org/"; - description = "High-Performance Polyglot VM"; - license = with licenses; [ upl gpl2Classpath bsd3 ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - mainProgram = "java"; - maintainers = with maintainers; [ - bandresen - hlolli - glittershark - babariviere - ericdallo - thiagokokada - ]; - } // meta); -}) + passthru = { + inherit products; + home = graalvmXXX-ce; + }; + + meta = with lib; ({ + inherit platforms; + homepage = "https://www.graalvm.org/"; + description = "High-Performance Polyglot VM"; + license = with licenses; [ upl gpl2Classpath bsd3 ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + mainProgram = "java"; + maintainers = with maintainers; [ + bandresen + hlolli + glittershark + babariviere + ericdallo + thiagokokada + ]; + } // meta); + }); +in graalvmXXX-ce From daf668db55c2d756f37dbb981bfec986132d7710 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 22:13:33 +0000 Subject: [PATCH 12/66] mkGraal: remove --- .../graalvm/community-edition/mkGraal.nix | 346 ------------------ 1 file changed, 346 deletions(-) delete mode 100644 pkgs/development/compilers/graalvm/community-edition/mkGraal.nix diff --git a/pkgs/development/compilers/graalvm/community-edition/mkGraal.nix b/pkgs/development/compilers/graalvm/community-edition/mkGraal.nix deleted file mode 100644 index 023fc81474ef..000000000000 --- a/pkgs/development/compilers/graalvm/community-edition/mkGraal.nix +++ /dev/null @@ -1,346 +0,0 @@ -{ - # An attrset describing each platform configuration. All values are extract - # from the GraalVM releases available on - # https://github.com/graalvm/graalvm-ce-builds/releases - # Example: - # config = { - # x86_64-linux = { - # # List of products that will be included in the GraalVM derivation - # # See `with{NativeImage,Ruby,Python,WASM,*}Svm` variables for the - # # available values - # products = [ "graalvm-ce" "native-image-installable-svm" ]; - # # GraalVM arch, not to be confused with the nix platform - # arch = "linux-amd64"; - # # GraalVM version - # version = "22.0.0.2"; - # }; - # } - config - # GraalVM version that will be used unless overridden by `config..version` -, defaultVersion - # Java version used by GraalVM -, javaVersion - # Platforms were GraalVM will be allowed to build (i.e. `meta.platforms`) -, platforms ? builtins.attrNames config - # If set to true, update script will (re-)generate the sources file even if - # there are no updates available -, forceUpdate ? false - # Path for the sources file that will be used - # See `update.nix` file for a description on how this file works -, sourcesPath ? ./. + "/graalvm${javaVersion}-ce-sources.json" -}: - -{ stdenv -, lib -, autoPatchelfHook -, fetchurl -, makeWrapper -, setJavaClassPath -, writeShellScriptBin - # minimum dependencies -, alsa-lib -, fontconfig -, Foundation -, freetype -, glibc -, openssl -, perl -, unzip -, xorg -, zlib - # runtime dependencies -, binutils -, cups -, gcc -, musl - # runtime dependencies for GTK+ Look and Feel -, gtkSupport ? stdenv.isLinux -, cairo -, glib - # updateScript deps -, gnused -, gtk3 -, jq -, writeShellScript - # Use musl instead of glibc to allow true static builds in GraalVM's - # Native Image (i.e.: `--static --libc=musl`). This will cause glibc static - # builds to fail, so it should be used with care -, useMusl ? false - # Extra libraries to be included in native-image using '-H:CLibraryPath' flag -, extraCLibs ? [ ] -}: - -assert useMusl -> stdenv.isLinux; - -let - platform = config.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - version = platform.version or defaultVersion; - name = "graalvm${javaVersion}-ce"; - sources = builtins.fromJSON (builtins.readFile sourcesPath); - - cLibs = [ glibc zlib.static ] - ++ lib.optionals (!useMusl) [ glibc.static ] - ++ lib.optionals useMusl [ musl ] - ++ extraCLibs; - - runtimeLibraryPath = lib.makeLibraryPath - ([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]); - - runtimeDependencies = lib.makeBinPath ([ - binutils - stdenv.cc - ] ++ lib.optionals useMusl [ - (lib.getDev musl) - # GraalVM 21.3.0+ expects musl-gcc as -musl-gcc - (writeShellScriptBin "${stdenv.hostPlatform.system}-musl-gcc" ''${lib.getDev musl}/bin/musl-gcc "$@"'') - ]); - - withNativeImageSvm = builtins.elem "native-image-installable-svm" platform.products; - withRubySvm = builtins.elem "ruby-installable-svm" platform.products; - withPythonSvm = builtins.elem "python-installable-svm" platform.products; - withWasmSvm = builtins.elem "wasm-installable-svm" platform.products; - - graalvmXXX-ce = stdenv.mkDerivation rec { - inherit version; - pname = name; - - srcs = map fetchurl (builtins.attrValues sources.${platform.arch}); - - buildInputs = lib.optionals stdenv.isLinux [ - alsa-lib # libasound.so wanted by lib/libjsound.so - fontconfig - freetype - stdenv.cc.cc.lib # libstdc++.so.6 - xorg.libX11 - xorg.libXext - xorg.libXi - xorg.libXrender - xorg.libXtst - zlib - ] ++ lib.optionals withRubySvm [ - openssl # libssl.so wanted by languages/ruby/lib/mri/openssl.so - ]; - - nativeBuildInputs = [ unzip perl makeWrapper ] - ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; - - unpackPhase = '' - runHook preUnpack - - unpack_jar() { - jar=$1 - unzip -q -o $jar -d $out - perl -ne 'use File::Path qw(make_path); - use File::Basename qw(dirname); - if (/^(.+) = (.+)$/) { - make_path dirname("$ENV{out}/$1"); - system "ln -s $2 $ENV{out}/$1"; - }' $out/META-INF/symlinks - perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) { - my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) + - ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) + - ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0); - chmod $mode, "$ENV{out}/$1"; - }' $out/META-INF/permissions - rm -rf $out/META-INF - } - - mkdir -p $out - arr=($srcs) - - # The tarball on Linux has the following directory structure: - # - # graalvm-ce-java11-20.3.0/* - # - # while on Darwin it looks like this: - # - # graalvm-ce-java11-20.3.0/Contents/Home/* - # - # We therefor use --strip-components=1 vs 3 depending on the platform. - tar xf ''${arr[0]} -C $out --strip-components=${ - if stdenv.isLinux then "1" else "3" - } - - # Sanity check - if [ ! -d $out/bin ]; then - echo "The `bin` is directory missing after extracting the graalvm" - echo "tarball, please compare the directory structure of the" - echo "tarball with what happens in the unpackPhase (in particular" - echo "with regards to the `--strip-components` flag)." - exit 1 - fi - - for jar in "''${arr[@]:1}"; do - unpack_jar "$jar" - done - - runHook postUnpack - ''; - - installPhase = '' - runHook preInstall - - # jni.h expects jni_md.h to be in the header search path. - ln -s $out/include/linux/*_md.h $out/include/ - - # copy-paste openjdk's preFixup - # Set JAVA_HOME automatically. - mkdir -p $out/nix-support - cat > $out/nix-support/setup-hook << EOF - if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi - EOF - ${ - # Wrap native-image binary to pass -H:CLibraryPath flag and find glibc - lib.optionalString (withNativeImageSvm && stdenv.isLinux) '' - wrapProgram $out/bin/native-image \ - ${lib.concatStringsSep " " - (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)} - '' - } - - runHook postInstall - ''; - - dontStrip = true; - - # Workaround for libssl.so.10 wanted by TruffleRuby - # Resulting TruffleRuby cannot use `openssl` library. - autoPatchelfIgnoreMissingDeps = withRubySvm && stdenv.isDarwin; - - preFixup = lib.optionalString (stdenv.isLinux) '' - # Find all executables in any directory that contains '/bin/' - for bin in $(find "$out" -executable -type f -wholename '*/bin/*'); do - wrapProgram "$bin" \ - --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" \ - --prefix PATH : "${runtimeDependencies}" - done - - find "$out" -name libfontmanager.so -exec \ - patchelf --add-needed libfontconfig.so {} \; - - ${ - lib.optionalString withRubySvm '' - # Workaround for libssl.so.10/libcrypto.so.10 wanted by TruffleRuby - patchelf $out/languages/ruby/lib/mri/openssl.so \ - --replace-needed libssl.so.10 libssl.so \ - --replace-needed libcrypto.so.10 libcrypto.so - '' - } - ''; - - # $out/bin/native-image needs zlib to build native executables. - propagatedBuildInputs = [ setJavaClassPath zlib ] ++ - # On Darwin native-image calls clang and it - # tries to include , - # and Interactive Ruby (irb) requires OpenSSL - # headers. - lib.optionals stdenv.hostPlatform.isDarwin [ Foundation openssl ]; - - doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - - echo ${ - lib.escapeShellArg '' - public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World"); - } - } - '' - } > HelloWorld.java - $out/bin/javac HelloWorld.java - - # run on JVM with Graal Compiler - echo "Testing GraalVM" - $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' - - ${ - lib.optionalString withNativeImageSvm '' - echo "Ahead-Of-Time compilation" - $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld - ./helloworld | fgrep 'Hello World' - '' - } - - ${# --static flag doesn't work for darwin - lib.optionalString (withNativeImageSvm && stdenv.isLinux && !useMusl) '' - echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" - $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld - ./helloworld | fgrep 'Hello World' - - echo "Ahead-Of-Time compilation with --static" - $out/bin/native-image --static HelloWorld - ./helloworld | fgrep 'Hello World' - '' - } - - ${# --static flag doesn't work for darwin - lib.optionalString (withNativeImageSvm && stdenv.isLinux && useMusl) '' - echo "Ahead-Of-Time compilation with --static and --libc=musl" - $out/bin/native-image --libc=musl --static HelloWorld - ./helloworld | fgrep 'Hello World' - '' - } - - ${ - lib.optionalString withWasmSvm '' - echo "Testing Jshell" - echo '1 + 1' | $out/bin/jshell - '' - } - - ${ - lib.optionalString withPythonSvm '' - echo "Testing GraalPython" - $out/bin/graalpython -c 'print(1 + 1)' - echo '1 + 1' | $out/bin/graalpython - '' - } - - ${ - lib.optionalString withRubySvm '' - echo "Testing TruffleRuby" - # Hide warnings about wrong locale - export LANG=C - export LC_ALL=C - $out/bin/ruby -e 'puts(1 + 1)' - '' - # FIXME: irb is broken in all platforms - + lib.optionalString false '' - echo '1 + 1' | $out/bin/irb - '' - } - - runHook postInstallCheck - ''; - - passthru = { - inherit (platform) products; - home = graalvmXXX-ce; - updateScript = import ./update.nix { - inherit config defaultVersion forceUpdate gnused jq lib name sourcesPath writeShellScript; - graalVersion = version; - javaVersion = "java${javaVersion}"; - }; - }; - - meta = with lib; { - inherit platforms; - homepage = "https://www.graalvm.org/"; - description = "High-Performance Polyglot VM"; - license = with licenses; [ upl gpl2Classpath bsd3 ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - mainProgram = "java"; - maintainers = with maintainers; [ - bandresen - hlolli - glittershark - babariviere - ericdallo - thiagokokada - ]; - }; - }; -in -graalvmXXX-ce From 6b60a4fc50505b09d0b72d85cce6538d640aeb22 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 22:54:06 +0000 Subject: [PATCH 13/66] buildGraalvmProduct: document phase behavior --- .../graalvm/community-edition/buildGraalvmProduct.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix index a58b503a0d68..0cc559bdc5a3 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -55,6 +55,11 @@ stdenv.mkDerivation (args // { dontInstall = true; dontBuild = true; dontStrip = true; + # installCheckPhase is going to run in GraalVM main derivation (see buildGraalvm.nix) + # to make sure that it has everything it needs to run correctly. + # Other hooks like fixupPhase/installPhase are also going to run there for the + # same reason. + doInstallCheck = false; passthru = { inherit product; } // passthru; From 68e6010e81f0d36b7a861ae17c42cbe7b576aec3 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 23:04:45 +0000 Subject: [PATCH 14/66] native-image-installable-svm: add useMusl option back --- .../native-image-installable-svm.nix | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix b/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix index 85205c6dbdb7..393a226df19c 100644 --- a/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix @@ -4,20 +4,34 @@ , gcc , glibc , javaVersion +, musl , src , version +, writeShellScriptBin , zlib +, useMusl ? false +, extraCLibs ? [ ] }: +assert useMusl -> stdenv.isLinux; +let + cLibs = [ glibc zlib.static ] + ++ lib.optionals (!useMusl) [ glibc.static ] + ++ lib.optionals useMusl [ musl ] + ++ extraCLibs; + # GraalVM 21.3.0+ expects musl-gcc as -musl-gcc + musl-gcc = (writeShellScriptBin "${stdenv.hostPlatform.system}-musl-gcc" ''${lib.getDev musl}/bin/musl-gcc "$@"''); + binPath = lib.makeBinPath ([ gcc ] ++ lib.optionals useMusl [ musl-gcc ]); +in graalvmCEPackages.buildGraalvmProduct rec { inherit src javaVersion version; product = "native-image-installable-svm"; postInstall = lib.optionalString stdenv.isLinux '' wrapProgram $out/bin/native-image \ - --prefix PATH : ${lib.makeBinPath [ gcc ]} \ + --prefix PATH : ${binPath} \ ${lib.concatStringsSep " " - (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") [ glibc glibc.static zlib.static ])} + (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)} ''; installCheckPhase = '' @@ -25,7 +39,7 @@ graalvmCEPackages.buildGraalvmProduct rec { $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld ./helloworld | fgrep 'Hello World' - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString (stdenv.isLinux && !useMusl) '' echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld ./helloworld | fgrep 'Hello World' @@ -34,5 +48,11 @@ graalvmCEPackages.buildGraalvmProduct rec { $out/bin/native-image --static HelloWorld ./helloworld | fgrep 'Hello World' ''} + + ${lib.optionalString (stdenv.isLinux && useMusl) '' + echo "Ahead-Of-Time compilation with --static and --libc=musl" + $out/bin/native-image --static HelloWorld --libc=musl + ./helloworld | fgrep 'Hello World' + ''} ''; } From 78c9e8b76e129fdfe3693dbaebca43b5445ed3c2 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 23:06:27 +0000 Subject: [PATCH 15/66] graalvm*-ce: remove unneeded params --- .../compilers/graalvm/community-edition/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index d933672f72d0..d328c8741297 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -2,9 +2,6 @@ , stdenv , callPackage , fetchurl -, gcc -, glibc -, zlib }: let From 0b6052b8b07bf8537f0e854ec5e81b343342ecdd Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 23:18:10 +0000 Subject: [PATCH 16/66] graalvm*-ce: re-added darwin support --- .../compilers/graalvm/community-edition/buildGraalvm.nix | 7 ++++--- .../graalvm/community-edition/buildGraalvmProduct.nix | 2 +- .../compilers/graalvm/community-edition/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 4d81674bdb8a..88ab5866dad3 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -5,6 +5,7 @@ , cairo , cups , fontconfig +, Foundation , glib , gtk3 , gtkSupport ? stdenv.isLinux @@ -71,10 +72,11 @@ let ++ lib.optional stdenv.isLinux autoPatchelfHook ++ mapProductsList "nativeBuildInputs"; - propagatedBuildInputs = [ setJavaClassPath ] + propagatedBuildInputs = [ setJavaClassPath zlib ] + ++ lib.optional stdenv.isDarwin Foundation ++ mapProductsList "propagatedBuildInputs"; - buildInputs = [ + buildInputs = lib.optionals stdenv.isLinux [ alsa-lib # libasound.so wanted by lib/libjsound.so fontconfig stdenv.cc.cc.lib # libstdc++.so.6 @@ -83,7 +85,6 @@ let xorg.libXi xorg.libXrender xorg.libXtst - zlib ] ++ mapProductsList "buildInputs"; preInstall = concatProducts "preInstall"; diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix index 0cc559bdc5a3..75a8e527b5ba 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (args // { pname = "${product}-java${javaVersion}"; nativeBuildInputs = [ perl unzip makeWrapper ] - ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook + ++ lib.optional stdenv.isLinux autoPatchelfHook ++ extraNativeBuildInputs; buildInputs = [ diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index d328c8741297..c5e1e452a2de 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -2,10 +2,11 @@ , stdenv , callPackage , fetchurl +, Foundation }: let - buildGraalvm = callPackage ./buildGraalvm.nix { }; + buildGraalvm = callPackage ./buildGraalvm.nix { inherit Foundation; }; buildGraalvmProduct = callPackage ./buildGraalvmProduct.nix { }; sources = javaVersion: builtins.fromJSON (builtins.readFile (./. + "/graalvm${javaVersion}-ce-sources.json")); in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b997e0662649..24181c424147 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14985,7 +14985,9 @@ with pkgs; openjdk_headless = jdk_headless; graalvmCEPackages = - recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { }); + recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { + inherit (darwin.apple_sdk.frameworks) Foundation; + }); graalvm11-ce = graalvmCEPackages.graalvm11-ce; graalvm17-ce = graalvmCEPackages.graalvm17-ce; buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { From 1da6843f1b5b47ecc6857caafdeb025bd39a14f5 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 23:41:40 +0000 Subject: [PATCH 17/66] buildGraalvm: do not add products inputs --- .../compilers/graalvm/community-edition/buildGraalvm.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 88ab5866dad3..c5b289f6f21c 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -24,7 +24,6 @@ let runtimeLibraryPath = lib.makeLibraryPath ([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]); mapProducts = key: default: (map (p: p.${key} or default) products); - mapProductsList = key: mapProducts key [ ]; concatProducts = key: lib.concatStringsSep "\n" (mapProducts key ""); graalvmXXX-ce = stdenv.mkDerivation (args // { @@ -69,12 +68,10 @@ let dontStrip = true; nativeBuildInputs = [ unzip makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook - ++ mapProductsList "nativeBuildInputs"; + ++ lib.optional stdenv.isLinux autoPatchelfHook; propagatedBuildInputs = [ setJavaClassPath zlib ] - ++ lib.optional stdenv.isDarwin Foundation - ++ mapProductsList "propagatedBuildInputs"; + ++ lib.optional stdenv.isDarwin Foundation; buildInputs = lib.optionals stdenv.isLinux [ alsa-lib # libasound.so wanted by lib/libjsound.so @@ -85,7 +82,7 @@ let xorg.libXi xorg.libXrender xorg.libXtst - ] ++ mapProductsList "buildInputs"; + ]; preInstall = concatProducts "preInstall"; postInstall = '' From 0c7f039bad78d09982ad242496a1ee4494a2bdc9 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 9 Feb 2023 23:46:19 +0000 Subject: [PATCH 18/66] maintainers/team-list: create graalvm-ce team --- maintainers/team-list.nix | 13 +++++++++++++ .../graalvm/community-edition/buildGraalvm.nix | 9 +-------- .../community-edition/buildGraalvmProduct.nix | 9 +-------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 49ddf1f10be8..4d338675c654 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -312,6 +312,19 @@ with lib.maintainers; { enableFeatureFreezePing = true; }; + graalvm-ce = { + members = [ + bandresen + hlolli + glittershark + babariviere + ericdallo + thiagokokada + ]; + scope = "Maintain GraalVM Community Edition packages."; + shortName = "GraalVM-CE"; + }; + haskell = { members = [ cdepillabout diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index c5b289f6f21c..5debe942e8ae 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -141,14 +141,7 @@ let license = with licenses; [ upl gpl2Classpath bsd3 ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; mainProgram = "java"; - maintainers = with maintainers; [ - bandresen - hlolli - glittershark - babariviere - ericdallo - thiagokokada - ]; + maintainers = with maintainers; teams.graalvm-ce.members ++ [ ]; } // meta); }); in graalvmXXX-ce diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix index 75a8e527b5ba..e4b55cc756b7 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -68,13 +68,6 @@ stdenv.mkDerivation (args // { description = "High-Performance Polyglot VM (Product: ${product})"; license = with licenses; [ upl gpl2Classpath bsd3 ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ - bandresen - hlolli - glittershark - babariviere - ericdallo - thiagokokada - ]; + maintainers = with maintainers; teams.graalvm-ce.members ++ [ ]; } // meta); }) From 79c2eceda8d622e0b707f0c20a1dcff72b4e83bb Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 11 Feb 2023 13:06:18 +0000 Subject: [PATCH 19/66] graalvm*-ce: 22.3.0 -> 22.3.1, migrate upgrade script to sh --- .../community-edition/buildGraalvm.nix | 1 + .../graalvm/community-edition/default.nix | 31 ++- .../graalvm/community-edition/hashes.nix | 71 ++++++ .../graalvm/community-edition/update.nix | 227 ------------------ .../graalvm/community-edition/update.sh | 86 +++++++ 5 files changed, 178 insertions(+), 238 deletions(-) create mode 100644 pkgs/development/compilers/graalvm/community-edition/hashes.nix delete mode 100644 pkgs/development/compilers/graalvm/community-edition/update.nix create mode 100755 pkgs/development/compilers/graalvm/community-edition/update.sh diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 5debe942e8ae..f8a1e515db3b 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -132,6 +132,7 @@ let passthru = { inherit products; home = graalvmXXX-ce; + updateScript = ./update.sh; }; meta = with lib; ({ diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index c5e1e452a2de..0f9cec44f18f 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -8,36 +8,45 @@ let buildGraalvm = callPackage ./buildGraalvm.nix { inherit Foundation; }; buildGraalvmProduct = callPackage ./buildGraalvmProduct.nix { }; - sources = javaVersion: builtins.fromJSON (builtins.readFile (./. + "/graalvm${javaVersion}-ce-sources.json")); + javaPlatform = { + "aarch64-linux" = "linux-aarch64"; + "x86_64-linux" = "linux-amd64"; + "aarch64-darwin" = "darwin-aarch64"; + "x86_64-darwin" = "darwin-amd64"; + }; + javaPlatformVersion = javaVersion: + "${javaVersion}-${javaPlatform.${stdenv.system} or (throw "Unsupported platform: ${stdenv.system}")}"; + source = product: javaVersion: (import ./hashes.nix).${product}.${javaPlatformVersion javaVersion}; + in rec { inherit buildGraalvm buildGraalvmProduct; graalvm11-ce = buildGraalvm rec { - version = "22.3.0"; + version = "22.3.1"; javaVersion = "11"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; - meta.platforms = builtins.attrNames (sources javaVersion); + src = fetchurl (source "graalvm-ce" javaVersion); + meta.platforms = builtins.attrNames javaPlatform; products = [ native-image-installable-svm-java11 ]; }; native-image-installable-svm-java11 = callPackage ./native-image-installable-svm.nix rec { javaVersion = "11"; - version = "22.3.0"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"native-image-installable-svm|java${javaVersion}|${version}"}; + version = "22.3.1"; + src = fetchurl (source "native-image-installable-svm" javaVersion); }; graalvm17-ce = buildGraalvm rec { - version = "22.3.0"; + version = "22.3.1"; javaVersion = "17"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"graalvm-ce|java${javaVersion}|${version}"}; - meta.platforms = builtins.attrNames (sources javaVersion); + src = fetchurl (source "graalvm-ce" javaVersion); + meta.platforms = builtins.attrNames javaPlatform; products = [ native-image-installable-svm-java17 ]; }; native-image-installable-svm-java17 = callPackage ./native-image-installable-svm.nix rec { javaVersion = "17"; - version = "22.3.0"; - src = fetchurl (sources javaVersion).${stdenv.system}.${"native-image-installable-svm|java${javaVersion}|${version}"}; + version = "22.3.1"; + src = fetchurl (source "native-image-installable-svm" javaVersion); }; } diff --git a/pkgs/development/compilers/graalvm/community-edition/hashes.nix b/pkgs/development/compilers/graalvm/community-edition/hashes.nix new file mode 100644 index 000000000000..c0353e033ae2 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/hashes.nix @@ -0,0 +1,71 @@ +# Generated by pkgs/development/compilers/graalvm/community-edition/update.sh script +{ + "native-image-installable-svm" = { + "11-linux-aarch64" = { + sha256 = "0z9rbmci6yz7f7mqd3xzsxc5ih4hq72lyzqfchan7fr6mh38d6gw"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java11-linux-aarch64-22.3.1.jar"; + }; + "17-linux-aarch64" = { + sha256 = "03v20fc9famlnbrznpasnd5gdl5k9nl4dlj3pp6bad4y6l7rqnx5"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java17-linux-aarch64-22.3.1.jar"; + }; + "11-linux-amd64" = { + sha256 = "1yb7kpbs7hrzlysvrqjzgfz678p1hbg6237jzb35zmwdaczav51n"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java11-linux-amd64-22.3.1.jar"; + }; + "17-linux-amd64" = { + sha256 = "00fbyqsj4xj9ay8bki1190lf59bgrzvla8lzzq51p53a1bdrhhmv"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java17-linux-amd64-22.3.1.jar"; + }; + "11-darwin-aarch64" = { + sha256 = "1kaqvkbhj3iifq6asyrpy225a89y7klzbh7an1ycnvc2hvqkv4nz"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java11-darwin-aarch64-22.3.1.jar"; + }; + "17-darwin-aarch64" = { + sha256 = "09l7x4x8yanq55v6y6wpfx94mvsq1bpbnihknjc6dnq3vcrci77n"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java17-darwin-aarch64-22.3.1.jar"; + }; + "11-darwin-amd64" = { + sha256 = "036w9dmdcs46kmjqr3086mg389fgr3h1zysavfq8cbh199x0ibia"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java11-darwin-amd64-22.3.1.jar"; + }; + "17-darwin-amd64" = { + sha256 = "1hvjfvcn878bzvi944v3x23sby72hbfvg5s3zzspyc37l5cdpqi3"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/native-image-installable-svm-java17-darwin-amd64-22.3.1.jar"; + }; + }; + "graalvm-ce" = { + "11-linux-aarch64" = { + sha256 = "1g4a3z9993pq52j3jf25pbcq9rvl8jz1yar8c859jw5chaf3ysml"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java11-linux-aarch64-22.3.1.tar.gz"; + }; + "17-linux-aarch64" = { + sha256 = "06288dwbql943nii74i9mngzb38h2nzrxzzgs346mgk2965gwm59"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java17-linux-aarch64-22.3.1.tar.gz"; + }; + "11-linux-amd64" = { + sha256 = "1f6xkdnxn6xsm24sqw24rsca72wm7v6q96m23l5fng5ym0jpfm2m"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java11-linux-amd64-22.3.1.tar.gz"; + }; + "17-linux-amd64" = { + sha256 = "0aci9i28rq5nk2qya9dcg5hxr3sgsbv7f5x8679hrjrqmrclmkrs"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java17-linux-amd64-22.3.1.tar.gz"; + }; + "11-darwin-aarch64" = { + sha256 = "0cbcm9d211m4b6g1bkpfksma917lzqkl4kx38vm1nrwjkll357y5"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java11-darwin-aarch64-22.3.1.tar.gz"; + }; + "17-darwin-aarch64" = { + sha256 = "1qbw3hlmqcrmd70xk56463scdxr50n66z2n3c24h68qlwwlpqc73"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java17-darwin-aarch64-22.3.1.tar.gz"; + }; + "11-darwin-amd64" = { + sha256 = "0a12rzf99x5l29f6bwm6myk18dgnrx2c9rwmii2pm864y7azlnij"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java11-darwin-amd64-22.3.1.tar.gz"; + }; + "17-darwin-amd64" = { + sha256 = "02lclv2j3v850izh84wdvksi3d3xmgpfl7x85vzifhgsvagm6sz4"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/graalvm-ce-java17-darwin-amd64-22.3.1.tar.gz"; + }; + }; +} diff --git a/pkgs/development/compilers/graalvm/community-edition/update.nix b/pkgs/development/compilers/graalvm/community-edition/update.nix deleted file mode 100644 index 8bb31c792dda..000000000000 --- a/pkgs/development/compilers/graalvm/community-edition/update.nix +++ /dev/null @@ -1,227 +0,0 @@ -{ config -, defaultVersion -, forceUpdate -, gnused -, graalVersion -, javaVersion -, jq -, lib -, name -, sourcesPath -, writeShellScript -}: - -/* - How to use: - run `nix-shell maintainers/scripts/update.nix --argstr package graalvmXX-ce` - to update the graalvmXX-ce-sources.json file. - E.g: nix-shell maintainers/scripts/update.nix --argstr package graalvm17-ce - - Basic idea: - If we know the platform, product, javaVersion and graalVersion - we can create the url. This leads to the following json structure: - { - "platform/arch1": { - "product1|javaVersion|graalVersion": { "sha256": "...", "url": "..."}, - "product2|javaVersion|graalVersion": { "sha256": "...", "url": "..."}, - ... - }, - "platform/arch2": { - ... - } - } -*/ - -let - separator = "|"; - - # isDev :: String -> Boolean - isDev = version: - lib.hasInfix "dev" version; - - # getLatestVersion :: String -> String - getLatestVersion = currentVersion: - let - dev = if isDev currentVersion then "dev-" else ""; - url = "https://api.github.com/repos/graalvm/graalvm-ce-${dev}builds/releases/latest"; - file = builtins.fetchurl url; - json = builtins.fromJSON (builtins.readFile file); - in - lib.removePrefix "vm-" json.tag_name; - - # getArchString :: String -> String - getArchString = nixArchString: - { - "aarch64-linux" = "linux-aarch64"; - "aarch64-darwin" = "darwin-aarch64"; - "x86_64-linux" = "linux-amd64"; - "x86_64-darwin" = "darwin-amd64"; - }.${nixArchString}; - - - # getProductSuffix :: String -> String - getProductSuffix = productName: - { - "graalvm-ce" = ".tar.gz"; - "native-image-installable-svm" = ".jar"; - "ruby-installable-svm" = ".jar"; - "wasm-installable-svm" = ".jar"; - "python-installable-svm" = ".jar"; - "js-installable-svm" = ".jar"; - }.${productName}; - - # getProductSuffix :: String -> String - getProductBaseUrl = productName: - { - "graalvm-ce" = "https://github.com/graalvm/graalvm-ce-builds/releases/download"; - "native-image-installable-svm" = "https://github.com/graalvm/graalvm-ce-builds/releases/download"; - "ruby-installable-svm" = "https://github.com/oracle/truffleruby/releases/download"; - "wasm-installable-svm" = "https://github.com/graalvm/graalvm-ce-builds/releases/download"; - "python-installable-svm" = "https://github.com/graalvm/graalpython/releases/download"; - "js-installable-svm" = "https://github.com/oracle/graaljs/releases/download"; - }.${productName}; - - # getDevUrl :: String - getDevUrl = { arch, graalVersion, product, javaVersion }: - let - baseUrl = https://github.com/graalvm/graalvm-ce-dev-builds/releases/download; - in - "${baseUrl}/${graalVersion}/${product}-${javaVersion}-${arch}-dev${getProductSuffix product}"; - - # getReleaseUrl :: AttrSet -> String - getReleaseUrl = { arch, graalVersion, product, javaVersion }: - let baseUrl = getProductBaseUrl product; - in - "${baseUrl}/vm-${graalVersion}/${product}-${javaVersion}-${arch}-${graalVersion}${getProductSuffix product}"; - - # getUrl :: AttrSet -> String - getUrl = args@{ arch, graalVersion, product, javaVersion }: - if isDev graalVersion - then getDevUrl args - else getReleaseUrl args; - - # computeSha256 :: String -> String - computeSha256 = url: - builtins.hashFile "sha256" (builtins.fetchurl url); - - # downloadSha256 :: String -> String - downloadSha256 = url: - let sha256Url = url + ".sha256"; - in - builtins.readFile (builtins.fetchurl sha256Url); - - # getSha256 :: String -> String -> String - getSha256 = graalVersion: url: - if isDev graalVersion - then computeSha256 url - else downloadSha256 url; - - # cartesianZipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c] - cartesianZipListsWith = f: fst: snd: - let - cartesianProduct = lib.cartesianProductOfSets { a = fst; b = snd; }; - fst' = builtins.catAttrs "a" cartesianProduct; - snd' = builtins.catAttrs "b" cartesianProduct; - in - lib.zipListsWith f fst' snd'; - - # zipListsToAttrs :: [a] -> [b] -> AttrSet - zipListsToAttrs = names: values: - lib.listToAttrs ( - lib.zipListsWith (name: value: { inherit name value; }) names values - ); - - # genProductJavaVersionGraalVersionAttrSet :: String -> AttrSet - genProductJavaVersionGraalVersionAttrSet = product_javaVersion_graalVersion: - let - attrNames = [ "product" "javaVersion" "graalVersion" ]; - attrValues = lib.splitString separator product_javaVersion_graalVersion; - in - zipListsToAttrs attrNames attrValues; - - # genUrlAndSha256 :: String -> String -> AttrSet - genUrlAndSha256 = arch: product_javaVersion_graalVersion: - let - productJavaVersionGraalVersion = - (genProductJavaVersionGraalVersionAttrSet product_javaVersion_graalVersion) - // { inherit arch; }; - url = getUrl productJavaVersionGraalVersion; - sha256 = getSha256 productJavaVersionGraalVersion.graalVersion url; - in - { - ${arch} = { - ${product_javaVersion_graalVersion} = { - inherit sha256 url; - }; - }; - }; - - # genArchProductVersionPairs :: String -> -> String -> AttrSet -> [AttrSet] - genArchProductVersionList = javaVersion: graalVersion: archProducts: - let - arch = archProducts.arch; - products = archProducts.products; - javaGraalVersion = javaVersion + separator + (getLatestVersion (archProducts.version or graalVersion)); - productJavaGraalVersionList = - cartesianZipListsWith (a: b: a + separator + b) - products [ javaGraalVersion ]; - in - cartesianZipListsWith (genUrlAndSha256) [ arch ] productJavaGraalVersionList; - - - # genSources :: String -> String -> AttrSet -> Path String - genSources = javaVersion: defaultVersion: config: - let - archProducts = builtins.attrValues config; - sourcesList = builtins.concatMap (genArchProductVersionList javaVersion defaultVersion) archProducts; - sourcesAttr = builtins.foldl' (lib.recursiveUpdate) { } sourcesList; - in - builtins.toFile "sources.json" (builtins.toJSON sourcesAttr); - - # isNew :: String -> String -> Boolean - isNew = newVersion: currentVersion: - { - "-1" = false; - "0" = false; - "1" = true; - }.${builtins.toString (builtins.compareVersions newVersion currentVersion)}; - - newVersion = getLatestVersion graalVersion; - sourcesJson = genSources javaVersion defaultVersion config; - sourcesJsonPath = lib.strings.escapeShellArg sourcesPath; - - # versionKeyInDefaultNix String -> String - versionKeyInDefaultNix = graalVersion: - if isDev graalVersion - then "${name}-dev-version" - else "${name}-release-version"; - - /* - updateScriptText :: String -> String -> String - Writes the json file and updates the version in default.nix using sed - because update-source-version does not work srcs. - */ - updateScriptText = newVersion: currentVersion: - - if (forceUpdate || (isNew newVersion currentVersion)) - then - let - versionKey = versionKeyInDefaultNix currentVersion; - in - '' - echo "New version found. Updating ${currentVersion} -> ${newVersion}". - export PATH="${lib.makeBinPath [ jq gnused ]}:$PATH" - jq . ${sourcesJson} > ${sourcesJsonPath} - sed -i 's|${versionKey} = "${currentVersion}";|${versionKey} = "${newVersion}";|' \ - ${lib.strings.escapeShellArg ./default.nix} - '' - else ''echo "No new version found. Skip updating."''; - -in -writeShellScript "update-graal.sh" '' - set -o errexit - set -o nounset - set -o pipefail - - ${updateScriptText newVersion graalVersion} -'' diff --git a/pkgs/development/compilers/graalvm/community-edition/update.sh b/pkgs/development/compilers/graalvm/community-edition/update.sh new file mode 100755 index 000000000000..6121df8a7c98 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/update.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env nix-shell +#!nix-shell -p coreutils curl.out nix jq gnused -i bash + +set -eou pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")" +tmpfile="$(mktemp --suffix=.nix)" + +info() { echo "[INFO] $*"; } + +echo_file() { echo "$@" >> "$tmpfile"; } + +verlte() { + [ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ] +} + +readonly nixpkgs=../../../../.. + +readonly current_version="$(nix-instantiate "$nixpkgs" --eval --strict -A graalvm11-ce.version | tr -d \")" + +if [[ -z "${1:-}" ]]; then + readonly gh_version="$(curl \ + ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \ + -s https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest | \ + jq --raw-output .tag_name)" + readonly new_version="${gh_version//vm-/}" +else + readonly new_version="$1" +fi + +info "Current version: $current_version" +info "New version: $new_version" +if verlte "$new_version" "$current_version"; then + info "graalvm-ce $current_version is up-to-date." + [[ -z "${FORCE:-}" ]] && exit 0 +else + info "graalvm-ce $current_version is out-of-date. Updating..." +fi + +declare -r -A products_urls=( + [graalvm-ce]="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/graalvm-ce-java@platform@-${new_version}.tar.gz" + [native-image-installable-svm]="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/native-image-installable-svm-java@platform@-${new_version}.jar" + # [ruby-installable-svm]="https://github.com/oracle/truffleruby/releases/download/vm-${new_version}/ruby-installable-svm-java@platform@-${new_version}.jar" + # [wasm-installable-svm]="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/wasm-installable-svm-java@platform@-${new_version}.jar" + # [python-installable-svm]="https://github.com/graalvm/graalpython/releases/download/vm-${new_version}/python-installable-svm-java@platform@-${new_version}.jar" +) + +readonly platforms=( + "11-linux-aarch64" + "17-linux-aarch64" + "11-linux-amd64" + "17-linux-amd64" + "11-darwin-aarch64" + "17-darwin-aarch64" + "11-darwin-amd64" + "17-darwin-amd64" +) + +info "Generating hashes.nix file for 'graalvm-ce' $new_version. This will take a while..." + +# Indentation of `echo_file` function is on purpose to make it easier to visualize the output +echo_file "# Generated by $0 script" +echo_file "{" +for product in "${!products_urls[@]}"; do + url="${products_urls["${product}"]}" +echo_file " \"$product\" = {" + for platform in "${platforms[@]}"; do + if hash="$(nix-prefetch-url "${url//@platform@/$platform}")"; then +echo_file " \"$platform\" = {" +echo_file " sha256 = \"$hash\";" +echo_file " url = \"${url//@platform@/${platform}}\";" +echo_file " };" + fi + done +echo_file " };" +done +echo_file "}" + +info "Updating graalvm-ce version..." +# update-source-version does not work here since it expects src attribute +sed "s|$current_version|$new_version|" -i default.nix + +info "Moving the temporary file to hashes.nix" +mv "$tmpfile" hashes.nix + +info "Done!" From 6704d4f4e4d2af442a4b76a6011f660fb115eb91 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 11 Feb 2023 14:03:22 +0000 Subject: [PATCH 20/66] bbin: inherit graalvmDrv from babashka --- pkgs/build-support/build-graalvm-native-image/default.nix | 2 ++ pkgs/development/tools/bbin/default.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index 019055332024..be11d06308a7 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -51,6 +51,8 @@ stdenv.mkDerivation (args // { disallowedReferences = [ graalvmDrv ]; + passthru = { inherit graalvmDrv; }; + meta = { # default to graalvm's platforms platforms = graalvmDrv.meta.platforms; diff --git a/pkgs/development/tools/bbin/default.nix b/pkgs/development/tools/bbin/default.nix index 606633fd3a1a..d0956845092f 100644 --- a/pkgs/development/tools/bbin/default.nix +++ b/pkgs/development/tools/bbin/default.nix @@ -29,7 +29,7 @@ stdenvNoCC.mkDerivation rec { mkdir -p $out/share cp -r docs $out/share/docs wrapProgram $out/bin/bbin \ - --prefix PATH : "${lib.makeBinPath [ babashka graalvm17-ce ]}" + --prefix PATH : "${lib.makeBinPath [ babashka babashka.graalvmDrv ]}" runHook postInstall ''; From 3dc2e4d016178ccbac480f98a33f40bd27806a46 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Feb 2023 15:48:35 +0000 Subject: [PATCH 21/66] python310Packages.oslo-log: 5.0.2 -> 5.1.0 --- pkgs/development/python-modules/oslo-log/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/oslo-log/default.nix b/pkgs/development/python-modules/oslo-log/default.nix index d981114b7301..7d8443a14b3b 100644 --- a/pkgs/development/python-modules/oslo-log/default.nix +++ b/pkgs/development/python-modules/oslo-log/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "oslo-log"; - version = "5.0.2"; + version = "5.1.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "oslo.log"; inherit version; - hash = "sha256-5F5zEqpxUooWc2zkUVK+PxrxI/XvYqqB2gRoBVhPzKM="; + hash = "sha256-9qw3r5WRjgXXod19CwVSuosisuQwhi6zNt5ZLSXITyk="; }; propagatedBuildInputs = [ From ede042f54dbc9dbfdb846b7203c5f23e5a5d17e4 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 11 Feb 2023 14:56:24 -0500 Subject: [PATCH 22/66] nnpdf: 4.0.4 -> 4.0.6 --- pkgs/applications/science/physics/nnpdf/default.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/science/physics/nnpdf/default.nix b/pkgs/applications/science/physics/nnpdf/default.nix index c3ac1f6e0a8d..ec29c02054df 100644 --- a/pkgs/applications/science/physics/nnpdf/default.nix +++ b/pkgs/applications/science/physics/nnpdf/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , pkg-config , apfel @@ -16,22 +15,15 @@ stdenv.mkDerivation rec { pname = "nnpdf"; - version = "4.0.4"; + version = "4.0.6"; src = fetchFromGitHub { owner = "NNPDF"; repo = pname; rev = version; - sha256 = "sha256-Alx4W0TkPzJBsnRXcKBrlEU6jWTnOjrji/IPk+dNCw0="; + hash = "sha256-mwOMNlYFhHZq/wakO1/HGwcxvKGKh5OyFa2D9d3Y3IA="; }; - patches = [ - (fetchpatch { - url = "https://github.com/NNPDF/nnpdf/commit/7943b62a91d3a41fd4f6366b18881d50695f4b45.diff"; - hash = "sha256-UXhTO7vZgJiY8h3bgjg7SQC0gMUQsYQ/V/PgtCEQ7VU="; - }) - ]; - postPatch = '' for file in CMakeLists.txt buildmaster/CMakeLists.txt; do substituteInPlace $file \ From 34ccf74c23cdcf6013c841a2575ebb8c12875680 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 11 Feb 2023 14:44:33 -0500 Subject: [PATCH 23/66] python3Packages.n3fit: init at 4.0 --- .../python-modules/n3fit/default.nix | 50 +++++++++++++++++++ .../python-modules/validphys2/default.nix | 2 +- pkgs/top-level/python-packages.nix | 2 + 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/n3fit/default.nix diff --git a/pkgs/development/python-modules/n3fit/default.nix b/pkgs/development/python-modules/n3fit/default.nix new file mode 100644 index 000000000000..5c8b06b74a65 --- /dev/null +++ b/pkgs/development/python-modules/n3fit/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, hyperopt +, keras +, nnpdf +, psutil +, tensorflow +, validphys2 +}: + +buildPythonPackage rec { + pname = "n3fit"; + version = "4.0"; + format = "setuptools"; + + inherit (nnpdf) src; + + prePatch = '' + cd n3fit + ''; + + postPatch = '' + substituteInPlace src/n3fit/version.py \ + --replace '= __give_git()' '= "'$version'"' + ''; + + propagatedBuildInputs = [ + hyperopt + keras + psutil + tensorflow + validphys2 + ]; + + postInstall = '' + for prog in "$out"/bin/*; do + wrapProgram "$prog" --set PYTHONPATH "$PYTHONPATH:$(toPythonPath "$out")" + done + ''; + + doCheck = false; # no tests + pythonImportsCheck = [ "n3fit" ]; + + meta = with lib; { + description = "NNPDF fitting framework"; + homepage = "https://docs.nnpdf.science"; + inherit (nnpdf.meta) license; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/development/python-modules/validphys2/default.nix b/pkgs/development/python-modules/validphys2/default.nix index c417cb47e2d3..38debb91be11 100644 --- a/pkgs/development/python-modules/validphys2/default.nix +++ b/pkgs/development/python-modules/validphys2/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace src/validphys/version.py \ - --replace '= __give_git()' '= "${version}"' + --replace '= __give_git()' '= "'$version'"' ''; propagatedBuildInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf7d7643e03f..fa49fbe1dd28 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6188,6 +6188,8 @@ self: super: with self; { myst-parser = callPackage ../development/python-modules/myst-parser { }; + n3fit = callPackage ../development/python-modules/n3fit { }; + nad-receiver = callPackage ../development/python-modules/nad-receiver { }; nagiosplugin = callPackage ../development/python-modules/nagiosplugin { }; From 98c1d7eb6747db65eab6c8112d35f618141f8079 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 02:07:47 +0000 Subject: [PATCH 24/66] awscli2: 2.9.21 -> 2.9.23 --- pkgs/tools/admin/awscli2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/awscli2/default.nix b/pkgs/tools/admin/awscli2/default.nix index 33cb045a4ae5..8009118be6b3 100644 --- a/pkgs/tools/admin/awscli2/default.nix +++ b/pkgs/tools/admin/awscli2/default.nix @@ -25,14 +25,14 @@ let in with py.pkgs; buildPythonApplication rec { pname = "awscli2"; - version = "2.9.21"; # N.B: if you change this, check if overrides are still up-to-date + version = "2.9.23"; # N.B: if you change this, check if overrides are still up-to-date format = "pyproject"; src = fetchFromGitHub { owner = "aws"; repo = "aws-cli"; rev = version; - hash = "sha256-/CMV6eCNm2gF9HhdoTo2TUUy7I4NF9Fb+6l2biGIbkE="; + hash = "sha256-OaZ8Eax8XE4xGs5yHh+1P8mwEfHkFNEtY6ZGLQc8Thk="; }; nativeBuildInputs = [ From a6081aedf809e850b5b9eadaa0565ce968df3a72 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 03:55:47 +0000 Subject: [PATCH 25/66] python310Packages.clustershell: 1.9 -> 1.9.1 --- pkgs/development/python-modules/clustershell/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/clustershell/default.nix b/pkgs/development/python-modules/clustershell/default.nix index b38d61f6fa01..e1bd8e4f8b7b 100644 --- a/pkgs/development/python-modules/clustershell/default.nix +++ b/pkgs/development/python-modules/clustershell/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "ClusterShell"; - version = "1.9"; + version = "1.9.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-A0arNKF9jPRj3GnnOBHG8xDD2YEPpMrPRbZEaKg8FHQ="; + sha256 = "sha256-bwqzyhQbUI2gPOGb1S8eXo0pdz/DBi1782RQqCIH7Bs="; }; postPatch = '' From 4ea38729b3e9e7b1738ed433971a099d2b14ebbc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 04:43:56 +0000 Subject: [PATCH 26/66] python310Packages.iminuit: 2.18.0 -> 2.19.0 --- pkgs/development/python-modules/iminuit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iminuit/default.nix b/pkgs/development/python-modules/iminuit/default.nix index eebeb17bb7e7..97c224a39ac8 100644 --- a/pkgs/development/python-modules/iminuit/default.nix +++ b/pkgs/development/python-modules/iminuit/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "iminuit"; - version = "2.18.0"; + version = "2.19.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-fuLGoLzaxYGzj66NDzQ/3uVfkfH2psyWQ/z7zGwtw+Y="; + hash = "sha256-9NHLrM8RXNxIZpaPZJ8qN3lKXA3gGN6BVqp0VWNQpUw="; }; nativeBuildInputs = [ From b512908f99b5bdadd5f666f23220a82b4a672a44 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 07:03:21 +0000 Subject: [PATCH 27/66] python310Packages.drf-yasg: 1.21.4 -> 1.21.5 --- pkgs/development/python-modules/drf-yasg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/drf-yasg/default.nix b/pkgs/development/python-modules/drf-yasg/default.nix index eca45373fab7..4853e7eb0825 100644 --- a/pkgs/development/python-modules/drf-yasg/default.nix +++ b/pkgs/development/python-modules/drf-yasg/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "drf-yasg"; - version = "1.21.4"; + version = "1.21.5"; src = fetchPypi { inherit pname version; - sha256 = "sha256-iHyfeeZPRqpIl0I05hApsb6msS6mKKj8ijaXWJrdHT4="; + sha256 = "sha256-zu8MO13EOJeBr9eG5tw2l68qL+DYck7h9jfCPXW7xbI="; }; postPatch = '' From 80bce711c372b85ba1f1f75ae110ed3b1d1cf280 Mon Sep 17 00:00:00 2001 From: Evils Date: Thu, 9 Feb 2023 23:38:30 +0100 Subject: [PATCH 28/66] wxGTK32: 3.2.1 -> 3.2.2 --- pkgs/development/libraries/wxwidgets/wxGTK32.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/wxGTK32.nix b/pkgs/development/libraries/wxwidgets/wxGTK32.nix index 543c6fb4e055..19bdac417a00 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK32.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK32.nix @@ -53,13 +53,13 @@ let in stdenv.mkDerivation rec { pname = "wxwidgets"; - version = "3.2.1"; + version = "3.2.2"; src = fetchFromGitHub { owner = "wxWidgets"; repo = "wxWidgets"; rev = "v${version}"; - hash = "sha256-k6td/8pF7ad7+gVm7L0jX79fHKwR7/qrOBpSFggyaI0="; + hash = "sha256-bGvFrQNiGXBMyYd4cyDrZs4D7hKo/WqYkDRoGT5t5a0="; }; # Workaround for pkgsMusl.wxGTK32 failing as: From 56a249d31f3bf0276681ccbb295144063b469e2e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 11:59:27 +0000 Subject: [PATCH 29/66] python310Packages.limnoria: 2023.1.12 -> 2023.1.28 --- pkgs/development/python-modules/limnoria/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/limnoria/default.nix b/pkgs/development/python-modules/limnoria/default.nix index 428b199294cc..6f07c8854862 100644 --- a/pkgs/development/python-modules/limnoria/default.nix +++ b/pkgs/development/python-modules/limnoria/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "limnoria"; - version = "2023.1.12"; + version = "2023.1.28"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-V3DkIsnVv/HekWuOnIKnMHhccDGWun7mF7AcBSEsy6o="; + hash = "sha256-yIKJAW5hb7EOUiS7G+Q4QAESfG4dbfqHScaQBKLMkeM="; }; propagatedBuildInputs = [ From 25e334fc0430a1cec8acb5385ebcfef233362b91 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 13:10:25 +0000 Subject: [PATCH 30/66] python310Packages.primer3: 0.6.1 -> 1.0.0 --- pkgs/development/python-modules/primer3/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/primer3/default.nix b/pkgs/development/python-modules/primer3/default.nix index 14c96e5734ab..d3d44259fefb 100644 --- a/pkgs/development/python-modules/primer3/default.nix +++ b/pkgs/development/python-modules/primer3/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "primer3"; - version = "0.6.1"; + version = "1.0.0"; src = fetchFromGitHub { owner = "libnano"; repo = "primer3-py"; - rev = version; - sha256 = "1glybwp9w2m1ydvaphr41gj31d8fvlh40s35galfbjqa563si72g"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-o9B8TN3mOchOO7dz34mI3NDtIhHSlA9+lMNsYcxhTE0="; }; nativeBuildInputs = [ cython ] From 542c88f871e7a443aaf32dea6ecbb21c5493d127 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 12 Feb 2023 14:46:56 +0000 Subject: [PATCH 31/66] graalvm*-ce: remove old sources file --- .../graalvm11-ce-sources.json | 42 ------------------- .../graalvm17-ce-sources.json | 42 ------------------- 2 files changed, 84 deletions(-) delete mode 100644 pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json delete mode 100644 pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json b/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json deleted file mode 100644 index 705750cfe7f0..000000000000 --- a/pkgs/development/compilers/graalvm/community-edition/graalvm11-ce-sources.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "aarch64-darwin": { - "graalvm-ce|java11|22.3.0": { - "sha256": "c9657e902c2ba674931c3cf233a38c4de3d5186ae5d70452f9df75ac0c4cacff", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-darwin-aarch64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java11|22.3.0": { - "sha256": "dd9f91a970c7270b3f7fe8e711ba1ae081d34ed433c75f2bb0459aaf19e0fbe7", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-darwin-aarch64-22.3.0.jar" - } - }, - "x86_64-darwin": { - "graalvm-ce|java11|22.3.0": { - "sha256": "b8b39d6a3e3a9ed6348c2776ff071fc64ca90f98999ee846e6ca7e5fdc746a8b", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-darwin-amd64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java11|22.3.0": { - "sha256": "00fe13c42813f581955eb35370bb8409ba17c7fdc83971d000baf695be2a0cb5", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-darwin-amd64-22.3.0.jar" - } - }, - "aarch64-linux": { - "graalvm-ce|java11|22.3.0": { - "sha256": "c6646149dad486a0b02c5fc10649786240f275efda65aa14a25d01d2f5bafe15", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-linux-aarch64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java11|22.3.0": { - "sha256": "0886e214f03f8a44962ecab459a94afb5c6a0f20910cb128d9ff775f4a9e4162", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-linux-aarch64-22.3.0.jar" - } - }, - "x86_64-linux": { - "graalvm-ce|java11|22.3.0": { - "sha256": "d4200bcc43e5ad4e6949c1b1edc1e59f63066e3a2280d5bd82d0c9b1d67c3f2c", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java11-linux-amd64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java11|22.3.0": { - "sha256": "17843f92dc9de74b161a63c52cc2a4597e5472cf3f6f6d71930fb655b35f9208", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java11-linux-amd64-22.3.0.jar" - } - } -} diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json b/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json deleted file mode 100644 index 93f598a66598..000000000000 --- a/pkgs/development/compilers/graalvm/community-edition/graalvm17-ce-sources.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "aarch64-darwin": { - "graalvm-ce|java17|22.3.0": { - "sha256": "dfc0c8998b8d00fcca87ef1c866c6e4985fd20b0beba3021f9677f9b166dfaf8", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-darwin-aarch64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java17|22.3.0": { - "sha256": "b6e44cb03f560bb43db1fd0aa862af36ba1df6717765920d91c18519712adfe9", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-darwin-aarch64-22.3.0.jar" - } - }, - "x86_64-darwin": { - "graalvm-ce|java17|22.3.0": { - "sha256": "422cd6abecfb8b40238460c09c42c5a018cb92fab4165de9691be2e3c3d0e8d1", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-darwin-amd64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java17|22.3.0": { - "sha256": "9ce13874e62877d3bbe3faa4a57fbbffc766fdc8191971e7b25de0226fe86598", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-darwin-amd64-22.3.0.jar" - } - }, - "aarch64-linux": { - "graalvm-ce|java17|22.3.0": { - "sha256": "e27249d9eef4504deb005cf14c6a028aad1adfa37209e12e9d7407710c08ed90", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-linux-aarch64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java17|22.3.0": { - "sha256": "d5b833c44d37fbe4df75906f73144e2db01e683bca3386fe185f4abbc8fbc798", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-linux-aarch64-22.3.0.jar" - } - }, - "x86_64-linux": { - "graalvm-ce|java17|22.3.0": { - "sha256": "3473d8b3b1bc682e95adfb3ac1d9a59b51b0f43e2b752f2a5b550e4ebfa2fd17", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-linux-amd64-22.3.0.tar.gz" - }, - "native-image-installable-svm|java17|22.3.0": { - "sha256": "d1f5c58b65c57ad8a0c7da0c4569ce815ebf1ae503b0741ba1facf27b816d398", - "url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/native-image-installable-svm-java17-linux-amd64-22.3.0.jar" - } - } -} From 359896bd1bcab22e14f8e26c098831c8844a8d4f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 16:01:04 +0000 Subject: [PATCH 32/66] ipset: 7.15 -> 7.17 --- pkgs/os-specific/linux/ipset/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/ipset/default.nix b/pkgs/os-specific/linux/ipset/default.nix index a116aef7920a..6aa369e4eb4a 100644 --- a/pkgs/os-specific/linux/ipset/default.nix +++ b/pkgs/os-specific/linux/ipset/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "ipset"; - version = "7.15"; + version = "7.17"; src = fetchurl { url = "https://ipset.netfilter.org/${pname}-${version}.tar.bz2"; - sha256 = "sha256-ClVFqq22QBQsH4iNNmp43fhyR5mWf6IGhqcAU71iF1E="; + sha256 = "sha256-vknJ/0id1mEMrWVB50PDOE6slunyRwfaezkp2PKsZNg="; }; nativeBuildInputs = [ pkg-config ]; From ddbc1eb4c2021ab0ffe49dfdeb371f7aa1149bcf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 17:33:43 +0000 Subject: [PATCH 33/66] darkman: 1.4.0 -> 1.5.4 --- pkgs/applications/misc/darkman/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/darkman/default.nix b/pkgs/applications/misc/darkman/default.nix index 04b1af9bc2ae..a20b8ab72625 100644 --- a/pkgs/applications/misc/darkman/default.nix +++ b/pkgs/applications/misc/darkman/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "darkman"; - version = "1.4.0"; + version = "1.5.4"; src = fetchFromGitLab { owner = "WhyNotHugo"; repo = "darkman"; rev = "v${version}"; - sha256 = "sha256-Q/pjQmlyREl32C0LiwypEz1qBw2AeBOZbUIwNP392Sc="; + sha256 = "sha256-6SNXVe6EfVwcXH9O6BxNw+v4/uhKhCtVS3XE2GTc2Sc="; }; - vendorSha256 = "09rjqw6v1jaf0mhmycw9mcay9q0y1fya2azj8216gdgkl48ics08"; + vendorSha256 = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY="; nativeBuildInputs = [ scdoc ]; From d2e047f112b459dc2ded9923c388370c893520ae Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 12 Feb 2023 14:47:13 +0000 Subject: [PATCH 34/66] graalvm-ce: add it to all-packages pointing to graalvm11-ce --- pkgs/build-support/build-graalvm-native-image/default.nix | 4 ++-- .../compilers/graalvm/community-edition/update.sh | 2 +- pkgs/top-level/all-packages.nix | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index be11d06308a7..810ef52235e1 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, graalvm, glibcLocales }: +{ lib, stdenv, graalvm-ce, glibcLocales }: { name ? "${args.pname}-${args.version}" # Final executable name @@ -19,7 +19,7 @@ # XMX size of GraalVM during build , graalvmXmx ? "-J-Xmx6g" # The GraalVM derivation to use -, graalvmDrv ? graalvm +, graalvmDrv ? graalvm-ce # Locale to be used by GraalVM compiler , LC_ALL ? "en_US.UTF-8" , meta ? { } diff --git a/pkgs/development/compilers/graalvm/community-edition/update.sh b/pkgs/development/compilers/graalvm/community-edition/update.sh index 6121df8a7c98..476bd754ad50 100755 --- a/pkgs/development/compilers/graalvm/community-edition/update.sh +++ b/pkgs/development/compilers/graalvm/community-edition/update.sh @@ -16,7 +16,7 @@ verlte() { readonly nixpkgs=../../../../.. -readonly current_version="$(nix-instantiate "$nixpkgs" --eval --strict -A graalvm11-ce.version | tr -d \")" +readonly current_version="$(nix-instantiate "$nixpkgs" --eval --strict -A graalvm-ce.version | tr -d \")" if [[ -z "${1:-}" ]]; then readonly gh_version="$(curl \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24181c424147..ccd4642b80fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14988,11 +14988,10 @@ with pkgs; recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { inherit (darwin.apple_sdk.frameworks) Foundation; }); + graalvm-ce = graalvm11-ce; graalvm11-ce = graalvmCEPackages.graalvm11-ce; graalvm17-ce = graalvmCEPackages.graalvm17-ce; - buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { - graalvm = graalvm11-ce; - }; + buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { }; openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { }; From d2128e82eeb1ace7c424a86e035ac9b1ad8451f2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 20:30:36 +0000 Subject: [PATCH 35/66] repro-get: 0.2.1 -> 0.3.0 --- pkgs/tools/package-management/repro-get/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/repro-get/default.nix b/pkgs/tools/package-management/repro-get/default.nix index 18eb021d3efb..42b000658c88 100644 --- a/pkgs/tools/package-management/repro-get/default.nix +++ b/pkgs/tools/package-management/repro-get/default.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "repro-get"; - version = "0.2.1"; + version = "0.3.0"; src = fetchFromGitHub { owner = "reproducible-containers"; repo = "repro-get"; rev = "v${version}"; - sha256 = "sha256-3cvKHwAyPYwR5VlhpPJH+3BK9Kw7dTGOPN1q2RnwsG0="; + sha256 = "sha256-2B4jNP58t+cfeHi5pICtB9+NwujRzkhl1d/cPkWlNrk="; }; - vendorSha256 = "sha256-ebvtPc0QiP7fNiWYjd7iLG/4iH4DqWV/eaDHvmV/H3Y="; + vendorHash = "sha256-GM8sKIZb2G9dBj2RoRO80hQrv8D+hHYo0O9FbBuK780="; nativeBuildInputs = [ installShellFiles ]; From 596ef34e284f6df07c9647c106584469bc7cb9dd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 20:44:42 +0000 Subject: [PATCH 36/66] jbang: 0.102.0 -> 0.103.0 --- pkgs/development/tools/jbang/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/jbang/default.nix b/pkgs/development/tools/jbang/default.nix index 2a1197cae0c8..0eeeba6fa767 100644 --- a/pkgs/development/tools/jbang/default.nix +++ b/pkgs/development/tools/jbang/default.nix @@ -1,12 +1,12 @@ { stdenv, lib, fetchzip, jdk, makeWrapper, coreutils, curl }: stdenv.mkDerivation rec { - version = "0.102.0"; + version = "0.103.0"; pname = "jbang"; src = fetchzip { url = "https://github.com/jbangdev/jbang/releases/download/v${version}/${pname}-${version}.tar"; - sha256 = "sha256-5T0MQ1b1kA7MVm2drNbUdK6CitTjT76ORPN/BJmsmsM="; + sha256 = "sha256-81Le1xVftyQkt5Jm2JXRxID/ySNS1Tcl+BRIsDYeg1k="; }; nativeBuildInputs = [ makeWrapper ]; From d1dd7f8a8de510c5d67964b8fd67975dc2627579 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 12 Feb 2023 21:03:36 +0000 Subject: [PATCH 37/66] hilbish: 2.0.1 -> 2.1.0 --- pkgs/shells/hilbish/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/hilbish/default.nix b/pkgs/shells/hilbish/default.nix index c1980309e1f1..20e1331dbcb9 100644 --- a/pkgs/shells/hilbish/default.nix +++ b/pkgs/shells/hilbish/default.nix @@ -2,19 +2,19 @@ buildGoModule rec { pname = "hilbish"; - version = "2.0.1"; + version = "2.1.0"; src = fetchFromGitHub { owner = "Rosettea"; repo = "Hilbish"; rev = "v${version}"; - sha256 = "sha256-5GPJVusF3/WbEE5VH45Wyxq40wbNxgjO8QI2cLMpdN0="; + sha256 = "sha256-iXDBo3bcmjsDy+iUREpg+sDTFN2LeF7jA+mg62LKeIs="; fetchSubmodules = true; }; subPackages = [ "." ]; - vendorSha256 = "sha256-Kiy1JR3X++naY2XNLpnGujrNQt7qlL0zxv8E96cHmHo="; + vendorHash = "sha256-Kiy1JR3X++naY2XNLpnGujrNQt7qlL0zxv8E96cHmHo="; ldflags = [ "-s" From 1280a27bbd5d48a6b3b015ef5ad1d229f41faa12 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Feb 2023 00:45:23 +0000 Subject: [PATCH 38/66] python3.pkgs.lightning: drop Tests fail with Python 3.11, no maintainer, and upstream has been dead for several years. --- .../python-modules/lightning/default.nix | 30 ------------------- pkgs/top-level/python-packages.nix | 2 -- 2 files changed, 32 deletions(-) delete mode 100644 pkgs/development/python-modules/lightning/default.nix diff --git a/pkgs/development/python-modules/lightning/default.nix b/pkgs/development/python-modules/lightning/default.nix deleted file mode 100644 index f6d21f95dbfc..000000000000 --- a/pkgs/development/python-modules/lightning/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pytest -, jinja2 -, matplotlib -, numpy -, requests -, six -}: - -buildPythonPackage rec { - version = "1.2.1"; - pname = "lightning-python"; - - src = fetchPypi { - inherit pname version; - sha256 = "3987d7d4a634bdb6db9bcf212cf4d2f72bab5bc039f4f6cbc02c9d01c4ade792"; - }; - - buildInputs = [ pytest ]; - propagatedBuildInputs = [ jinja2 matplotlib numpy requests six ]; - - meta = with lib; { - description = "A Python client library for the Lightning data visualization server"; - homepage = "http://lightning-viz.org"; - license = licenses.mit; - }; - -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3710c88a2f6a..b71b4373d6f3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5458,8 +5458,6 @@ self: super: with self; { lightgbm = callPackage ../development/python-modules/lightgbm { }; - lightning = callPackage ../development/python-modules/lightning { }; - lightning-utilities = callPackage ../development/python-modules/lightning-utilities { }; lightparam = callPackage ../development/python-modules/lightparam { }; From 5af91852b822d5129bd98276c0bf52d93587548f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Feb 2023 02:07:57 +0000 Subject: [PATCH 39/66] xray: 1.7.2 -> 1.7.5 --- pkgs/tools/networking/xray/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/xray/default.nix b/pkgs/tools/networking/xray/default.nix index e59715e61f38..f250d6de13f2 100644 --- a/pkgs/tools/networking/xray/default.nix +++ b/pkgs/tools/networking/xray/default.nix @@ -20,16 +20,16 @@ let in buildGoModule rec { pname = "xray"; - version = "1.7.2"; + version = "1.7.5"; src = fetchFromGitHub { owner = "XTLS"; repo = "Xray-core"; rev = "v${version}"; - sha256 = "sha256-jwCvo6+YXC471VqGWzcrnrLWOSJW2tBKa5SoynQg0Lo="; + sha256 = "sha256-WCku/7eczcsGiIuTy0sSQKUKXlH14TpdVg2/ZPdaiHQ="; }; - vendorSha256 = "sha256-P2g0MqlBScm6yTnpvL5T6l9ntsb4tK9k3Civ7rTevrE="; + vendorSha256 = "sha256-2P7fI7fUnShsAl95mPiJgtr/eobt+DMmaoxZcox0eu8="; nativeBuildInputs = [ makeWrapper ]; From 51b444c7c9b80be13473eaa45ddd7dd22703a392 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 13 Feb 2023 04:20:00 +0000 Subject: [PATCH 40/66] git-trim: fix build on darwin --- .../version-management/git-trim/default.nix | 27 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/git-trim/default.nix b/pkgs/applications/version-management/git-trim/default.nix index 0ef5a678ee8e..a7dbf0c6ba4b 100644 --- a/pkgs/applications/version-management/git-trim/default.nix +++ b/pkgs/applications/version-management/git-trim/default.nix @@ -1,4 +1,14 @@ -{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }: +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, pkg-config +, openssl +, libgit2 +, IOKit +, CoreFoundation +, fetchpatch +}: rustPlatform.buildRustPackage rec { pname = "git-trim"; @@ -11,11 +21,22 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-XAO3Qg5I2lYZVNx4+Z5jKHRIFdNwBJsUQwJXFb4CbvM="; }; - cargoHash = "sha256-KCLMb8NXxjscrmKXkP/RbV+LsJqOG7zaClJGFiQ4o9k="; + cargoHash = "sha256-mS8kNkZs8jX99ryG4XkU+U/iWIIcmET2vOfG1YNNZFU="; + + cargoPatches = [ + # Update git2 https://github.com/foriequal0/git-trim/pull/202 + (fetchpatch { + url = "https://github.com/foriequal0/git-trim/commit/4355cd1d6f605455087c4d7ad16bfb92ffee941f.patch"; + sha256 = "sha256-C1pX4oe9ZCgvqYTBJeSjMdr0KFyjv2PNVMJDlwCAngY="; + }) + ]; + + OPENSSL_NO_VENDOR = 1; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = [ openssl libgit2 ] + ++ lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ]; postInstall = '' install -Dm644 -t $out/share/man/man1/ docs/git-trim.1 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 91450b149754..254752782317 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1912,7 +1912,7 @@ with pkgs; git-town = callPackage ../applications/version-management/git-town { }; git-trim = callPackage ../applications/version-management/git-trim { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation; }; git-up = callPackage ../applications/version-management/git-up { From 0d48da7e29148184fcb8372a1fd76a92d08ebd06 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Feb 2023 06:07:10 +0000 Subject: [PATCH 41/66] python310Packages.vowpalwabbit: 9.6.0 -> 9.7.0 --- pkgs/development/python-modules/vowpalwabbit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix index 40303c29f9c9..e50a91c06039 100644 --- a/pkgs/development/python-modules/vowpalwabbit/default.nix +++ b/pkgs/development/python-modules/vowpalwabbit/default.nix @@ -18,11 +18,11 @@ buildPythonPackage rec { pname = "vowpalwabbit"; - version = "9.6.0"; + version = "9.7.0"; src = fetchPypi{ inherit pname version; - sha256 = "sha256-LHs98lccPjub5GDPB3dxtkOYCDxri04CVpSSsypa4xI="; + sha256 = "sha256-O3WnG3JQ7CEHMPYTmE9pgnS8YZs717P6wBKBnXIvvFI="; }; nativeBuildInputs = [ From 1995db3be345620685d143fe378b62d430fcd5cf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Feb 2023 06:19:12 +0000 Subject: [PATCH 42/66] rocm-device-libs: 5.4.2 -> 5.4.3 --- pkgs/development/libraries/rocm-device-libs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/rocm-device-libs/default.nix b/pkgs/development/libraries/rocm-device-libs/default.nix index 3fba6da7f537..fa60a4d3f9e4 100644 --- a/pkgs/development/libraries/rocm-device-libs/default.nix +++ b/pkgs/development/libraries/rocm-device-libs/default.nix @@ -14,7 +14,7 @@ let else throw "Unsupported ROCm LLVM platform"; in stdenv.mkDerivation (finalAttrs: { pname = "rocm-device-libs"; - version = "5.4.2"; + version = "5.4.3"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; From 9435a8f48e37ea494b01330c3443f77a66bdc5e5 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 13 Feb 2023 07:21:16 +0100 Subject: [PATCH 43/66] =?UTF-8?q?ocaml-top:=201.2.0-rc=20=E2=86=92=201.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/tools/ocaml/ocaml-top/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/ocaml/ocaml-top/default.nix b/pkgs/development/tools/ocaml/ocaml-top/default.nix index 095af7769140..18ea26ca22a8 100644 --- a/pkgs/development/tools/ocaml/ocaml-top/default.nix +++ b/pkgs/development/tools/ocaml/ocaml-top/default.nix @@ -2,13 +2,13 @@ with ocamlPackages; buildDunePackage rec { pname = "ocaml-top"; - version = "1.2.0-rc"; + version = "1.2.0"; src = fetchFromGitHub { owner = "OCamlPro"; repo = "ocaml-top"; rev = version; - sha256 = "sha256-ZXnPnPvJmHshkTwYWeBojrgJYAF/R6vUo0XkvVMFSeQ="; + hash = "sha256-xmPGGB/zUpfeAxUIhR1PhfoESAJq7sTpqHuf++EH3Lw="; }; nativeBuildInputs = [ ocp-build ]; @@ -19,11 +19,6 @@ with ocamlPackages; buildDunePackage rec { ocp-build -init ''; - postPatch = '' - substituteInPlace src/completion.ml \ - --replace 'LibIndex.load ' 'LibIndex.load ~qualify:false ' - ''; - meta = { homepage = "https://www.typerex.org/ocaml-top.html"; license = lib.licenses.gpl3; From 04b686d4d61ad45146212818601763a931d572da Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Feb 2023 08:22:11 +0000 Subject: [PATCH 44/66] python310Packages.holoviews: 1.15.3 -> 1.15.4 --- pkgs/development/python-modules/holoviews/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/holoviews/default.nix b/pkgs/development/python-modules/holoviews/default.nix index 8f109053b5e9..b60343dfc68a 100644 --- a/pkgs/development/python-modules/holoviews/default.nix +++ b/pkgs/development/python-modules/holoviews/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "holoviews"; - version = "1.15.3"; + version = "1.15.4"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-pFiRzSuPzUCHQs//81HJKPv0zx730fBEQsfYeG7o6ZQ="; + hash = "sha256-StwTN1DmDnNiZ+3iF2NW5qMDFDiwkTZ8tPKzhN6ZrgM="; }; propagatedBuildInputs = [ From a1e6a37fcd472c9356cfa1c21d3b027375c1f64a Mon Sep 17 00:00:00 2001 From: Sam Parkinson Date: Mon, 13 Feb 2023 20:08:48 +1100 Subject: [PATCH 45/66] regextester: 1.0.1 -> 1.1.1 --- pkgs/applications/misc/regextester/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/regextester/default.nix b/pkgs/applications/misc/regextester/default.nix index 2a00cb92b9d1..e5900a050efc 100644 --- a/pkgs/applications/misc/regextester/default.nix +++ b/pkgs/applications/misc/regextester/default.nix @@ -11,18 +11,19 @@ , ninja , gobject-introspection , gsettings-desktop-schemas +, desktop-file-utils , pantheon , wrapGAppsHook }: stdenv.mkDerivation rec { pname = "regextester"; - version = "1.0.1"; + version = "1.1.1"; src = fetchFromGitHub { owner = "artemanufrij"; repo = "regextester"; rev = version; - sha256 = "1xwwv1hccni1mrbl58f7ly4qfq6738vn24bcbl2q346633cd7kx3"; + hash = "sha256-5+gU8DeB99w2h/4vMal2eHkR0305dmRYiY6fsLZzlnc="; }; nativeBuildInputs = [ @@ -34,6 +35,7 @@ stdenv.mkDerivation rec { ninja pkg-config wrapGAppsHook + desktop-file-utils ]; buildInputs = [ From 3f794e72d1a0ae5772119bc25b890f2068a326f3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Feb 2023 10:48:17 +0000 Subject: [PATCH 46/66] prometheus-artifactory-exporter: 1.11.0 -> 1.12.0 --- pkgs/servers/monitoring/prometheus/artifactory-exporter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/artifactory-exporter.nix b/pkgs/servers/monitoring/prometheus/artifactory-exporter.nix index 5f951f308ddc..17775b491c64 100644 --- a/pkgs/servers/monitoring/prometheus/artifactory-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/artifactory-exporter.nix @@ -6,14 +6,14 @@ buildGoModule rec { pname = "artifactory_exporter"; - version = "1.11.0"; + version = "1.12.0"; rev = "v${version}"; src = fetchFromGitHub { owner = "peimanja"; repo = pname; rev = rev; - hash = "sha256-dUAIPS2o+uvCGX32AgknynT0Mzzbq/7SeNmKN0Xc69o="; + hash = "sha256-EFjWDoWPePbPX9j4vuI41TAlGcFRlUyPpSvJriZdR0U="; }; vendorHash = "sha256-5yzBKgjJCv4tgdBS6XmZUq1ebbka0LOuv6BARWO7kQg="; From 832acbd7434c69b6c602251240d61b6a754ba17e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Feb 2023 11:24:27 +0000 Subject: [PATCH 47/66] python311.pkgs.validobj: disable --- pkgs/development/python-modules/validobj/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/validobj/default.nix b/pkgs/development/python-modules/validobj/default.nix index be42bfc0792a..ee3ff3fb3950 100644 --- a/pkgs/development/python-modules/validobj/default.nix +++ b/pkgs/development/python-modules/validobj/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, pythonAtLeast , fetchPypi , flit , hypothesis @@ -11,6 +12,9 @@ buildPythonPackage rec { version = "0.6"; format = "pyproject"; + # https://github.com/Zaharid/validobj/issues/8 + disabled = pythonAtLeast "3.11"; + src = fetchPypi { inherit pname version; sha256 = "sha256-BvnHn0Erk87Ce3tYwYf0tBwRJMrG19Af/Y568VJ02uo="; From eed132659295ddc06e81305f1644ecd68bab2ed1 Mon Sep 17 00:00:00 2001 From: Gabriel Volpe Date: Mon, 13 Feb 2023 12:31:15 +0100 Subject: [PATCH 48/66] tree-sitter: fix src value --- pkgs/development/tools/parsing/tree-sitter/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 13ba669bb4f2..8fcb696ac7f2 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -60,7 +60,7 @@ let buildGrammar { language = grammar.language or name; inherit version; - src = grammar.src or fetchGrammar grammar; + src = grammar.src or (fetchGrammar grammar); location = grammar.location or null; }; grammars' = import ./grammars { inherit lib; } // extraGrammars; From 5596aefd05f97183bcca7c3d053b084a048e85dd Mon Sep 17 00:00:00 2001 From: noisersup Date: Mon, 13 Feb 2023 13:23:12 +0100 Subject: [PATCH 49/66] ferretdb: 0.9.0 -> 0.9.1 --- pkgs/servers/nosql/ferretdb/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/nosql/ferretdb/default.nix b/pkgs/servers/nosql/ferretdb/default.nix index 41a5d6bca7ce..c89d3f789e15 100644 --- a/pkgs/servers/nosql/ferretdb/default.nix +++ b/pkgs/servers/nosql/ferretdb/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "ferretdb"; - version = "0.9.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "FerretDB"; repo = "FerretDB"; rev = "v${version}"; - sha256 = "sha256-+tmClWkW3uhBXuQzuSMJnzeA1rrkpLV0QLCzcKhbThw="; + sha256 = "sha256-iqoz7axU5U6MdRl8I2vS3Nh37XZZPI4bRb3oFxpQs6M="; }; postPatch = '' @@ -19,7 +19,7 @@ buildGoModule rec { echo nixpkgs > build/version/package.txt ''; - vendorSha256 = "sha256-43FxDRcif8FDHyXdNL/FJEt5ZnCQ8r7d5Red3l9442Q="; + vendorSha256 = "sha256-qtxR1vk/EZZmCRP1Z+EFObfMbQXKiRaSiI1Dsv268b8="; CGO_ENABLED = 0; From afbdf8c54d71c819f5e7f61cf3cdd492be2dcbdf Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Mon, 10 Oct 2022 11:19:04 +0200 Subject: [PATCH 50/66] cosmoc: drop --- .../manual/release-notes/rl-2305.section.md | 2 + pkgs/development/tools/cosmoc/default.nix | 41 ------------------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 pkgs/development/tools/cosmoc/default.nix diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index abaefac66e3c..22b1fe885cc3 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -99,6 +99,8 @@ In addition to numerous new and upgraded packages, this release has the followin - Calling `makeSetupHook` without passing a `name` argument is deprecated. +- The `cosmoc` package has been removed. The upstream scripts in `cosmocc` should be used instead. + - Qt 5.12 and 5.14 have been removed, as the corresponding branches have been EOL upstream for a long time. This affected under 10 packages in nixpkgs, largely unmaintained upstream as well, however, out-of-tree package expressions may need to be updated manually. - The [services.wordpress.sites.<name>.plugins](#opt-services.wordpress.sites._name_.plugins) and [services.wordpress.sites.<name>.themes](#opt-services.wordpress.sites._name_.themes) options have been converted from sets to attribute sets to allow for consumers to specify explicit install paths via attribute name. diff --git a/pkgs/development/tools/cosmoc/default.nix b/pkgs/development/tools/cosmoc/default.nix deleted file mode 100644 index e64cf02e9f7e..000000000000 --- a/pkgs/development/tools/cosmoc/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, lib, cosmopolitan }: - -stdenv.mkDerivation { - pname = "cosmoc"; - inherit (cosmopolitan) version; - - doInstallCheck = true; - dontUnpack = true; - dontBuild = true; - - # compiler arguments based on upstream README.md - installPhase = '' - runHook preInstall - mkdir -p $out/bin - cat <$out/bin/cosmoc - #!${stdenv.shell} - exec ${stdenv.cc}/bin/${stdenv.cc.targetPrefix}gcc \ - -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \ - -fno-omit-frame-pointer -pg -mnop-mcount -mno-tls-direct-seg-refs \ - "\$@" \ - -fuse-ld=bfd -Wl,-T,${cosmopolitan}/lib/ape.lds -Wl,--gc-sections \ - -include ${cosmopolitan}/include/cosmopolitan.h \ - ${cosmopolitan}/lib/{crt.o,ape-no-modify-self.o,cosmopolitan.a} - EOF - chmod +x $out/bin/cosmoc - runHook postInstall - ''; - - installCheckPhase = '' - printf 'main() { printf("hello world\\n"); }\n' >hello.c - $out/bin/cosmoc hello.c - ./a.out - ''; - - meta = with lib; { - homepage = "https://justine.lol/cosmopolitan/"; - description = "compiler for Cosmopolitan C programs"; - license = licenses.mit; - maintainers = teams.cosmopolitan.members; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 91450b149754..9bf74f533f8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19293,8 +19293,6 @@ with pkgs; cog = callPackage ../development/web/cog { }; - cosmoc = callPackage ../development/tools/cosmoc { }; - cosmopolitan = callPackage ../development/libraries/cosmopolitan { }; python-cosmopolitan = callPackage ../development/interpreters/python-cosmopolitan { }; From e9be28ebacfd89a9123d3cc716493fd73479790e Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Mon, 10 Oct 2022 11:28:29 +0200 Subject: [PATCH 51/66] cosmocc: init at 2.2 --- pkgs/development/tools/cosmocc/default.nix | 35 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/tools/cosmocc/default.nix diff --git a/pkgs/development/tools/cosmocc/default.nix b/pkgs/development/tools/cosmocc/default.nix new file mode 100644 index 000000000000..71028d1a1968 --- /dev/null +++ b/pkgs/development/tools/cosmocc/default.nix @@ -0,0 +1,35 @@ +{ runCommand, lib, cosmopolitan }: + +let + cosmocc = + runCommand "cosmocc" + { + pname = "cosmocc"; + inherit (cosmopolitan) version; + + meta = with lib; { + homepage = "https://justine.lol/cosmopolitan/"; + description = "compilers for Cosmopolitan C/C++ programs"; + license = licenses.mit; + maintainers = teams.cosmopolitan.members; + }; + passthru.tests = { + cc = runCommand "c-test" { } '' + cat > hello.c << END + #include + int main() { + printf("Hello world!\n"); + return 0; + } + END + ${cosmocc}/bin/cosmocc hello.c + ./a.out > $out + ''; + }; + } '' + mkdir -p $out/bin + install ${cosmopolitan.dist}/tool/scripts/{cosmocc,cosmoc++} $out/bin + sed 's|/opt/cosmo\([ /]\)|${cosmopolitan.dist}\1|g' -i $out/bin/* + ''; +in +cosmocc diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9bf74f533f8b..86bdd538cd92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19293,6 +19293,8 @@ with pkgs; cog = callPackage ../development/web/cog { }; + cosmocc = callPackage ../development/tools/cosmocc { }; + cosmopolitan = callPackage ../development/libraries/cosmopolitan { }; python-cosmopolitan = callPackage ../development/interpreters/python-cosmopolitan { }; From 58ad16c22e30209fdc292a3fcc5e5459e290b250 Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Mon, 13 Feb 2023 13:38:19 +0100 Subject: [PATCH 52/66] libreddit: 0.29.1 -> 0.29.2 --- pkgs/servers/libreddit/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/libreddit/default.nix b/pkgs/servers/libreddit/default.nix index 508a3319d632..c4a3a918d304 100644 --- a/pkgs/servers/libreddit/default.nix +++ b/pkgs/servers/libreddit/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "libreddit"; - version = "0.29.1"; + version = "0.29.2"; src = fetchFromGitHub { owner = "libreddit"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-W/vUOioZpA2UYPyJOVTGC1mek574m48NKQXG2o7emjU="; + hash = "sha256-YCjH0K84sPgQ9MtA5IUHoGCxrAzRSu4KIuk2qPyhaM4="; }; - cargoHash = "sha256-WrkUW9fV69RswS3qBMqBGxNBq6W4eJmJaTrEDp9byrM="; + cargoHash = "sha256-VsQckZm8ySmbpn1uSgxWqZ+cc+NnUDNBmSsj4MHdQtk="; buildInputs = lib.optionals stdenv.isDarwin [ Security From b274778192ef2d21da3ff281d773fa5908a20dbc Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Mon, 13 Feb 2023 13:46:25 +0100 Subject: [PATCH 53/66] haruna: 0.10.2 -> 0.10.3 --- pkgs/applications/video/haruna/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/haruna/default.nix b/pkgs/applications/video/haruna/default.nix index 3849acda9473..25fac4fba61d 100644 --- a/pkgs/applications/video/haruna/default.nix +++ b/pkgs/applications/video/haruna/default.nix @@ -26,13 +26,13 @@ mkDerivation rec { pname = "haruna"; - version = "0.10.2"; + version = "0.10.3"; src = fetchFromGitLab { owner = "multimedia"; repo = "haruna"; rev = "v${version}"; - hash = "sha256-hhHWxmr2EzW9QqfV1bpJCiWOWsmGJmvxvtQcuXlMTc4="; + hash = "sha256-kXafPUcWWvadGbcN4PAtXlFmfll/mSpwu2Sbh6Gxx4w="; domain = "invent.kde.org"; }; From d990d1ea881a3cf1226ab4dbbf612bc7a01c9c79 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Feb 2023 10:58:09 +0000 Subject: [PATCH 54/66] python311.pkgs.collections-extended: disable Not supported yet. --- .../python-modules/collections-extended/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/collections-extended/default.nix b/pkgs/development/python-modules/collections-extended/default.nix index c4d20c23d3f2..d1545d36b376 100644 --- a/pkgs/development/python-modules/collections-extended/default.nix +++ b/pkgs/development/python-modules/collections-extended/default.nix @@ -5,6 +5,7 @@ , poetry-core , pytestCheckHook , pythonOlder +, pythonAtLeast }: buildPythonPackage rec { @@ -12,7 +13,8 @@ buildPythonPackage rec { version = "2.0.2"; format = "pyproject"; - disabled = pythonOlder "3.6"; + # https://github.com/mlenzen/collections-extended/issues/198 + disabled = pythonOlder "3.6" || pythonAtLeast "3.11"; src = fetchFromGitHub { owner = "mlenzen"; From 8c9a8fa6e37b7f4c941362a9190ba251d712788c Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Mon, 13 Feb 2023 14:40:29 +0100 Subject: [PATCH 55/66] torq: copy frontend instead of linking --- pkgs/applications/blockchains/torq/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/torq/default.nix b/pkgs/applications/blockchains/torq/default.nix index 4b786168bce3..bda5fbd036a2 100644 --- a/pkgs/applications/blockchains/torq/default.nix +++ b/pkgs/applications/blockchains/torq/default.nix @@ -29,7 +29,7 @@ let # override npmInstallHook, we only care about the build/ directory installPhase = '' mkdir $out - cp -r build $out/ + cp -r build/* $out/ ''; }; in @@ -47,7 +47,8 @@ buildGoModule rec { ]; postInstall = '' - ln -s ${web} $out/web + mkdir -p $out/web/build + cp -r ${web}/* $out/web/build/ ''; meta = with lib; { From bb62992d4e3a50d590c27c8bbdc480b63b35f20a Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Mon, 13 Feb 2023 14:58:17 +0100 Subject: [PATCH 56/66] torq: 0.17.3 -> 0.18.17 --- pkgs/applications/blockchains/torq/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/blockchains/torq/default.nix b/pkgs/applications/blockchains/torq/default.nix index bda5fbd036a2..657e5b0e3ffa 100644 --- a/pkgs/applications/blockchains/torq/default.nix +++ b/pkgs/applications/blockchains/torq/default.nix @@ -6,20 +6,20 @@ let pname = "torq"; - version = "0.17.3"; + version = "0.18.17"; src = fetchFromGitHub { owner = "lncapital"; repo = pname; rev = "v${version}"; - hash = "sha256-fqHJZi1NQCrZqsa+N+FVYZ8s9o0D555Sqn5qNlJ1MmI="; + hash = "sha256-xiA66yGo8b1+zZ7jQ7SFOtNPmqbdna7fUCT21uibrIM="; }; web = buildNpmPackage { pname = "${pname}-frontend"; inherit version; src = "${src}/web"; - npmDepsHash = "sha256-8mUfTFzPjQlQvhC3zZf+WruDBkYnmGt3yckNi0CPWs0="; + npmDepsHash = "sha256-/7x5RWYIB5BChYMnMuFVVaZd0pVkew4i4QrF7hSFnCM="; # copied from upstream Dockerfile npmInstallFlags = [ "--legacy-peer-deps" ]; @@ -36,7 +36,7 @@ in buildGoModule rec { inherit pname version src; - vendorHash = "sha256-HETN2IMnpxnTyg6bQDpoD0saJu+gKocdEf0VzEi12Gs="; + vendorHash = "sha256-bvisI589Gq9IdyJEqI+uzs3iDPOTUkq95P3n/KoFhF0="; subPackages = [ "cmd/torq" ]; From 3af4729a3291de4f35df7af986f8a4fc52589f8f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Feb 2023 13:58:48 +0000 Subject: [PATCH 57/66] python3.pkgs.certomancer: 0.8.2 -> 0.9.1 Adds Python 3.11 compatibility. --- pkgs/development/python-modules/certomancer/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/certomancer/default.nix b/pkgs/development/python-modules/certomancer/default.nix index 4fbe2ecd3792..767071a75ef2 100644 --- a/pkgs/development/python-modules/certomancer/default.nix +++ b/pkgs/development/python-modules/certomancer/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "certomancer"; - version = "0.8.2"; + version = "0.9.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "MatthiasValvekens"; repo = "certomancer"; rev = version; - sha256 = "sha256-H43NlFNTwZtedHsB7c62MocwQVOi5JjVJxRcZY+Wn7Y="; + sha256 = "4v2e46ZrzhKXpMULj0vmDRoLOypi030eaADAYjLMg5M="; }; propagatedBuildInputs = [ @@ -43,9 +43,7 @@ buildPythonPackage rec { ]; postPatch = '' - substituteInPlace setup.py \ - --replace ", 'pytest-runner'" "" \ - --replace "pyhanko-certvalidator==0.19.2" "pyhanko-certvalidator==0.19.5" + substituteInPlace setup.py --replace ", 'pytest-runner'" "" ''; nativeCheckInputs = [ From a098dc81ae2107a7c911783c65bca9de8cbe08ce Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 13 Feb 2023 16:09:09 +0200 Subject: [PATCH 58/66] helvum: 0.3.4 -> 0.4.0 --- pkgs/applications/audio/helvum/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/helvum/default.nix b/pkgs/applications/audio/helvum/default.nix index 684f074b4e61..78891967fa41 100644 --- a/pkgs/applications/audio/helvum/default.nix +++ b/pkgs/applications/audio/helvum/default.nix @@ -16,20 +16,20 @@ stdenv.mkDerivation rec { pname = "helvum"; - version = "0.3.4"; + version = "0.4.0"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "pipewire"; repo = pname; rev = version; - sha256 = "0nhv6zw2zzxz2bg2zj32w1brywnm5lv6j3cvmmvwshc389z2k5x1"; + hash = "sha256-TvjO7fGobGmAltVHeXWyMtMLANdVWVGvBYq20JD3mMI="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-EIHO9qVPIXgezfFOaarlTU0an762nFmX1ELbQuAZ7rY"; + hash = "sha256-W5Imlut30cjV4A6TCjBFLbViB0CDUucNsvIUiCXqu7I="; }; nativeBuildInputs = [ @@ -50,9 +50,6 @@ stdenv.mkDerivation rec { pipewire ]; - # FIXME: workaround for Pipewire 0.3.64 deprecated API change, remove when fixed upstream - NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ]; - meta = with lib; { description = "A GTK patchbay for pipewire"; homepage = "https://gitlab.freedesktop.org/pipewire/helvum"; From 4ec05165a3afb988fc82aadd017fd2539e96e1a4 Mon Sep 17 00:00:00 2001 From: Evils Date: Mon, 13 Feb 2023 16:56:17 +0100 Subject: [PATCH 59/66] wxGTK32: 3.2.2 -> 3.2.2.1 --- pkgs/development/libraries/wxwidgets/wxGTK32.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/wxGTK32.nix b/pkgs/development/libraries/wxwidgets/wxGTK32.nix index 19bdac417a00..83154c50d3e3 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK32.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK32.nix @@ -53,13 +53,13 @@ let in stdenv.mkDerivation rec { pname = "wxwidgets"; - version = "3.2.2"; + version = "3.2.2.1"; src = fetchFromGitHub { owner = "wxWidgets"; repo = "wxWidgets"; rev = "v${version}"; - hash = "sha256-bGvFrQNiGXBMyYd4cyDrZs4D7hKo/WqYkDRoGT5t5a0="; + hash = "sha256-u+INjo9EkW433OYoCDZpw5pcW1DyF/t/J5ntLZX+6aA="; }; # Workaround for pkgsMusl.wxGTK32 failing as: From c1cf9a0fe63637dbe9b4c65896feb140079c05aa Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 15:53:34 +0000 Subject: [PATCH 60/66] python310Packages.aioesphomeapi: 13.2.0 -> 13.3.1 Diff: https://github.com/esphome/aioesphomeapi/compare/refs/tags/v13.2.0...v13.3.1 Changelog: https://github.com/esphome/aioesphomeapi/releases/tag/v13.3.1 --- pkgs/development/python-modules/aioesphomeapi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix index 12bdd985abbe..c0d21eec563a 100644 --- a/pkgs/development/python-modules/aioesphomeapi/default.nix +++ b/pkgs/development/python-modules/aioesphomeapi/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "aioesphomeapi"; - version = "13.2.0"; + version = "13.3.1"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "esphome"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-ACO5vp5ZMxzfY4RBvZ+vbk+fsj43Q896bar0+HNYHwE="; + hash = "sha256-Pca+SMuUL3XyQpLAL6SOYPnztc95WF2o0v4+5Nc5Nxg="; }; postPatch = '' From a3526481a6617daa2fb38a7285a2356ea66d3260 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 15:53:59 +0000 Subject: [PATCH 61/66] python310Packages.oralb-ble: 0.17.4 -> 0.17.5 Diff: https://github.com/Bluetooth-Devices/oralb-ble/compare/refs/tags/v0.17.4...v0.17.5 Changelog: https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v0.17.5 --- pkgs/development/python-modules/oralb-ble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/oralb-ble/default.nix b/pkgs/development/python-modules/oralb-ble/default.nix index c0f2840763ea..689cd7903368 100644 --- a/pkgs/development/python-modules/oralb-ble/default.nix +++ b/pkgs/development/python-modules/oralb-ble/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "oralb-ble"; - version = "0.17.4"; + version = "0.17.5"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-KvvcyeYXBtV/sUKMv+1xoXH9ALUX46EWS/STFZkCnUQ="; + hash = "sha256-Lwrr5XzU2pbx3cYkvYtHgXFhGnz3cMBnNFWCpuY3ltg="; }; nativeBuildInputs = [ From 18a3b21de225ac26ec1beed1fbd8fcefcc956923 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 15:54:18 +0000 Subject: [PATCH 62/66] python310Packages.xiaomi-ble: 0.16.1 -> 0.16.3 Diff: https://github.com/Bluetooth-Devices/xiaomi-ble/compare/refs/tags/v0.16.1...v0.16.3 Changelog: https://github.com/Bluetooth-Devices/xiaomi-ble/releases/tag/v0.16.3 --- pkgs/development/python-modules/xiaomi-ble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xiaomi-ble/default.nix b/pkgs/development/python-modules/xiaomi-ble/default.nix index 7815a36396be..8dfbd418157a 100644 --- a/pkgs/development/python-modules/xiaomi-ble/default.nix +++ b/pkgs/development/python-modules/xiaomi-ble/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "xiaomi-ble"; - version = "0.16.1"; + version = "0.16.3"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-JsrOt6LmmhJZ4MBwLVKKt3IMbvAnxJx70AZROhb9gbc="; + hash = "sha256-yk3rEOcHIEZLz3qKxeGzHuVUWWxG3GhSt9vc0pXcanQ="; }; nativeBuildInputs = [ From 22b11b3bb82810fd58f6347cd18757f95c0f332c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 15:56:01 +0000 Subject: [PATCH 63/66] python310Packages.yalexs-ble: 1.12.8 -> 1.12.12 Diff: https://github.com/bdraco/yalexs-ble/compare/refs/tags/v1.12.8...1.12.12 Changelog: https://github.com/bdraco/yalexs-ble/blob/v1.12.12/CHANGELOG.md --- pkgs/development/python-modules/yalexs-ble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yalexs-ble/default.nix b/pkgs/development/python-modules/yalexs-ble/default.nix index 3e2de3d2afcd..46f1904faf23 100644 --- a/pkgs/development/python-modules/yalexs-ble/default.nix +++ b/pkgs/development/python-modules/yalexs-ble/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "yalexs-ble"; - version = "1.12.8"; + version = "1.12.12"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-04Xl2TBs9RL+KWmJgUY+PDoYN4AAvrcWP7TJBEu5lNU="; + hash = "sha256-CO+plbsZzQkxtvz8N3QP71P2V1wPdyp1oeW/424mZks="; }; nativeBuildInputs = [ From b421e2a0a3998939d9cdba2f791a253a2f10a570 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 16:04:48 +0000 Subject: [PATCH 64/66] home-assistant: 2023.2.3 -> 2023.2.4 https://github.com/home-assistant/core/releases/tag/2023.2.4 --- pkgs/servers/home-assistant/component-packages.nix | 2 +- pkgs/servers/home-assistant/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 8abe197bee7d..3a171c41725a 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2023.2.3"; + version = "2023.2.4"; components = { "3_day_blinds" = ps: with ps; [ ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 921a6dccbc1b..9811d52a8db9 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -270,7 +270,7 @@ let extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs); # Don't forget to run parse-requirements.py after updating - hassVersion = "2023.2.3"; + hassVersion = "2023.2.4"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -288,7 +288,7 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-cRdxlmlgkKTnrtqGQPbSpBLHf+vfI9T6sdETcGshN9M="; + hash = "sha256-Lt/t4S6To0MvdvmdKir7VytrNXPGhC7sMfjQmgox5XY="; }; nativeBuildInputs = with python3.pkgs; [ From 1069dbc604de80eccfdd2f19b3ecc7e6311b45bc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Feb 2023 17:13:20 +0100 Subject: [PATCH 65/66] python310Packages.raincloudy: Fix build Due to an improper update during a python-updates cycle this package broke. With version 1.2.0 there is now `raincloudy.aio`, which does not get installed on recent setuptools versions, due to a misconfigured packages configuration in setup.py. Also convert the build process to a PEP517 based build using setuptools and fix the distinfo version by adding setuptools-scm. Additionally `aiohttp` is an undeclared dependencym, for which a PR has already been submitted upstream. --- .../python-modules/raincloudy/default.nix | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/raincloudy/default.nix b/pkgs/development/python-modules/raincloudy/default.nix index da4a3846a95f..6a223bb4fb76 100644 --- a/pkgs/development/python-modules/raincloudy/default.nix +++ b/pkgs/development/python-modules/raincloudy/default.nix @@ -1,12 +1,18 @@ { lib +, aiohttp +, aioresponses , beautifulsoup4 , buildPythonPackage , fetchFromGitHub , html5lib +, pytest-asyncio +, pytest-aiohttp , pytestCheckHook , pythonOlder , requests , requests-mock +, setuptools +, setuptools-scm , urllib3 }: @@ -24,7 +30,25 @@ buildPythonPackage rec { hash = "sha256-qCkBVirM09iA1sXiOB9FJns8bHjQq7rRk8XbRWrtBDI="; }; + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + postPatch = '' + # https://github.com/vanstinator/raincloudy/pull/60 + substituteInPlace setup.py \ + --replace "bs4" "beautifulsoup4" \ + + # fix raincloudy.aio package discovery, by relying on + # autodiscovery instead. + sed -i '/packages=/d' setup.py + ''; + propagatedBuildInputs = [ + aiohttp requests beautifulsoup4 urllib3 @@ -32,19 +56,16 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytest-aiohttp pytestCheckHook requests-mock ]; - postPatch = '' - # https://github.com/vanstinator/raincloudy/pull/60 - substituteInPlace setup.py \ - --replace "bs4" "beautifulsoup4" \ - --replace "html5lib==1.0.1" "html5lib" - ''; - pythonImportsCheck = [ "raincloudy" + "raincloudy.aio" ]; disabledTests = [ From 032b2cf74af9098f60c23ca2154209d1782bb91b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Feb 2023 16:18:13 +0000 Subject: [PATCH 66/66] python3.pkgs.quantiphy: 2.18 -> 2.19 Adds Python 3.11 support. --- pkgs/development/python-modules/quantiphy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/quantiphy/default.nix b/pkgs/development/python-modules/quantiphy/default.nix index 38ff4bc434ff..b05a0428f976 100644 --- a/pkgs/development/python-modules/quantiphy/default.nix +++ b/pkgs/development/python-modules/quantiphy/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "quantiphy"; - version = "2.18"; + version = "2.19"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "KenKundert"; repo = "quantiphy"; rev = "v${version}"; - hash = "sha256-KXZQTal5EQDrMNV9QKeuLeYYDaMfAJlEDEagq2XG9/Q="; + hash = "sha256-oSWq/D1EX6mxUDElfujyOSEtql0csAm72u2B5RuQddE="; }; nativeBuildInputs = [