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

cligh : init at 0.3, pyGithub : init at 1.32, python-jose : init at 1.3.2 #23914

Closed
wants to merge 1 commit into from

Conversation

jhhuh
Copy link
Contributor

@jhhuh jhhuh commented Mar 15, 2017

Motivation for this change

Adding a new package cligh (https://github.com/cmb/cligh) and the missing dependencies.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@jhhuh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer.

@@ -5063,6 +5063,26 @@ in {
};
};

python-jose = buildPythonPackage rec {
Copy link
Member

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"

Copy link
Contributor Author

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.

@@ -20338,6 +20357,25 @@ in {
};
};

pyGithub = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

sha256 = "0gip9ksm0m78wd2rhv4ahdaclw5fqz1f7bpdv8y3zpq7i9crf443";
};
propagatedBuildInputs = with self; [ python-jose ];
buildInput = with pkgs; [ openssl pkgconfig ];
Copy link
Member

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 ];

Copy link
Contributor Author

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 {
Copy link
Member

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.

Copy link
Contributor Author

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";
Copy link
Member

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.

Copy link
Contributor Author

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.

@jhhuh jhhuh force-pushed the cligh branch 2 times, most recently from 1e363ef to 2db47e3 Compare March 15, 2017 13:46
@@ -0,0 +1,37 @@
diff -ru python-jose-1.3.2/requirements.txt python-jose-1.3.2.new/requirements.txt
Copy link
Member

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

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

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

filename

Copy link
Contributor Author

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}";
Copy link
Member

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.

Copy link
Contributor Author

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
@Mic92
Copy link
Member

Mic92 commented Mar 16, 2017

I splitted it up into single commits, made some style changes and fixed the tests.

@Mic92 Mic92 closed this in 26045fa Mar 16, 2017
peterhoeg pushed a commit to peterhoeg/nixpkgs that referenced this pull request Mar 16, 2017
@jhhuh jhhuh deleted the cligh branch March 18, 2017 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants