srvc: 0.8.0 -> 0.9.0

This commit is contained in:
John Shaffer 2022-12-12 18:32:17 -06:00
parent f5c7a97d53
commit 6f4d63b205
2 changed files with 10 additions and 43 deletions

View File

@ -1,28 +1,31 @@
{ lib, rustPlatform, fetchFromGitHub, stdenv, Security }:
{ lib, rustPlatform, fetchFromGitHub, stdenv, Security, webfs }:
rustPlatform.buildRustPackage rec {
pname = "srvc";
version = "0.8.0";
version = "0.9.0";
src = fetchFromGitHub {
owner = "insilica";
repo = "rs-srvc";
rev = "v${version}";
sha256 = "sha256-2eEuKAMxxTwjDInpYcOlFJha5DTe0IrxT5rI6ymN0hc=";
sha256 = "sha256-XslMwA1DhztK9DPNCucUpzjCQXz6PN8ml8JBvKtJeqg=";
};
cargoSha256 = "sha256-nJM7/w4awbCZQysUOSTO6bfsBXO3agJRdp1RyRZhtUY=";
# remove timeouts in tests to make them less flaky
patches = [ ./tests-no-timeout.patch ];
cargoSha256 = "sha256-KxwBF5t8lcaH8ZD4SorIBiq7p6r9LGHfEOyNXtB9HJw=";
buildInputs = lib.optionals stdenv.isDarwin [
Security
];
checkInputs = [ webfs ];
# remove timeouts in tests to make them less flaky
TEST_SRVC_DISABLE_TIMEOUT = 1;
meta = with lib; {
description = "Sysrev version control";
homepage = "https://github.com/insilica/rs-srvc";
changelog = "https://github.com/insilica/rs-srvc/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ john-shaffer ];
mainProgram = "sr";

View File

@ -1,36 +0,0 @@
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -1,15 +1,13 @@
#![allow(dead_code)]
use std::path::PathBuf;
-use std::time::Duration;
use assert_cmd::Command;
#[cfg(unix)]
use rexpect::session::PtySession;
-pub fn cmd(timeout_millis: u64) -> Command {
+pub fn cmd(_: u64) -> Command {
let mut cmd = Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
- cmd.timeout(Duration::from_millis(timeout_millis));
cmd.env_remove("RUST_BACKTRACE");
cmd
}
@@ -19,14 +17,14 @@ pub fn spawn(
dir: &str,
args: Vec<&str>,
timestamp_override: u64,
- timeout_millis: u64,
+ _: u64,
) -> Result<PtySession, rexpect::errors::Error> {
let mut cmd = std::process::Command::new(env!("CARGO_BIN_EXE_sr"));
cmd.args(args);
cmd.current_dir(dir);
cmd.env("SR_TIMESTAMP_OVERRIDE", timestamp_override.to_string());
cmd.env_remove("RUST_BACKTRACE");
- Ok(rexpect::session::spawn_command(cmd, Some(timeout_millis))?)
+ rexpect::session::spawn_command(cmd, None)
}
pub fn remove_sink(dir: &str) -> Result<(), std::io::Error> {