2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, libgit2
|
|
|
|
, libssh2
|
|
|
|
, openssl
|
|
|
|
, zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
rustPlatform.buildRustPackage {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "git-series";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "unstable-2019-10-15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "git-series";
|
|
|
|
repo = "git-series";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "c570a015e15214be46a7fd06ba08526622738e20";
|
|
|
|
sha256 = "1i0m2b7ma6xvkg95k57gaj1wpc1rfvka6h8jr5hglxmqqbz6cb6w";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
libgit2
|
|
|
|
libssh2
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
LIBGIT2_SYS_USE_PKG_CONFIG = true;
|
|
|
|
LIBSSH2_SYS_USE_PKG_CONFIG = true;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# update Cargo.lock to work with openssl 3
|
|
|
|
postPatch = ''
|
|
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
install -D "$src/git-series.1" "$out/man/man1/git-series.1"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to help with formatting git patches for review on mailing lists";
|
|
|
|
longDescription = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
git series tracks changes to a patch series over time. git
|
|
|
|
series also tracks a cover letter for the patch series,
|
|
|
|
formats the series for email, and prepares pull requests.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
homepage = "https://github.com/git-series/git-series";
|
|
|
|
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ edef vmandela ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "git-series";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|