3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/atom/default.nix

52 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}:
stdenv.mkDerivation rec {
name = "atom-${version}";
2018-03-09 18:12:48 +00:00
version = "1.24.1";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
2018-03-09 18:12:48 +00:00
sha256 = "0llg2q1hn2wmhi80ddwwb2lir2xwwmrw19i2c1y3qmfb0apynhw3";
name = "${name}.deb";
};
2016-04-13 16:30:38 +01:00
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/usr/
2017-06-16 13:09:15 +01:00
ar p $src data.tar.xz | tar -C $out -xJ ./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 \
2017-03-18 00:39:14 +00:00
--prefix "PATH" : "${gvfs}/bin"
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 16:41:41 +00:00
$out/share/atom/resources/app/apm/bin/node
2017-03-18 00:39:14 +00:00
2017-10-05 15:12:41 +01:00
rm -f $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/bin/git
ln -s ${pkgs.git}/bin/git $out/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/bin/git
2017-03-18 00:39:14 +00:00
find $out/share/atom -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom" {} \;
2017-08-05 19:36:00 +01:00
paxmark m $out/share/atom/atom
paxmark m $out/share/atom/resources/app/apm/bin/node
'';
meta = with stdenv.lib; {
description = "A hackable text editor for the 21st Century";
homepage = https://atom.io/;
license = licenses.mit;
2016-02-15 19:58:46 +00:00
maintainers = [ maintainers.offline maintainers.nequissimus ];
platforms = [ "x86_64-linux" ];
};
}