2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, jdk, makeWrapper, autoPatchelfHook, makeDesktopItem, glib, libsecret }:
|
2017-12-19 15:46:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "apache-directory-studio";
|
2021-07-24 23:04:08 +01:00
|
|
|
version = "2.0.0-M17";
|
|
|
|
versionWithDate = "2.0.0.v20210717-M17";
|
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";
|
2021-07-24 23:04:08 +01:00
|
|
|
sha256 = "19zdspzv4n3mfgb1g45s3wh0vbvn6a9zjd4xi5x2afmdjkzlwxi4";
|
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
|
|
|
|
2021-07-12 11:51:53 +01: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
|
|
|
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-10-01 14:36:31 +01:00
|
|
|
--prefix PATH : "${jdk}/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
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-12-19 15:46:01 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|