nixpkgs/pkgs/tools/misc/staruml/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
2.0 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl
, dpkg, wrapGAppsHook3
, hicolor-icon-theme
, 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
let
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
xorg.libXrandr expat libdrm
mesa alsa-lib at-spi2-core
cups
];
in
2023-09-18 20:51:59 +00:00
stdenv.mkDerivation (finalAttrs: {
2024-07-27 09:52:16 +00:00
version = "6.2.2";
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
};
nativeBuildInputs = [ wrapGAppsHook3 dpkg ];
buildInputs = [ glib hicolor-icon-theme ];
2016-02-21 18:34:30 +00:00
unpackPhase = ''
mkdir pkg
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
2016-02-21 18:34:30 +00:00
installPhase = ''
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/
ln -s ${lib.getLib systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
2016-02-21 18:34:30 +00:00
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$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
'';
meta = with lib; {
2016-02-21 18:34:30 +00:00
description = "Sophisticated software modeler";
homepage = "https://staruml.io/";
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 ];
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
})