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
pythonPackages.libnacl: init at 1.5.0 #24020
Conversation
pkgs/top-level/python-packages.nix
Outdated
name = "libnacl-${version}"; | ||
version = "1.5.0"; | ||
|
||
src = pkgs.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.
Done, it will be included in next push.
pkgs/top-level/python-packages.nix
Outdated
|
||
propagatedBuildInputs = with self; [ pkgs.libsodium ]; | ||
|
||
patchPhase = '' |
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.
postPatch
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, it will be included in next push.
pkgs/top-level/python-packages.nix
Outdated
@@ -13867,6 +13867,30 @@ in { | |||
clblas = pkgs.clblas-cuda; | |||
}; | |||
|
|||
libnacl = 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.
move expression to pkgs/development/python-modules/libnacl/default.nix
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, it will be included in next push.
There is now only libnacl = callPackage ../development/python-modules/libnacl/default.nix { };
in python-packages.nix
pkgs/top-level/python-packages.nix
Outdated
patchPhase = '' | ||
substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium.so')" "ctypes.cdll.LoadLibrary('${pkgs.libsodium}/lib/libsodium.so')" | ||
''; | ||
#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.
are the tests running and are they found?
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.
It seems they are not found, there is no error but it says Ran 0 tests in 0.000s
. Any tip on how to proceed?
pkgs/top-level/python-packages.nix
Outdated
''; | ||
#doCheck = false; | ||
|
||
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.
are you going to maintain this package?
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'm pretty inexperienced, but i am willing to do it if it's ok.
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.
in this case please add yourself as a maintainer to this package.
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.
No problem, darwin users can propose a fix. |
f0ed147
to
f7a20c0
Compare
description = "Python bindings for libsodium based on ctypes"; | ||
homepage = "https://pypi.python.org/pypi/libnacl"; | ||
license = stdenv.lib.licenses.asl20; | ||
platforms = stdenv.lib.platforms.unix; |
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.
For the meantime, I would limit platforms to linux, if mac os x probably does not work.
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.
f7a20c0
to
c883cef
Compare
I also added the tests of this project |
Wow, thanks a lot, your changes have taught me some things. |
Motivation for this change
To add libnacl to pythonPackages.
This is needed to upgrade tribler to 7.0.0-beta (still working on it) and might be useful for other packages.
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/
)It might need another substitution in postPatch to work in macOS, i have no way to test it, but the current substitution affects linux only.