depot/third_party/nixpkgs/pkgs/tools/networking/trurl/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

46 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, curl, python3, trurl, testers }:
stdenv.mkDerivation rec {
pname = "trurl";
version = "0.9";
src = fetchFromGitHub {
owner = "curl";
repo = pname;
rev = "${pname}-${version}";
hash = "sha256-R/7Saea84iqUICAAQz9zcfDLDud4uFedY2752xyg+oE=";
};
# The version number was forgotten to be updated for the release,
# so do it manually in the meantime.
# See https://github.com/curl/trurl/discussions/244#discussioncomment-7436369
postPatch = ''
substituteInPlace version.h --replace 0.8 0.9
'';
outputs = [ "out" "dev" "man" ];
separateDebugInfo = stdenv.isLinux;
enableParallelBuilding = true;
nativeBuildInputs = [ curl ];
buildInputs = [ curl ];
makeFlags = [ "PREFIX=$(out)" ];
doCheck = true;
nativeCheckInputs = [ python3 ];
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";
changelog = "https://github.com/curl/trurl/releases/tag/${pname}-${version}";
license = licenses.curl;
maintainers = with maintainers; [ christoph-heiss ];
platforms = platforms.all;
};
}