nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv
2, fetchFromGitHub
3, rustPlatform
4, Security
5}:
6
7rustPlatform.buildRustPackage rec {
8 pname = "grex";
9 version = "1.4.1";
10
11 src = fetchFromGitHub {
12 owner = "pemistahl";
13 repo = pname;
14 rev = "v${version}";
15 sha256 = "sha256-of6mZ0SeiFXuXmvk64WoUNv6CLoj05K2kQpDQLMLwuY=";
16 };
17
18 cargoSha256 = "sha256-BS9K/1CyNYFwC/zQXEWZcSCjQyWgLgcVNbuyez2q/Ak=";
19
20 buildInputs = lib.optionals stdenv.isDarwin [ Security ];
21
22 doInstallCheck = true;
23 installCheckPhase = ''
24 $out/bin/grex --help > /dev/null
25 '';
26
27 meta = with lib; {
28 description = "A command-line tool for generating regular expressions from user-provided test cases";
29 homepage = "https://github.com/pemistahl/grex";
30 license = licenses.asl20;
31 maintainers = with maintainers; [ SuperSandro2000 ];
32 };
33}