all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Multiple sources
@ 2021-07-22 16:49 phodina via
  2021-07-22 17:07 ` Julien Lepiller
  0 siblings, 1 reply; 3+ messages in thread
From: phodina via @ 2021-07-22 16:49 UTC (permalink / raw)
  To: help-guix@gnu.org

Dear all,
is there a way to specify multiple sources for building a package? Or do I have to create for each source a package (use copy-build-system) and then use it as a input for the final package with custom phases?

Let me give you an example. I have a git repo with source code to build and then another with some scripts to run and modify the first one. Also the second repo is not applicable as set of patches and it can't be merged into the first one.

Kind regards
Petr

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

* Re: Multiple sources
  2021-07-22 16:49 Multiple sources phodina via
@ 2021-07-22 17:07 ` Julien Lepiller
  2021-07-22 18:03   ` phodina
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Lepiller @ 2021-07-22 17:07 UTC (permalink / raw)
  To: help-guix

Le Thu, 22 Jul 2021 16:49:14 +0000,
phodina via <help-guix@gnu.org> a écrit :

> Dear all,
> is there a way to specify multiple sources for building a package? Or
> do I have to create for each source a package (use copy-build-system)
> and then use it as a input for the final package with custom phases?
> 
> Let me give you an example. I have a git repo with source code to
> build and then another with some scripts to run and modify the first
> one. Also the second repo is not applicable as set of patches and it
> can't be merged into the first one.
> 
> Kind regards
> Petr

Maybe you can use the first repo as the source, and use the second as
an input, then have a phase to copy the files in place?

You can do something like this in the inputs:

(inputs
 `(("second-repo" ,(origin
                     (method url-fetch)
                     (uri ...)
                     ...))))

and in a phase you could do something like

(with-directory-excursion "some-place"
  (invoke "tar" "xf" (assoc-ref inputs "second-repo")))

(or copy if it's not a tar)

HTH!


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

* Re: Multiple sources
  2021-07-22 17:07 ` Julien Lepiller
@ 2021-07-22 18:03   ` phodina
  0 siblings, 0 replies; 3+ messages in thread
From: phodina @ 2021-07-22 18:03 UTC (permalink / raw)
  To: help-guix; +Cc: Julien Lepiller

> Maybe you can use the first repo as the source, and use the second as
>
> an input, then have a phase to copy the files in place?
>
> You can do something like this in the inputs:
>
> (inputs
>
> `(("second-repo" ,(origin
>
> (method url-fetch)
>
> (uri ...)
>
> ...))))
>
> and in a phase you could do something like
>
> (with-directory-excursion "some-place"
>
> (invoke "tar" "xf" (assoc-ref inputs "second-repo")))
>
> (or copy if it's not a tar)
>
> HTH!

Thanks Julien!

This is a good way to save myself from full package definition. I now see that other packages define multiple sources in similar way as now I know what to look for.

Though my original question was more about the way the other package managers define sources e.g. PKGBUILD. There the sources are in one "list".
But in the end both definitions are equivalent and they alsoprovide the sums (if not skipped ;-)

source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
        $pkgname.desktop
        "git+https://gitlab.com/${pkgname}-community/browser/common.git#tag=${_common_tag}"
        "git+https://gitlab.com/${pkgname}-community/settings.git#tag=${_settings_tag}")
source_aarch64=("${pkgver}-${pkgrel}_build-arm-libopus.patch::https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch")
sha256sums=('43a943e7d7660c6d7f5b41c95b344b7fd6a4a88ad0bb45dbd844b372ea60d58b'
            '0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
            'SKIP'
            'SKIP')
sha256sums_aarch64=('2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')



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

end of thread, other threads:[~2021-07-22 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-22 16:49 Multiple sources phodina via
2021-07-22 17:07 ` Julien Lepiller
2021-07-22 18:03   ` phodina

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.