From 9ebbf272a7c58e2afb2769f8afcd341e83702d03 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Fri, 6 Jun 2025 16:51:40 +0900 Subject: [PATCH] artichoke: init at 0-unstable-2025-06-01 --- pkgs/by-name/ar/artichoke/package.nix | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/ar/artichoke/package.nix diff --git a/pkgs/by-name/ar/artichoke/package.nix b/pkgs/by-name/ar/artichoke/package.nix new file mode 100644 index 000000000000..f3d93d31a96a --- /dev/null +++ b/pkgs/by-name/ar/artichoke/package.nix @@ -0,0 +1,58 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + llvmPackages, + _experimental-update-script-combinators, + unstableGitUpdater, + nix-update-script, +}: + +rustPlatform.buildRustPackage { + pname = "artichoke"; + version = "0-unstable-2025-06-01"; + + src = fetchFromGitHub { + owner = "artichoke"; + repo = "artichoke"; + rev = "7c35392d8c7622cd8ab8eccaee73d57633b2b901"; + hash = "sha256-7YPExT+5F+5MMk/yLfG4Rk8ZDwsYfVKlkvIroFB22No="; + }; + + cargoHash = "sha256-cN70yYYKhktUoswow63ZXHvfFbXDo1rUrTWm22LluCM="; + + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + stdout="$("$out/bin/artichoke" -e 'puts "Hello World!"')" + [[ "$stdout" == 'Hello World!' ]] + + runHook postInstallCheck + ''; + + passthru = { + updateScript = _experimental-update-script-combinators.sequence [ + (unstableGitUpdater { }) + (nix-update-script { + # Updating `cargoHash` + extraArgs = [ "--version=skip" ]; + }) + ]; + }; + + meta = { + description = "Ruby implementation written in Rust and Ruby"; + homepage = "https://www.artichokeruby.org/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + kachick + ]; + mainProgram = "artichoke"; + platforms = with lib.platforms; unix ++ windows; + }; +}