2020-05-21 13:45:44 +01:00
|
|
|
{ stdenv, fetchurl, jdk14, makeWrapper, autoPatchelfHook, makeDesktopItem, glib, libsecret }:
|
2017-12-19 15:46:01 +00:00
|
|
|
|
|
|
|
let
|
2018-01-15 13:53:49 +00:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "apache-directory-studio";
|
|
|
|
exec = "ApacheDirectoryStudio";
|
|
|
|
icon = "apache-directory-studio";
|
|
|
|
comment = "Eclipse-based LDAP browser and directory client";
|
|
|
|
desktopName = "Apache Directory Studio";
|
|
|
|
genericName = "Apache Directory Studio";
|
|
|
|
categories = "Java;Network";
|
|
|
|
};
|
2020-05-21 13:45:44 +01:00
|
|
|
version = "2.0.0-M15";
|
|
|
|
versionWithDate = "2.0.0.v20200411-M15";
|
2017-12-19 15:46:01 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "apache-directory-studio";
|
2019-11-06 18:48:14 +00:00
|
|
|
inherit version;
|
2017-12-19 15:46:01 +00:00
|
|
|
|
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-12-19 15:46:01 +00:00
|
|
|
fetchurl {
|
2019-11-06 18:48:14 +00:00
|
|
|
url = "mirror://apache/directory/studio/${versionWithDate}/ApacheDirectoryStudio-${versionWithDate}-linux.gtk.x86_64.tar.gz";
|
2020-05-21 13:45:44 +01:00
|
|
|
sha256 = "1rkyb0qcsl9hk2qcwp5mwaab69q3sn77v5xyn9mbvi5wg9icbc37";
|
2017-12-19 15:46:01 +00:00
|
|
|
}
|
2018-08-20 20:11:29 +01:00
|
|
|
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
2017-12-19 15:46:01 +00:00
|
|
|
|
2020-05-21 13:45:44 +01:00
|
|
|
buildInputs = [ glib libsecret ];
|
|
|
|
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
|
2017-12-19 15:46:01 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
dest="$out/libexec/ApacheDirectoryStudio"
|
|
|
|
mkdir -p "$dest"
|
|
|
|
cp -r . "$dest"
|
|
|
|
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
"$dest/ApacheDirectoryStudio"
|
2020-05-21 13:45:44 +01:00
|
|
|
|
2017-12-19 15:46:01 +00:00
|
|
|
makeWrapper "$dest/ApacheDirectoryStudio" \
|
|
|
|
"$out/bin/ApacheDirectoryStudio" \
|
2020-05-21 13:45:44 +01:00
|
|
|
--prefix PATH : "${jdk14}/bin"
|
2018-01-15 13:53:49 +00:00
|
|
|
install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
|
|
|
|
install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
|
2017-12-19 15:46:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Eclipse-based LDAP browser and directory client";
|
|
|
|
homepage = "https://directory.apache.org/studio/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
# Upstream supports macOS and Windows too.
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|