Unverified Commit 62baba46 authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

snx-rs: 3.1.2 -> 4.4.1 (#413854)

parents 2bba56ab d5b61902
Loading
Loading
Loading
Loading
+17 −10
Original line number Diff line number Diff line
{
  fetchFromGitHub,
  glib,
  gtk3,
  gtk4,
  iproute2,
  kdePackages,
  lib,
@@ -14,17 +14,19 @@
  pkg-config,
  rustPlatform,
  webkitgtk_4_1,
  graphene,
  nix-update-script,
  versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
  pname = "snx-rs";
  version = "3.1.2";
  version = "4.4.1";

  src = fetchFromGitHub {
    owner = "ancwrd1";
    repo = "snx-rs";
    tag = "v${version}";
    hash = "sha256-bLuIXd2pqqiyEP+lDTJYVDZkRZ0HcDkKFZd/qlpuf98=";
    hash = "sha256-Juv38ALXf1nMeokBH7Z+39oIscXW7S+OxdD/ZSNs49U=";
  };

  passthru.updateScript = nix-update-script { };
@@ -36,7 +38,7 @@ rustPlatform.buildRustPackage rec {

  buildInputs = [
    glib
    gtk3
    gtk4
    kdePackages.kstatusnotifieritem
    libappindicator
    libappindicator-gtk2
@@ -45,19 +47,24 @@ rustPlatform.buildRustPackage rec {
    libsoup_3
    openssl
    webkitgtk_4_1
    graphene
  ];

  postPatch = ''
    substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
      --replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
  '';

  checkFlags = [
    "--skip=platform::linux::net::tests::test_default_ip"
    "--skip=platform::linux::tests::test_xfrm_check"
  ];

  nativeInstallCheckInputs = [
    versionCheckHook
  ];

  useFetchCargoVendor = true;
  cargoHash = "sha256-E5OJVf9CkLn5mFtk4Yacs2OIvAuIw0idSs7QuTNvfgU=";
  cargoHash = "sha256-NcoTdu/CQRu0RuZjlngP8lTPaomEiPTcfn2hAt+YjwA=";

  doInstallCheck = true;
  versionCheckProgram = "${placeholder "out"}/bin/snx-rs";
  versionCheckProgramArg = "--version";

  meta = {
    description = "Open source Linux client for Checkpoint VPN tunnels";