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

tunnelx: minor refactor and cleanup
This commit is contained in:
Pol Dellaiera
2023-07-16 15:00:15 +02:00
committed by GitHub
2 changed files with 19 additions and 14 deletions
+15 -12
View File
@@ -19,34 +19,37 @@ stdenv.mkDerivation (finalAttrs: {
};
nativeBuildInputs = [
jdk
makeWrapper
];
buildInputs = [
jdk
];
runtimeInputs = [
survex
];
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
View File
@@ -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
];