2014-07-16 22:10:08 +01:00
|
|
|
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
|
|
|
|
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
|
2015-10-03 19:52:03 +01:00
|
|
|
, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, libudev
|
2014-07-16 22:10:08 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
2015-01-15 04:25:26 +00:00
|
|
|
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
|
2014-07-16 22:10:08 +01:00
|
|
|
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf
|
2015-09-15 10:26:18 +01:00
|
|
|
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
|
|
|
xorg.libXcomposite xorg.libXi xorg.libXfixes
|
2014-07-16 22:10:08 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-03-14 18:33:05 +00:00
|
|
|
name = "lighttable-${version}";
|
2015-02-28 12:25:33 +00:00
|
|
|
version = "0.7.2";
|
2014-07-16 22:10:08 +01:00
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.system == "i686-linux" then
|
|
|
|
fetchurl {
|
|
|
|
name = "LightTableLinux.tar.gz";
|
2015-02-28 12:25:33 +00:00
|
|
|
url = "https://d35ac8ww5dfjyg.cloudfront.net/playground/bins/${version}/LightTableLinux.tar.gz";
|
|
|
|
sha256 = "1q5m50r319xn9drfv3cyfja87b7dfhni9d9gmz9733idq3l5fl9i";
|
2014-07-16 22:10:08 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
|
|
|
name = "LightTableLinux64.tar.gz";
|
2015-02-28 12:25:33 +00:00
|
|
|
url = "https://d35ac8ww5dfjyg.cloudfront.net/playground/bins/${version}/LightTableLinux64.tar.gz";
|
|
|
|
sha256 = "1jnn103v5qrplkb5ik9p8whfqclcq2r1qv666hp3jaiwb46vhf3c";
|
2014-07-16 22:10:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
tar xvf ${src}
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv LightTable $out/
|
|
|
|
|
|
|
|
patchelf \
|
2014-12-17 18:11:30 +00:00
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2015-01-15 04:25:26 +00:00
|
|
|
--set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
|
2014-07-16 22:10:08 +01:00
|
|
|
$out/LightTable/ltbin
|
|
|
|
|
2015-10-03 19:52:03 +01:00
|
|
|
ln -sf ${libudev.out}/lib/libudev.so.1 $out/LightTable/libudev.so.0
|
2014-07-16 22:10:08 +01:00
|
|
|
|
|
|
|
makeWrapper $out/LightTable/ltbin $out/bin/lighttable \
|
|
|
|
--prefix "LD_LIBRARY_PATH" : $out/LightTable
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "the next generation code editor";
|
|
|
|
homepage = http://www.lighttable.com/;
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.gpl3;
|
2014-07-16 22:10:08 +01:00
|
|
|
};
|
|
|
|
}
|