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

Update vdirsyncer #33052

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions pkgs/development/python-modules/milksnake/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ lib, python3Packages, buildPythonPackage, fetchurl }:
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, individual packages as parameters


buildPythonPackage rec {
pname = "milksnake";
version = "0.1.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.

drop name


src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does not work. I tested it, but it can't find the package. That's why I used fetchurl.

Copy link
Member

Choose a reason for hiding this comment

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

because you request a zip. It needs `extension = "zip";'

Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi with extension = "zip";

url = "https://pypi.python.org/packages/04/12/358c2c7a27f06a71d69e44a4b7f62411524c25e6c7284b5a0f757a9ba068/milksnake-0.1.1.zip";
sha256 = "12bdyc2kjqpiq8wrbsk7ymcq2xdakri3bsvaqgsyzj33wyzbcwzy";
};

buildInputs = with python3Packages; [
Copy link
Member

Choose a reason for hiding this comment

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

cffi only at build time?

cffi
Copy link
Member

Choose a reason for hiding this comment

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

no patching is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how to do this, TBH.

];

meta = with lib; {
description = "A python library that extends setuptools for binary extensions.";
homepage = https://pypi.python.org/pypi/milksnake/;
license = licenses.apl;
Copy link
Member

Choose a reason for hiding this comment

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

maintainer?

};
}
10 changes: 7 additions & 3 deletions pkgs/tools/misc/vdirsyncer/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{ stdenv, fetchurl, python3Packages, glibcLocales }:
{ stdenv, fetchurl, python3Packages, glibcLocales, pkgs }:

# Packaging documentation at:
# https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst
let
pythonPackages = python3Packages;
in
pythonPackages.buildPythonApplication rec {
version = "0.16.3";
version = "0.17.0a1";
Copy link
Member

Choose a reason for hiding this comment

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

we typically do not have alpha's in Nixpkgs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to leave this unmerged (even after the remaining issues with this PR are solved) until I can bump to a new stable release (if there is any).

name = "vdirsyncer-${version}";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

url = "mirror://pypi/v/vdirsyncer/${name}.tar.gz";
sha256 = "0dpwbfi97ksijqng191659m8k0v215y8ld95w8gb126m4m96qpzw";
sha256 = "1gzb37cpn6y7sg0fqcnb62ir9gdq6hvyz85x9pnss1d9xwf07lkn";
};

propagatedBuildInputs = with pythonPackages; [
Expand All @@ -20,6 +20,10 @@ pythonPackages.buildPythonApplication rec {
requests
requests_oauthlib # required for google oauth sync
atomicwrites
milksnake

pkgs.cargo
pkgs.rustc
Copy link
Member

Choose a reason for hiding this comment

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

Please import cargo and rustc without relying on pkgs. This is needed for vdirsyncer.override {} to work.

];

buildInputs = with pythonPackages; [hypothesis pytest pytest-localserver pytest-subtesthack setuptools_scm ] ++ [ glibcLocales ];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10712,6 +10712,8 @@ in {
};
};

milksnake = callPackage ../development/python-modules/milksnake { };

minimock = buildPythonPackage rec {
version = "1.2.8";
name = "minimock-${version}";
Expand Down