17 pname = "zerotierone";
20 src = fetchFromGitHub {
24 sha256 = "sha256-p900bw+BGzyMwH91W9NRfYS1ZUW74YaALwr1Gv9BlvQ=";
26 in stdenv.mkDerivation {
27 inherit pname version src;
30 patchShebangs ./doc/build.sh
31 substituteInPlace ./doc/build.sh \
32 --replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \
34 substituteInPlace ./make-linux.mk \
35 --replace '-march=armv6zk' "" \
36 --replace '-mcpu=arm1176jzf-s' ""
38 # Upstream does not define the cargo settings necessary to use the vendorized rust-jwt version, so it has to be added manually.
39 # Can be removed once ZeroTierOne's zeroidc no longer uses a git url in Cargo.toml for jwt
40 echo '[source."https://github.com/glimberg/rust-jwt"]
41 git = "https://github.com/glimberg/rust-jwt"
42 replace-with = "vendored-sources"' >> ./zeroidc/.cargo/config.toml
48 rustPlatform.rust.cargo
49 rustPlatform.rust.rustc
58 enableParallelBuilding = true;
60 buildFlags = [ "all" "selftest" ];
62 doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
69 installFlags = [ "DESTDIR=$$out/upstream" ];
72 mv $out/upstream/usr/sbin $out/bin
75 mv $out/upstream/usr/share/man $man/share/man
80 outputs = [ "out" "man" ];
83 description = "Create flat virtual Ethernet networks of almost unlimited size";
84 homepage = "https://www.zerotier.com";
85 license = licenses.bsl11;
86 maintainers = with maintainers; [ sjmackenzie zimbatm ehmry obadz danielfullmer ];
87 platforms = platforms.all;