2019-05-22 11:03:39 +00:00
|
|
|
{ stdenv, fetchurl, gtk2, glib, gdk-pixbuf, alsaLib, nss, nspr, gconf
|
2019-04-09 01:28:50 +00:00
|
|
|
, cups, libgcrypt_1_5, systemd, dbus, libXdamage, expat }:
|
2017-04-16 21:35:40 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2015-11-01 21:23:11 +00:00
|
|
|
let
|
2017-04-16 21:35:40 +00:00
|
|
|
bracketsLibs = makeLibraryPath [
|
2019-05-22 11:03:39 +00:00
|
|
|
gtk2 glib gdk-pixbuf stdenv.cc.cc.lib alsaLib nss nspr gconf cups libgcrypt_1_5 dbus systemd libXdamage expat
|
2017-04-16 21:35:40 +00:00
|
|
|
];
|
2015-11-01 21:23:11 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "brackets-${version}";
|
2017-04-16 21:35:40 +00:00
|
|
|
version = "1.9";
|
2015-11-01 21:23:11 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
|
2017-04-16 21:35:40 +00:00
|
|
|
sha256 = "0c4l2rr0853xd21kw8hhxlmrx8mqwb7iqa2k24zvwyjp4nnwkgbp";
|
2015-11-01 21:23:11 +00:00
|
|
|
name = "${name}.deb";
|
|
|
|
};
|
|
|
|
|
2016-10-21 23:42:57 +00:00
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
2015-11-01 21:23:11 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
ar p $src data.tar.xz | tar -C $out -xJ
|
|
|
|
|
|
|
|
mv $out/usr/* $out/
|
|
|
|
rmdir $out/usr
|
|
|
|
ln -sf $out/opt/brackets/brackets $out/bin/brackets
|
|
|
|
|
2016-09-05 16:59:00 +00:00
|
|
|
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0
|
2015-11-01 21:23:11 +00:00
|
|
|
|
2017-04-16 21:35:40 +00:00
|
|
|
substituteInPlace $out/opt/brackets/brackets.desktop \
|
|
|
|
--replace "Exec=/opt/brackets/brackets" "Exec=brackets"
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s $out/opt/brackets/brackets.desktop $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2015-11-01 21:23:11 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2017-04-16 21:35:40 +00:00
|
|
|
--set-rpath "${bracketsLibs}:$out/opt/brackets/lib" \
|
2015-11-01 21:23:11 +00:00
|
|
|
$out/opt/brackets/Brackets
|
|
|
|
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2017-04-16 21:35:40 +00:00
|
|
|
--set-rpath "${bracketsLibs}" \
|
2015-11-01 21:23:11 +00:00
|
|
|
$out/opt/brackets/Brackets-node
|
|
|
|
|
2017-04-16 21:35:40 +00:00
|
|
|
patchelf --set-rpath "${bracketsLibs}" \
|
2015-11-01 21:23:11 +00:00
|
|
|
$out/opt/brackets/lib/libcef.so
|
|
|
|
'';
|
|
|
|
|
2017-04-16 21:35:40 +00:00
|
|
|
meta = {
|
2015-11-01 21:23:11 +00:00
|
|
|
description = "An open source code editor for the web, written in JavaScript, HTML and CSS";
|
|
|
|
homepage = http://brackets.io/;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.matejc ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|