2021-06-10 03:57:09 +01:00
|
|
|
{ stdenv, lib, fetchurl, zlib, glib, alsa-lib, makeDesktopItem
|
2019-05-22 12:03:39 +01:00
|
|
|
, dbus, gtk2, atk, pango, freetype, fontconfig, libgnome-keyring3, gdk-pixbuf
|
2021-09-04 21:05:03 +01:00
|
|
|
, cairo, cups, expat, libgpg-error, nspr, gnome2, nss, xorg, systemd, libnotify
|
2014-07-16 22:10:08 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-01-15 13:21:58 +00:00
|
|
|
libPath = lib.makeLibraryPath [
|
2018-02-25 02:23:58 +00:00
|
|
|
stdenv.cc.cc zlib glib dbus gtk2 atk pango freetype libgnome-keyring3 nss
|
2021-09-04 21:05:03 +01:00
|
|
|
fontconfig gdk-pixbuf cairo cups expat libgpg-error alsa-lib nspr gnome2.GConf
|
2015-09-15 10:26:18 +01:00
|
|
|
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
2016-01-15 08:51:46 +00:00
|
|
|
xorg.libXcomposite xorg.libXi xorg.libXfixes libnotify xorg.libXrandr
|
|
|
|
xorg.libXcursor
|
|
|
|
];
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "LightTable";
|
|
|
|
exec = "light";
|
|
|
|
comment = "LightTable";
|
|
|
|
desktopName = "LightTable";
|
|
|
|
genericName = "the next generation code editor";
|
|
|
|
};
|
2014-07-16 22:10:08 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lighttable";
|
2016-01-15 08:51:46 +00:00
|
|
|
version = "0.8.1";
|
2014-07-16 22:10:08 +01:00
|
|
|
|
2016-01-15 08:51:46 +00:00
|
|
|
src =
|
2014-07-16 22:10:08 +01:00
|
|
|
fetchurl {
|
|
|
|
name = "LightTableLinux64.tar.gz";
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://github.com/LightTable/LightTable/releases/download/${version}/${pname}-${version}-linux.tar.gz";
|
2016-01-15 08:51:46 +00:00
|
|
|
sha256 = "06fj725xfhf3fwrf7dya7ijmxq3v76kfmd4lr2067a92zhlwr5pv";
|
2014-07-16 22:10:08 +01:00
|
|
|
};
|
|
|
|
|
2021-07-14 15:08:53 +01:00
|
|
|
dontConfigure = true;
|
2014-07-16 22:10:08 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-01-15 08:51:46 +00:00
|
|
|
tar xf ${src}
|
|
|
|
mkdir -p $out/{bin,share/LightTable}
|
2019-08-15 13:41:18 +01:00
|
|
|
mv ./${pname}-${version}-linux/* $out/share/LightTable
|
2014-07-16 22:10:08 +01:00
|
|
|
|
|
|
|
patchelf \
|
2014-12-17 18:11:30 +00:00
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2016-01-15 08:51:46 +00:00
|
|
|
--set-rpath ${libPath}:${libPath}/lib64:$out/share/LightTable \
|
|
|
|
$out/share/LightTable/LightTable
|
|
|
|
|
|
|
|
mv $out/share/LightTable/light $out/bin/light
|
2014-07-16 22:10:08 +01:00
|
|
|
|
2020-08-12 19:10:30 +01:00
|
|
|
ln -sf ${lib.getLib systemd}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0
|
2016-01-15 08:51:46 +00:00
|
|
|
substituteInPlace $out/bin/light \
|
2020-08-12 19:10:30 +01:00
|
|
|
--replace "/usr/lib/x86_64-linux-gnu" "${lib.getLib systemd}/lib" \
|
2016-01-15 08:51:46 +00:00
|
|
|
--replace "/lib/x86_64-linux-gnu" "$out/share/LightTable" \
|
|
|
|
--replace 'HERE=`dirname $(readlink -f $0)`' "HERE=$out/share/LightTable"
|
2014-07-16 22:10:08 +01:00
|
|
|
|
2016-01-15 08:51:46 +00:00
|
|
|
mkdir -p "$out"/share/applications
|
|
|
|
cp "${desktopItem}/share/applications/LightTable.desktop" "$out"/share/applications/
|
2014-07-16 22:10:08 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "The next generation code editor";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.lighttable.com/";
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.gpl3;
|
2016-01-15 08:51:46 +00:00
|
|
|
maintainers = [ maintainers.matejc ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2014-07-16 22:10:08 +01:00
|
|
|
};
|
|
|
|
}
|