nixpkgs/pkgs/tools/misc/grex/default.nix
2022-10-21 23:56:48 +02:00

34 lines
806 B
Nix

{ lib, stdenv
, fetchFromGitHub
, rustPlatform
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "grex";
version = "1.4.1";
src = fetchFromGitHub {
owner = "pemistahl";
repo = pname;
rev = "v${version}";
sha256 = "sha256-of6mZ0SeiFXuXmvk64WoUNv6CLoj05K2kQpDQLMLwuY=";
};
cargoSha256 = "sha256-BS9K/1CyNYFwC/zQXEWZcSCjQyWgLgcVNbuyez2q/Ak=";
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 ];
};
}