all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: poptsov.artyom@gmail.com (Artyom V. Poptsov)
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 51998@debbugs.gnu.org
Subject: [bug#51998] [PATCH] gnu: Add guile-gitlab
Date: Fri, 26 Nov 2021 22:20:17 +0300	[thread overview]
Message-ID: <87bl26k9la.fsf@gmail.com> (raw)
In-Reply-To: <87h7c0mq2s.fsf@gnu.org> (Mathieu Othacehe's message of "Thu, 25 Nov 2021 11:28:59 +0000")


[-- Attachment #1.1: Type: text/plain, Size: 116 bytes --]

Hello Mathieu,

thank you for the feedback.

I fixed my patch, please find the updated version attached.

- Artyom


[-- Attachment #1.2: 0001-gnu-Add-guile-gitlab.patch --]
[-- Type: text/x-diff, Size: 4383 bytes --]

From 2e53ae7cda8d704d38633636f6e602abe411498c Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 20 Nov 2021 15:32:10 +0300
Subject: [PATCH] gnu: Add guile-gitlab

* gnu/packages/guile-xyz.scm (guile-gitlab): Add new package.
---
 gnu/packages/guile-xyz.scm | 69 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 628d81710a..5aae47da1d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2021 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4795,3 +4796,71 @@ It provides a generic library for writing implementations of a netlink
 protocol, a low-level rtnetlink implementation that uses that library and a
 high-level API for network management that uses rtnetlink.")
     (license license:gpl3+)))
+
+(define-public guile-gitlab
+  (package
+    (name "guile-gitlab")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/artyom-poptsov/guile-gitlab")
+             (commit (string-append "v" version))))
+       (file-name (string-append name "-" version "-checkout"))
+       (sha256
+        (base32
+         "1vpwwnxxglla8ci9mz6smm3nyqvdz2k082qyrp36ad14v9y70l86"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:modules (((guix build guile-build-system)
+                   #:select (target-guile-effective-version))
+                  ,@%gnu-build-system-modules)
+       #:imported-modules ((guix build guile-build-system)
+                           ,@%gnu-build-system-modules)
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'set-guilesitedir
+                    (lambda _
+                      (substitute* (find-files "." "Makefile.in")
+                        (("^guilesitedir = .*$")
+                         "guilesitedir = \
+$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")
+                        (("guilemoduledir =.*guile/site" all)
+                         (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
+                      #t))
+                  (add-after 'install 'wrap-program
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (guile-lib (assoc-ref inputs "guile-lib"))
+                             (version (target-guile-effective-version))
+                             (scm (string-append "/share/guile/site/"
+                                                 version))
+                             (go (string-append  "/lib/guile/"
+                                                 version "/site-ccache")))
+                        (wrap-program (string-append bin "/gitlab-cli")
+                          `("GUILE_LOAD_PATH" prefix
+                            (,(string-append out scm)
+                             ,(string-append guile-lib scm)))
+                          `("GUILE_LOAD_COMPILED_PATH" prefix
+                            (,(string-append out go)
+                             ,(string-append guile-lib go)))))
+                      #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("texinfo" ,texinfo)))
+    (inputs `(("guile"        ,guile-2.2)
+              ("guile-json"   ,guile-json-1)
+              ("guile-gnutls" ,guile2.2-gnutls)))
+    (propagated-inputs `(("guile-lib" ,guile2.2-lib)))
+    (home-page "https://github.com/artyom-poptsov/guile-gitlab")
+    (synopsis "GitLab module for Guile")
+    (description
+     "GNU Guile interface to GitLab Community Edition REST API.
+
+This package provides @samp{gitlab-cli} command line tool for interacting with
+a GitLab instance.")
+    (license license:gpl3)))
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 207 bytes --]


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

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

  reply	other threads:[~2021-11-26 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 14:13 [bug#51998] [PATCH] gnu: Add guile-gitlab Artyom V. Poptsov
2021-11-25 11:28 ` Mathieu Othacehe
2021-11-26 19:20   ` Artyom V. Poptsov [this message]
2021-11-27 11:21     ` Mathieu Othacehe
2021-11-27 19:02       ` Artyom V. Poptsov
2021-11-28 10:04         ` bug#51998: " Mathieu Othacehe
2021-11-28 18:07           ` [bug#51998] " Artyom V. Poptsov
2021-11-28 21:36             ` 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

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

  git send-email \
    --in-reply-to=87bl26k9la.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=51998@debbugs.gnu.org \
    --cc=othacehe@gnu.org \
    /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 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.