Unverified Commit 5e8f4032 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

snphost: 0.6.0 -> 0.6.1, add versionCheckHook (#427424)

parents 7ad5af60 fd06da68
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -10,21 +10,22 @@
  nix-update-script,
  findutils,
  installShellFiles,
  versionCheckHook,
}:

rustPlatform.buildRustPackage rec {
  pname = "snphost";
  version = "0.6.0";
  version = "0.6.1";

  src = fetchFromGitHub {
    owner = "virtee";
    repo = "snphost";
    tag = "v${version}";
    hash = "sha256-sBEIQQ0vfwQh5eqsC6x37VDlbXuBUybRh4LNUjfEJ5A=";
    hash = "sha256-FvHawwoIqCiZ+Jm1itDWspaI+vDN6xDfeI11KoiO/DU=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-aNXv6Av3JvnTqTbxX70FmwEF4jJaQmD6FHjvh7om9iE=";
  cargoHash = "sha256-ZOXOfFYingTBq5LfJqHRf6ZdvrdY1Zve/ZMnAE25kPM=";

  nativeBuildInputs = [
    asciidoctor
@@ -39,12 +40,17 @@ rustPlatform.buildRustPackage rec {
    zlib
  ];

  env.OPENSSL_NO_VENDOR = true;

  # man page is placed in cargo's $OUT_DIR, which is randomized.
  # Contacted upstream about it, for now use find to locate it.
  postInstall = ''
    installManPage $(find target/x86_64-unknown-linux-gnu/release/build -name "snphost.1")
  '';

  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {