From fdf8c7731c68d49207370f16e708e3e69ca2d8ee Mon Sep 17 00:00:00 2001 From: awwpotato Date: Sat, 29 Mar 2025 13:53:04 -0700 Subject: [PATCH] drip: unbreak, modernize --- pkgs/by-name/dr/drip/package.nix | 39 ++++++++++++++++++++++---------- pkgs/by-name/dr/drip/wait.patch | 11 +++++++++ 2 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 pkgs/by-name/dr/drip/wait.patch diff --git a/pkgs/by-name/dr/drip/package.nix b/pkgs/by-name/dr/drip/package.nix index 9e7de6a3bb0f..6a920447f21b 100644 --- a/pkgs/by-name/dr/drip/package.nix +++ b/pkgs/by-name/dr/drip/package.nix @@ -2,26 +2,31 @@ lib, stdenv, fetchFromGitHub, - jdk8, - which, makeWrapper, + jdk8, + coreutils, + which, + gnumake, + versionCheckHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "drip"; version = "0.2.4"; src = fetchFromGitHub { repo = "drip"; owner = "ninjudd"; - rev = version; - sha256 = "1zl62wdwfak6z725asq5lcqb506la1aavj7ag78lvp155wyh8aq1"; + tag = finalAttrs.version; + hash = "sha256-ASsEPS8l3E3ReerIrVRQ1ICyMKMFa1XE+WYqxxsXhv4="; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ jdk8 ]; + patches = [ ./wait.patch ]; + postPatch = '' patchShebangs . ''; @@ -31,16 +36,26 @@ stdenv.mkDerivation rec { mkdir $out cp ./* $out -r wrapProgram $out/bin/drip \ - --prefix PATH : "${which}/bin" - $out/bin/drip version + --prefix PATH : ${ + lib.makeBinPath [ + coreutils + which + gnumake + jdk8 + ] + } runHook postInstall ''; - meta = with lib; { + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "version"; + + meta = { description = "Launcher for the Java Virtual Machine intended to be a drop-in replacement for the java command, only faster"; - license = licenses.epl10; + license = lib.licenses.epl10; homepage = "https://github.com/ninjudd/drip"; - platforms = platforms.linux; - maintainers = [ maintainers.rybern ]; + platforms = lib.platforms.linux; + maintainers = [ lib.maintainers.rybern ]; }; -} +}) diff --git a/pkgs/by-name/dr/drip/wait.patch b/pkgs/by-name/dr/drip/wait.patch new file mode 100644 index 000000000000..d4befa9e988d --- /dev/null +++ b/pkgs/by-name/dr/drip/wait.patch @@ -0,0 +1,11 @@ +diff --git a/src/drip_daemon.c b/src/drip_daemon.c +index cbfd4d9..79fdaf4 100644 +--- a/src/drip_daemon.c ++++ b/src/drip_daemon.c +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + static char* jvm_dir;