2020-08-12 19:20:32 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper
|
2016-03-08 17:26:14 +00:00
|
|
|
, dpkg, patchelf
|
2021-08-25 14:14:45 +01:00
|
|
|
, gtk3, glib, systemd
|
|
|
|
, xorg, nss, nspr
|
|
|
|
, atk, at-spi2-atk, dbus
|
|
|
|
, gdk-pixbuf, pango, cairo
|
|
|
|
, expat, libdrm, mesa
|
|
|
|
, alsa-lib, at-spi2-core, cups }:
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2016-03-08 17:26:14 +00:00
|
|
|
let
|
2021-08-25 14:14:45 +01: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
|
|
|
|
nss nspr atk at-spi2-atk dbus
|
|
|
|
gdk-pixbuf pango cairo
|
|
|
|
xorg.libXrandr expat libdrm
|
|
|
|
mesa alsa-lib at-spi2-core
|
|
|
|
cups
|
|
|
|
];
|
2016-03-08 17:26:14 +00:00
|
|
|
in
|
2016-02-21 18:34:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-25 14:14:45 +01:00
|
|
|
version = "4.0.1";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "staruml";
|
2016-02-21 18:34:30 +00:00
|
|
|
|
|
|
|
src =
|
2021-08-25 14:14:45 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://staruml.io/download/releases-v4/StarUML_${version}_amd64.deb";
|
|
|
|
sha256 = "0vxrs5y4a17bnc27fd2k2qc0vi81v677mi55znylwf3a41fjfcir";
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
|
|
|
|
2019-04-28 18:11:03 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper dpkg ];
|
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 = ''
|
|
|
|
mkdir $out
|
2021-08-25 14:14:45 +01:00
|
|
|
mv opt/StarUML $out/bin
|
2016-02-21 18:34:30 +00:00
|
|
|
|
|
|
|
mkdir -p $out/lib
|
2016-04-30 21:56:43 +01:00
|
|
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
2020-08-12 19:20:32 +01: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 14:14:45 +01:00
|
|
|
patchelf \
|
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
$out/bin/staruml
|
|
|
|
wrapProgram $out/bin/staruml \
|
|
|
|
--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 = "A sophisticated software modeler";
|
2020-11-27 00:29:13 +00:00
|
|
|
homepage = "https://staruml.io/";
|
2016-02-21 18:34:30 +00:00
|
|
|
license = licenses.unfree;
|
2021-08-25 14:14:45 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
|
|
|
}
|