2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, dpkg, patchelf
|
2021-06-28 23:13:55 +00:00
|
|
|
, gtk2, glib, gdk-pixbuf, alsa-lib, nss, nspr, GConf, cups, libgcrypt, dbus, systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
, libXdamage, expat }:
|
|
|
|
|
|
|
|
let
|
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath
|
2021-06-28 23:13:55 +00:00
|
|
|
[ glib gtk2 gdk-pixbuf alsa-lib nss nspr GConf cups libgcrypt dbus libXdamage expat ];
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2.8.1";
|
|
|
|
pname = "staruml";
|
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v${version}-32-bit.deb";
|
|
|
|
sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
|
|
|
|
} else fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v${version}-64-bit.deb";
|
|
|
|
sha256 = "05gzrnlssjkhyh0wv019d4r7p40lxnsa1sghazll6f233yrqmxb0";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper dpkg ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir pkg
|
|
|
|
dpkg-deb -x $src pkg
|
|
|
|
sourceRoot=pkg
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv opt/staruml $out/bin
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
for binary in StarUML Brackets-node; do
|
|
|
|
${patchelf}/bin/patchelf \
|
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
$out/bin/$binary
|
|
|
|
wrapProgram $out/bin/$binary \
|
|
|
|
--prefix LD_LIBRARY_PATH : $out/lib:${LD_LIBRARY_PATH}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A sophisticated software modeler";
|
2020-11-30 08:33:03 +00:00
|
|
|
homepage = "https://staruml.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|