16 pname = "zerotierone";
19 src = fetchFromGitHub {
23 sha256 = "sha256-YWcqALUB3ZEukL4er2FKcyNdEbuaf//QU5hRbKAfxDA=";
26 in stdenv.mkDerivation {
27 inherit pname version src;
29 cargoDeps = rustPlatform.importCargoLock {
30 lockFile = ./Cargo.lock;
32 "jwt-0.16.0" = "sha256-P5aJnNlcLe9sBtXZzfqHdRvxNfm6DPBcfcKOVeLZxcM=";
33 "rustfsm-0.1.0" = "sha256-q7J9QgN67iuoNhQC8SDVzUkjCNRXGiNCkE8OsQc5+oI=";
36 postPatch = "cp ${./Cargo.lock} Cargo.lock";
39 cmp ./Cargo.lock ./rustybits/Cargo.lock || {
40 echo 1>&2 "Please make sure that the derivation's Cargo.lock is identical to ./rustybits/Cargo.lock!"
44 patchShebangs ./doc/build.sh
45 substituteInPlace ./doc/build.sh \
46 --replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \
48 substituteInPlace ./make-linux.mk \
49 --replace '-march=armv6zk' "" \
50 --replace '-mcpu=arm1176jzf-s' ""
56 rustPlatform.cargoSetupHook
66 enableParallelBuilding = true;
68 buildFlags = [ "all" "selftest" ];
70 doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
77 installFlags = [ "DESTDIR=$$out/upstream" ];
80 mv $out/upstream/usr/sbin $out/bin
83 mv $out/upstream/usr/share/man $man/share/man
88 outputs = [ "out" "man" ];
90 passthru.updateScript = ./update.sh;
93 description = "Create flat virtual Ethernet networks of almost unlimited size";
94 homepage = "https://www.zerotier.com";
95 license = licenses.bsl11;
96 maintainers = with maintainers; [ sjmackenzie zimbatm ehmry obadz danielfullmer ];
97 platforms = platforms.linux;