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
vcstool: init at 0.1.31 #29533
vcstool: init at 0.1.31 #29533
Conversation
sha256 = "0n2zkvy2km9ky9lljf1mq5nqyqi5qqzfy2a6sgkjg2grvsk7abxc"; | ||
}; | ||
|
||
meta = with stdenv.lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A maintainer must be set, did you want to maintain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, can I update the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I see that you've already done it. 👍
name = "vcstool"; | ||
version = "0.1.31"; | ||
#no tests | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FRidh would it not be helpful to have support for makeWrapperArgs = []
also in nixpkgs/pkgs/development/interpreters/python/wrapper.nix
? This package for instance would need tools like git
and svn
in its PATH. And the only way to inject this I am seeing is to have to the executable wrapped twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it could look like this:
diff --git a/pkgs/development/tools/vcstool/default.nix b/pkgs/development/tools/vcstool/default.nix
index 65ce3334b8..f03db562ab 100644
--- a/pkgs/development/tools/vcstool/default.nix
+++ b/pkgs/development/tools/vcstool/default.nix
@@ -1,21 +1,35 @@
-{ stdenv, fetchurl, python35Packages }:
-
- python35Packages.buildPythonApplication rec {
- name = "vcstool";
- version = "0.1.31";
- #no tests
- doCheck = false;
-
- propagatedBuildInputs = with python35Packages; [ pyyaml ];
- src = fetchurl {
- url = "mirror://pypi/v/vcstool/${name}-${version}.tar.gz";
- sha256 = "0n2zkvy2km9ky9lljf1mq5nqyqi5qqzfy2a6sgkjg2grvsk7abxc";
- };
-
- meta = with stdenv.lib; {
- description = "Provides a command line tool to invoke vcs commands on multiple repositories";
- homepage = "https://github.com/dirk-thomas/vcstool";
- license = licenses.asl20;
- maintainer = with maintainers; [ sivteck ];
- };
+{ stdenv, fetchFromGitHub, python3Packages, makeWrapper, git }:
+
+with python3Packages;
+
+buildPythonApplication rec {
+ name = "vcstool-${version}";
+ version = "0.1.31";
+
+ src = fetchFromGitHub {
+ owner = "dirk-thomas";
+ repo = "vcstool";
+ rev = version;
+ sha256 = "0xs77frwx1kvxks57nfw90vimhiaw61dl4kyhwbmcwnjs81xzb66";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ propagatedBuildInputs = [ pyyaml git ];
+
+ makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ git ]}"];
+
+ checkInputs = [ pytest ];
+ checkPhase = ''
+ # requires pydocstyle, which is not packaged yet
+ rm test/test_flake8.py
+ py.test test
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Provides a command line tool to invoke vcs commands on multiple repositories";
+ homepage = https://github.com/dirk-thomas/vcstool;
+ license = licenses.asl20;
+ maintainer = with maintainers; [ sivteck ];
+ };
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is wrapper.nix
relevant here? buildPythonApplication
is practically the same as buildPythonPackage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What code is used to wrap python executables then in buildPythonApplication
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also just patch the references to the executables. e.g. in the case of git
https://github.com/dirk-thomas/vcstool/blob/0.1.31/vcstool/clients/git.py#L382
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly the same as buildPythonPackage
:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/wrap.sh
doCheck = false; | ||
|
||
propagatedBuildInputs = with python35Packages; [ pyyaml ]; | ||
src = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchPypi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to fetchFromGithub
in my patch above to download the tests.
|
||
makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ git bazaar subversion ]}"]; | ||
|
||
doCheck = false; # requires network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to disable the tests again unfortunately.
|
||
propagatedBuildInputs = [ pyyaml ]; | ||
|
||
makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ git bazaar subversion ]}"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this over patching, since we have wrappers anyway and it is less like to break in future. I don't know, why I did not work for me in the first place.
@Mic92 can I close this PR? can you open another with yourself as the maintainer? |
@sivteck I don't want to adopt it actually. |
@Mic92 ok, can I squash the last commit? |
yes |
Adds vcstool application. Initial work to get ROS2 packages on Nix.
Adds vcstool application. Initial work to get ROS2 packages on
Nix
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)