biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / text / yx / default.nix
blobf773ca66a00007c97dc85fe5ac48c7235ce9b22f
1 { lib
2 , stdenv
3 , fetchFromGitLab
4 , fetchpatch
5 , libyaml
6 , testers
7 , yx
8 }:
9 stdenv.mkDerivation rec {
10   pname = "yx";
11   version = "1.0.2";
13   src = fetchFromGitLab {
14     owner = "tomalok";
15     repo = "yx";
16     rev = version;
17     hash = "sha256-uuso+hsmdsB7VpIRKob8rfMaWvRMCBHvCFnYrHPC6iw=";
18   };
20   patches = [
21     # https://gitlab.com/tomalok/yx/-/issues/2
22     ./0001-Don-t-strip-binary-when-installing.patch
23     (fetchpatch {
24       # https://gitlab.com/tomalok/yx/-/merge_requests/10
25       url = "https://gitlab.com/tomalok/yx/-/commit/5747ca40f4b0acb56d67fd29a818734d7b19d61a.patch";
26       hash = "sha256-0tNtkq1tZ96Ag5EJfUfDao/QxpRB4Jadop3OPBvhnlo=";
27     })
28   ];
30   makeFlags = [
31     "PREFIX=${placeholder "out"}"
32   ];
34   strictDeps = true;
36   buildInputs = [ libyaml ];
38   doCheck = true;
40   passthru.tests.version = testers.testVersion {
41     package = yx;
42     command = "${meta.mainProgram} -v";
43     version = "v${yx.version}";
44   };
46   meta = with lib; {
47     description = "YAML Data Extraction Tool";
48     homepage = "https://gitlab.com/tomalok/yx";
49     license = licenses.mit;
50     platforms = platforms.all;
51     maintainers = with maintainers; [ twz123 ];
52     mainProgram = "yx";
53   };