blob: a878a1bd233b70992f0c98cca316d4d1f8ca9096 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ stdenv, lib, openssl, pkg-config, rustPlatform, fetchFromGitHub, Security
, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "xh";
version = "0.10.0";
src = fetchFromGitHub {
owner = "ducaale";
repo = "xh";
rev = "v${version}";
sha256 = "sha256-eOP9sc1qmQuc3HecNNZDMarVkXmEfGZkan0H9598LC0=";
};
cargoSha256 = "sha256-JXywHuZPQVhuWBVUNi9k8TwgE8KCNDtucjxxDi6unVM=";
nativeBuildInputs = [ 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" ];
# Nix build happens in sandbox without internet connectivity
# disable tests as some of them require internet due to nature of application
doCheck = false;
doInstallCheck = true;
postInstallCheck = ''
$out/bin/xh --help > /dev/null
'';
meta = with lib; {
description = "Yet another HTTPie clone in Rust";
homepage = "https://github.com/ducaale/xh";
changelog = "https://github.com/ducaale/xh/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ payas SuperSandro2000 ];
};
}
|