diff options
author | Matej Cotman <cotman.matej@gmail.com> | 2015-11-01 22:23:11 +0100 |
---|---|---|
committer | Matej Cotman <cotman.matej@gmail.com> | 2015-11-17 14:50:17 +0100 |
commit | 3454f8d3713d110ed2af42faf324c9fd2c3a9f98 (patch) | |
tree | 5ba5f6506ba30bbd4900eab8c1dd2f8c827debf8 /pkgs/applications/editors/brackets | |
parent | d81fc427da98905a980268c6e65eb46070055471 (diff) |
brackets: new package, code editor
Diffstat (limited to 'pkgs/applications/editors/brackets')
-rw-r--r-- | pkgs/applications/editors/brackets/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/applications/editors/brackets/default.nix b/pkgs/applications/editors/brackets/default.nix new file mode 100644 index 000000000000..131675486bad --- /dev/null +++ b/pkgs/applications/editors/brackets/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchurl, buildEnv, gtk, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf +, cups, libgcrypt_1_5, makeWrapper, dbus, udev }: +let + bracketsEnv = buildEnv { + name = "env-brackets"; + paths = [ + gtk glib gdk_pixbuf stdenv.cc.cc alsaLib nss nspr gconf cups libgcrypt_1_5 + dbus udev + ]; + }; +in +stdenv.mkDerivation rec { + name = "brackets-${version}"; + version = "1.5"; + + src = fetchurl { + url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb"; + sha256 = "1fc8wvh9wbcydd1sw20yfnwlfv7nllb6vrssr6hgn80m7i0zl3db"; + name = "${name}.deb"; + }; + + phases = [ "installPhase" ]; + + buildInputs = [ makeWrapper ]; + + 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 + + ln -s ${udev}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0 + + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \ + $out/opt/brackets/Brackets + + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + $out/opt/brackets/Brackets-node + + patchelf \ + --set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \ + $out/opt/brackets/lib/libcef.so + + wrapProgram $out/opt/brackets/brackets \ + --prefix LD_LIBRARY_PATH : "${bracketsEnv}/lib:${bracketsEnv}/lib64" + + 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/ + ''; + + meta = with stdenv.lib; { + 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" ]; + }; +} |