2022-03-05 16:20:37 +00:00
|
|
|
{ stdenv, lib, fetchurl
|
2024-05-15 15:35:15 +00:00
|
|
|
, dpkg, wrapGAppsHook3
|
2022-03-05 16:20:37 +00:00
|
|
|
, hicolor-icon-theme
|
2021-08-27 14:25:00 +00:00
|
|
|
, gtk3, glib, systemd
|
|
|
|
, xorg, nss, nspr
|
|
|
|
, atk, at-spi2-atk, dbus
|
|
|
|
, gdk-pixbuf, pango, cairo
|
|
|
|
, expat, libdrm, mesa
|
2023-08-22 20:05:09 +00:00
|
|
|
, alsa-lib, at-spi2-core, cups
|
|
|
|
, libxkbcommon }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-08-27 14:25:00 +00:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath [
|
|
|
|
glib gtk3 xorg.libXdamage
|
|
|
|
xorg.libX11 xorg.libxcb xorg.libXcomposite
|
|
|
|
xorg.libXcursor xorg.libXext xorg.libXfixes
|
|
|
|
xorg.libXi xorg.libXrender xorg.libXtst
|
2023-08-22 20:05:09 +00:00
|
|
|
xorg.libxshmfence libxkbcommon nss
|
|
|
|
nspr atk at-spi2-atk
|
|
|
|
dbus gdk-pixbuf pango cairo
|
2021-08-27 14:25:00 +00:00
|
|
|
xorg.libXrandr expat libdrm
|
|
|
|
mesa alsa-lib at-spi2-core
|
|
|
|
cups
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "6.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "staruml";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://files.staruml.io/releases-v6/StarUML_${finalAttrs.version}_amd64.deb";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-azfh27klczMK8m5jeVmJFkwJgN/qh6lzMUyYqkBNca8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 dpkg ];
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [ glib hicolor-icon-theme ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir pkg
|
|
|
|
dpkg-deb -x $src pkg
|
|
|
|
sourceRoot=pkg
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mv opt $out
|
|
|
|
|
|
|
|
mv usr/share $out
|
|
|
|
rm -rf $out/share/doc
|
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/staruml.desktop \
|
|
|
|
--replace "/opt/StarUML/staruml" "$out/bin/staruml"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mkdir -p $out/lib
|
|
|
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
2020-09-25 04:45:31 +00:00
|
|
|
ln -s ${lib.getLib systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
patchelf \
|
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2022-03-05 16:20:37 +00:00
|
|
|
$out/opt/StarUML/staruml
|
|
|
|
|
|
|
|
ln -s $out/opt/StarUML/staruml $out/bin/staruml
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix LD_LIBRARY_PATH ':' $out/lib:${LD_LIBRARY_PATH}
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Sophisticated software modeler";
|
2020-11-30 08:33:03 +00:00
|
|
|
homepage = "https://staruml.io/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ kashw2 ];
|
2021-08-27 14:25:00 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "staruml";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|