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

Add papis: 0.5.0 #32760

Closed
wants to merge 17 commits into from
Closed

Add papis: 0.5.0 #32760

wants to merge 17 commits into from

Conversation

matthiasbeyer
Copy link
Contributor

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
    • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Need help here. It does not find configparser though the dependency is clearly in scope.

@@ -6252,6 +6254,10 @@ in {

paperwork-backend = callPackage ../applications/office/paperwork/backend.nix { };

papis = callPackage ../applications/office/papis { };
Copy link
Member

Choose a reason for hiding this comment

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

This is not correct. If its a Python library then it should be called from here but the expression should be in pkgs/development/python-modules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it is not a library?

Copy link
Member

Choose a reason for hiding this comment

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

Then you should also add an entry to all-packages.nix i.e, papis = python3.pkgs.papis

Copy link
Member

Choose a reason for hiding this comment

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

Then it should have an entry in all-packages.nix, but it should not be called via python-packages.nix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to all-packages.nix.

@@ -0,0 +1,41 @@
{ lib, fetchFromGitHub, python3Packages, pkgs }:
Copy link
Member

Choose a reason for hiding this comment

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

don't pass in pkgs

buildPythonPackage rec {
pname = "arxiv2bib";
version = "1.0.8";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Don't set name. Its not required anymore with buildPython*

python3Packages.buildPythonPackage rec {
pname = "pylibgen";
version = "1.3.0";
name = "${pname}-${version}";
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

buildPythonPackage rec {
pname = "papis-python-rofi";
version = "1.0.1";
name = "${pname}-${version}";
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


let
# pyparser only builds with parse == 1.6.5
parse = 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.

No "private" packages in python-packages.nix because that can cause collisions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So how to do this then? We need this specific version (we have a more recent version in nixpkgs, but we need an older one for the papis package (see comment)).

description = "Get arXiv.org metadata in BibTeX format";
license = stdenv.lib.licenses.bsd;
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
platforms = stdenv.lib.platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

why only .unix?

description = "Create simple GUIs using the Rofi application";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
platforms = stdenv.lib.platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

why only .unix?

description = "Programmatic Python interface for Library Genesis";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
platforms = stdenv.lib.platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

why only .unix?

description = "A collection of classes to make it easier to parse text data in a pythonic way";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
platforms = stdenv.lib.platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

why only .unix?

@orivej
Copy link
Contributor

orivej commented Dec 17, 2017

BTW it was surprising to discover that in Nixpkgs lib.platforms.unix == lib.platforms.all. As a matter of style, I think all is preferred in all cases.

@@ -0,0 +1,41 @@
{ lib, fetchFromGitHub, python3Packages }:

python3Packages.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.

Why not buildPythonApplication then?

@matthiasbeyer
Copy link
Contributor Author

Still fails because of builder for ‘/nix/store/gs64w0j7yfyw80zb1q8hvyn1b775p9am-python2.7-pylibgen-1.3.0.drv’ failed with exit code 1.


python3Packages.buildPythonApplication rec {
name = "papis-${version}";
version = "v0.5.0";
Copy link
Member

Choose a reason for hiding this comment

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

without the v

src = fetchFromGitHub {
owner = "alejandrogallo";
repo = "papis";
rev = version;
Copy link
Member

Choose a reason for hiding this comment

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

this could be e.g. rev = "v${version}";

pythonPackages.buildPythonPackage rec {
pname = "pylibgen";
version = "1.3.0";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

no name

@@ -0,0 +1,25 @@
{ pythonPackages, fetchPypi , python , stdenv }:
Copy link
Member

Choose a reason for hiding this comment

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

no pythonPackages in python-modules. This applies to other expressions as well.


let
# pyparser only builds with parse == 1.6.5
parse = 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 can't have "private" packages inside python-packages.nix as that could cause collisions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So what do you suggest?


let
# pyparser only builds with parse == 1.6.5
parse = buildPythonPackage rec {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned by @FRidh, this should not be. I don't know how to do this, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw I also don't understand why github marks the other comments on this diff as outdated, I did not change this part of the diff in my fixup commits!

Copy link
Member

Choose a reason for hiding this comment

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

I don't mind helping out, but this needs a bit more effort. Mainly, check and verify that your contribution is according to the (Python) contributing guidelines because it gets very tiring having to note certain parts have not been checked.


let
# pyparser only builds with parse == 1.6.5
parse = 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 don't mind helping out, but this needs a bit more effort. Mainly, check and verify that your contribution is according to the (Python) contributing guidelines because it gets very tiring having to note certain parts have not been checked.

@@ -0,0 +1,19 @@
{ buildPythonPackage , fetchPypi , python , stdenv }:

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.

Tests are not run. I noticed no tests are included in this archive.

@@ -13506,13 +13512,13 @@ in {


vobject = buildPythonPackage rec {
version = "0.9.3";
version = "0.9.5";
Copy link
Member

Choose a reason for hiding this comment

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

I've pushed this commit to master (even though this expression should be moved).

@nico202
Copy link
Contributor

nico202 commented Feb 14, 2018

Hi, I just realized this issue was open, #34761 solves it, can be closed

@matthiasbeyer matthiasbeyer deleted the add-papis branch February 14, 2018 09:42
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