diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/xh/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/networking/xh/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/tools/networking/xh/default.nix b/nixpkgs/pkgs/tools/networking/xh/default.nix index 7acdc2d7e9c5..0a62fee4bd74 100644 --- a/nixpkgs/pkgs/tools/networking/xh/default.nix +++ b/nixpkgs/pkgs/tools/networking/xh/default.nix @@ -1,27 +1,35 @@ { stdenv, lib, openssl, pkg-config, rustPlatform, fetchFromGitHub, Security -, libiconv }: +, libiconv, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "xh"; - version = "0.9.2"; + version = "0.10.0"; src = fetchFromGitHub { owner = "ducaale"; repo = "xh"; rev = "v${version}"; - sha256 = "cOlya3ngIoaoqzh0fIbNAjwO7S7wZCQk7WVqgZona8A="; + sha256 = "0b9cgjgzf1vxd9j6cz44g68xbaii8gb3973pvjf0p6barnqzvqvq"; }; - cargoSha256 = "5B2fY+S9z6o+CHCIK93+Yj8dpaiQi4PSMQw1mfXg1NA="; + cargoSha256 = "0lwxmqp0ww9wf9p3nd42q89j0g7ichpkcm0mb1p5hhagwqgb0z15"; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = if stdenv.isDarwin then [ Security libiconv ] else [ openssl ]; # Get openssl-sys to use pkg-config OPENSSL_NO_VENDOR = 1; - checkFlagsArray = [ "--skip=basic_options" ]; + postInstall = '' + installShellCompletion --cmd xh \ + --bash completions/xh.bash \ + --fish completions/xh.fish \ + --zsh completions/_xh + + # https://github.com/ducaale/xh#xh-and-xhs + ln -s $out/bin/xh $out/bin/xhs + ''; # Nix build happens in sandbox without internet connectivity # disable tests as some of them require internet due to nature of application @@ -29,10 +37,11 @@ rustPlatform.buildRustPackage rec { doInstallCheck = true; postInstallCheck = '' $out/bin/xh --help > /dev/null + $out/bin/xhs --help > /dev/null ''; meta = with lib; { - description = "Yet another HTTPie clone in Rust"; + description = "Friendly and fast tool for sending HTTP requests"; homepage = "https://github.com/ducaale/xh"; changelog = "https://github.com/ducaale/xh/blob/v${version}/CHANGELOG.md"; license = licenses.mit; |