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 tfc commented Nov 22, 2019

Works on macOS 10.15

@tfc
tfc approved these changes Nov 22, 2019
@teto
Copy link
Contributor

@teto 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 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 blitz force-pushed the blitz:git-machete branch from 6c67b62 to 1aa0a1d Nov 22, 2019
@blitz
Copy link
Contributor Author

@blitz 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 ghost commented Nov 22, 2019

👍 LGTM

Copy link
Contributor

@Br1ght0ne Br1ght0ne left a comment

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 blitz force-pushed the blitz:git-machete branch from 1aa0a1d to 22d5e78 Nov 22, 2019
@blitz
Copy link
Contributor Author

@blitz blitz commented Nov 22, 2019

installShellCompletion

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

Copy link
Member

@worldofpeace worldofpeace left a comment

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
Contributor

@Br1ght0ne 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
Member

@worldofpeace worldofpeace commented Nov 22, 2019

Ah, merci bien @filalex77

That should be fine.

@Br1ght0ne
Copy link
Contributor

@Br1ght0ne Br1ght0ne commented Nov 22, 2019

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

@blitz blitz force-pushed the blitz:git-machete branch from 22d5e78 to 54a15bb Nov 24, 2019
@blitz
Copy link
Contributor Author

@blitz blitz commented Nov 24, 2019

@worldofpeace @filalex77 Done.

@blitz blitz requested a review from worldofpeace Nov 24, 2019
@worldofpeace worldofpeace merged commit 27421fc into NixOS:master Nov 24, 2019
2 of 4 checks passed
2 of 4 checks passed
grahamcofborg-eval Beginning Evaluations
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.