nixpkgs/pkgs/applications/version-management/gitoxide/default.nix
2023-11-05 07:02:36 +00:00

44 lines
1.0 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, cmake
, pkg-config
, stdenv
, libiconv
, Security
, SystemConfiguration
, curl
, openssl
}:
rustPlatform.buildRustPackage rec {
pname = "gitoxide";
version = "0.31.1";
src = fetchFromGitHub {
owner = "Byron";
repo = "gitoxide";
rev = "v${version}";
hash = "sha256-ML0sVsegrG96rBfpnD7GgOf9TWe/ojRo9UJwMFpDsKs=";
};
cargoHash = "sha256-gz4VY4a4AK9laIQo2MVTabyKzMyc7jRHrYsrfOLx+Ao=";
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ curl ] ++ (if stdenv.isDarwin
then [ libiconv Security SystemConfiguration ]
else [ openssl ]);
# Needed to get openssl-sys to use pkg-config.
env.OPENSSL_NO_VENDOR = 1;
meta = with lib; {
description = "A command-line application for interacting with git repositories";
homepage = "https://github.com/Byron/gitoxide";
changelog = "https://github.com/Byron/gitoxide/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ syberant ];
};
}