2021-10-22 16:51:22 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
|
|
|
, openssl
|
|
|
|
}:
|
2020-08-16 08:26:59 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "gitoxide";
|
2022-04-22 12:34:23 +02:00
|
|
|
version = "0.12.0";
|
2020-08-16 08:26:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Byron";
|
|
|
|
repo = "gitoxide";
|
|
|
|
rev = "v${version}";
|
2022-04-22 12:34:23 +02:00
|
|
|
sha256 = "sha256-hDNlnNGm9of6Yu9WRVTRH5g4fAXlUxAexdufbZ0vMOo=";
|
2020-08-16 08:26:59 +02:00
|
|
|
};
|
|
|
|
|
2022-04-22 12:34:23 +02:00
|
|
|
cargoSha256 = "sha256-026DFEWu7PTvhJZP7YW3KOBOkzFRoxrc+THilit87jU=";
|
2020-09-13 21:08:17 +02:00
|
|
|
|
2021-05-10 04:40:00 +02:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2021-05-15 21:42:38 +02:00
|
|
|
buildInputs = if stdenv.isDarwin
|
2021-10-22 16:51:22 +02:00
|
|
|
then [ libiconv Security SystemConfiguration ]
|
2021-05-15 21:42:38 +02:00
|
|
|
else [ openssl ];
|
2020-09-13 21:08:17 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
2020-09-13 21:08:17 +02:00
|
|
|
OPENSSL_NO_VENDOR = 1;
|
2020-08-16 08:26:59 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-12-30 03:05:47 +01:00
|
|
|
description = "A command-line application for interacting with git repositories";
|
2020-08-16 08:26:59 +02:00
|
|
|
homepage = "https://github.com/Byron/gitoxide";
|
2021-10-22 16:51:22 +02:00
|
|
|
changelog = "https://github.com/Byron/gitoxide/blob/v${version}/CHANGELOG.md";
|
2020-09-13 21:08:17 +02:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
2021-10-22 16:51:22 +02:00
|
|
|
maintainers = with maintainers; [ syberant ];
|
2020-08-16 08:26:59 +02:00
|
|
|
};
|
|
|
|
}
|