Subject: bug#31190: Ansible doesn't build

From: Jelle Licht <[email-masked]>
Date: Tue, 17 Apr 2018 20:36:20 +0200

2018-04-17 11:40 GMT+02:00 Clément Lassieur <[email-masked]>:

> starting phase `check'
> running "python setup.py" with command "test" and parameters ()
> running test
> Searching for pynacl>=1.0.1
> Reading https://pypi.python.org/simple/pynacl/
> Download error on https://pypi.python.org/simple/pynacl/: [Errno -2] Name
> or service not known -- Some packages may not be found!
> Couldn't find index page for 'pynacl' (maybe misspelled?)
> Scanning index of all packages (this may take a while)
> Reading https://pypi.python.org/simple/
> Download error on https://pypi.python.org/simple/: [Errno -2] Name or
> service not known -- Some packages may not be found!
> No local packages or working download links found for pynacl>=1.0.1
> error: Could not find suitable distribution for
> Requirement.parse('pynacl>=1.0.1')
> phase `check' failed after 0.5 seconds
> builder for `/gnu/store/4mmlsi4rw7iwaw1nghkixbx859vi24ad-ansible-2.4.2.0.drv'
> failed with exit code 1
> @ build-failed /gnu/store/4mmlsi4rw7iwaw1nghkixbx859vi24ad-ansible-2.4.2.0.drv
> - 1 builder for `/gnu/store/4mmlsi4rw7iwaw1nghkixbx859vi24ad-ansible-2.4.2.0.drv'
> failed with exit code 1
> guix build: error: build failed: build of `/gnu/store/
> 4mmlsi4rw7iwaw1nghkixbx859vi24ad-ansible-2.4.2.0.drv' failed
>
>
>
>
The attached patches should fix this issue, but I am currently not able to
build them myself.
Could someone review + verify them?

- Jelle
From 1c978fad25da3847d55fd6879a4473e84a9b02ff Mon Sep 17 00:00:00 2001
From: Jelle Licht <[email-masked]>
Date: Tue, 17 Apr 2018 21:29:41 +0200
Subject: [PATCH] gnu: Add python2-pynacl.

* gnu/packages/python-crypto.scm (python2-pynacl): New variable.
---
 gnu/packages/python-crypto.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index ace0891a7..9d5c35cac 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -587,6 +587,9 @@ Networking and Cryptography library.  These libraries have a stated goal
 of improving usability, security and speed.")
     (license license:asl2.0)))
 
+(define-public python2-pynacl
+  (package-with-python2 python-pynacl))
+
 (define-public python2-pgpdump
   (package
     (name "python2-pgpdump")
-- 
2.17.0

From f770998d0f0b56180e0c9a12f0946a77d7ff61a5 Mon Sep 17 00:00:00 2001
From: Jelle Licht <[email-masked]>
Date: Tue, 17 Apr 2018 21:31:05 +0200
Subject: [PATCH] gnu: ansible: Add missing inputs

* gnu/packages/admin.scm (ansible)[native-inputs]: Add python2-bcrypt and
  python2-pynacl.
---
 gnu/packages/admin.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index aed997e5b..07401af72 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -73,6 +73,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages password-utils)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages terminals)
@@ -1522,7 +1523,9 @@ of supported upstream metrics systems simultaneously.")
        (patches (search-patches "ansible-wrap-program-hack.patch"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python2-pycrypto" ,python2-pycrypto)
+     `(("python2-bcrypt" ,python2-bcrypt)
+       ("python2-pycrypto" ,python2-pycrypto)
+       ("python2-pynacl" ,python2-pynacl)
        ("python2-httplib2" ,python2-httplib2)
        ("python2-passlib" ,python2-passlib)
        ("python2-nose" ,python2-nose)
-- 
2.17.0