forked from mirrors/nixpkgs
brackets: 1.8 -> 1.9
Use rpath instead of buildEnv. Also add cups. fixes #24775
This commit is contained in:
parent
5042e9d009
commit
18f5ba5a3e
|
@ -1,28 +1,24 @@
|
||||||
{ stdenv, fetchurl, buildEnv, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf
|
{ stdenv, fetchurl, buildEnv, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf
|
||||||
, cups, libgcrypt_1_5, systemd, makeWrapper, dbus }:
|
, cups, libgcrypt_1_5, systemd, makeWrapper, dbus }:
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
bracketsEnv = buildEnv {
|
bracketsLibs = makeLibraryPath [
|
||||||
name = "env-brackets";
|
gtk2 glib gdk_pixbuf stdenv.cc.cc.lib alsaLib nss nspr gconf cups libgcrypt_1_5 dbus systemd
|
||||||
paths = [
|
];
|
||||||
gtk2 glib gdk_pixbuf stdenv.cc.cc.lib alsaLib nss nspr gconf cups libgcrypt_1_5
|
|
||||||
dbus.lib systemd.lib
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "brackets-${version}";
|
name = "brackets-${version}";
|
||||||
version = "1.8";
|
version = "1.9";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
|
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
|
||||||
sha256 = "0b2k0vv1qwmsg1wckp71yrb86zp8zisskmzzvx9ir19bma9jzr42";
|
sha256 = "0c4l2rr0853xd21kw8hhxlmrx8mqwb7iqa2k24zvwyjp4nnwkgbp";
|
||||||
name = "${name}.deb";
|
name = "${name}.deb";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = [ "installPhase" "fixupPhase" ];
|
phases = [ "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ar p $src data.tar.xz | tar -C $out -xJ
|
ar p $src data.tar.xz | tar -C $out -xJ
|
||||||
|
@ -33,27 +29,26 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0
|
ln -s ${systemd.lib}/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 \
|
substituteInPlace $out/opt/brackets/brackets.desktop \
|
||||||
--replace "Exec=/opt/brackets/brackets" "Exec=brackets"
|
--replace "Exec=/opt/brackets/brackets" "Exec=brackets"
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
ln -s $out/opt/brackets/brackets.desktop $out/share/applications/
|
ln -s $out/opt/brackets/brackets.desktop $out/share/applications/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
postFixup = ''
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
|
--set-rpath "${bracketsLibs}:$out/opt/brackets/lib" \
|
||||||
|
$out/opt/brackets/Brackets
|
||||||
|
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
|
--set-rpath "${bracketsLibs}" \
|
||||||
|
$out/opt/brackets/Brackets-node
|
||||||
|
|
||||||
|
patchelf --set-rpath "${bracketsLibs}" \
|
||||||
|
$out/opt/brackets/lib/libcef.so
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "An open source code editor for the web, written in JavaScript, HTML and CSS";
|
description = "An open source code editor for the web, written in JavaScript, HTML and CSS";
|
||||||
homepage = http://brackets.io/;
|
homepage = http://brackets.io/;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
Loading…
Reference in a new issue