2023-09-23 15:42:12 +00:00
|
|
|
{ buildPythonApplication
|
|
|
|
, lib
|
2024-01-27 04:20:00 +00:00
|
|
|
, stdenv
|
2023-09-23 15:42:12 +00:00
|
|
|
, fetchFromGitHub
|
2024-01-27 04:20:00 +00:00
|
|
|
, pkg-config
|
2023-09-23 15:42:12 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-rust
|
|
|
|
, rustPlatform
|
|
|
|
, cargo
|
|
|
|
, rustc
|
|
|
|
, breezy
|
|
|
|
, dulwich
|
|
|
|
, jinja2
|
2024-01-27 04:20:00 +00:00
|
|
|
, libiconv
|
|
|
|
, openssl
|
2023-09-23 15:42:12 +00:00
|
|
|
, pyyaml
|
|
|
|
, ruamel-yaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "silver-platter";
|
2024-01-27 04:20:00 +00:00
|
|
|
version = "0.5.20";
|
2023-09-23 15:42:12 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jelmer";
|
|
|
|
repo = "silver-platter";
|
|
|
|
rev = version;
|
2024-01-27 04:20:00 +00:00
|
|
|
hash = "sha256-k+C4jrC4FO/yy9Eb6x4lv1zyyp/eGkpMcDqZ0KoxfBs=";
|
2023-09-23 15:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2024-01-27 04:20:00 +00:00
|
|
|
hash = "sha256-+EUj6iBnHF4zlOAAfaHy5V/z6CCD/LFksBClE4FaHHc=";
|
2023-09-23 15:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ setuptools breezy dulwich jinja2 pyyaml ruamel-yaml ];
|
2024-01-27 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "silver_platter" ];
|
2023-09-23 15:42:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Automate the creation of merge proposals for scriptable changes";
|
|
|
|
homepage = "https://jelmer.uk/code/silver-platter";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
mainProgram = "svp";
|
|
|
|
};
|
|
|
|
}
|