2022-02-28 21:51:29 +00:00
|
|
|
{ stdenv, lib, fetchurl
|
2024-04-26 20:24:03 +00:00
|
|
|
, dpkg, wrapGAppsHook3
|
2022-02-28 21:51:29 +00:00
|
|
|
, hicolor-icon-theme
|
2021-08-25 13:14:45 +00:00
|
|
|
, gtk3, glib, systemd
|
|
|
|
, xorg, nss, nspr
|
|
|
|
, atk, at-spi2-atk, dbus
|
|
|
|
, gdk-pixbuf, pango, cairo
|
|
|
|
, expat, libdrm, mesa
|
2023-08-04 10:53:01 +00:00
|
|
|
, alsa-lib, at-spi2-core, cups
|
|
|
|
, libxkbcommon }:
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2016-03-08 17:26:14 +00:00
|
|
|
let
|
2021-08-25 13:14:45 +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-04 10:53:01 +00:00
|
|
|
xorg.libxshmfence libxkbcommon nss
|
|
|
|
nspr atk at-spi2-atk
|
|
|
|
dbus gdk-pixbuf pango cairo
|
2021-08-25 13:14:45 +00:00
|
|
|
xorg.libXrandr expat libdrm
|
|
|
|
mesa alsa-lib at-spi2-core
|
|
|
|
cups
|
|
|
|
];
|
2016-03-08 17:26:14 +00:00
|
|
|
in
|
2023-09-18 20:51:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-07-27 09:52:16 +00:00
|
|
|
version = "6.2.2";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "staruml";
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2023-09-18 20:51:29 +00:00
|
|
|
src = fetchurl {
|
2023-09-18 20:51:59 +00:00
|
|
|
url = "https://files.staruml.io/releases-v6/StarUML_${finalAttrs.version}_amd64.deb";
|
2024-07-27 09:52:16 +00:00
|
|
|
sha256 = "sha256-1zxrT7phXeQYNbWHWMyPuHiUglrPSMPP0bfAcfvt8dM=";
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
|
|
|
|
2024-04-26 20:24:03 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 dpkg ];
|
2023-08-04 11:00:49 +00:00
|
|
|
buildInputs = [ glib hicolor-icon-theme ];
|
2016-03-08 17:26:14 +00:00
|
|
|
|
2016-02-21 18:34:30 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir pkg
|
|
|
|
dpkg-deb -x $src pkg
|
|
|
|
sourceRoot=pkg
|
|
|
|
'';
|
2016-03-08 17:26:14 +00:00
|
|
|
|
2016-02-21 18:34:30 +00:00
|
|
|
installPhase = ''
|
2022-02-28 21:51:29 +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"
|
2016-02-21 18:34:30 +00:00
|
|
|
|
|
|
|
mkdir -p $out/lib
|
2016-04-30 20:56:43 +00:00
|
|
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
2020-08-12 18:20:32 +00:00
|
|
|
ln -s ${lib.getLib systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2021-08-25 13:14:45 +00:00
|
|
|
patchelf \
|
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2022-02-28 21:51:29 +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}
|
|
|
|
)
|
2016-02-21 18:34:30 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-02-21 18:34:30 +00:00
|
|
|
description = "Sophisticated software modeler";
|
2020-11-27 00:29:13 +00:00
|
|
|
homepage = "https://staruml.io/";
|
2022-06-11 11:39:29 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2016-02-21 18:34:30 +00:00
|
|
|
license = licenses.unfree;
|
2023-09-11 03:26:38 +00:00
|
|
|
maintainers = with maintainers; [ kashw2 ];
|
2021-08-25 13:14:45 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "staruml";
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
2023-09-18 20:51:59 +00:00
|
|
|
})
|