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
|
2024-10-23 06:41:50 +00:00
|
|
|
, glib
|
2024-10-11 05:15:48 +00:00
|
|
|
, webkitgtk_4_0
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-11-16 04:20:00 +00:00
|
|
|
, _7zz
|
|
|
|
, nixosTests
|
2020-12-03 08:41:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "Archi";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "5.3.0";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
2024-05-15 15:35:15 +00:00
|
|
|
url = "https://www.archimatetool.com/downloads/archi/${version}/Archi-Linux64-${version}.tgz";
|
|
|
|
hash = "sha256-ngO3YFCChsnefxdxtR00Dy736K2GYnTEYI4vKWLnPsw=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
"x86_64-darwin" = fetchurl {
|
2024-05-15 15:35:15 +00:00
|
|
|
url = "https://www.archimatetool.com/downloads/archi/${version}/Archi-Mac-${version}.dmg";
|
|
|
|
hash = "sha256-dL1c7IrbDMY/WbijQh1dCmCrRQQhj4fjGN+6m19OjO0=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
"aarch64-darwin" = fetchurl {
|
2024-05-15 15:35:15 +00:00
|
|
|
url = "https://www.archimatetool.com/downloads/archi/${version}/Archi-Mac-Silicon-${version}.dmg";
|
|
|
|
hash = "sha256-iczIUm1LCAjYKOyHXbFCgb+zoUxxATSOVkB8Ldk7pxQ=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libsecret
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
makeWrapper
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
_7zz
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
sourceRoot = if stdenv.hostPlatform.isDarwin then "." 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 \
|
2024-10-23 06:41:50 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib webkitgtk_4_0 ])} \
|
2024-05-15 15:35:15 +00:00
|
|
|
--set WEBKIT_DISABLE_DMABUF_RENDERER 1 \
|
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/"
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "Archi";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
}
|