nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.21.0";
13
14 src = fetchFromGitHub {
15 owner = "aaronriekenberg";
16 repo = "rust-parallel";
17 rev = "v${version}";
18 hash = "sha256-86CUFtq6XpTYL7zpDBBfbSXlPYhWofwMjJSK698lclI=";
19 };
20
21 cargoHash = "sha256-g2R3dEvDv3uzZVXBFvsCoX/M0XuHhoE/mMHni6qEN1g=";
22
23 postPatch = ''
24 substituteInPlace tests/dummy_shell.sh \
25 --replace-fail "/bin/bash" "${bash}/bin/bash"
26 '';
27
28 checkFlags = [
29 "--skip=runs_echo_commands_dry_run"
30 "--skip=test_keep_order_with_sleep"
31
32 "--skip=runs_regex_command_with_dollar_signs"
33 "--skip=runs_regex_from_command_line_args_nomatch_1"
34 "--skip=runs_regex_from_input_file_badline_j1"
35 ];
36
37 nativeInstallCheckInputs = [ versionCheckHook ];
38 doInstallCheck = true;
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}