nixpkgs/pkgs/applications/version-management/silver-platter/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

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