2023-09-23 17:42:12 +02:00
|
|
|
{ buildPythonApplication
|
|
|
|
, lib
|
2024-01-27 05:20:00 +01:00
|
|
|
, stdenv
|
2023-09-23 17:42:12 +02:00
|
|
|
, fetchFromGitHub
|
2024-01-27 05:20:00 +01:00
|
|
|
, pkg-config
|
2023-09-23 17:42:12 +02:00
|
|
|
, setuptools
|
|
|
|
, setuptools-rust
|
|
|
|
, rustPlatform
|
|
|
|
, cargo
|
|
|
|
, rustc
|
|
|
|
, breezy
|
|
|
|
, dulwich
|
|
|
|
, jinja2
|
2024-01-27 05:20:00 +01:00
|
|
|
, libiconv
|
|
|
|
, openssl
|
2023-09-23 17:42:12 +02:00
|
|
|
, pyyaml
|
|
|
|
, ruamel-yaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "silver-platter";
|
2024-01-27 05:20:00 +01:00
|
|
|
version = "0.5.20";
|
2023-09-23 17:42:12 +02:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jelmer";
|
|
|
|
repo = "silver-platter";
|
|
|
|
rev = version;
|
2024-01-27 05:20:00 +01:00
|
|
|
hash = "sha256-k+C4jrC4FO/yy9Eb6x4lv1zyyp/eGkpMcDqZ0KoxfBs=";
|
2023-09-23 17:42:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2024-01-27 05:20:00 +01:00
|
|
|
hash = "sha256-+EUj6iBnHF4zlOAAfaHy5V/z6CCD/LFksBClE4FaHHc=";
|
2023-09-23 17:42:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ setuptools breezy dulwich jinja2 pyyaml ruamel-yaml ];
|
2024-01-27 05:20:00 +01:00
|
|
|
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ pkg-config ];
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "silver_platter" ];
|
2023-09-23 17:42:12 +02: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";
|
|
|
|
};
|
|
|
|
}
|