1{
2 bash,
3 fetchFromGitHub,
4 lib,
5 rustPlatform,
6 versionCheckHook,
7 nix-update-script,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "rust-parallel";
12 version = "1.18.1";
13
14 src = fetchFromGitHub {
15 owner = "aaronriekenberg";
16 repo = "rust-parallel";
17 rev = "v${version}";
18 hash = "sha256-4f/JE8KWYDdLwx+bCSSbz0Cpfy/g3WIaRzqCvUix4t0=";
19 };
20
21 cargoHash = "sha256-wJtXYx2mncOnnUep4CMFt+1mK1vMyhYFCQM/2B9m6zY=";
22
23 postPatch = ''
24 substituteInPlace tests/dummy_shell.sh \
25 --replace "/bin/bash" "${bash}/bin/bash"
26 '';
27
28 checkFlags = [
29 "--skip=runs_echo_commands_dry_run"
30
31 "--skip=runs_regex_command_with_dollar_signs"
32 "--skip=runs_regex_from_command_line_args_nomatch_1"
33 "--skip=runs_regex_from_input_file_badline_j1"
34 ];
35
36 nativeInstallCheckInputs = [ versionCheckHook ];
37 doInstallCheck = true;
38 versionCheckProgramArg = "--version";
39
40 passthru.updateScript = nix-update-script { };
41
42 meta = {
43 description = "Rust shell tool to run commands in parallel with a similar interface to GNU parallel";
44 homepage = "https://github.com/aaronriekenberg/rust-parallel";
45 license = lib.licenses.mit;
46 mainProgram = "rust-parallel";
47 maintainers = with lib.maintainers; [ sedlund ];
48 };
49}