Commit 892d1e52 authored by Michael Hoang's avatar Michael Hoang
Browse files

zerotierone: 1.14.0 -> 1.14.2

parent a79cfe0e
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
From b83e6354de099860bcb1ca3876c222c57de89f0c Mon Sep 17 00:00:00 2001
From: Michael Hoang <enzime@users.noreply.github.com>
Date: Mon, 10 Feb 2025 18:03:12 +0700
Subject: [PATCH] rustfsm: remove unsupported `lints.workspace`

This patch will no longer be necessary when
https://github.com/NixOS/nixpkgs/pull/300532 is merged
---
 fsm/Cargo.toml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fsm/Cargo.toml b/fsm/Cargo.toml
index 5e9e1c9..3fda704 100644
--- a/fsm/Cargo.toml
+++ b/fsm/Cargo.toml
@@ -17,5 +17,3 @@ rustfsm_trait = { version = "0.1", path = "rustfsm_trait" }
 [package.metadata.workspaces]
 independent = true
 
-[lints]
-workspace = true
-- 
2.46.0
+0 −3579

File deleted.

Preview size limit exceeded, changes collapsed.

+17 −22
Original line number Diff line number Diff line
@@ -13,50 +13,45 @@
  zlib,
  libiconv,
  darwin,
  fetchpatch,
}:

let
  pname = "zerotierone";
  version = "1.14.0";
  version = "1.14.2";

  src = fetchFromGitHub {
    owner = "zerotier";
    repo = "ZeroTierOne";
    rev = version;
    hash = "sha256-YWcqALUB3ZEukL4er2FKcyNdEbuaf//QU5hRbKAfxDA=";
    tag = version;
    hash = "sha256-D+7/ja5uYzH1iNd+Ti3k+dWOf5GvN4U+GuVBA9gxtTc=";
  };

in
stdenv.mkDerivation {
  inherit pname version src;

  cargoDeps = rustPlatform.importCargoLock {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "jwt-0.16.0" = "sha256-P5aJnNlcLe9sBtXZzfqHdRvxNfm6DPBcfcKOVeLZxcM=";
      "rustfsm-0.1.0" = "sha256-q7J9QgN67iuoNhQC8SDVzUkjCNRXGiNCkE8OsQc5+oI=";
    };
  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit src;
    sourceRoot = "source/rustybits";
    hash = "sha256-CSpm4zBWKhcrM/KXGU6/51NSQ6hzpT44D2J+QETBtpQ=";

    # REMOVEME when https://github.com/NixOS/nixpkgs/pull/300532 is merged
    postBuild = ''
      pushd $out/git/730aadcc02767ae630e88f8f8c788a85d6bc81e6
      patch --verbose -p1 <${./0001-rustfsm-remove-unsupported-lints.workspace.patch}
      popd
    '';
  };

  patches = [
    # https://github.com/zerotier/ZeroTierOne/pull/2314
    (fetchpatch {
      url = "https://github.com/zerotier/ZeroTierOne/commit/f9c6ee0181acb1b77605d9a4e4106ac79aaacca3.patch";
      hash = "sha256-zw7KmaxiCH99Y0wQtOQM4u0ruxiePhvv/birxMQioJU=";
    })
    ./0001-darwin-disable-link-time-optimization.patch
  ];

  postPatch = ''
    cp ${./Cargo.lock} Cargo.lock
    cp ${./Cargo.lock} rustybits/Cargo.lock
    cp rustybits/Cargo.lock Cargo.lock
  '';

  preConfigure = ''
    cmp ./Cargo.lock ./rustybits/Cargo.lock || {
      echo 1>&2 "Please make sure that the derivation's Cargo.lock is identical to ./rustybits/Cargo.lock!"
      exit 1
    }

    patchShebangs ./doc/build.sh
    substituteInPlace ./doc/build.sh \
      --replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \