nixpkgs-suyu/pkgs/applications/editors/atom/default.nix

48 lines
1.7 KiB
Nix
Raw Normal View History

2016-11-10 01:54:13 +01:00
{ stdenv, fetchurl, lib, makeWrapper, gvfs, atomEnv, libXScrnSaver, libxkbfile }:
stdenv.mkDerivation rec {
name = "atom-${version}";
2017-02-10 00:22:55 +01:00
version = "1.14.1";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
2017-02-10 00:22:55 +01:00
sha256 = "0dmzqz1j2nfcm459zgfzqym26kmbspdn9lipf77aawbbn2y36xqp";
name = "${name}.deb";
};
2016-04-13 17:30:38 +02:00
nativeBuildInputs = [ makeWrapper ];
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 \
2016-11-10 01:54:13 +01:00
--prefix "PATH" : "${gvfs}/bin" \
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libxkbfile ]}/libxkbfile.so.1
fixupPhase
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}" \
2015-03-12 17:41:41 +01:00
$out/share/atom/resources/app/apm/bin/node
2016-05-30 04:12:26 +02:00
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
'';
meta = with stdenv.lib; {
description = "A hackable text editor for the 21st Century";
homepage = https://atom.io/;
license = licenses.mit;
2016-02-15 20:58:46 +01:00
maintainers = [ maintainers.offline maintainers.nequissimus ];
platforms = [ "x86_64-linux" ];
};
}