2016-03-08 17:26:14 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, dpkg, patchelf
|
2018-05-15 13:57:18 +01:00
|
|
|
, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, GConf, cups, libgcrypt, dbus, systemd
|
|
|
|
, libXdamage }:
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2016-03-08 17:26:14 +00:00
|
|
|
let
|
|
|
|
inherit (stdenv) lib;
|
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath
|
2018-05-15 13:57:18 +01:00
|
|
|
[ glib gtk2 gdk_pixbuf alsaLib nss nspr GConf cups libgcrypt dbus libXdamage ];
|
2016-03-08 17:26:14 +00:00
|
|
|
in
|
2016-02-21 18:34:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-05-15 13:56:43 +01:00
|
|
|
version = "2.8.1";
|
2016-02-21 18:34:30 +00:00
|
|
|
name = "staruml-${version}";
|
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.system == "i686-linux" then fetchurl {
|
|
|
|
url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
|
2018-05-15 13:56:43 +01:00
|
|
|
sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
|
2016-02-21 18:34:30 +00:00
|
|
|
} else fetchurl {
|
|
|
|
url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-64-bit.deb";
|
2018-05-15 13:56:43 +01:00
|
|
|
sha256 = "05gzrnlssjkhyh0wv019d4r7p40lxnsa1sghazll6f233yrqmxb0";
|
2016-02-21 18:34:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ dpkg ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
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 21:56:43 +01:00
|
|
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
2016-09-05 17:59:00 +01:00
|
|
|
ln -s ${systemd.lib}/lib/libudev.so.1 $out/lib/libudev.so.0
|
2016-02-21 18:34:30 +00:00
|
|
|
|
2018-05-15 13:57:18 +01: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
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A sophisticated software modeler";
|
|
|
|
homepage = http://staruml.io/;
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|