summary refs log tree commit diff
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2017-08-02 12:09:02 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-08-18 00:36:27 +0200
commitd80a47f2f53a686a0aef9ecf50d5d7f35e153a09 (patch)
tree35d5455cd70d3a20d4876fd21f93c0bbb1d11afb
parentd016b60fa350834e96dd075b6121de2c27ee2205 (diff)
downloadguix-d80a47f2f53a686a0aef9ecf50d5d7f35e153a09.tar.gz
gnu: libnl: Add "doc" output.
* gnu/packages/linux.scm (libnl)[native-inputs]: Add doc origin.
[outputs]: New field.
[arguments]: Add 'install-doc' phase. New field.

Co-authored-by: Marius Bakke <mbakke@fastmail.com>
-rw-r--r--gnu/packages/linux.scm24
1 files changed, 23 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ce95de6278..2df4c86cea 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1464,7 +1464,29 @@ transparently through a bridge.")
                (base32
                 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h"))))
     (build-system gnu-build-system)
-    (native-inputs `(("flex" ,flex) ("bison" ,bison)))
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)
+       ("libnl3-doc"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append
+                 "https://github.com/thom311/libnl/releases/download/libnl"
+                 (string-join (string-split version #\.) "_")
+                 "/libnl-doc-" version ".tar.gz"))
+           (sha256
+            (base32 "0srab805yj8wb13l64qjyp3mdbqapxg5vk46v3zlhhzpmxqw8j7r"))))))
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-doc
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((dest (string-append (assoc-ref outputs "doc")
+                                        "/share/doc/libnl")))
+               (mkdir-p dest)
+               (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
+                               "--strip-components=1" "-C" dest))))))))
     (home-page "http://www.infradead.org/~tgr/libnl/")
     (synopsis "NetLink protocol library suite")
     (description