Merge pull request #76916 from danielfullmer/zerotierone-cross

zerotierone: fix cross compilation
This commit is contained in:
zimbatm 2020-01-04 20:41:22 +00:00 committed by GitHub
commit 48f461d8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";
@ -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
@ -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;
};
}