2016-04-22 12:51:11 +02:00
|
|
|
{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv }:
|
2016-04-04 18:11:41 +02:00
|
|
|
|
2016-04-22 12:51:11 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-06-19 23:17:00 +02:00
|
|
|
name = "electron-${version}";
|
2016-04-04 18:11:41 +02:00
|
|
|
version = "0.36.2";
|
2014-11-13 06:39:58 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-19 23:17:00 +02:00
|
|
|
url = "https://github.com/atom/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
|
2016-04-04 18:11:41 +02:00
|
|
|
sha256 = "01d78j8dfrdygm1r141681b3bfz1f1xqg9vddz7j52z1mlfv9f1d";
|
2014-11-13 06:39:58 +01:00
|
|
|
name = "${name}.zip";
|
|
|
|
};
|
|
|
|
|
2016-04-22 12:51:11 +02:00
|
|
|
buildInputs = [ unzip ];
|
2014-11-13 06:39:58 +01:00
|
|
|
|
2016-04-22 12:51:11 +02:00
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/lib/electron $out/bin
|
|
|
|
unzip -d $out/lib/electron $src
|
|
|
|
ln -s $out/lib/electron/electron $out/bin
|
2014-11-13 06:39:58 +01:00
|
|
|
|
2016-04-22 16:44:30 +02:00
|
|
|
fixupPhase
|
|
|
|
|
2016-04-03 17:04:31 +02:00
|
|
|
patchelf \
|
2016-04-22 12:51:11 +02:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${atomEnv.libPath}:$out/lib/electron" \
|
|
|
|
$out/lib/electron/electron
|
2014-11-13 06:39:58 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Cross platform desktop application shell";
|
2015-06-19 23:17:00 +02:00
|
|
|
homepage = https://github.com/atom/electron;
|
2015-05-28 19:20:29 +02:00
|
|
|
license = licenses.mit;
|
2015-06-20 20:43:10 +02:00
|
|
|
maintainers = [ maintainers.travisbhartwell ];
|
2014-11-13 06:39:58 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|