2020-08-12 18:20:32 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper
|
2016-03-08 17:26:14 +00:00
|
|
|
, dpkg, patchelf
|
2019-05-22 11:03:39 +00:00
|
|
|
, gtk2, glib, gdk-pixbuf, alsaLib, nss, nspr, GConf, cups, libgcrypt, dbus, systemd
|
2019-04-28 11:59:51 +00:00
|
|
|
, libXdamage, expat }:
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2016-03-08 17:26:14 +00:00
|
|
|
let
|
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath
|
2019-05-22 11:03:39 +00:00
|
|
|
[ glib gtk2 gdk-pixbuf alsaLib nss nspr GConf cups libgcrypt dbus libXdamage expat ];
|
2016-03-08 17:26:14 +00:00
|
|
|
in
|
2016-02-21 18:34:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-05-15 12:56:43 +00:00
|
|
|
version = "2.8.1";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "staruml";
|
2016-02-21 18:34:30 +00:00
|
|
|
|
|
|
|
src =
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
|
2018-10-15 08:22:54 +00:00
|
|
|
url = "https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v${version}-32-bit.deb";
|
2018-05-15 12:56:43 +00:00
|
|
|
sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
|
2016-02-21 18:34:30 +00:00
|
|
|
} else fetchurl {
|
2018-10-15 08:22:54 +00:00
|
|
|
url = "https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v${version}-64-bit.deb";
|
2018-05-15 12:56:43 +00:00
|
|
|
sha256 = "05gzrnlssjkhyh0wv019d4r7p40lxnsa1sghazll6f233yrqmxb0";
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
|
|
|
|
2019-04-28 17:11:03 +00: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
|
|
|
|
mv opt/staruml $out/bin
|
|
|
|
|
|
|
|
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
|
|
|
|
2018-05-15 12:57:18 +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
|
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;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|