File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
pkgs/by-name/el/element-desktop Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1010 xcbuild ,
1111 fetchNpmDeps ,
1212 npmHooks ,
13+ electron ,
14+ runCommand ,
1315} :
1416
1517let
1618 pinData = lib . importJSON ./pin.json ;
1719
20+ electron-headers = runCommand "electron-headers" { } ''
21+ mkdir -p $out
22+ tar -C $out --strip-components=1 -xvf ${ electron . headers }
23+ '' ;
24+
1825in
1926stdenv . mkDerivation rec {
2027 pname = "keytar" ;
@@ -48,8 +55,10 @@ stdenv.mkDerivation rec {
4855 export -f pkg-config
4956 '' ;
5057
51- # https://nodejs.org/api/os.html#osarch
5258 npmFlags = [
59+ # Make sure the native modules are built against electron's ABI
60+ "--nodedir=${ electron-headers } "
61+ # https://nodejs.org/api/os.html#osarch
5362 "--arch=${
5463 if stdenv . hostPlatform . parsed . cpu . name == "i686" then
5564 "ia32"
Original file line number Diff line number Diff line change 2323 pinData = import ./element-desktop-pin.nix ;
2424 inherit ( pinData . hashes ) desktopSrcHash desktopYarnHash ;
2525 executableName = "element-desktop" ;
26- keytar = callPackage ./keytar { } ;
27- seshat = callPackage ./seshat { } ;
2826 electron = electron_33 ;
27+ keytar = callPackage ./keytar {
28+ inherit electron ;
29+ } ;
30+ seshat = callPackage ./seshat { } ;
2931in
3032stdenv . mkDerivation (
3133 finalAttrs :
You can’t perform that action at this time.
0 commit comments