Unverified Commit db29276f authored by Guillaume Girol's avatar Guillaume Girol Committed by GitHub
Browse files

Merge pull request #226699 from christoph-heiss/pkgs/trurl

trurl: 0.4 -> 0.6, add manpage, add passthru.tests.version
parents 0216a463 215801b5
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, curl, perl }:
{ lib, stdenv, fetchFromGitHub, curl, python3, python3Packages, trurl, testers }:

stdenv.mkDerivation rec {
  pname = "trurl";
  version = "0.4";
  version = "0.6";

  src = fetchFromGitHub {
    owner = "curl";
    repo = pname;
    rev = "${pname}-${version}";
    sha256 = "sha256-f9z0gPtHcn3iWFA6MT6ngok0nXBcd6zJ8Tjnb5Lzf6c=";
    hash = "sha256-/Gf7T67LPzVPhjAqTvbLiJOqfKeWvwH/WHelJZTH4ZI=";
  };

  outputs = [ "out" "dev" "man" ];
  separateDebugInfo = stdenv.isLinux;

  enableParallelBuilding = true;

  nativeBuildInputs = [ curl ];
  buildInputs = [ curl ];
  makeFlags = [ "PREFIX=$(out)" ];

  doCheck = true;
  checkInputs = [ perl ];
  nativeCheckInputs = [ python3 python3Packages.packaging ];
  checkTarget = "test";

  passthru.tests.version = testers.testVersion {
    package = trurl;
  };

  meta = with lib; {
    description = "A command line tool for URL parsing and manipulation";
    homepage = "https://curl.se/trurl";