guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: youtube-dl: Add native-search-paths.


From: Alex Vong
Subject: Re: [PATCH] gnu: youtube-dl: Add native-search-paths.
Date: Mon, 14 Dec 2015 20:20:55 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

>From 21db93d3caa4846882720a610a7fa0e0a2fe3162 Mon Sep 17 00:00:00 2001
From: Alex Vong <address@hidden>
Date: Mon, 14 Dec 2015 20:00:52 +0800
Subject: [PATCH] gnu: youtube-dl: Install the man page and completion files.

* gnu/packages/video.scm (youtube-dl) [arguments]: Add
fix-the-data-files-path phase.
---
 gnu/packages/video.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 76374e2..154befd 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -822,6 +822,20 @@ projects while introducing many more.")
     (build-system python-build-system)
     (native-inputs `(("python-setuptools" ,python-setuptools)))
     (home-page "http://youtube-dl.org";)
+    (arguments
+     ;; The problem here is that the path for the man page and completion
+     ;; files is relative. Normally, this is fine. However, for some reason,
+     ;; setup.py uses the auto-detected sys.prefix instead of the user-defined
+     ;; "--prefix=FOO". So, we need pass the prefix directly.
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'install 'fix-the-data-files-path
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((prefix (assoc-ref outputs "out")))
+                        (substitute* "setup.py"
+                          (("'etc/")
+                           (string-append "'" prefix "/etc/"))
+                          (("'share/")
+                           (string-append "'" prefix "/share/")))))))))
     (synopsis "Download videos from YouTube.com and other sites")
     (description
      "Youtube-dl is a small command-line program to download videos from
-- 
2.6.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]