2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-03 08:41:04 +00:00
|
|
|
, fetchurl
|
|
|
|
, autoPatchelfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, makeWrapper
|
|
|
|
, jdk
|
2020-12-03 08:41:04 +00:00
|
|
|
, libsecret
|
2023-03-24 00:07:29 +00:00
|
|
|
, webkitgtk
|
|
|
|
, wrapGAppsHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, _7zz
|
|
|
|
, nixosTests
|
2020-12-03 08:41:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "Archi";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "5.2.0";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = "https://www.archimatetool.com/downloads/archi_5.php?/${version}/Archi-Linux64-${version}.tgz";
|
|
|
|
hash = "sha256-uGW4Wl3E71ZCgWzPHkmXv/PluegDF8C64FUQ7C5/SDA=";
|
|
|
|
};
|
|
|
|
"x86_64-darwin" = fetchurl {
|
|
|
|
url = "https://www.archimatetool.com/downloads/archi_5.php?/${version}/Archi-Mac-${version}.dmg";
|
|
|
|
hash = "sha256-GI9aIAYwu60RdjN0Y3O94sVMzJR1+nX4txVcvqn1r58=";
|
|
|
|
};
|
|
|
|
"aarch64-darwin" = fetchurl {
|
|
|
|
url = "https://www.archimatetool.com/downloads/archi_5.php?/${version}/Archi-Mac-Silicon-${version}.dmg";
|
|
|
|
hash = "sha256-Jg+tl902OWSm4GHxF7QXbRU5nxX4/5q6LTGubHWQ08E=";
|
|
|
|
};
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system");
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libsecret
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
makeWrapper
|
2023-03-24 00:07:29 +00:00
|
|
|
wrapGAppsHook
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
_7zz
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
unpackPhase = if stdenv.hostPlatform.isDarwin then ''
|
|
|
|
7zz x $src
|
|
|
|
'' else null;
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
|
|
|
''
|
2021-02-05 17:12:51 +00:00
|
|
|
mkdir -p $out/bin $out/libexec
|
|
|
|
for f in configuration features p2 plugins Archi.ini; do
|
|
|
|
cp -r $f $out/libexec
|
2020-12-03 08:41:04 +00:00
|
|
|
done
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
install -D -m755 Archi $out/libexec/Archi
|
|
|
|
makeWrapper $out/libexec/Archi $out/bin/Archi \
|
2023-03-24 00:07:29 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ webkitgtk ])} \
|
2021-02-05 17:12:51 +00:00
|
|
|
--prefix PATH : ${jdk}/bin
|
2020-12-03 08:41:04 +00:00
|
|
|
''
|
|
|
|
else
|
|
|
|
''
|
|
|
|
mkdir -p "$out/Applications"
|
|
|
|
mv Archi.app "$out/Applications/"
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) archi; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-03 08:41:04 +00:00
|
|
|
description = "ArchiMate modelling toolkit";
|
|
|
|
longDescription = ''
|
|
|
|
Archi is an open source modelling toolkit to create ArchiMate
|
|
|
|
models and sketches.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.archimatetool.com/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-12-03 08:41:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ earldouglas paumr ];
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
}
|