Skip to content

Commit

Permalink
Merge pull request NixOS#76916 from danielfullmer/zerotierone-cross
Browse files Browse the repository at this point in the history
zerotierone: fix cross compilation
  • Loading branch information
zimbatm committed Jan 4, 2020
2 parents 947043a + 115534c commit 48f461d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pkgs/tools/networking/zerotierone/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, openssl, lzo, zlib, iproute, which, ronn }:
{ stdenv, buildPackages, fetchFromGitHub, openssl, lzo, zlib, iproute, ronn }:

stdenv.mkDerivation rec {
pname = "zerotierone";
Expand All @@ -20,11 +20,14 @@ stdenv.mkDerivation rec {
patchShebangs ./doc/build.sh
substituteInPlace ./doc/build.sh \
--replace '/usr/bin/ronn' '${ronn}/bin/ronn' \
--replace 'ronn -r' '${ronn}/bin/ronn -r'
--replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \
'';

buildInputs = [ openssl lzo zlib iproute which ronn ];

nativeBuildInputs = [ ronn ];
buildInputs = [ openssl lzo zlib iproute ];

enableParallelBuilding = true;

installPhase = ''
install -Dt "$out/bin/" zerotier-one
Expand All @@ -43,7 +46,7 @@ stdenv.mkDerivation rec {
description = "Create flat virtual Ethernet networks of almost unlimited size";
homepage = https://www.zerotier.com;
license = licenses.bsl11;
maintainers = with maintainers; [ sjmackenzie zimbatm ehmry obadz ];
platforms = platforms.x86_64 ++ platforms.aarch64;
maintainers = with maintainers; [ sjmackenzie zimbatm ehmry obadz danielfullmer ];
platforms = with platforms; x86_64 ++ aarch64 ++ arm;
};
}

0 comments on commit 48f461d

Please sign in to comment.