Unverified Commit df009d42 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #256920 from lukegb/silverplatter

silver-platter: init at 0.5.12
parents f3d260b2 0c702bd8
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
{ buildPythonApplication
, lib
, fetchFromGitHub
, setuptools
, setuptools-rust
, rustPlatform
, cargo
, rustc
, breezy
, dulwich
, jinja2
, pyyaml
, ruamel-yaml
}:

buildPythonApplication rec {
  pname = "silver-platter";
  version = "0.5.12";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jelmer";
    repo = "silver-platter";
    rev = version;
    hash = "sha256-QkTT9UcJuGDAwpp/CtXobPvfTYQzFakBR72MhF//Bpo=";
  };

  cargoDeps = rustPlatform.fetchCargoTarball {
    inherit src;
    name = "${pname}-${version}";
    hash = "sha256-QLnKu9D23FVp1jCSuxN3odPZ1ToAZ6i/FNS8BkmNuQw=";
  };

  propagatedBuildInputs = [ setuptools breezy dulwich jinja2 pyyaml ruamel-yaml ];
  nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ];

  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";
  };
}
+15 −1
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, cargo
, configobj
@@ -8,6 +9,7 @@
, dulwich
, fastbencode
, fastimport
, pygithub
, libiconv
, merge3
, patiencediff
@@ -37,6 +39,14 @@ buildPythonPackage rec {
    hash = "sha256-fEEvOfo8YWhx+xuiqD/KNstlso5/K1XJnGY64tkLIwE=";
  };

  patches = [
    # Explicitly track which URLs are used for GitLab
    (fetchpatch {
      url = "https://github.com/breezy-team/breezy/commit/cc9fdf3774253183f726127c2ee191c24640d898.patch";
      hash = "sha256-HTDAW3CPEZ1YBe0wnv6ncWEd0QRHwHawfTplbVDiOGc=";
    })
  ];

  cargoDeps = rustPlatform.importCargoLock {
    lockFile = ./Cargo.lock;
  };
@@ -66,7 +76,8 @@ buildPythonPackage rec {
    pyyaml
    urllib3
  ] ++ passthru.optional-dependencies.launchpad
    ++ passthru.optional-dependencies.fastimport;
    ++ passthru.optional-dependencies.fastimport
    ++ passthru.optional-dependencies.github;

  nativeCheckInputs = [
    testtools
@@ -109,6 +120,9 @@ buildPythonPackage rec {
      fastimport = [
        fastimport
      ];
      github = [
        pygithub
      ];
    };
  };

+2 −0
Original line number Diff line number Diff line
@@ -2527,6 +2527,8 @@ with pkgs;
  scmpuff = callPackage ../applications/version-management/scmpuff { };
  silver-platter = python3Packages.callPackage ../applications/version-management/silver-platter { };
  stgit = callPackage ../applications/version-management/stgit { };
  subgit = callPackage ../applications/version-management/subgit { };