3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/atom/default.nix
R. RyanTM 19742d0baf atom: 1.25.1 -> 1.26.0
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/atom/versions.

These checks were done:

- built on NixOS
- ran ‘/nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0/bin/apm -h’ got 0 exit code
- ran ‘/nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0/bin/apm --help’ got 0 exit code
- ran ‘/nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0/bin/apm help’ got 0 exit code
- ran ‘/nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0/bin/atom help’ got 0 exit code
- ran ‘/nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0/bin/.atom-wrapped help’ got 0 exit code
- found 1.26.0 with grep in /nix/store/q560gnycgnl44jmldg5y2a9akg47q8kb-atom-1.26.0
- directory tree listing: https://gist.github.com/10c433ad7807e5aeaa581f442b89dd6c
2018-04-20 12:39:31 -07:00

52 lines
1.7 KiB
Nix

{ stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}:
stdenv.mkDerivation rec {
name = "atom-${version}";
version = "1.26.0";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "1gyxys3mwwizc88vlb6j769b6r4ibjnqs6pg5iv336b13f9acyvr";
name = "${name}.deb";
};
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/usr/
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 \
--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}" \
$out/share/atom/resources/app/apm/bin/node
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
find $out/share/atom -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom" {} \;
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;
maintainers = [ maintainers.offline maintainers.nequissimus ];
platforms = [ "x86_64-linux" ];
};
}