summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-08-24 04:21:42 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-08-24 04:36:51 +0200
commita2765029c2e2fbbf5e9d548a7a635a373cccbf7e (patch)
tree3b41c25f728df49d9b55e0cb46dafa3558621afd /gnu
parent44da87334da74cbbeb20e5819c767fc886cf7aac (diff)
downloadguix-patches-a2765029c2e2fbbf5e9d548a7a635a373cccbf7e.tar
guix-patches-a2765029c2e2fbbf5e9d548a7a635a373cccbf7e.tar.gz
gnu: electrum: Fix share/ location.
* gnu/packages/finance.scm (electrum)[arguments]: Rename the ‘patch-home’ phase to ‘fix-prefix’. Do so.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/finance.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 12da4225dc..332142f0c2 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -458,12 +458,16 @@ do so.")
`(#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
- (add-before 'build 'patch-home
+ (add-after 'unpack 'fix-prefix
(lambda* (#:key outputs #:allow-other-keys)
- (substitute* "setup.py"
- (("~/.local/share")
- (string-append (assoc-ref outputs "out") "/local/share")))
- #t)))))
+ (let ((out (assoc-ref outputs "out")))
+ ;; setup.py installs to ~/.local/share if sys.prefix/share isn't
+ ;; writable. sys.prefix points to Python's, not our, --prefix.
+ (mkdir-p (string-append out "/share"))
+ (substitute* "setup.py"
+ (("sys\\.prefix")
+ (format #f "\"~a\"" out)))
+ #t))))))
(home-page "https://electrum.org/")
(synopsis "Bitcoin wallet")
(description