mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
parent
b2426adf1c
commit
6185f74531
@ -1,20 +1,6 @@
|
||||
{ stdenv, fetchurl, lib, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
|
||||
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
|
||||
, gvfs, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, systemd
|
||||
}:
|
||||
{ stdenv, fetchurl, lib, makeWrapper, gvfs, atomEnv }:
|
||||
|
||||
let
|
||||
atomPkgs = [
|
||||
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
|
||||
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
|
||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor libcap systemd
|
||||
];
|
||||
atomLib = lib.makeLibraryPath atomPkgs;
|
||||
atomLib64 = lib.makeSearchPathOutputs "lib64" ["lib"] atomPkgs;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "atom-${version}";
|
||||
version = "1.6.2";
|
||||
|
||||
@ -26,25 +12,23 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
buildCommand = ''
|
||||
mkdir -p $out/usr/
|
||||
ar p $src data.tar.gz | tar -C $out -xz ./usr
|
||||
substituteInPlace $out/usr/share/applications/atom.desktop \
|
||||
--replace /usr/share/atom $out/bin
|
||||
mv $out/usr/* $out/
|
||||
rm -r $out/share/lintian
|
||||
rm -r $out/usr/
|
||||
wrapProgram $out/bin/atom \
|
||||
--prefix "PATH" : "${gvfs}/bin"
|
||||
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}:$out/share/atom" \
|
||||
$out/share/atom/atom
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}" \
|
||||
$out/share/atom/resources/app/apm/bin/node
|
||||
wrapProgram $out/bin/atom \
|
||||
--prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}" \
|
||||
--prefix "PATH" : "${gvfs}/bin"
|
||||
wrapProgram $out/bin/apm \
|
||||
--prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
19
pkgs/applications/editors/atom/env.nix
Normal file
19
pkgs/applications/editors/atom/env.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk, atk, pango, freetype, fontconfig
|
||||
, libgnome_keyring3, gdk_pixbuf, gvfs, cairo, cups, expat, libgpgerror, nspr
|
||||
, gconf, nss, xorg, libcap, systemd, libnotify
|
||||
}:
|
||||
|
||||
let
|
||||
packages = [
|
||||
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
|
||||
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
|
||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor libcap systemd libnotify
|
||||
];
|
||||
|
||||
libPathNative = lib.makeLibraryPath packages;
|
||||
libPath64 = lib.makeSearchPathOutputs "lib64" ["lib"] packages;
|
||||
libPath = "${libPathNative}:${libPath64}";
|
||||
|
||||
in { inherit packages libPath; }
|
@ -1,10 +1,6 @@
|
||||
{ stdenv, callPackage, fetchurl, unzip
|
||||
, ...
|
||||
} @ args:
|
||||
{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv }:
|
||||
|
||||
let
|
||||
atomEnv = callPackage ../../../development/tools/electron/env-atom.nix (args);
|
||||
|
||||
version = "0.10.10";
|
||||
rev = "5b5f4db87c10345b9d5c8d0bed745bcad4533135";
|
||||
sha256 = if stdenv.system == "i686-linux" then "1mmgq4fxi2h4hvz7yxgzzyvlznkb42qwr8i1g2b1akdlgnrvvpby"
|
||||
@ -30,21 +26,16 @@ in
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r ./* $out/bin
|
||||
|
||||
${if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then ''
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
$out/bin/code
|
||||
'' else ""}
|
||||
mkdir -p $out/lib/vscode $out/bin
|
||||
cp -r ./* $out/lib/vscode
|
||||
ln -s $out/lib/vscode/code $out/bin
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
${if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then ''
|
||||
patchelf \
|
||||
--set-rpath "${atomEnv}/lib:${atomEnv}/lib64:$out/bin:$(patchelf --print-rpath $out/bin/code)" \
|
||||
$out/bin/code
|
||||
'' else ""}
|
||||
fixupPhase = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}:$out/lib/vscode" \
|
||||
$out/lib/vscode/code
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,10 +1,6 @@
|
||||
{ stdenv, callPackage, fetchurl, unzip
|
||||
, ...
|
||||
} @ args:
|
||||
{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv }:
|
||||
|
||||
let
|
||||
atomEnv = callPackage ./env-atom.nix (args);
|
||||
in stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "electron-${version}";
|
||||
version = "0.36.2";
|
||||
|
||||
@ -14,23 +10,17 @@ in stdenv.mkDerivation rec {
|
||||
name = "${name}.zip";
|
||||
};
|
||||
|
||||
buildInputs = [ atomEnv unzip ];
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
buildCommand = ''
|
||||
mkdir -p $out/lib/electron $out/bin
|
||||
unzip -d $out/lib/electron $src
|
||||
ln -s $out/lib/electron/electron $out/bin
|
||||
|
||||
unpackCmd = "unzip";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
unzip -d $out/bin $src
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
$out/bin/electron
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf \
|
||||
--set-rpath "${atomEnv}/lib:${atomEnv}/lib64:$out/bin:$(patchelf --print-rpath $out/bin/electron)" \
|
||||
$out/bin/electron
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}:$out/lib/electron" \
|
||||
$out/lib/electron/electron
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ stdenv, buildEnv, zlib, glib, alsaLib
|
||||
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
|
||||
, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap
|
||||
, systemd, libnotify
|
||||
, ...
|
||||
}:
|
||||
|
||||
buildEnv {
|
||||
name = "env-atom";
|
||||
paths = [
|
||||
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
|
||||
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
|
||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor libcap systemd libnotify
|
||||
];
|
||||
}
|
@ -5700,10 +5700,7 @@ in
|
||||
|
||||
astyle = callPackage ../development/tools/misc/astyle { };
|
||||
|
||||
electron = callPackage ../development/tools/electron {
|
||||
gconf = pkgs.gnome.GConf;
|
||||
};
|
||||
|
||||
electron = callPackage ../development/tools/electron { };
|
||||
|
||||
autobuild = callPackage ../development/tools/misc/autobuild { };
|
||||
|
||||
@ -11647,10 +11644,12 @@ in
|
||||
|
||||
artha = callPackage ../applications/misc/artha { };
|
||||
|
||||
atom = callPackage ../applications/editors/atom {
|
||||
atomEnv = callPackage ../applications/editors/atom/env.nix {
|
||||
gconf = gnome.GConf;
|
||||
};
|
||||
|
||||
atom = callPackage ../applications/editors/atom { };
|
||||
|
||||
aseprite = callPackage ../applications/editors/aseprite {
|
||||
giflib = giflib_4_1;
|
||||
};
|
||||
@ -14253,9 +14252,7 @@ in
|
||||
|
||||
vorbis-tools = callPackage ../applications/audio/vorbis-tools { };
|
||||
|
||||
vscode = callPackage ../applications/editors/vscode {
|
||||
gconf = pkgs.gnome.GConf;
|
||||
};
|
||||
vscode = callPackage ../applications/editors/vscode { };
|
||||
|
||||
vue = callPackage ../applications/misc/vue { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user