unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Martin Becze <mjbecze@riseup.net>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 40984@debbugs.gnu.org
Subject: [bug#40984] [PATCH 1/2] gnu: Add guile3.0-ncurses.
Date: Fri, 1 May 2020 13:16:31 -0500	[thread overview]
Message-ID: <9fe04c4c-52ad-2279-95bb-00b5fcab0221@riseup.net> (raw)
In-Reply-To: <87d07o3paj.fsf@gmail.com>

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

Ok I think figured it out! Attached is the updated patch. I had to use
(target-guile-effective-version) instead of effective-version.

On 5/1/20 5:47 AM, Mathieu Othacehe wrote:
> 
> Hello Martin,
> 
> Thanks for this patch.
> 
>> +               (substitute* files
>> +                 (("\"libguile-ncurses\"")
>> +                  (format #f "\"~a/lib/guile/3.0/libguile-ncurses\""
>> +                          out)))
>> +               #t))))))))
> 
> I think you could modify guile-ncurses to use "effective-version"
> instead of hardcoded "2.2". This way, guile3.0-ncurses would just
> inherit from guile-ncurses this way:
> 
> --8<---------------cut here---------------start------------->8---
> (define-public guile3.0-ncurses
>   (package
>     (inherit guile-ncurses)
>     (name "guile3.0-ncurses")
>     (version "3.0")
>     (inputs `(("ncurses" ,ncurses)
>               ("guile" ,guile-3.0)))))
> --8<---------------cut here---------------end--------------->8---
> 
> WDYT?
> 
> Thanks,
> 
> Mathieu
> 

[-- Attachment #2: 0001-gnu-Add-guile3.0-ncurses.patch --]
[-- Type: text/x-patch, Size: 2757 bytes --]

From 002ec2f173b0782a4c9995c768e12a083e11ae3f Mon Sep 17 00:00:00 2001
From: Martin Becze <mjbecze@riseup.net>
Date: Thu, 30 Apr 2020 11:21:38 -0500
Subject: [PATCH 1/2] gnu: Add guile3.0-ncurses.

* gnu/packages/guile-xyz.scm (guile3.0-ncurses):
  Uses (target-guile-effective-version) instead of hardcoding the version
  number in the libary path.
  (guile3.0-ncurses): new variable.
---
 gnu/packages/guile-xyz.scm | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 6ec1c4c2fc..de76f3b6d0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -23,7 +23,7 @@
 ;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
 ;;; Copyright © 2019, 2020 Amar Singh <nly@disroot.org>
 ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
-;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1833,7 +1833,13 @@ many readers as needed).")
               ("guile" ,guile-2.2)))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (arguments
-     '(#:configure-flags (list "--with-ncursesw"  ; Unicode support
+     `(#:modules ((guix build gnu-build-system)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version))
+                  (guix build utils))
+       #:imported-modules ((guix build guile-build-system)
+                           ,@%gnu-build-system-modules)
+       #:configure-flags (list "--with-ncursesw" ; Unicode support
                                "--with-gnu-filesystem-hierarchy")
        #:phases
        (modify-phases %standard-phases
@@ -1848,8 +1854,8 @@ many readers as needed).")
                     (files (find-files dir ".scm")))
                (substitute* files
                  (("\"libguile-ncurses\"")
-                  (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
-                          out)))
+                  (format #f "\"~a/lib/guile/~a/libguile-ncurses\""
+                          out (target-guile-effective-version))))
                #t))))))
     (home-page "https://www.gnu.org/software/guile-ncurses/")
     (synopsis "Guile bindings to ncurses")
@@ -1858,6 +1864,14 @@ many readers as needed).")
 library.")
     (license license:lgpl3+)))
 
+(define-public guile3.0-ncurses
+  (package
+    (inherit guile-ncurses)
+    (name "guile3.0-ncurses")
+    (version "3.0")
+    (inputs `(("ncurses" ,ncurses)
+              ("guile" ,guile-3.0)))))
+
 (define-public guile-ncurses/gpm
   (package
     (inherit guile-ncurses)
-- 
2.26.2


  reply	other threads:[~2020-05-01 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 16:37 [bug#40984] [PATCH 1/2] gnu: Add guile3.0-ncurses Martin Becze
2020-05-01 10:47 ` Mathieu Othacehe
2020-05-01 18:16   ` Martin Becze [this message]
2020-05-02 10:32     ` bug#40984: " Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fe04c4c-52ad-2279-95bb-00b5fcab0221@riseup.net \
    --to=mjbecze@riseup.net \
    --cc=40984@debbugs.gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).