silver-platter: provide binary and 0.8.1 -> 0.8.2 (#484609)
This commit is contained in:
@@ -1,53 +1,66 @@
|
||||
{
|
||||
python3Packages,
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
cargo,
|
||||
rustc,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
makeBinaryWrapper,
|
||||
pkg-config,
|
||||
libiconv,
|
||||
openssl,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "silver-platter";
|
||||
version = "0.8.1";
|
||||
pyproject = true;
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jelmer";
|
||||
repo = "silver-platter";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-/GFTM/VF+b0I8cDY4vkHzSxCBbvpMiLBVVEPFHcn1/Q=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-CvFnmGMV46nX6d568pZPqmDEyLZkDnDPpTtf0dMJd4U=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
hash = "sha256-Y16OnSBC4v21NcCeWAwwGoFYJMQq/se25QqvpMyblmk=";
|
||||
};
|
||||
cargoHash = "sha256-nMCOEb1WTG320ozno0H/5JeZql5TqFakO8TghjbKbiQ=";
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
setuptools
|
||||
breezy
|
||||
dulwich
|
||||
jinja2
|
||||
pyyaml
|
||||
ruamel-yaml
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
python3Packages.setuptools-rust
|
||||
rustPlatform.cargoSetupHook
|
||||
cargo
|
||||
rustc
|
||||
buildInputs = [
|
||||
python3
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
||||
buildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
|
||||
pythonImportsCheck = [ "silver_platter" ];
|
||||
nativeBuildInputs = [
|
||||
python3
|
||||
pkg-config
|
||||
|
||||
python3.pkgs.wrapPython
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3.pkgs.breezy
|
||||
];
|
||||
|
||||
pythonPath = [
|
||||
python3.pkgs.breezy
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapPythonPrograms
|
||||
for pgm in $out/bin/svp $out/bin/debian-svp; do
|
||||
wrapProgram "$pgm" \
|
||||
--set PYTHONNOUSERSITE "true" \
|
||||
--set PYTHONPATH "$program_PYTHONPATH"
|
||||
done
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
passthru.tests = {
|
||||
python3-bindings = python3.pkgs.silver-platter;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Automate the creation of merge proposals for scriptable changes";
|
||||
@@ -56,4 +69,4 @@ python3Packages.buildPythonApplication rec {
|
||||
maintainers = with lib.maintainers; [ lukegb ];
|
||||
mainProgram = "svp";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
pkgs,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
cargo,
|
||||
rustc,
|
||||
libiconv,
|
||||
openssl,
|
||||
|
||||
setuptools,
|
||||
setuptools-rust,
|
||||
breezy,
|
||||
dulwich,
|
||||
jinja2,
|
||||
pyyaml,
|
||||
ruamel-yaml,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) silver-platter;
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit (silver-platter)
|
||||
pname
|
||||
version
|
||||
src
|
||||
cargoDeps
|
||||
;
|
||||
|
||||
pyproject = true;
|
||||
|
||||
dependencies = [
|
||||
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" ];
|
||||
|
||||
meta = {
|
||||
inherit (silver-platter.meta)
|
||||
description
|
||||
homepage
|
||||
license
|
||||
maintainers
|
||||
;
|
||||
};
|
||||
}
|
||||
@@ -17335,6 +17335,8 @@ self: super: with self; {
|
||||
|
||||
sigtools = callPackage ../development/python-modules/sigtools { };
|
||||
|
||||
silver-platter = callPackage ../development/python-modules/silver-platter { };
|
||||
|
||||
simanneal = callPackage ../development/python-modules/simanneal { };
|
||||
|
||||
simber = callPackage ../development/python-modules/simber { };
|
||||
|
||||
Reference in New Issue
Block a user