unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Winter Hound <winterhound@yandex.ru>
To: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Managing a multiple package definition
Date: Mon, 30 May 2022 19:36:12 +0530	[thread overview]
Message-ID: <817211653918941@mail.yandex.com> (raw)

   Perhaps you may already know this



   ss

   ;; Defining a dummy package that is common to all
   I;; Taking fields that are common.

   Having multiple versions of the same package is convenient. Why isnt
   Guix has similar ? I know there inferior but having multiple versions
   in the same file would benefit right ?

   (You may already know this pattern.)



   ;; Defining a dummy package that is common to all
   ;; Adding fields that are common.
   (define dcnnt-base
    (package
      (name "dcnnt")
      (version #f)
      (source #f)
      (build-system python-build-system)
      (home-page "https://github.com/cyanomiko/dcnnt-py")
      (synopsis "UI-less tool to connect Android phone with desktop")
      (description "UI-less tool to connect Android phone with desktop")
      (license license:expat)))
   ;; Then making a specific versions
   (define-public dcnnt-0.5.0
    (package
      (inherit dcnnt-base)
      (version "0.5.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "dcnnt" version))
         (sha256
          (base32
   "0c3j6ckln0qkk9ak2lb5z99ycpcfzmanhy7jll24sf58m5wc3pic"))))
      (propagated-inputs (list python-pycryptodome))))
   (define-public dcnnt-0.6.0
    (package
      (inherit dcnnt-base)
      (version "0.6.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "dcnnt" version))
         (sha256
          (base32
   "149skjvdzvc9di0q48m7fzs0k4ykykva4armz8jkxjv3c597i1gg"))))
      (propagated-inputs (list python-pycryptodome))))
   ;; Just Package Name points to latest version
   (define-public dcnnt dcnnt-0.7.0)
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;;;;;;;;;;;;;;;;;;;
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;;;;;;;;;;;;;;;;;;;
   ;; Alternative
   (define (dcnnt-base version hash)
    (package
      (name "dcnnt")
      (version version)
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "dcnnt" version))
         (sha256
          (base32 hash))))
      (build-system python-build-system)
      (home-page "https://github.com/cyanomiko/dcnnt-py")
      (synopsis "UI-less tool to connect Android phone with desktop")
      (description "UI-less tool to connect Android phone with desktop")
      (license license:expat)))
   (define-public dcnnt-0.5.0
    (package
      (inherit (dcnnt-base "0.5.0"
   "0c3j6ckln0qkk9ak2lb5z99ycpcfzmanhy7jll24sf58m5wc3pic"))
      (propagated-inputs (list python-pycryptodome))))
   (define-public dcnnt-0.6.0
    (package
      (inherit (dcnnt-base "0.6.0"
   "149skjvdzvc9di0q48m7fzs0k4ykykva4armz8jkxjv3c597i1gg"))
      (propagated-inputs (list python-pycryptodome))))
   (define-public dcnnt dcnnt-0.6.0)
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;;;;;;;;;;;;;;;;;;;

             reply	other threads:[~2022-05-31 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 14:06 Winter Hound [this message]
2022-05-31 13:52 ` Managing a multiple package definition raingloom

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=817211653918941@mail.yandex.com \
    --to=winterhound@yandex.ru \
    --cc=help-guix@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.
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).