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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.3 KiB
Nix
Raw Permalink Normal View History

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