summary refs log tree commit diff
path: root/pkgs/tools/misc/grex/default.nix
blob: 62c216adcbeffe536687e18db4535ae1d23dcd47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, rustPlatform
, Security
, libiconv
}:

rustPlatform.buildRustPackage rec {
  pname = "grex";
  version = "1.3.0";

  cargoSha256 = "sha256-zNwTk4RcTv2dGbKWelOPSvasBmj7tnjLhQ0DZhZ9hxk=";

  src = fetchFromGitHub {
    owner = "pemistahl";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-NMz35jgd7XPemVdA8nol2H6cgWD3yEPh0FEMPw8kgKQ=";
  };

  buildInputs = lib.optionals stdenv.isDarwin [ Security ];

  doInstallCheck = true;
  installCheckPhase = ''
    $out/bin/grex --help > /dev/null
  '';

  meta = with lib; {
    description = "A command-line tool for generating regular expressions from user-provided test cases";
    homepage = "https://github.com/pemistahl/grex";
    license = licenses.asl20;
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
}