Commit 047b5cd1 authored by Guy Chronister's avatar Guy Chronister
Browse files

treewide: refactor git python package definitions

parent 19245606
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  python3Packages,
  fetchFromGitHub,
  git,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-mock,
}:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "git-archive-all";
  version = "1.23.1";
  format = "setuptools";
@@ -16,7 +13,7 @@ buildPythonApplication rec {
  src = fetchFromGitHub {
    owner = "Kentzo";
    repo = "git-archive-all";
    rev = version;
    tag = version;
    hash = "sha256-fIPjggOx+CEorj1bazz8s81ZdppkTL0OlA5tRqCYZyc=";
  };

@@ -40,7 +37,7 @@ buildPythonApplication rec {
    git
  ];

  checkInputs = [
  checkInputs = with python3Packages; [
    pytestCheckHook
    pytest-cov-stub
    pytest-mock
@@ -52,15 +49,15 @@ buildPythonApplication rec {
    export HOME="$(mktemp -d)"
  '';

  meta = with lib; {
  meta = {
    description = "Archive a repository with all its submodules";
    longDescription = ''
      A python script wrapper for git-archive that archives a git superproject
      and its submodules, if it has any. Takes into account .gitattributes
    '';
    homepage = "https://github.com/Kentzo/git-archive-all";
    license = licenses.mit;
    maintainers = with maintainers; [ fgaz ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fgaz ];
    mainProgram = "git-archive-all";
  };
}
+5 −5
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  python3Packages,
  fetchPypi,
  installShellFiles,
}:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "git-imerge";
  version = "1.2.0";
  format = "setuptools";
@@ -21,11 +21,11 @@ buildPythonApplication rec {
    installShellCompletion --bash completions/git-imerge
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/mhagger/git-imerge";
    description = "Perform a merge between two branches incrementally";
    license = licenses.gpl2Plus;
    maintainers = [ ];
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ ];
    mainProgram = "git-imerge";
  };
}
+3 −3
Original line number Diff line number Diff line
@@ -6,14 +6,14 @@
  fetchFromGitHub,
  installShellFiles,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "git-publish";
  version = "1.8.2";

  src = fetchFromGitHub {
    owner = "stefanha";
    repo = "git-publish";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-jjpbr+ZqG4U8/z0PurnXR+IUKQkG3QB8YqhDkH8uu2Y=";
  };

@@ -40,4 +40,4 @@ stdenv.mkDerivation rec {
    homepage = "https://github.com/stefanha/git-publish";
    mainProgram = "git-publish";
  };
}
})
+8 −11
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  hatchling,
  colorama,
  python3Packages,
  fetchPypi,
  gitpython,
}:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "gitup";
  version = "0.5.2";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-51DWPJ9JOMrRdWGaiiL4qzo4VFFeT1rG5yyI6Ej+ZRw=";
    hash = "sha256-51DWPJ9JOMrRdWGaiiL4qzo4VFFeT1rG5yyI6Ej+ZRw=";
  };

  build-system = [ hatchling ];
  propagatedBuildInputs = [
  build-system = with python3Packages; [ hatchling ];
  dependencies = with python3Packages; [
    colorama
    gitpython
  ];
@@ -26,11 +23,11 @@ buildPythonApplication rec {
  # no tests
  doCheck = false;

  meta = with lib; {
  meta = {
    description = "Easily update multiple Git repositories at once";
    homepage = "https://github.com/earwig/git-repo-updater";
    license = licenses.mit;
    maintainers = with maintainers; [
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      bdesham
      artturin
    ];
+8 −11
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  python3Packages,
  fetchgit,
  pbr,
  requests,
  setuptools,
  gitUpdater,
}:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "git-review";
  version = "2.5.0";
  format = "setuptools";

  # Manually set version because prb wants to get it from the git
  # Manually set version because pbr wants to get it from the git
  # upstream repository (and we are installing from tarball instead)
  PBR_VERSION = version;

@@ -29,11 +26,11 @@ buildPythonApplication rec {
    "man"
  ];

  nativeBuildInputs = [
  nativeBuildInputs = with python3Packages; [
    pbr
  ];

  propagatedBuildInputs = [
  dependencies = with python3Packages; [
    requests
    setuptools # implicit dependency, used to get package version through pkg_resources
  ];
@@ -47,12 +44,12 @@ buildPythonApplication rec {

  passthru.updateScript = gitUpdater { };

  meta = with lib; {
  meta = {
    description = "Tool to submit code to Gerrit";
    homepage = "https://opendev.org/opendev/git-review";
    changelog = "https://docs.opendev.org/opendev/git-review/latest/releasenotes.html#relnotes-${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ kira-bruneau ];
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ kira-bruneau ];
    mainProgram = "git-review";
  };
}