Merge pull request #99367 from Mic92/apache-directory-studio

apache-directory-studio: 2.0.0-M14 -> 2.0.0-M15
This commit is contained in:
Martin Weinelt 2020-10-04 05:44:52 +02:00 committed by GitHub
commit 4751529844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,6 @@
{ stdenv, fetchurl, xorg, jre, makeWrapper, makeDesktopItem }:
{ stdenv, fetchurl, jdk14, makeWrapper, autoPatchelfHook, makeDesktopItem, glib, libsecret }:
let
rpath = stdenv.lib.makeLibraryPath (with xorg; [
libXtst
]);
desktopItem = makeDesktopItem {
name = "apache-directory-studio";
exec = "ApacheDirectoryStudio";
@ -14,8 +10,8 @@ let
genericName = "Apache Directory Studio";
categories = "Java;Network";
};
version = "2.0.0-M14";
versionWithDate = "2.0.0.v20180908-M14";
version = "2.0.0-M15";
versionWithDate = "2.0.0.v20200411-M15";
in
stdenv.mkDerivation rec {
pname = "apache-directory-studio";
@ -25,16 +21,12 @@ stdenv.mkDerivation rec {
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${versionWithDate}/ApacheDirectoryStudio-${versionWithDate}-linux.gtk.x86_64.tar.gz";
sha256 = "0kq4l3755q69p7bry9xpm5xxw56ksncp76fdqqd1xzbvsg309bps";
}
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${versionWithDate}/ApacheDirectoryStudio-${versionWithDate}-linux.gtk.x86.tar.gz";
sha256 = "038dy8jjgq5gj5r56y9ps3ycqi9gn57i4q1r3mmjx1b1950wmh1q";
sha256 = "1rkyb0qcsl9hk2qcwp5mwaab69q3sn77v5xyn9mbvi5wg9icbc37";
}
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];
buildInputs = [ glib libsecret ];
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
installPhase = ''
dest="$out/libexec/ApacheDirectoryStudio"
@ -44,10 +36,10 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$dest/ApacheDirectoryStudio"
makeWrapper "$dest/ApacheDirectoryStudio" \
"$out/bin/ApacheDirectoryStudio" \
--prefix PATH : "${jre}/bin" \
--prefix LD_LIBRARY_PATH : "${rpath}"
--prefix PATH : "${jdk14}/bin"
install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
'';