Unverified Commit 07a88232 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

git-up: unbreak (#402064)

parents 8cd99e09 8179f88d
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
{
  lib,
  pythonPackages,
  fetchPypi,
  git,
  python3Packages,
  writableTmpDirAsHomeHook,
  gitMinimal,
}:

pythonPackages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "git-up";
  version = "2.3.0";
  format = "pyproject";
@@ -16,45 +17,45 @@ pythonPackages.buildPythonApplication rec {
    hash = "sha256-SncbnK6LxsleKRa/sSCm/8dsgPw/XJGvYfkcIeWYDy4=";
  };

  nativeBuildInputs = with pythonPackages; [
  pythonRelaxDeps = [
    "termcolor"
  ];

  build-system = with python3Packages; [
    poetry-core
  ];

  # git should be on path for tool to work correctly
  propagatedBuildInputs =
    [
      git
    ]
    ++ (with pythonPackages; [
  # required in PATH for tool to work
  propagatedBuildInputs = [ gitMinimal ];

  dependencies = with python3Packages; [
    colorama
    gitpython
    termcolor
    ]);
  ];

  nativeCheckInputs = [
    git
    pythonPackages.pytest7CheckHook
    gitMinimal
    python3Packages.pytest7CheckHook
    writableTmpDirAsHomeHook
  ];

  # 1. git fails to run as it cannot detect the email address, so we set it
  # 2. $HOME is by default not a valid dir, so we have to set that too
  # https://github.com/NixOS/nixpkgs/issues/12591
  # git fails without email address
  preCheck = ''
    export HOME=$TMPDIR
    git config --global user.email "nobody@example.com"
    git config --global user.name "Nobody"
  '';

  postInstall = ''
    rm -r $out/${pythonPackages.python.sitePackages}/PyGitUp/tests
    rm -r $out/${python3Packages.python.sitePackages}/PyGitUp/tests
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/msiemens/PyGitUp";
    description = "Git pull replacement that rebases all local branches when pulling";
    license = licenses.mit;
    maintainers = with maintainers; [ peterhoeg ];
    platforms = platforms.all;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ peterhoeg ];
    platforms = lib.platforms.all;
    mainProgram = "git-up";
  };
}
+0 −4
Original line number Diff line number Diff line
@@ -1360,10 +1360,6 @@ with pkgs;
    inherit (darwin.apple_sdk.frameworks) Security;
  };
  git-up = callPackage ../applications/version-management/git-up {
    pythonPackages = python3Packages;
  };
  gittyup = libsForQt5.callPackage ../applications/version-management/gittyup { };
  lucky-commit = callPackage ../applications/version-management/lucky-commit {