Unverified Commit d563d987 authored by Felix Bargfeldt's avatar Felix Bargfeldt Committed by GitHub
Browse files

drip: unbreak, modernize (#394431)

parents 0d7d18dd 97607ae7
Loading
Loading
Loading
Loading
+29 −11
Original line number Diff line number Diff line
@@ -2,26 +2,31 @@
  lib,
  stdenv,
  fetchFromGitHub,
  makeWrapper,
  jdk8,
  coreutils,
  which,
  makeWrapper,
  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,29 @@ 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 = with lib.maintainers; [
      rybern
      awwpotato
    ];
  };
}
})
+11 −0
Original line number Diff line number Diff line
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 <stdio.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <sys/wait.h>

 static char* jvm_dir;