mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
49 lines
916 B
Nix
49 lines
916 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, openssl
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "hydra-cli";
|
|
version = "0.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nlewo";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1fd3swdjx249971ak1bgndm5kh6rlzbfywmydn122lhfi6ry6a03";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
# build fails due to outdated socket2 dependency
|
|
postPatch = ''
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "A client for the Hydra CI";
|
|
homepage = "https://github.com/nlewo/hydra-cli";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ gilligan lewo ];
|
|
};
|
|
}
|