all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version'.
@ 2018-10-17 19:27 Alex Vong
  2018-10-17 19:37 ` Alex Vong
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:27 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

Tags: patch

Hello,

The following patches for core-updates remove 'package-name-version' and
make everything use 'strip-store-file-name' instead of
'package-name-version'.

Cheers,
Alex

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version'.
  2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
@ 2018-10-17 19:37 ` Alex Vong
  2018-10-17 19:51   ` Alex Vong
  2018-10-17 19:40 ` [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name' Alex Vong
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:37 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

Alex Vong <alexvong1995@gmail.com> writes:

> Tags: patch
>
> Hello,
>
> The following patches for core-updates remove 'package-name-version' and
> make everything use 'strip-store-file-name' instead of
> 'package-name-version'.
>
> Cheers,
> Alex

I forget to mention that I haven't test the patches because of the huge
number of re-builds involved (I stop the build after noticing icedtea
has to be re-build). But I think these changes are
strightforward. Hopefully they will work wihout testing.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.
  2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
  2018-10-17 19:37 ` Alex Vong
@ 2018-10-17 19:40 ` Alex Vong
  2018-10-17 19:41 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:40 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-build-system-haskell-Use-strip-store-file-name.patch --]
[-- Type: text/x-diff, Size: 7097 bytes --]

From 0c4ece986917593b4f940c780e788009a38ce4b0 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 18 Oct 2018 02:53:32 +0800
Subject: [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.

See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/haskell-build-system.scm (package-name-version): Remove it.
(configure): Use 'strip-store-file-name' instead of 'package-name-version'.
(setup-compiler): Likewise.
(make-ghc-package-database): Likewise.
(register): Likewise.
* gnu/packages/haskell.scm (ghc-cairo)[arguments]: Likewise.
* gnu/packages/agda.scm (agda)[arguments]: Likewise.
---
 gnu/packages/agda.scm               |  4 ++--
 gnu/packages/haskell.scm            |  4 ++--
 guix/build/haskell-build-system.scm | 19 ++++++++-----------
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index 6bb38aac4..26c5012bb 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -85,6 +85,7 @@
            (lambda* (#:key outputs inputs tests? (configure-flags '())
                      #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (name-version (strip-store-file-name out))
                     (input-dirs (match inputs
                                   (((_ . dir) ...)
                                    dir)
@@ -95,8 +96,7 @@
                                     `(,(string-append "--bindir=" out "/bin"))
                                     `(,(string-append
                                         "--docdir=" out
-                                        "/share/doc/" ((@@ (guix build haskell-build-system)
-                                                           package-name-version) out)))
+                                        "/share/doc/" name-version))
                                     '("--libsubdir=$compiler/$pkg-$version")
                                     '("--package-db=../package.conf.d")
                                     '("--global")
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 0a90ac523..57435dca0 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -10619,6 +10619,7 @@ expose it from another module in the hierarchy.
            (lambda* (#:key outputs inputs tests? (configure-flags '())
                      #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (name-version (strip-store-file-name out))
                     (input-dirs (match inputs
                                   (((_ . dir) ...)
                                    dir)
@@ -10629,8 +10630,7 @@ expose it from another module in the hierarchy.
                                     `(,(string-append "--bindir=" out "/bin"))
                                     `(,(string-append
                                         "--docdir=" out
-                                        "/share/doc/" ((@@ (guix build haskell-build-system)
-                                                           package-name-version) out)))
+                                        "/share/doc/" name-version))
                                     '("--libsubdir=$compiler/$pkg-$version")
                                     '("--package-db=../package.conf.d")
                                     '("--global")
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 72714a29a..3cd49d4f4 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -78,6 +78,7 @@ and parameters ~s~%"
          (doc (assoc-ref outputs "doc"))
          (lib (assoc-ref outputs "lib"))
          (bin (assoc-ref outputs "bin"))
+         (name-version (strip-store-file-name out))
          (input-dirs (match inputs
                        (((_ . dir) ...)
                         dir)
@@ -88,7 +89,7 @@ and parameters ~s~%"
                          `(,(string-append "--bindir=" (or bin out) "/bin"))
                          `(,(string-append
                              "--docdir=" (or doc out)
-                             "/share/doc/" (package-name-version out)))
+                             "/share/doc/" name-version))
                          '("--libsubdir=$compiler/$pkg-$version")
                          `(,(string-append "--package-db=" %tmp-db-dir))
                          '("--global")
@@ -127,12 +128,6 @@ and parameters ~s~%"
   "Install a given Haskell package."
   (run-setuphs "copy" '()))
 
-(define (package-name-version store-dir)
-  "Given a store directory STORE-DIR return 'name-version' of the package."
-  (let* ((base (basename store-dir)))
-    (string-drop base
-                 (+ 1 (string-index base #\-)))))
-
 (define (grep rx port)
   "Given a regular-expression RX including a group, read from PORT until the
 first match and return the content of the group."
@@ -147,7 +142,7 @@ first match and return the content of the group."
 (define* (setup-compiler #:key system inputs outputs #:allow-other-keys)
   "Setup the compiler environment."
   (let* ((haskell (assoc-ref inputs "haskell"))
-         (name-version (package-name-version haskell)))
+         (name-version (strip-store-file-name haskell)))
     (cond
      ((string-match "ghc" name-version)
       (make-ghc-package-database system inputs outputs))
@@ -164,6 +159,7 @@ first match and return the content of the group."
 (define (make-ghc-package-database system inputs outputs)
   "Generate the GHC package database."
   (let* ((haskell  (assoc-ref inputs "haskell"))
+         (name-version (strip-store-file-name haskell))
          (input-dirs (match inputs
                        (((_ . dir) ...)
                         dir)
@@ -171,7 +167,7 @@ first match and return the content of the group."
          ;; Silence 'find-files' (see 'evaluate-search-paths')
          (conf-dirs (with-null-error-port
                      (search-path-as-list
-                      `(,(string-append "lib/" (package-name-version haskell)))
+                      `(,(string-append "lib/" name-version))
                       input-dirs #:pattern ".*\\.conf.d$")))
          (conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs)))
     (mkdir-p %tmp-db-dir)
@@ -231,9 +227,10 @@ given Haskell package."
 
   (let* ((out (assoc-ref outputs "out"))
          (haskell  (assoc-ref inputs "haskell"))
+         (name-verion (strip-store-file-name haskell))
          (lib (string-append out "/lib"))
-         (config-dir (string-append lib "/"
-                                    (package-name-version haskell)
+         (config-dir (string-append lib
+                                    "/" name-verion
                                     "/" name ".conf.d"))
          (id-rx (make-regexp "^id: *(.*)$"))
          (config-file (string-append out "/" name ".conf"))
-- 
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 2/2] java-utils: Use 'strip-store-file-name'.
  2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
  2018-10-17 19:37 ` Alex Vong
  2018-10-17 19:40 ` [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name' Alex Vong
@ 2018-10-17 19:41 ` Alex Vong
  2018-10-17 19:54 ` [bug#33077] [PATCH 1/2] build-system/haskell: " Alex Vong
  2018-10-17 19:55 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong
  4 siblings, 0 replies; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:41 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0002-java-utils-Use-strip-store-file-name.patch --]
[-- Type: text/x-diff, Size: 1868 bytes --]

From 3ddcfde711ce4a9cbff09c8b54f65bb2a977c094 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 18 Oct 2018 03:08:31 +0800
Subject: [PATCH 2/2] java-utils: Use 'strip-store-file-name'.

See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/java-utils.scm (package-name-version): Remove it.
(install-javadoc): Use 'strip-store-file-name' instead of
'package-name-version'.
---
 guix/build/java-utils.scm | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm
index 128be1ede..7c9cafacc 100644
--- a/guix/build/java-utils.scm
+++ b/guix/build/java-utils.scm
@@ -23,12 +23,6 @@
             install-jars
             install-javadoc))
 
-;; Copied from haskell-build-system.scm
-(define (package-name-version store-dir)
-  "Given a store directory STORE-DIR return 'name-version' of the package."
-  (let* ((base (basename store-dir)))
-    (string-drop base (+ 1 (string-index base #\-)))))
-
 (define* (ant-build-javadoc #:key (target "javadoc") (make-flags '())
                             #:allow-other-keys)
   (apply invoke `("ant" ,target ,@make-flags)))
@@ -48,8 +42,9 @@ is used in case the build.xml does not include an install target."
 install javadocs when this is not done by the install target."
   (lambda* (#:key outputs #:allow-other-keys)
     (let* ((out (assoc-ref outputs "out"))
+           (name-version (strip-store-file-name out))
            (docs (string-append (or (assoc-ref outputs "doc") out)
-                                "/share/doc/" (package-name-version out) "/")))
+                                "/share/doc/" name-version "/")))
       (mkdir-p docs)
       (copy-recursively apidoc-directory docs)
       #t)))
-- 
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version'.
  2018-10-17 19:37 ` Alex Vong
@ 2018-10-17 19:51   ` Alex Vong
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:51 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

Alex Vong <alexvong1995@gmail.com> writes:

> Alex Vong <alexvong1995@gmail.com> writes:
>
>> Tags: patch
>>
>> Hello,
>>
>> The following patches for core-updates remove 'package-name-version' and
>> make everything use 'strip-store-file-name' instead of
>> 'package-name-version'.
>>
>> Cheers,
>> Alex
>
> I forget to mention that I haven't test the patches because of the huge
> number of re-builds involved (I stop the build after noticing icedtea
> has to be re-build). But I think these changes are
> strightforward. Hopefully they will work wihout testing.

Sorry, forget to add the copyright lines again. Re-sending...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.
  2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
                   ` (2 preceding siblings ...)
  2018-10-17 19:41 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong
@ 2018-10-17 19:54 ` Alex Vong
  2018-10-19 21:20   ` bug#33077: " Ludovic Courtès
  2018-10-17 19:55 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong
  4 siblings, 1 reply; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:54 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995


[-- Attachment #1.1: 0001-build-system-haskell-Use-strip-store-file-name.patch --]
[-- Type: text/x-diff, Size: 7714 bytes --]

From 15d45f6fc8ead71b86fa276d2b4409a3e2ce8b1e Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 18 Oct 2018 02:53:32 +0800
Subject: [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.

See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/haskell-build-system.scm (package-name-version): Remove it.
(configure): Use 'strip-store-file-name' instead of 'package-name-version'.
(setup-compiler): Likewise.
(make-ghc-package-database): Likewise.
(register): Likewise.
* gnu/packages/haskell.scm (ghc-cairo)[arguments]: Likewise.
* gnu/packages/agda.scm (agda)[arguments]: Likewise.
---
 gnu/packages/agda.scm               |  5 +++--
 gnu/packages/haskell.scm            |  4 ++--
 guix/build/haskell-build-system.scm | 20 +++++++++-----------
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index 6bb38aac4..d2113555e 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -85,6 +86,7 @@
            (lambda* (#:key outputs inputs tests? (configure-flags '())
                      #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (name-version (strip-store-file-name out))
                     (input-dirs (match inputs
                                   (((_ . dir) ...)
                                    dir)
@@ -95,8 +97,7 @@
                                     `(,(string-append "--bindir=" out "/bin"))
                                     `(,(string-append
                                         "--docdir=" out
-                                        "/share/doc/" ((@@ (guix build haskell-build-system)
-                                                           package-name-version) out)))
+                                        "/share/doc/" name-version))
                                     '("--libsubdir=$compiler/$pkg-$version")
                                     '("--package-db=../package.conf.d")
                                     '("--global")
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 0a90ac523..57435dca0 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -10619,6 +10619,7 @@ expose it from another module in the hierarchy.
            (lambda* (#:key outputs inputs tests? (configure-flags '())
                      #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (name-version (strip-store-file-name out))
                     (input-dirs (match inputs
                                   (((_ . dir) ...)
                                    dir)
@@ -10629,8 +10630,7 @@ expose it from another module in the hierarchy.
                                     `(,(string-append "--bindir=" out "/bin"))
                                     `(,(string-append
                                         "--docdir=" out
-                                        "/share/doc/" ((@@ (guix build haskell-build-system)
-                                                           package-name-version) out)))
+                                        "/share/doc/" name-version))
                                     '("--libsubdir=$compiler/$pkg-$version")
                                     '("--package-db=../package.conf.d")
                                     '("--global")
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 72714a29a..7b556f643 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -78,6 +79,7 @@ and parameters ~s~%"
          (doc (assoc-ref outputs "doc"))
          (lib (assoc-ref outputs "lib"))
          (bin (assoc-ref outputs "bin"))
+         (name-version (strip-store-file-name out))
          (input-dirs (match inputs
                        (((_ . dir) ...)
                         dir)
@@ -88,7 +90,7 @@ and parameters ~s~%"
                          `(,(string-append "--bindir=" (or bin out) "/bin"))
                          `(,(string-append
                              "--docdir=" (or doc out)
-                             "/share/doc/" (package-name-version out)))
+                             "/share/doc/" name-version))
                          '("--libsubdir=$compiler/$pkg-$version")
                          `(,(string-append "--package-db=" %tmp-db-dir))
                          '("--global")
@@ -127,12 +129,6 @@ and parameters ~s~%"
   "Install a given Haskell package."
   (run-setuphs "copy" '()))
 
-(define (package-name-version store-dir)
-  "Given a store directory STORE-DIR return 'name-version' of the package."
-  (let* ((base (basename store-dir)))
-    (string-drop base
-                 (+ 1 (string-index base #\-)))))
-
 (define (grep rx port)
   "Given a regular-expression RX including a group, read from PORT until the
 first match and return the content of the group."
@@ -147,7 +143,7 @@ first match and return the content of the group."
 (define* (setup-compiler #:key system inputs outputs #:allow-other-keys)
   "Setup the compiler environment."
   (let* ((haskell (assoc-ref inputs "haskell"))
-         (name-version (package-name-version haskell)))
+         (name-version (strip-store-file-name haskell)))
     (cond
      ((string-match "ghc" name-version)
       (make-ghc-package-database system inputs outputs))
@@ -164,6 +160,7 @@ first match and return the content of the group."
 (define (make-ghc-package-database system inputs outputs)
   "Generate the GHC package database."
   (let* ((haskell  (assoc-ref inputs "haskell"))
+         (name-version (strip-store-file-name haskell))
          (input-dirs (match inputs
                        (((_ . dir) ...)
                         dir)
@@ -171,7 +168,7 @@ first match and return the content of the group."
          ;; Silence 'find-files' (see 'evaluate-search-paths')
          (conf-dirs (with-null-error-port
                      (search-path-as-list
-                      `(,(string-append "lib/" (package-name-version haskell)))
+                      `(,(string-append "lib/" name-version))
                       input-dirs #:pattern ".*\\.conf.d$")))
          (conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs)))
     (mkdir-p %tmp-db-dir)
@@ -231,9 +228,10 @@ given Haskell package."
 
   (let* ((out (assoc-ref outputs "out"))
          (haskell  (assoc-ref inputs "haskell"))
+         (name-verion (strip-store-file-name haskell))
          (lib (string-append out "/lib"))
-         (config-dir (string-append lib "/"
-                                    (package-name-version haskell)
+         (config-dir (string-append lib
+                                    "/" name-verion
                                     "/" name ".conf.d"))
          (id-rx (make-regexp "^id: *(.*)$"))
          (config-file (string-append out "/" name ".conf"))
-- 
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#33077] [PATCH 2/2] java-utils: Use 'strip-store-file-name'.
  2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
                   ` (3 preceding siblings ...)
  2018-10-17 19:54 ` [bug#33077] [PATCH 1/2] build-system/haskell: " Alex Vong
@ 2018-10-17 19:55 ` Alex Vong
  4 siblings, 0 replies; 8+ messages in thread
From: Alex Vong @ 2018-10-17 19:55 UTC (permalink / raw)
  To: 33077; +Cc: alexvong1995


[-- Attachment #1.1: 0002-java-utils-Use-strip-store-file-name.patch --]
[-- Type: text/x-diff, Size: 2182 bytes --]

From bba65bca3f5f8b7031b300032205c2413606d6fb Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 18 Oct 2018 03:08:31 +0800
Subject: [PATCH 2/2] java-utils: Use 'strip-store-file-name'.

See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/java-utils.scm (package-name-version): Remove it.
(install-javadoc): Use 'strip-store-file-name' instead of
'package-name-version'.
---
 guix/build/java-utils.scm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm
index 128be1ede..8200638be 100644
--- a/guix/build/java-utils.scm
+++ b/guix/build/java-utils.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,12 +24,6 @@
             install-jars
             install-javadoc))
 
-;; Copied from haskell-build-system.scm
-(define (package-name-version store-dir)
-  "Given a store directory STORE-DIR return 'name-version' of the package."
-  (let* ((base (basename store-dir)))
-    (string-drop base (+ 1 (string-index base #\-)))))
-
 (define* (ant-build-javadoc #:key (target "javadoc") (make-flags '())
                             #:allow-other-keys)
   (apply invoke `("ant" ,target ,@make-flags)))
@@ -48,8 +43,9 @@ is used in case the build.xml does not include an install target."
 install javadocs when this is not done by the install target."
   (lambda* (#:key outputs #:allow-other-keys)
     (let* ((out (assoc-ref outputs "out"))
+           (name-version (strip-store-file-name out))
            (docs (string-append (or (assoc-ref outputs "doc") out)
-                                "/share/doc/" (package-name-version out) "/")))
+                                "/share/doc/" name-version "/")))
       (mkdir-p docs)
       (copy-recursively apidoc-directory docs)
       #t)))
-- 
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#33077: [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.
  2018-10-17 19:54 ` [bug#33077] [PATCH 1/2] build-system/haskell: " Alex Vong
@ 2018-10-19 21:20   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-19 21:20 UTC (permalink / raw)
  To: Alex Vong; +Cc: 33077-done

Hello,

Alex Vong <alexvong1995@gmail.com> skribis:

> From 15d45f6fc8ead71b86fa276d2b4409a3e2ce8b1e Mon Sep 17 00:00:00 2001
> From: Alex Vong <alexvong1995@gmail.com>
> Date: Thu, 18 Oct 2018 02:53:32 +0800
> Subject: [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name'.
>
> See the discussion at
> <https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.
>
> * guix/build/haskell-build-system.scm (package-name-version): Remove it.
> (configure): Use 'strip-store-file-name' instead of 'package-name-version'.
> (setup-compiler): Likewise.
> (make-ghc-package-database): Likewise.
> (register): Likewise.
> * gnu/packages/haskell.scm (ghc-cairo)[arguments]: Likewise.
> * gnu/packages/agda.scm (agda)[arguments]: Likewise.

[...]

> From bba65bca3f5f8b7031b300032205c2413606d6fb Mon Sep 17 00:00:00 2001
> From: Alex Vong <alexvong1995@gmail.com>
> Date: Thu, 18 Oct 2018 03:08:31 +0800
> Subject: [PATCH 2/2] java-utils: Use 'strip-store-file-name'.
>
> See the discussion at
> <https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.
>
> * guix/build/java-utils.scm (package-name-version): Remove it.
> (install-javadoc): Use 'strip-store-file-name' instead of
> 'package-name-version'.

I pushed both to ‘core-updates’, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-19 21:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
2018-10-17 19:37 ` Alex Vong
2018-10-17 19:51   ` Alex Vong
2018-10-17 19:40 ` [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name' Alex Vong
2018-10-17 19:41 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong
2018-10-17 19:54 ` [bug#33077] [PATCH 1/2] build-system/haskell: " Alex Vong
2018-10-19 21:20   ` bug#33077: " Ludovic Courtès
2018-10-17 19:55 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.