Unverified Commit 0ccfe603 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #243521 from NixOS/tunnelx/update-buildinputs

tunnelx: minor refactor and cleanup
parents c2c289f3 3ecdb1d3
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -19,34 +19,37 @@ stdenv.mkDerivation (finalAttrs: {
  };

  nativeBuildInputs = [
    makeWrapper
  ];

  buildInputs = [
    jdk
  ];

  runtimeInputs = [
    survex
    makeWrapper
  ];

  buildPhase = ''
    runHook preBuild

    javac -d . src/*.java

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin $out/java
    cp -r symbols Tunnel tutorials $out/java
    # `SURVEX_EXECUTABLE_DIR` must include trailing slash
    makeWrapper ${jre}/bin/java $out/bin/tunnelx \
      --add-flags "-cp $out/java Tunnel.MainBox" \
      --set SURVEX_EXECUTABLE_DIR ${survex}/bin/ \
      --set SURVEX_EXECUTABLE_DIR ${lib.getBin survex}/bin/ \
      --set TUNNEL_USER_DIR $out/java/

    runHook postInstall
  '';

  meta = with lib; {
  meta = {
    description = "A program for drawing cave surveys in 2D";
    homepage = "https://github.com/CaveSurveying/tunnelx/";
    license = licenses.gpl3;
    maintainers = with maintainers; [ goatchurchprime ];
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [ goatchurchprime ];
    platforms = lib.platforms.linux;
  };
})
+4 −2
Original line number Diff line number Diff line
@@ -45,14 +45,16 @@ stdenv.mkDerivation rec {
  buildInputs = [
    ffmpeg
    glib
    libGLU
    mesa
    proj
    wxGTK32
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    Carbon
    Cocoa
  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    # TODO: libGLU doesn't build for macOS because of Mesa issues
    # (#233265); is it required for anything?
    libGLU
    mesa
    libICE
    libX11
  ];