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
cligh : init at 0.3, pyGithub : init at 1.32, python-jose : init at 1.3.2 #23914
Conversation
pkgs/top-level/python-packages.nix
Outdated
@@ -5063,6 +5063,26 @@ in { | |||
}; | |||
}; | |||
|
|||
python-jose = buildPythonPackage rec { |
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.
We have a new policy for python to put python packages into a separate file and only reference them here:
See also:
$ chromium "file://$(nix-build --no-out-link doc)//share/doc/nixpkgs/manual.html#contributing-guidelines"
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.
@Mic92 Thanks for your quick review. OK. I've check the new policy, and moved them to /development/python-modules/ directory.
pkgs/top-level/python-packages.nix
Outdated
@@ -20338,6 +20357,25 @@ in { | |||
}; | |||
}; | |||
|
|||
pyGithub = buildPythonPackage rec { |
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.
same here.
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.
done.
pkgs/top-level/python-packages.nix
Outdated
sha256 = "0gip9ksm0m78wd2rhv4ahdaclw5fqz1f7bpdv8y3zpq7i9crf443"; | ||
}; | ||
propagatedBuildInputs = with self; [ python-jose ]; | ||
buildInput = with pkgs; [ openssl pkgconfig ]; |
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.
pkgconfig goes to nativeBuildInputs:
nativeBuildInputs = [ pkgconfig ];
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.
You're right. Anyway, both openssl and pkgconfig are found to be unnecessary so I removed the line. I do not remember why I put them in.
{ stdenv, fetchurl, pythonPackages }: | ||
|
||
with pythonPackages; | ||
buildPythonPackage rec { |
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 would use buildPythonApplication here.
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.
OK, done :)
namePrefix = ""; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/CMB/cligh/archive/v${version}.tar.gz"; |
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 would use fetchFromGitHub
here.
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.
OK. I changed it to fetchFromGiHub. I thought the release archive versions may have different contents so fetchurl was used, but now I see their release archives seem to have the same content as in the git repos.
1e363ef
to
2db47e3
Compare
@@ -0,0 +1,37 @@ | |||
diff -ru python-jose-1.3.2/requirements.txt python-jose-1.3.2.new/requirements.txt |
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.
please check the name of this file, pycyprtodome.patch
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 Thanks for your review. One stupid typo. Fixed.
}; | ||
patches = [ | ||
# to use pycryptodme instead of pycrypto | ||
./pycyprtodome.patch |
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.
filename
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.
changed
, buildPythonPackage, python-jose }: | ||
|
||
buildPythonPackage rec { | ||
name = "pyGithub-${version}"; |
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.
PyGitHub
, so capital P because that's the name upstream uses.
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.
You're right. It is now capitalized.
….3.2 python-jose and pyGithub moved to python-module directory pyGithub : unneccessary dependencies removed minor changes: pyGithub -> PyGithub, pycyprtodome.patch -> pycryptodome.patch
I splitted it up into single commits, made some style changes and fixed the tests. |
Motivation for this change
Adding a new package cligh (https://github.com/cmb/cligh) and the missing dependencies.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)