Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-machete: init at 2.12.1 #73907

Merged
merged 1 commit into from Nov 24, 2019
Merged

git-machete: init at 2.12.1 #73907

merged 1 commit into from Nov 24, 2019

Conversation

blitz
Copy link
Contributor

@blitz blitz commented Nov 22, 2019

Motivation for this change

Git machete is a tool for automating rebase-based workflows. See https://github.com/VirtusLab/git-machete for details.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @tfc @jtraue

@tfc
Copy link
Contributor

tfc commented Nov 22, 2019

Works on macOS 10.15

@teto
Copy link
Member

teto commented Nov 22, 2019

this looks interesting. Do you plan to add the completion files ? with installShellCompletion for instance

@blitz
Copy link
Contributor Author

blitz commented Nov 22, 2019

this looks interesting. Do you plan to add the completion files ? with installShellCompletion for instance

Good point. Will do.

@blitz
Copy link
Contributor Author

blitz commented Nov 22, 2019

@teto I've added it unconditionally, as this is what the other git tools do as well. Tested successfully on NixOS.

@ghost
Copy link

ghost commented Nov 22, 2019

👍 LGTM

Copy link
Member

@Br1ght0ne Br1ght0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use installShellCompletion:

-      install -D completion/git-machete.completion.bash $out/etc/bash_completion.d/git-machete
-      install -D completion/git-machete.completion.zsh $out/share/zsh/site-functions/_git-machete
+      installShellCompletion
+        --name git-machete completion/git-machete.completion.bash
+        --name _git-machete completion/git-machete.completion.zsh

@blitz
Copy link
Contributor Author

blitz commented Nov 22, 2019

installShellCompletion

TIL. I've updated the PR to include this.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't build for me because you're missing pbr in nativeBuildInputs

Also, can we setup tests?
Those dependencies are at https://github.com/VirtusLab/git-machete/blob/master/test-requirements.txt, and belong in checkInputs. The test runner is tox.

@Br1ght0ne
Copy link
Member

Br1ght0ne commented Nov 22, 2019

@worldofpeace stestr is not in nixpkgs. I found packaging it (with checkInputs itself) to be challenging. How about we disable check for now?

diff --git a/pkgs/applications/version-management/git-and-tools/git-machete/default.nix b/pkgs/applications/version-management/git-and-tools/git-machete/default.nix
index 9d81149d600..aafaa6659d3 100644
--- a/pkgs/applications/version-management/git-and-tools/git-machete/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-machete/default.nix
@@ -1,4 +1,6 @@
-{ lib, buildPythonApplication, fetchPypi, installShellFiles }:
+{ lib, buildPythonApplication, fetchPypi
+, installShellFiles, pbr
+, flake8, mock, pycodestyle, pylint, tox }:
 
 buildPythonApplication rec {
   pname = "git-machete";
@@ -9,7 +11,12 @@ buildPythonApplication rec {
     sha256 = "114kq396zq45jlibn1lp0nk4lmanj4w1bcn48gi7xzdm0y1nkzfq";
   };
 
-  nativeBuildInputs = [ installShellFiles ];
+  nativeBuildInputs = [ installShellFiles pbr ];
+
+  # TODO: Add missing check inputs (2019-11-22):
+  # - stestr
+  doCheck = false;
+  checkInputs = [ flake8 mock pycodestyle pylint tox ];
 
   postInstall = ''
       installShellCompletion --bash --name git-machete completion/git-machete.completion.bash

@worldofpeace
Copy link
Contributor

Ah, merci bien @filalex77 ✨

That should be fine.

@Br1ght0ne
Copy link
Member

@blitz You can git apply <(curl https://github.com/filalex77/nixpkgs/commit/5d7f3dbc9f68158d890af4a40d5d93c4bae6f28a.diff) to apply this diff.

@blitz
Copy link
Contributor Author

blitz commented Nov 24, 2019

@worldofpeace @filalex77 Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants