unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Help packaging R Quarto Cli
@ 2022-10-24 11:43 Sébastien Rey-Coyrehourcq
  2022-10-24 16:00 ` Sebastien Rey-Coyrehourcq
  2022-10-24 17:08 ` zimoun
  0 siblings, 2 replies; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-10-24 11:43 UTC (permalink / raw)
  To: help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 1610 bytes --]

Hi,

I’m trying to package Quarto Cli ( <https://github.com/quarto-dev/quarto-cli> ), used in combination with Pandoc to publish -reproducible- scientific document : website, blog, etc.

I first think this is a classic gnu build : ./configure && make && make install BUT, there is a problem because the ./configure script bootstrap “Deno” during the run of configure.sh.

Because this download and compilation of Deno occur during ./configure.sh running, guix cannot patch the  #!/bin/bash path, so ./configure failed. Deno seems also not packaged into guix.

Do you have an idea to resolve this ? Perhaps we could try all together to do this.

I’m starting with this quarto-cli.scm :

┌────
│ (use-modules
│ (guix packages)
│ (guix download)
│ (guix build-system gnu)
│ (guix licenses)
│ )
│ 
│ (define-public quarto-cli
│   (package
│     (name "Quarto-CLI")
│     (version "1.1.251")
│     (source (origin
│               (method url-fetch)
│               (uri (string-append "https://github.com/quarto-dev/quarto-cli/archive/refs/tags/v"version".tar.gz"))
│               (sha256
│                (base32
│                 "1ycwrjndrrrciymnm3l0lhcd375fddkvjibvc0n084irg6z1lxn6"))))
│     (build-system gnu-build-system)
│     (synopsis "Quarto-cli")
│     (description
│      "Quarto-cli description")
│     (home-page "https://github.com/quarto-dev/quarto-cli")
│     (license gpl3+)))
│ quarto-cli
│ 
└────

To compile and fail :
guix build -f quarto-cli.scm

Best,
Sebastien RC.

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

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

* Re: Help packaging R Quarto Cli
  2022-10-24 11:43 Help packaging R Quarto Cli Sébastien Rey-Coyrehourcq
@ 2022-10-24 16:00 ` Sebastien Rey-Coyrehourcq
  2022-10-25 10:15   ` zimoun
  2022-10-24 17:08 ` zimoun
  1 sibling, 1 reply; 20+ messages in thread
From: Sebastien Rey-Coyrehourcq @ 2022-10-24 16:00 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: help-guix


Le Lundi, Octobre 24, 2022 13:43 CEST, Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> a écrit:

> Hi,
>
> I’m trying to package Quarto Cli ( <https://github.com/quarto-dev/quarto-cli> ), used in combination with Pandoc to publish -reproducible- scientific document : website, blog, etc.
>
> I first think this is a classic gnu build : ./configure && make && make install BUT, there is a problem because the ./configure script bootstrap “Deno” during the run of configure.sh.
>
> Because this download and compilation of Deno occur during ./configure.sh running, guix cannot patch the  #!/bin/bash path, so ./configure failed. Deno seems also not packaged into guix.
>
> Do you have an idea to resolve this ? Perhaps we could try all together to do this.
>
> I’m starting with this quarto-cli.scm :
>
> ┌────
> │ (use-modules
> │ (guix packages)
> │ (guix download)
> │ (guix build-system gnu)
> │ (guix licenses)
> │ )
> │
> │ (define-public quarto-cli
> │   (package
> │     (name "Quarto-CLI")
> │     (version "1.1.251")
> │     (source (origin
> │               (method url-fetch)
> │               (uri (string-append "https://github.com/quarto-dev/quarto-cli/archive/refs/tags/v"version".tar.gz"))
> │               (sha256
> │                (base32
> │                 "1ycwrjndrrrciymnm3l0lhcd375fddkvjibvc0n084irg6z1lxn6"))))
> │     (build-system gnu-build-system)
> │     (synopsis "Quarto-cli")
> │     (description
> │      "Quarto-cli description")
> │     (home-page "https://github.com/quarto-dev/quarto-cli")

> │     (license gpl3+)))
> │ quarto-cli
> │
> └────
>
> To compile and fail :
> guix build -f quarto-cli.scm
>
> Best,
> Sebastien RC.

Deno contain lot of packages dependencies actually,
here i comment all packages not packaged in rust after a simple run of guix import ...

#+BEGIN_SRC scheme

(use-modules
(guix packages)
(guix build-system cargo)
(guix download)
(guix licenses)
(gnu packages rust)
(gnu packages crates-io)
)

(define-public rust-deno-1
  (package
    (name "rust-deno")
    (version "1.26.2")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "deno" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1yzvdkj8sq475kfbkms1lfysjddkfwcyqhp1ggalfbk4hqhbiz29"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-atty" ,rust-atty-0.2)
                       ("rust-base64" ,rust-base64-0.13)
;                       ("rust-cache-control" ,rust-cache-control-0.2)

                        ("rust-chrono" ,rust-chrono-0.4)
;                       ("rust-clap" ,rust-clap-3)
;                       ("rust-clap-complete" ,rust-clap-complete-3)
;                       ("rust-clap-complete-fig" ,rust-clap-complete-fig-3)
                        ("rust-data-url" ,rust-data-url-0.1)
;                       ("rust-deno-ast" ,rust-deno-ast-0.19)
;                       ("rust-deno-broadcast-channel" ,rust-deno-broadcast-channel-0.67)
;                       ("rust-deno-cache" ,rust-deno-cache-0.5)
;                       ("rust-deno-console" ,rust-deno-console-0.73)
;                       ("rust-deno-core" ,rust-deno-core-0.155)
;                       ("rust-deno-core" ,rust-deno-core-0.155)
;                       ("rust-deno-crypto" ,rust-deno-crypto-0.87)
;                       ("rust-deno-doc" ,rust-deno-doc-0.46)
;                       ("rust-deno-emit" ,rust-deno-emit-0.9)
;                       ("rust-deno-fetch" ,rust-deno-fetch-0.96)
;                       ("rust-deno-graph" ,rust-deno-graph-0.34)
;                       ("rust-deno-lint" ,rust-deno-lint-0.33)
;                       ("rust-deno-net" ,rust-deno-net-0.65)
;                       ("rust-deno-node" ,rust-deno-node-0.10)
;                       ("rust-deno-runtime" ,rust-deno-runtime-0.81)
;                       ("rust-deno-task-shell" ,rust-deno-task-shell-0.5)
;                       ("rust-deno-url" ,rust-deno-url-0.73)
;                       ("rust-deno-web" ,rust-deno-web-0.104)
;                       ("rust-deno-webgpu" ,rust-deno-webgpu-0.74)
;                       ("rust-deno-websocket" ,rust-deno-websocket-0.78)
;                       ("rust-deno-webstorage" ,rust-deno-webstorage-0.68)
                       ("rust-dissimilar" ,rust-dissimilar-1)
;                       ("rust-dprint-plugin-json" ,rust-dprint-plugin-json-0.15)
;                       ("rust-dprint-plugin-markdown" ,rust-dprint-plugin-markdown-0.14)
;                       ("rust-dprint-plugin-typescript" ,rust-dprint-plugin-typescript-0.74)
                       ("rust-encoding-rs" ,rust-encoding-rs-0.8)
                       ("rust-env-logger" ,rust-env-logger-0.9)
;                       ("rust-eszip" ,rust-eszip-0.28)
;                       ("rust-fancy-regex" ,rust-fancy-regex-0.10)
                       ("rust-flate2" ,rust-flate2-1)
                       ("rust-fwdansi" ,rust-fwdansi-1)
;                       ("rust-glibc-version" ,rust-glibc-version-0.1)

                       ("rust-http" ,rust-http-0.2)
;                       ("rust-import-map" ,rust-import-map-0.12)
                       ("rust-indexmap" ,rust-indexmap-1)
;                       ("rust-indicatif" ,rust-indicatif-0.17)
;                       ("rust-jsonc-parser" ,rust-jsonc-parser-0.21)
;                       ("rust-junction" ,rust-junction-0.2)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-log" ,rust-log-0.4)
;                       ("rust-mitata" ,rust-mitata-0.0.7)
;                       ("rust-monch" ,rust-monch-0.2)
;                       ("rust-napi-sym" ,rust-napi-sym-0.3)
                       ("rust-notify" ,rust-notify-5)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-os-pipe" ,rust-os-pipe-1)
                       ("rust-percent-encoding" ,rust-percent-encoding-2)
                       ("rust-pin-project" ,rust-pin-project-1)
                       ("rust-rand" ,rust-rand-0.8)
                       ("rust-regex" ,rust-regex-1)
                       ("rust-regex" ,rust-regex-1)
                       ("rust-ring" ,rust-ring-0.16)
;                       ("rust-rustyline" ,rust-rustyline-10)
;                       ("rust-rustyline-derive" ,rust-rustyline-derive-0.7)
                       ("rust-semver" ,rust-semver-1)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-json" ,rust-serde-json-1)
                       ("rust-serde-repr" ,rust-serde-repr-0.1)
                       ("rust-shell-escape" ,rust-shell-escape-0.1)
                       ("rust-tar" ,rust-tar-0.4)
                       ("rust-tempfile" ,rust-tempfile-3)
                       ("rust-text-size" ,rust-text-size-1)
;                       ("rust-text-lines" ,rust-text-lines-0.6)
                       ("rust-tokio" ,rust-tokio-1)
;                       ("rust-tokio-util" ,rust-tokio-util-0.7)
;                       ("rust-tower-lsp" ,rust-tower-lsp-0.17)
                       ("rust-twox-hash" ,rust-twox-hash-1)
                       ("rust-typed-arena" ,rust-typed-arena-2)
;                       ("rust-uuid" ,rust-uuid-1)
                       ("rust-walkdir" ,rust-walkdir-2)
                       ("rust-winapi" ,rust-winapi-0.3)
                       ("rust-winapi" ,rust-winapi-0.3)
                       ("rust-winres" ,rust-winres-0.1)
;                      ("rust-zstd" ,rust-zstd-0.11)
                       )
       #:cargo-development-inputs (
                                   ;("rust-deno-bench-util" ,rust-deno-bench-util-0.67)
                                   ("rust-dotenv" ,rust-dotenv-0.15)
                                   ;("rust-flaky-test" ,rust-flaky-test-0.1)
                                   ;("rust-nix" ,rust-nix-0.24)
                                   ("rust-once-cell" ,rust-once-cell-1)
                                   ("rust-os-pipe" ,rust-os-pipe-1)
                                   ("rust-pretty-assertions" ,rust-pretty-assertions-1)
                                   ;("rust-trust-dns-client" ,rust-trust-dns-client-0.22)
                                   ;("rust-trust-dns-server" ,rust-trust-dns-server-0.22))))
    (home-page "https://github.com/denoland/deno")
    (synopsis "Provides the deno executable")
    (description "This package provides the deno executable")
    (license expat)))

rust-deno-1

#+END_SRC












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

* Re: Help packaging R Quarto Cli
  2022-10-24 11:43 Help packaging R Quarto Cli Sébastien Rey-Coyrehourcq
  2022-10-24 16:00 ` Sebastien Rey-Coyrehourcq
@ 2022-10-24 17:08 ` zimoun
  2022-10-24 17:48   ` Csepp
  2022-10-24 18:40   ` Wojtek Kosior via
  1 sibling, 2 replies; 20+ messages in thread
From: zimoun @ 2022-10-24 17:08 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq, help-guix

Hi Sébastien,

On lun., 24 oct. 2022 at 13:43, Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> I’m trying to package Quarto Cli (
> <https://github.com/quarto-dev/quarto-cli> ), used in combination with
> Pandoc to publish -reproducible- scientific document : website, blog,
> etc.

Well, after a quick look I think it is not easy to package because it is
TypeScript and the story between JavaScript and Guix is not really
smooth. :-)


> I first think this is a classic gnu build : ./configure && make &&
> make install BUT, there is a problem because the ./configure script
> bootstrap “Deno” during the run of configure.sh.

Assuming “Deno“ (a modern runtime for JavaScript and TypeScript written
in Rust) is packaged by Guix, the build system for packaging Quarto
would not clear to me.


> Because this download and compilation of Deno occur during
> ./configure.sh running, guix cannot patch the  #!/bin/bash path, so
> ./configure failed. Deno seems also not packaged into guix.
>
> Do you have an idea to resolve this ? Perhaps we could try all
> together to do this.

Hum, maybe package deno. ;-)  Well, 

    guix import crate deno -r

is a starting point.  But Deno, neither Quarto, are easy to package for
Guix.


Cheers,
simon


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

* Re: Help packaging R Quarto Cli
  2022-10-24 17:08 ` zimoun
@ 2022-10-24 17:48   ` Csepp
  2022-10-24 18:40   ` Wojtek Kosior via
  1 sibling, 0 replies; 20+ messages in thread
From: Csepp @ 2022-10-24 17:48 UTC (permalink / raw)
  To: zimoun; +Cc: Sébastien Rey-Coyrehourcq, help-guix


zimoun <zimon.toutoune@gmail.com> writes:

> Hi Sébastien,
>
> On lun., 24 oct. 2022 at 13:43, Sébastien Rey-Coyrehourcq
> <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> I’m trying to package Quarto Cli (
>> <https://github.com/quarto-dev/quarto-cli> ), used in combination with
>> Pandoc to publish -reproducible- scientific document : website, blog,
>> etc.
>
> Well, after a quick look I think it is not easy to package because it is
> TypeScript and the story between JavaScript and Guix is not really
> smooth. :-)
>
>
>> I first think this is a classic gnu build : ./configure && make &&
>> make install BUT, there is a problem because the ./configure script
>> bootstrap “Deno” during the run of configure.sh.
>
> Assuming “Deno“ (a modern runtime for JavaScript and TypeScript written
> in Rust) is packaged by Guix, the build system for packaging Quarto
> would not clear to me.
>
>
>> Because this download and compilation of Deno occur during
>> ./configure.sh running, guix cannot patch the  #!/bin/bash path, so
>> ./configure failed. Deno seems also not packaged into guix.
>>
>> Do you have an idea to resolve this ? Perhaps we could try all
>> together to do this.
>
> Hum, maybe package deno. ;-)  Well, 
>
>     guix import crate deno -r
>
> is a starting point.  But Deno, neither Quarto, are easy to package for
> Guix.
>
>
> Cheers,
> simon

There is a channel for free software that is not easily bootstrappable
that this might be suitable for:
https://github.com/guix-science/guix-science
That is where RStudio is packaged for example.


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

* Re: Help packaging R Quarto Cli
  2022-10-24 17:08 ` zimoun
  2022-10-24 17:48   ` Csepp
@ 2022-10-24 18:40   ` Wojtek Kosior via
  2022-10-25 10:08     ` zimoun
  1 sibling, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-10-24 18:40 UTC (permalink / raw)
  To: zimoun; +Cc: Sébastien Rey-Coyrehourcq, help-guix

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

> Well, after a quick look I think it is not easy to package because it is
> TypeScript and the story between JavaScript and Guix is not really
> smooth. :-)

Out of curiosity - what are the problems between Guix and JS? When I
read this my first suspicion was that maybe TS is a self-hosted
language and cannot be bootstrapped. However, when I ran `guix search
typescript`, it revealed the existence of some TS->JS compiler called
'rust-swc'. So I guess problems lie somewhere else, right?

Best,
Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #37: blessed Michał Tomaszek
Poznaj świętych krakowskich!  #37: błogosławiony Michał Tomaszek
https://pl.wikipedia.org/wiki/Michał_Tomaszek
-- (sig_end)


On Mon, 24 Oct 2022 19:08:26 +0200
zimoun <zimon.toutoune@gmail.com> wrote:

> Hi Sébastien,
> 
> On lun., 24 oct. 2022 at 13:43, Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
> 
> > I’m trying to package Quarto Cli (
> > <https://github.com/quarto-dev/quarto-cli> ), used in combination with
> > Pandoc to publish -reproducible- scientific document : website, blog,
> > etc.  
> 
> Well, after a quick look I think it is not easy to package because it is
> TypeScript and the story between JavaScript and Guix is not really
> smooth. :-)
> 
> 
> > I first think this is a classic gnu build : ./configure && make &&
> > make install BUT, there is a problem because the ./configure script
> > bootstrap “Deno” during the run of configure.sh.  
> 
> Assuming “Deno“ (a modern runtime for JavaScript and TypeScript written
> in Rust) is packaged by Guix, the build system for packaging Quarto
> would not clear to me.
> 
> 
> > Because this download and compilation of Deno occur during
> > ./configure.sh running, guix cannot patch the  #!/bin/bash path, so
> > ./configure failed. Deno seems also not packaged into guix.
> >
> > Do you have an idea to resolve this ? Perhaps we could try all
> > together to do this.  
> 
> Hum, maybe package deno. ;-)  Well, 
> 
>     guix import crate deno -r
> 
> is a starting point.  But Deno, neither Quarto, are easy to package for
> Guix.
> 
> 
> Cheers,
> simon
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-10-24 18:40   ` Wojtek Kosior via
@ 2022-10-25 10:08     ` zimoun
  2022-10-25 11:17       ` Wojtek Kosior via
  0 siblings, 1 reply; 20+ messages in thread
From: zimoun @ 2022-10-25 10:08 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: Sébastien Rey-Coyrehourcq, help-guix

Hi,

On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:

> Out of curiosity - what are the problems between Guix and JS? When I
> read this my first suspicion was that maybe TS is a self-hosted
> language and cannot be bootstrapped. However, when I ran `guix search
> typescript`, it revealed the existence of some TS->JS compiler called
> 'rust-swc'. So I guess problems lie somewhere else, right?

Nothing per se.  Note that «TypeScript is a strongly typed programming
language that builds on JavaScript» and from my understanding (maybe I
am wrong?), it is hard to package Javascript for Guix because the
Javascript ecosystem is messy.  Janneke provides some explanations [1]
and I am not convinced the situation have changed since then.  Maybe I
am wrong…

1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>

Cheers,
simon



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

* Re: Help packaging R Quarto Cli
  2022-10-24 16:00 ` Sebastien Rey-Coyrehourcq
@ 2022-10-25 10:15   ` zimoun
  0 siblings, 0 replies; 20+ messages in thread
From: zimoun @ 2022-10-25 10:15 UTC (permalink / raw)
  To: Sebastien Rey-Coyrehourcq, Sébastien Rey-Coyrehourcq; +Cc: help-guix

hi Sébastien,

On Mon, 24 Oct 2022 at 18:00, "Sebastien Rey-Coyrehourcq" <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Deno contain lot of packages dependencies actually, 
> here i comment all packages not packaged in rust after a simple run of guix import ...

Yeah! :-) Deno is not straightforward; “guix import crate -r deno” is
unmanageable, IMHO.

Maybe, the good start is to accept to pull a Deno “bootstrap” binary.
But it is probably not suitable for Guix proper; instead this attempt
could be part of the guix-science channel, IMHO.


Cheers,
simon


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

* Re: Help packaging R Quarto Cli
  2022-10-25 10:08     ` zimoun
@ 2022-10-25 11:17       ` Wojtek Kosior via
  2022-10-27  7:05         ` Sébastien Rey-Coyrehourcq
  0 siblings, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-10-25 11:17 UTC (permalink / raw)
  To: zimoun; +Cc: Sébastien Rey-Coyrehourcq, help-guix

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

> > Out of curiosity - what are the problems between Guix and JS? When I
> > read this my first suspicion was that maybe TS is a self-hosted
> > language and cannot be bootstrapped. However, when I ran `guix search
> > typescript`, it revealed the existence of some TS->JS compiler called
> > 'rust-swc'. So I guess problems lie somewhere else, right?  
> 
> Nothing per se.  Note that «TypeScript is a strongly typed programming
> language that builds on JavaScript» and from my understanding (maybe I
> am wrong?), it is hard to package Javascript for Guix because the
> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> and I am not convinced the situation have changed since then.  Maybe I
> am wrong…
> 
> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>

A few months ago (I think) I did run some code to actually check what
the dependency tree of the protocol buffers JS library (from npm) is.
The tree of runtime deps wasn't horribly big. The tree of
recursively-computed dev deps was, on the other hand, as bad as
described by Janneke or even worse... However, It seems in most cases
many of those packages designated as dev deps are not strictly needed
for actually building stuff. Some are just test dependencies. Others
were perhaps put there because developers understood "dev dependencies"
differently from how packagers understand it...

Anyway, it seems the only way to check what the situation really is is
to actually try packaging something. I'm confident it will be way
easier than it seems :)

Luckily for Sébastien, it seems quarto-cli - although written mostly in
JS/TS - has no NPM deps. Or at least I don't see any...

Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #15: saint Jan Paweł II
Poznaj świętych krakowskich!  #15: święty Jan Paweł II
https://pl.wikipedia.org/wiki/Jan_Paweł_II
-- (sig_end)


On Tue, 25 Oct 2022 12:08:59 +0200
zimoun <zimon.toutoune@gmail.com> wrote:

> Hi,
> 
> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
> 
> > Out of curiosity - what are the problems between Guix and JS? When I
> > read this my first suspicion was that maybe TS is a self-hosted
> > language and cannot be bootstrapped. However, when I ran `guix search
> > typescript`, it revealed the existence of some TS->JS compiler called
> > 'rust-swc'. So I guess problems lie somewhere else, right?  
> 
> Nothing per se.  Note that «TypeScript is a strongly typed programming
> language that builds on JavaScript» and from my understanding (maybe I
> am wrong?), it is hard to package Javascript for Guix because the
> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> and I am not convinced the situation have changed since then.  Maybe I
> am wrong…
> 
> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
> 
> Cheers,
> simon
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-10-25 11:17       ` Wojtek Kosior via
@ 2022-10-27  7:05         ` Sébastien Rey-Coyrehourcq
  2022-10-27  9:54           ` Wojtek Kosior via
  0 siblings, 1 reply; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-10-27  7:05 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: zimoun, help-guix

Hi,

I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.

My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.

I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?

Best

Wojtek Kosior <koszko@koszko.org> writes:


>> > Out of curiosity - what are the problems between Guix and JS? When I
>> > read this my first suspicion was that maybe TS is a self-hosted
>> > language and cannot be bootstrapped. However, when I ran `guix search
>> > typescript`, it revealed the existence of some TS->JS compiler called
>> > ’rust-swc’. So I guess problems lie somewhere else, right?
>>
>> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> language that builds on JavaScript» and from my understanding (maybe I
>> am wrong?), it is hard to package Javascript for Guix because the
>> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> and I am not convinced the situation have changed since then.  Maybe I
>> am wrong…
>>
>> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>
> A few months ago (I think) I did run some code to actually check what
> the dependency tree of the protocol buffers JS library (from npm) is.
> The tree of runtime deps wasn’t horribly big. The tree of
> recursively-computed dev deps was, on the other hand, as bad as
> described by Janneke or even worse… However, It seems in most cases
> many of those packages designated as dev deps are not strictly needed
> for actually building stuff. Some are just test dependencies. Others
> were perhaps put there because developers understood “dev dependencies”
> differently from how packagers understand it…
>
> Anyway, it seems the only way to check what the situation really is is
> to actually try packaging something. I’m confident it will be way
> easier than it seems :)
>
> Luckily for Sébastien, it seems quarto-cli - although written mostly in
> JS/TS - has no NPM deps. Or at least I don’t see any…
>
> Wojtek
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #15: saint Jan Paweł II
> Poznaj świętych krakowskich!  #15: święty Jan Paweł II
> <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
> – (sig_end)
>
>
> On Tue, 25 Oct 2022 12:08:59 +0200
> zimoun <zimon.toutoune@gmail.com> wrote:
>
>> Hi,
>>
>> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
>>
>> > Out of curiosity - what are the problems between Guix and JS? When I
>> > read this my first suspicion was that maybe TS is a self-hosted
>> > language and cannot be bootstrapped. However, when I ran `guix search
>> > typescript`, it revealed the existence of some TS->JS compiler called
>> > ’rust-swc’. So I guess problems lie somewhere else, right?
>>
>> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> language that builds on JavaScript» and from my understanding (maybe I
>> am wrong?), it is hard to package Javascript for Guix because the
>> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> and I am not convinced the situation have changed since then.  Maybe I
>> am wrong…
>>
>> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>>
>> Cheers,
>> simon
>>
>
>

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

* Re: Help packaging R Quarto Cli
  2022-10-27  7:05         ` Sébastien Rey-Coyrehourcq
@ 2022-10-27  9:54           ` Wojtek Kosior via
  2022-10-28 16:19             ` Sébastien Rey-Coyrehourcq
  0 siblings, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-10-27  9:54 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: zimoun, help-guix

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

> Hi,
> 
> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> 
> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.

Do you have wour work-in-progress in some public repo? This would make
us easier to understand your setup and would also allow more ppl to
cooperate (although unfortunately Idk if there's anyone else who's
particularly interested in deno at this particular moment).

> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?

From what I've seen, Guix package definitions are usually grouped into
modules thematically. Although until you actually try upstreaming your
work, you're not bound by any reqs and you can structure the
definitions in a way that's comfortable for you.

Also, are you adding your package by modifying the actual Guix sources?
Or by creating modules outsite of these? Perhaps this was already
metioned but I don't have previous emails on the top...

Good luck :)
Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #33: blessed Antonin Bajewski
Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
https://pl.wikipedia.org/wiki/Antonin_Bajewski
-- (sig_end)


On Thu, 27 Oct 2022 09:05:52 +0200
Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Hi,
> 
> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> 
> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
> 
> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
> 
> Best
> 
> Wojtek Kosior <koszko@koszko.org> writes:
> 
> 
> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >>
> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> language that builds on JavaScript» and from my understanding (maybe I
> >> am wrong?), it is hard to package Javascript for Guix because the
> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> and I am not convinced the situation have changed since then.  Maybe I
> >> am wrong…
> >>
> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>  
> >
> > A few months ago (I think) I did run some code to actually check what
> > the dependency tree of the protocol buffers JS library (from npm) is.
> > The tree of runtime deps wasn’t horribly big. The tree of
> > recursively-computed dev deps was, on the other hand, as bad as
> > described by Janneke or even worse… However, It seems in most cases
> > many of those packages designated as dev deps are not strictly needed
> > for actually building stuff. Some are just test dependencies. Others
> > were perhaps put there because developers understood “dev dependencies”
> > differently from how packagers understand it…
> >
> > Anyway, it seems the only way to check what the situation really is is
> > to actually try packaging something. I’m confident it will be way
> > easier than it seems :)
> >
> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
> > JS/TS - has no NPM deps. Or at least I don’t see any…
> >
> > Wojtek
> >
> > – (sig_start)
> > website: <https://koszko.org/koszko.html>
> > PGP: <https://koszko.org/key.gpg>
> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >
> > Meet Kraków saints!           #15: saint Jan Paweł II
> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
> > – (sig_end)
> >
> >
> > On Tue, 25 Oct 2022 12:08:59 +0200
> > zimoun <zimon.toutoune@gmail.com> wrote:
> >  
> >> Hi,
> >>
> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
> >>  
> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >>
> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> language that builds on JavaScript» and from my understanding (maybe I
> >> am wrong?), it is hard to package Javascript for Guix because the
> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> and I am not convinced the situation have changed since then.  Maybe I
> >> am wrong…
> >>
> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
> >>
> >> Cheers,
> >> simon
> >>  
> >
> >  



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-10-27  9:54           ` Wojtek Kosior via
@ 2022-10-28 16:19             ` Sébastien Rey-Coyrehourcq
  2022-10-28 20:17               ` Wojtek Kosior via
  0 siblings, 1 reply; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-10-28 16:19 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: zimoun, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 6625 bytes --]

Hi,

Wojtek Kosior <koszko@koszko.org> writes:

>> Hi,
>>
>> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>>
>> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>
> Do you have wour work-in-progress in some public repo? This would make
> us easier to understand your setup and would also allow more ppl to
> cooperate (although unfortunately Idk if there’s anyone else who’s
> particularly interested in deno at this particular moment).
>

Here we are : <https://git.sr.ht/~reyman/build-deno-script>

This is a wip python script that build an `export/' directory containing all rust module needed to compile deno (i suppose)

The deno script is localized at the root of `export/' folder

I build the modules folders, but know i don’t know how to compile all this folders correctly using correct path …
Any guile help appreciated to do that !

For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* need a module localized to *./export/rust-serdect-0.1/rust-serdect-0.1.scm*

I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* define-module but this probably not the good way.

>> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>
> From what I’ve seen, Guix package definitions are usually grouped into
> modules thematically. Although until you actually try upstreaming your
> work, you’re not bound by any reqs and you can structure the
> definitions in a way that’s comfortable for you.
>
> Also, are you adding your package by modifying the actual Guix sources?
> Or by creating modules outsite of these? Perhaps this was already
> metioned but I don’t have previous emails on the top…
>

If that works locally i suppose i could sent a patch with all the rust modules needed to build Deno ?

Best !
SR.

> Good luck :)
> Wojtek
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #33: blessed Antonin Bajewski
> Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
> <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
> – (sig_end)
>
>
> On Thu, 27 Oct 2022 09:05:52 +0200
> Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> Hi,
>>
>> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>>
>> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>>
>> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>>
>> Best
>>
>> Wojtek Kosior <koszko@koszko.org> writes:
>>
>>
>> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >>
>> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> am wrong…
>> >>
>> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >
>> > A few months ago (I think) I did run some code to actually check what
>> > the dependency tree of the protocol buffers JS library (from npm) is.
>> > The tree of runtime deps wasn’t horribly big. The tree of
>> > recursively-computed dev deps was, on the other hand, as bad as
>> > described by Janneke or even worse… However, It seems in most cases
>> > many of those packages designated as dev deps are not strictly needed
>> > for actually building stuff. Some are just test dependencies. Others
>> > were perhaps put there because developers understood “dev dependencies”
>> > differently from how packagers understand it…
>> >
>> > Anyway, it seems the only way to check what the situation really is is
>> > to actually try packaging something. I’m confident it will be way
>> > easier than it seems :)
>> >
>> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
>> > JS/TS - has no NPM deps. Or at least I don’t see any…
>> >
>> > Wojtek
>> >
>> > – (sig_start)
>> > website: <https://koszko.org/koszko.html>
>> > PGP: <https://koszko.org/key.gpg>
>> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >
>> > Meet Kraków saints!           #15: saint Jan Paweł II
>> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
>> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
>> > – (sig_end)
>> >
>> >
>> > On Tue, 25 Oct 2022 12:08:59 +0200
>> > zimoun <zimon.toutoune@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
>> >>
>> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >>
>> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> am wrong…
>> >>
>> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >>
>> >> Cheers,
>> >> simon
>> >>
>> >
>> >
>
>

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

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

* Re: Help packaging R Quarto Cli
  2022-10-28 16:19             ` Sébastien Rey-Coyrehourcq
@ 2022-10-28 20:17               ` Wojtek Kosior via
  2022-10-28 21:32                 ` Sébastien Rey-Coyrehourcq
  0 siblings, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-10-28 20:17 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: zimoun, help-guix

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

I think I almost understand your approach. Just a quick question - what
Guix command are you using to try building? With this setup I'd try
something like

    guix shell -L ./export/ rust-deno

and then I'd put

    (define-module (rust-ecdsa-0.14 rust-ecdsa-0.14)
      #:use-module (rust-serdect-0.1 rust-serdect-0.1))

inside `./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm`. That's how guile
modules work - a module is identified by a list of symbols that match
module file's path (starting from a guile's modules root directory, in
this case the one passed via the `-L` option).

> If that works locally i suppose i could sent a patch with all the
> rust modules needed to build Deno ?

A patch would then expect the module(s) to be put under gnu/packages in
the Guix repo and then their `#:use-module` lines would need to be
modified accordingly... So you'd need to make these small adaptations
first.

Honestly, I haven't been submitting patches before and I don't know
exactly what module structure Guix devs expect. Perhaps someone else
may help you here.

Anyway, it seems right now you just have the result of running
`guix import` and you have not yet built any of those recipes? I don't
want to be pessimistic but here's a warning - there'll surely be some
fixes you'll have to make. Be prepared to dive into scheme :)

Best,
Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #16: saint Jan z Dukli
Poznaj świętych krakowskich!  #16: święty Jan z Dukli
https://pl.wikipedia.org/wiki/Jan_z_Dukli
-- (sig_end)


On Fri, 28 Oct 2022 18:19:32 +0200
Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Hi,
> 
> Wojtek Kosior <koszko@koszko.org> writes:
> 
> >> Hi,
> >>
> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> >>
> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.  
> >
> > Do you have wour work-in-progress in some public repo? This would make
> > us easier to understand your setup and would also allow more ppl to
> > cooperate (although unfortunately Idk if there’s anyone else who’s
> > particularly interested in deno at this particular moment).
> >  
> 
> Here we are : <https://git.sr.ht/~reyman/build-deno-script>
> 
> This is a wip python script that build an `export/' directory containing all rust module needed to compile deno (i suppose)
> 
> The deno script is localized at the root of `export/' folder
> 
> I build the modules folders, but know i don’t know how to compile all this folders correctly using correct path …
> Any guile help appreciated to do that !
> 
> For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* need a module localized to *./export/rust-serdect-0.1/rust-serdect-0.1.scm*
> 
> I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* define-module but this probably not the good way.
> 
> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?  
> >
> > From what I’ve seen, Guix package definitions are usually grouped into
> > modules thematically. Although until you actually try upstreaming your
> > work, you’re not bound by any reqs and you can structure the
> > definitions in a way that’s comfortable for you.
> >
> > Also, are you adding your package by modifying the actual Guix sources?
> > Or by creating modules outsite of these? Perhaps this was already
> > metioned but I don’t have previous emails on the top…
> >  
> 
> If that works locally i suppose i could sent a patch with all the rust modules needed to build Deno ?
> 
> Best !
> SR.
> 
> > Good luck :)
> > Wojtek
> >
> > – (sig_start)
> > website: <https://koszko.org/koszko.html>
> > PGP: <https://koszko.org/key.gpg>
> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >
> > Meet Kraków saints!           #33: blessed Antonin Bajewski
> > Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
> > <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
> > – (sig_end)
> >
> >
> > On Thu, 27 Oct 2022 09:05:52 +0200
> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
> >  
> >> Hi,
> >>
> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> >>
> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
> >>
> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
> >>
> >> Best
> >>
> >> Wojtek Kosior <koszko@koszko.org> writes:
> >>
> >>  
> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >> >>
> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> >> language that builds on JavaScript» and from my understanding (maybe I
> >> >> am wrong?), it is hard to package Javascript for Guix because the
> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> >> and I am not convinced the situation have changed since then.  Maybe I
> >> >> am wrong…
> >> >>
> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>  
> >> >
> >> > A few months ago (I think) I did run some code to actually check what
> >> > the dependency tree of the protocol buffers JS library (from npm) is.
> >> > The tree of runtime deps wasn’t horribly big. The tree of
> >> > recursively-computed dev deps was, on the other hand, as bad as
> >> > described by Janneke or even worse… However, It seems in most cases
> >> > many of those packages designated as dev deps are not strictly needed
> >> > for actually building stuff. Some are just test dependencies. Others
> >> > were perhaps put there because developers understood “dev dependencies”
> >> > differently from how packagers understand it…
> >> >
> >> > Anyway, it seems the only way to check what the situation really is is
> >> > to actually try packaging something. I’m confident it will be way
> >> > easier than it seems :)
> >> >
> >> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
> >> > JS/TS - has no NPM deps. Or at least I don’t see any…
> >> >
> >> > Wojtek
> >> >
> >> > – (sig_start)
> >> > website: <https://koszko.org/koszko.html>
> >> > PGP: <https://koszko.org/key.gpg>
> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >> >
> >> > Meet Kraków saints!           #15: saint Jan Paweł II
> >> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
> >> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
> >> > – (sig_end)
> >> >
> >> >
> >> > On Tue, 25 Oct 2022 12:08:59 +0200
> >> > zimoun <zimon.toutoune@gmail.com> wrote:
> >> >  
> >> >> Hi,
> >> >>
> >> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
> >> >>  
> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >> >>
> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> >> language that builds on JavaScript» and from my understanding (maybe I
> >> >> am wrong?), it is hard to package Javascript for Guix because the
> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> >> and I am not convinced the situation have changed since then.  Maybe I
> >> >> am wrong…
> >> >>
> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
> >> >>
> >> >> Cheers,
> >> >> simon
> >> >>  
> >> >
> >> >  
> >
> >  



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-10-28 20:17               ` Wojtek Kosior via
@ 2022-10-28 21:32                 ` Sébastien Rey-Coyrehourcq
  2022-11-03 19:19                   ` Wojtek Kosior via
  0 siblings, 1 reply; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-10-28 21:32 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: zimoun, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 10029 bytes --]

Wojtek Kosior <koszko@koszko.org> writes:

> I think I almost understand your approach. Just a quick question - what
> Guix command are you using to try building? With this setup I’d try
> something like
>
>     guix shell -L ./export/ rust-deno
>

Actually, from export folder i try :
i try *guix build -L . -f rust-deno-1.scm*

But the module are not loaded, i don’t understand well the way guix load module it seems.

Into rust-deno-1.scm i put :

(define-module (rust-deno-1 rust-deno-1)
 #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)

and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :

(define-module (rust-cache-control-0.2 rust-cache-control-0.2)

But any of this pass using the *guix build* command :

`no code for module (rust-cache-control-0.2 rust-cache-control-0.2)'


> and then I’d put
>
>     (define-module (rust-ecdsa-0.14 rust-ecdsa-0.14)
>       #:use-module (rust-serdect-0.1 rust-serdect-0.1))
>
> inside `./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm`. That’s how guile
> modules work - a module is identified by a list of symbols that match
> module file’s path (starting from a guile’s modules root directory, in
> this case the one passed via the `-L` option).
>
>> If that works locally i suppose i could sent a patch with all the
>> rust modules needed to build Deno ?
>
> A patch would then expect the module(s) to be put under gnu/packages in
> the Guix repo and then their `#:use-module` lines would need to be
> modified accordingly… So you’d need to make these small adaptations
> first.
>
> Honestly, I haven’t been submitting patches before and I don’t know
> exactly what module structure Guix devs expect. Perhaps someone else
> may help you here.
>
> Anyway, it seems right now you just have the result of running
> `guix import` and you have not yet built any of those recipes? I don’t
> want to be pessimistic but here’s a warning - there’ll surely be some
> fixes you’ll have to make. Be prepared to dive into scheme :)
>

I first put all the things into deno.scm, with thousand of lines, that compile a little… and i changing my mind finally …
imho the module way is perhaps less discouraging : Resolving bug modules by modules…

I push some corrections to my python script to generate good module name when i found.

Yes, i probably need some guile diving …

Best,
Sr-C.

> Best,
> Wojtek
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #16: saint Jan z Dukli
> Poznaj świętych krakowskich!  #16: święty Jan z Dukli
> <https://pl.wikipedia.org/wiki/Jan_z_Dukli>
> – (sig_end)
>
>
> On Fri, 28 Oct 2022 18:19:32 +0200
> Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> Hi,
>>
>> Wojtek Kosior <koszko@koszko.org> writes:
>>
>> >> Hi,
>> >>
>> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>> >>
>> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>> >
>> > Do you have wour work-in-progress in some public repo? This would make
>> > us easier to understand your setup and would also allow more ppl to
>> > cooperate (although unfortunately Idk if there’s anyone else who’s
>> > particularly interested in deno at this particular moment).
>> >
>>
>> Here we are : <https://git.sr.ht/~reyman/build-deno-script>
>>
>> This is a wip python script that build an `export/’ directory containing all rust module needed to compile deno (i suppose)
>>
>> The deno script is localized at the root of `export/’ folder
>>
>> I build the modules folders, but know i don’t know how to compile all this folders correctly using correct path …
>> Any guile help appreciated to do that !
>>
>> For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* need a module localized to *./export/rust-serdect-0.1/rust-serdect-0.1.scm*
>>
>> I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* define-module but this probably not the good way.
>>
>> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>> >
>> > From what I’ve seen, Guix package definitions are usually grouped into
>> > modules thematically. Although until you actually try upstreaming your
>> > work, you’re not bound by any reqs and you can structure the
>> > definitions in a way that’s comfortable for you.
>> >
>> > Also, are you adding your package by modifying the actual Guix sources?
>> > Or by creating modules outsite of these? Perhaps this was already
>> > metioned but I don’t have previous emails on the top…
>> >
>>
>> If that works locally i suppose i could sent a patch with all the rust modules needed to build Deno ?
>>
>> Best !
>> SR.
>>
>> > Good luck :)
>> > Wojtek
>> >
>> > – (sig_start)
>> > website: <https://koszko.org/koszko.html>
>> > PGP: <https://koszko.org/key.gpg>
>> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >
>> > Meet Kraków saints!           #33: blessed Antonin Bajewski
>> > Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
>> > <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
>> > – (sig_end)
>> >
>> >
>> > On Thu, 27 Oct 2022 09:05:52 +0200
>> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>> >
>> >> Hi,
>> >>
>> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>> >>
>> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>> >>
>> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>> >>
>> >> Best
>> >>
>> >> Wojtek Kosior <koszko@koszko.org> writes:
>> >>
>> >>
>> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >>
>> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> >> am wrong…
>> >> >>
>> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >
>> >> > A few months ago (I think) I did run some code to actually check what
>> >> > the dependency tree of the protocol buffers JS library (from npm) is.
>> >> > The tree of runtime deps wasn’t horribly big. The tree of
>> >> > recursively-computed dev deps was, on the other hand, as bad as
>> >> > described by Janneke or even worse… However, It seems in most cases
>> >> > many of those packages designated as dev deps are not strictly needed
>> >> > for actually building stuff. Some are just test dependencies. Others
>> >> > were perhaps put there because developers understood “dev dependencies”
>> >> > differently from how packagers understand it…
>> >> >
>> >> > Anyway, it seems the only way to check what the situation really is is
>> >> > to actually try packaging something. I’m confident it will be way
>> >> > easier than it seems :)
>> >> >
>> >> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
>> >> > JS/TS - has no NPM deps. Or at least I don’t see any…
>> >> >
>> >> > Wojtek
>> >> >
>> >> > – (sig_start)
>> >> > website: <https://koszko.org/koszko.html>
>> >> > PGP: <https://koszko.org/key.gpg>
>> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >> >
>> >> > Meet Kraków saints!           #15: saint Jan Paweł II
>> >> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
>> >> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
>> >> > – (sig_end)
>> >> >
>> >> >
>> >> > On Tue, 25 Oct 2022 12:08:59 +0200
>> >> > zimoun <zimon.toutoune@gmail.com> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
>> >> >>
>> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >>
>> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> >> am wrong…
>> >> >>
>> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >>
>> >> >> Cheers,
>> >> >> simon
>> >> >>
>> >> >
>> >> >
>> >
>> >
>
>

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

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

* Re: Help packaging R Quarto Cli
  2022-10-28 21:32                 ` Sébastien Rey-Coyrehourcq
@ 2022-11-03 19:19                   ` Wojtek Kosior via
  2022-11-14 22:30                     ` Sébastien Rey-Coyrehourcq
  0 siblings, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-11-03 19:19 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: zimoun, help-guix

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

> > I think I almost understand your approach. Just a quick question - what
> > Guix command are you using to try building? With this setup I’d try
> > something like
> >
> >     guix shell -L ./export/ rust-deno
> >  
> 
> Actually, from export folder i try :
> i try *guix build -L . -f rust-deno-1.scm*

I see in your repo that rust-deno-1.scm is a module file (i.e. it has
"define-module" at the top), so you're not expected to use it with
"-f". Instead, you can rely on Guix loading it (because it is inside the
directory passed via "-L") and just do

    guix build -L . rust-deno

Where "rust-deno" is the same as in the package's "name" property.

> But the module are not loaded, i don’t understand well the way guix load module it seems.
> 
> Into rust-deno-1.scm i put :
> 
> (define-module (rust-deno-1 rust-deno-1)
>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
> 
> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
> 
> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
> 
> But any of this pass using the *guix build* command :
> 
> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)'

Perhaps modules can't contain periods ('.')? I'm not sure - too little
experience with scheme. I'd try giving them names without version


Wojtek


-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #12: saint Jadwiga Andegaweńska
Poznaj świętych krakowskich!  #12: święta Jadwiga Andegaweńska
https://pl.wikipedia.org/wiki/Jadwiga_Andegaweńska
-- (sig_end)


On Fri, 28 Oct 2022 23:32:10 +0200
Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Wojtek Kosior <koszko@koszko.org> writes:
> 
> > I think I almost understand your approach. Just a quick question - what
> > Guix command are you using to try building? With this setup I’d try
> > something like
> >
> >     guix shell -L ./export/ rust-deno
> >  
> 
> Actually, from export folder i try :
> i try *guix build -L . -f rust-deno-1.scm*
> 
> But the module are not loaded, i don’t understand well the way guix load module it seems.
> 
> Into rust-deno-1.scm i put :
> 
> (define-module (rust-deno-1 rust-deno-1)
>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
> 
> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
> 
> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
> 
> But any of this pass using the *guix build* command :
> 
> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)'
> 
> 
> > and then I’d put
> >
> >     (define-module (rust-ecdsa-0.14 rust-ecdsa-0.14)
> >       #:use-module (rust-serdect-0.1 rust-serdect-0.1))
> >
> > inside `./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm`. That’s how guile
> > modules work - a module is identified by a list of symbols that match
> > module file’s path (starting from a guile’s modules root directory, in
> > this case the one passed via the `-L` option).
> >  
> >> If that works locally i suppose i could sent a patch with all the
> >> rust modules needed to build Deno ?  
> >
> > A patch would then expect the module(s) to be put under gnu/packages in
> > the Guix repo and then their `#:use-module` lines would need to be
> > modified accordingly… So you’d need to make these small adaptations
> > first.
> >
> > Honestly, I haven’t been submitting patches before and I don’t know
> > exactly what module structure Guix devs expect. Perhaps someone else
> > may help you here.
> >
> > Anyway, it seems right now you just have the result of running
> > `guix import` and you have not yet built any of those recipes? I don’t
> > want to be pessimistic but here’s a warning - there’ll surely be some
> > fixes you’ll have to make. Be prepared to dive into scheme :)
> >  
> 
> I first put all the things into deno.scm, with thousand of lines, that compile a little… and i changing my mind finally …
> imho the module way is perhaps less discouraging : Resolving bug modules by modules…
> 
> I push some corrections to my python script to generate good module name when i found.
> 
> Yes, i probably need some guile diving …
> 
> Best,
> Sr-C.
> 
> > Best,
> > Wojtek
> >
> > – (sig_start)
> > website: <https://koszko.org/koszko.html>
> > PGP: <https://koszko.org/key.gpg>
> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >
> > Meet Kraków saints!           #16: saint Jan z Dukli
> > Poznaj świętych krakowskich!  #16: święty Jan z Dukli
> > <https://pl.wikipedia.org/wiki/Jan_z_Dukli>
> > – (sig_end)
> >
> >
> > On Fri, 28 Oct 2022 18:19:32 +0200
> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
> >  
> >> Hi,
> >>
> >> Wojtek Kosior <koszko@koszko.org> writes:
> >>  
> >> >> Hi,
> >> >>
> >> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> >> >>
> >> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> >> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.  
> >> >
> >> > Do you have wour work-in-progress in some public repo? This would make
> >> > us easier to understand your setup and would also allow more ppl to
> >> > cooperate (although unfortunately Idk if there’s anyone else who’s
> >> > particularly interested in deno at this particular moment).
> >> >  
> >>
> >> Here we are : <https://git.sr.ht/~reyman/build-deno-script>
> >>
> >> This is a wip python script that build an `export/’ directory containing all rust module needed to compile deno (i suppose)
> >>
> >> The deno script is localized at the root of `export/’ folder
> >>
> >> I build the modules folders, but know i don’t know how to compile all this folders correctly using correct path …
> >> Any guile help appreciated to do that !
> >>
> >> For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* need a module localized to *./export/rust-serdect-0.1/rust-serdect-0.1.scm*
> >>
> >> I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* define-module but this probably not the good way.
> >>  
> >> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?  
> >> >
> >> > From what I’ve seen, Guix package definitions are usually grouped into
> >> > modules thematically. Although until you actually try upstreaming your
> >> > work, you’re not bound by any reqs and you can structure the
> >> > definitions in a way that’s comfortable for you.
> >> >
> >> > Also, are you adding your package by modifying the actual Guix sources?
> >> > Or by creating modules outsite of these? Perhaps this was already
> >> > metioned but I don’t have previous emails on the top…
> >> >  
> >>
> >> If that works locally i suppose i could sent a patch with all the rust modules needed to build Deno ?
> >>
> >> Best !
> >> SR.
> >>  
> >> > Good luck :)
> >> > Wojtek
> >> >
> >> > – (sig_start)
> >> > website: <https://koszko.org/koszko.html>
> >> > PGP: <https://koszko.org/key.gpg>
> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >> >
> >> > Meet Kraków saints!           #33: blessed Antonin Bajewski
> >> > Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
> >> > <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
> >> > – (sig_end)
> >> >
> >> >
> >> > On Thu, 27 Oct 2022 09:05:52 +0200
> >> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
> >> >  
> >> >> Hi,
> >> >>
> >> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
> >> >>
> >> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
> >> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
> >> >>
> >> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
> >> >>
> >> >> Best
> >> >>
> >> >> Wojtek Kosior <koszko@koszko.org> writes:
> >> >>
> >> >>  
> >> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >> >> >>
> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> >> >> language that builds on JavaScript» and from my understanding (maybe I
> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> >> >> and I am not convinced the situation have changed since then.  Maybe I
> >> >> >> am wrong…
> >> >> >>
> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>  
> >> >> >
> >> >> > A few months ago (I think) I did run some code to actually check what
> >> >> > the dependency tree of the protocol buffers JS library (from npm) is.
> >> >> > The tree of runtime deps wasn’t horribly big. The tree of
> >> >> > recursively-computed dev deps was, on the other hand, as bad as
> >> >> > described by Janneke or even worse… However, It seems in most cases
> >> >> > many of those packages designated as dev deps are not strictly needed
> >> >> > for actually building stuff. Some are just test dependencies. Others
> >> >> > were perhaps put there because developers understood “dev dependencies”
> >> >> > differently from how packagers understand it…
> >> >> >
> >> >> > Anyway, it seems the only way to check what the situation really is is
> >> >> > to actually try packaging something. I’m confident it will be way
> >> >> > easier than it seems :)
> >> >> >
> >> >> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
> >> >> > JS/TS - has no NPM deps. Or at least I don’t see any…
> >> >> >
> >> >> > Wojtek
> >> >> >
> >> >> > – (sig_start)
> >> >> > website: <https://koszko.org/koszko.html>
> >> >> > PGP: <https://koszko.org/key.gpg>
> >> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
> >> >> >
> >> >> > Meet Kraków saints!           #15: saint Jan Paweł II
> >> >> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
> >> >> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
> >> >> > – (sig_end)
> >> >> >
> >> >> >
> >> >> > On Tue, 25 Oct 2022 12:08:59 +0200
> >> >> > zimoun <zimon.toutoune@gmail.com> wrote:
> >> >> >  
> >> >> >> Hi,
> >> >> >>
> >> >> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
> >> >> >>  
> >> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?  
> >> >> >>
> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
> >> >> >> language that builds on JavaScript» and from my understanding (maybe I
> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
> >> >> >> and I am not convinced the situation have changed since then.  Maybe I
> >> >> >> am wrong…
> >> >> >>
> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
> >> >> >>
> >> >> >> Cheers,
> >> >> >> simon
> >> >> >>  
> >> >> >
> >> >> >  
> >> >
> >> >  
> >
> >  



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-11-03 19:19                   ` Wojtek Kosior via
@ 2022-11-14 22:30                     ` Sébastien Rey-Coyrehourcq
  2022-11-14 22:57                       ` Wojtek Kosior via
  2022-11-15  7:58                       ` Efraim Flashner
  0 siblings, 2 replies; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-11-14 22:30 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: zimoun, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 15981 bytes --]

Hi,

After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.

I push the channel to reproduce the problem here :

The rust scm repo : git.sr.ht:~reyman/rust-channel
Channel info to put into *channels.scm* : <https://paste.debian.net/1260722>
The *rust-deno.scm* file to build : <https://paste.debian.net/1260723>
The command : guix time-machine -C channels.scm – build -f rust-deno.scm

And the rust error :

—

error: failed to run custom build command for `v8 v0.49.0`

Caused by:
  process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
  — stdout
  cargo:rerun-if-changed=.gn
  cargo:rerun-if-changed=BUILD.gn
  cargo:rerun-if-changed=src/binding.cc
  cargo:rerun-if-env-changed=CCACHE
  cargo:rerun-if-env-changed=CLANG_BASE_PATH
  cargo:rerun-if-env-changed=DENO_TRYBUILD
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=GN
  cargo:rerun-if-env-changed=GN_ARGS
  cargo:rerun-if-env-changed=HOST
  cargo:rerun-if-env-changed=NINJA
  cargo:rerun-if-env-changed=OUT_DIR
  cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
  cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
  cargo:rerun-if-env-changed=SCCACHE
  cargo:rerun-if-env-changed=V8_FORCE_DEBUG
  cargo:rerun-if-env-changed=V8_FROM_SOURCE
  cargo:rustc-link-lib=static=rusty_v8
  download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
  static lib URL: <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
  cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
  Downloading <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
  Python downloader failed, trying with curl.

  — stderr
  thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish…
error: build failed
error: in phase ’build’: uncaught exception:
%exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
phase `build’ failed after 105.5 seconds
command “cargo” “build” “–release” failed with status 101
builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed


Wojtek Kosior <koszko@koszko.org> writes:


>> > I think I almost understand your approach. Just a quick question - what
>> > Guix command are you using to try building? With this setup I’d try
>> > something like
>> >
>> >     guix shell -L ./export/ rust-deno
>> >
>>
>> Actually, from export folder i try :
>> i try *guix build -L . -f rust-deno-1.scm*
>
> I see in your repo that rust-deno-1.scm is a module file (i.e. it has
> “define-module” at the top), so you’re not expected to use it with
> “-f”. Instead, you can rely on Guix loading it (because it is inside the
> directory passed via “-L”) and just do
>
>     guix build -L . rust-deno
>
> Where “rust-deno” is the same as in the package’s “name” property.
>
>> But the module are not loaded, i don’t understand well the way guix load module it seems.
>>
>> Into rust-deno-1.scm i put :
>>
>> (define-module (rust-deno-1 rust-deno-1)
>>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
>>
>> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> But any of this pass using the *guix build* command :
>>
>> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)’
>
> Perhaps modules can’t contain periods (’.’)? I’m not sure - too little
> experience with scheme. I’d try giving them names without version
>
>
> Wojtek
>
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #12: saint Jadwiga Andegaweńska
> Poznaj świętych krakowskich!  #12: święta Jadwiga Andegaweńska
> <https://pl.wikipedia.org/wiki/Jadwiga_Andegaweńska>
> – (sig_end)
>
>
> On Fri, 28 Oct 2022 23:32:10 +0200
> Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> Wojtek Kosior <koszko@koszko.org> writes:
>>
>> > I think I almost understand your approach. Just a quick question - what
>> > Guix command are you using to try building? With this setup I’d try
>> > something like
>> >
>> >     guix shell -L ./export/ rust-deno
>> >
>>
>> Actually, from export folder i try :
>> i try *guix build -L . -f rust-deno-1.scm*
>>
>> But the module are not loaded, i don’t understand well the way guix load module it seems.
>>
>> Into rust-deno-1.scm i put :
>>
>> (define-module (rust-deno-1 rust-deno-1)
>>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
>>
>> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> But any of this pass using the *guix build* command :
>>
>> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)’
>>
>>
>> > and then I’d put
>> >
>> >     (define-module (rust-ecdsa-0.14 rust-ecdsa-0.14)
>> >       #:use-module (rust-serdect-0.1 rust-serdect-0.1))
>> >
>> > inside `./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm`. That’s how guile
>> > modules work - a module is identified by a list of symbols that match
>> > module file’s path (starting from a guile’s modules root directory, in
>> > this case the one passed via the `-L` option).
>> >
>> >> If that works locally i suppose i could sent a patch with all the
>> >> rust modules needed to build Deno ?
>> >
>> > A patch would then expect the module(s) to be put under gnu/packages in
>> > the Guix repo and then their `#:use-module` lines would need to be
>> > modified accordingly… So you’d need to make these small adaptations
>> > first.
>> >
>> > Honestly, I haven’t been submitting patches before and I don’t know
>> > exactly what module structure Guix devs expect. Perhaps someone else
>> > may help you here.
>> >
>> > Anyway, it seems right now you just have the result of running
>> > `guix import` and you have not yet built any of those recipes? I don’t
>> > want to be pessimistic but here’s a warning - there’ll surely be some
>> > fixes you’ll have to make. Be prepared to dive into scheme :)
>> >
>>
>> I first put all the things into deno.scm, with thousand of lines, that compile a little… and i changing my mind finally …
>> imho the module way is perhaps less discouraging : Resolving bug modules by modules…
>>
>> I push some corrections to my python script to generate good module name when i found.
>>
>> Yes, i probably need some guile diving …
>>
>> Best,
>> Sr-C.
>>
>> > Best,
>> > Wojtek
>> >
>> > – (sig_start)
>> > website: <https://koszko.org/koszko.html>
>> > PGP: <https://koszko.org/key.gpg>
>> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >
>> > Meet Kraków saints!           #16: saint Jan z Dukli
>> > Poznaj świętych krakowskich!  #16: święty Jan z Dukli
>> > <https://pl.wikipedia.org/wiki/Jan_z_Dukli>
>> > – (sig_end)
>> >
>> >
>> > On Fri, 28 Oct 2022 18:19:32 +0200
>> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>> >
>> >> Hi,
>> >>
>> >> Wojtek Kosior <koszko@koszko.org> writes:
>> >>
>> >> >> Hi,
>> >> >>
>> >> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>> >> >>
>> >> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> >> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>> >> >
>> >> > Do you have wour work-in-progress in some public repo? This would make
>> >> > us easier to understand your setup and would also allow more ppl to
>> >> > cooperate (although unfortunately Idk if there’s anyone else who’s
>> >> > particularly interested in deno at this particular moment).
>> >> >
>> >>
>> >> Here we are : <https://git.sr.ht/~reyman/build-deno-script>
>> >>
>> >> This is a wip python script that build an `export/’ directory containing all rust module needed to compile deno (i suppose)
>> >>
>> >> The deno script is localized at the root of `export/’ folder
>> >>
>> >> I build the modules folders, but know i don’t know how to compile all this folders correctly using correct path …
>> >> Any guile help appreciated to do that !
>> >>
>> >> For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* need a module localized to *./export/rust-serdect-0.1/rust-serdect-0.1.scm*
>> >>
>> >> I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* define-module but this probably not the good way.
>> >>
>> >> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>> >> >
>> >> > From what I’ve seen, Guix package definitions are usually grouped into
>> >> > modules thematically. Although until you actually try upstreaming your
>> >> > work, you’re not bound by any reqs and you can structure the
>> >> > definitions in a way that’s comfortable for you.
>> >> >
>> >> > Also, are you adding your package by modifying the actual Guix sources?
>> >> > Or by creating modules outsite of these? Perhaps this was already
>> >> > metioned but I don’t have previous emails on the top…
>> >> >
>> >>
>> >> If that works locally i suppose i could sent a patch with all the rust modules needed to build Deno ?
>> >>
>> >> Best !
>> >> SR.
>> >>
>> >> > Good luck :)
>> >> > Wojtek
>> >> >
>> >> > – (sig_start)
>> >> > website: <https://koszko.org/koszko.html>
>> >> > PGP: <https://koszko.org/key.gpg>
>> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >> >
>> >> > Meet Kraków saints!           #33: blessed Antonin Bajewski
>> >> > Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
>> >> > <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
>> >> > – (sig_end)
>> >> >
>> >> >
>> >> > On Thu, 27 Oct 2022 09:05:52 +0200
>> >> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> I continue the packaging using guix import crate, this is a slow process, but everything goes well at this time.
>> >> >>
>> >> >> My file deno.scm contain 6000 line, with all packages imported, this is a problem because i need to remove duplicate.
>> >> >> The best way was probably to export all `(define public method … )`  into a folder with corresponding library.scm.
>> >> >>
>> >> >> I need to create a module by package do you thing ? and after that import all the package using `use-modules` ?
>> >> >>
>> >> >> Best
>> >> >>
>> >> >> Wojtek Kosior <koszko@koszko.org> writes:
>> >> >>
>> >> >>
>> >> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >> >>
>> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> >> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> >> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> >> >> am wrong…
>> >> >> >>
>> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >> >
>> >> >> > A few months ago (I think) I did run some code to actually check what
>> >> >> > the dependency tree of the protocol buffers JS library (from npm) is.
>> >> >> > The tree of runtime deps wasn’t horribly big. The tree of
>> >> >> > recursively-computed dev deps was, on the other hand, as bad as
>> >> >> > described by Janneke or even worse… However, It seems in most cases
>> >> >> > many of those packages designated as dev deps are not strictly needed
>> >> >> > for actually building stuff. Some are just test dependencies. Others
>> >> >> > were perhaps put there because developers understood “dev dependencies”
>> >> >> > differently from how packagers understand it…
>> >> >> >
>> >> >> > Anyway, it seems the only way to check what the situation really is is
>> >> >> > to actually try packaging something. I’m confident it will be way
>> >> >> > easier than it seems :)
>> >> >> >
>> >> >> > Luckily for Sébastien, it seems quarto-cli - although written mostly in
>> >> >> > JS/TS - has no NPM deps. Or at least I don’t see any…
>> >> >> >
>> >> >> > Wojtek
>> >> >> >
>> >> >> > – (sig_start)
>> >> >> > website: <https://koszko.org/koszko.html>
>> >> >> > PGP: <https://koszko.org/key.gpg>
>> >> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >> >> >
>> >> >> > Meet Kraków saints!           #15: saint Jan Paweł II
>> >> >> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
>> >> >> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
>> >> >> > – (sig_end)
>> >> >> >
>> >> >> >
>> >> >> > On Tue, 25 Oct 2022 12:08:59 +0200
>> >> >> > zimoun <zimon.toutoune@gmail.com> wrote:
>> >> >> >
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> wrote:
>> >> >> >>
>> >> >> >> > Out of curiosity - what are the problems between Guix and JS? When I
>> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix search
>> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler called
>> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >> >>
>> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed programming
>> >> >> >> language that builds on JavaScript» and from my understanding (maybe I
>> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations [1]
>> >> >> >> and I am not convinced the situation have changed since then.  Maybe I
>> >> >> >> am wrong…
>> >> >> >>
>> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> simon
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>

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

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

* Re: Help packaging R Quarto Cli
  2022-11-14 22:30                     ` Sébastien Rey-Coyrehourcq
@ 2022-11-14 22:57                       ` Wojtek Kosior via
  2022-11-15  7:58                       ` Efraim Flashner
  1 sibling, 0 replies; 20+ messages in thread
From: Wojtek Kosior via @ 2022-11-14 22:57 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: zimoun, help-guix

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

> Hi,
> 
> After some day of packaging rust crate, i progress and deno start to
> compile … but after 1min i have this error when cargo start compiling
> *rust-v8-0.49* . Any rust + guix help appreciated.

Your determination is extraordinary :)

> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Have you tried doing exactly this - setting the variable for the build
command?

Nonetheless, a quick glance at the error you posted makes me believe
Deno's build process involves downloading precompiled binary of certain
"librusty_v8". Guix builder of course blocks network access for builds,
hence the failure.

It this is indeed the case, the librusty static lib dep must be
packaged as well (if it isn't already) and Deno should then be told to
use that instead of downloading anything.

Disclaimer:
I have never built rust programs ;)

Anyway, good luck!

Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #18: blessed Józef Kowalski
Poznaj świętych krakowskich!  #18: błogosławiony Józef Kowalski
https://pl.wikipedia.org/wiki/Józef_Kowalski_(duchowny)
-- (sig_end)


On Mon, 14 Nov 2022 23:30:47 +0100
Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Hi,
> 
> After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.
> 
> I push the channel to reproduce the problem here :
> 
> The rust scm repo : git.sr.ht:~reyman/rust-channel
> Channel info to put into *channels.scm* : <https://paste.debian.net/1260722>
> The *rust-deno.scm* file to build : <https://paste.debian.net/1260723>
> The command : guix time-machine -C channels.scm – build -f rust-deno.scm
> 
> And the rust error :
> 
> —
> 
> error: failed to run custom build command for `v8 v0.49.0`
> 
> Caused by:
>   process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
>   — stdout
>   cargo:rerun-if-changed=.gn
>   cargo:rerun-if-changed=BUILD.gn
>   cargo:rerun-if-changed=src/binding.cc
>   cargo:rerun-if-env-changed=CCACHE
>   cargo:rerun-if-env-changed=CLANG_BASE_PATH
>   cargo:rerun-if-env-changed=DENO_TRYBUILD
>   cargo:rerun-if-env-changed=DOCS_RS
>   cargo:rerun-if-env-changed=GN
>   cargo:rerun-if-env-changed=GN_ARGS
>   cargo:rerun-if-env-changed=HOST
>   cargo:rerun-if-env-changed=NINJA
>   cargo:rerun-if-env-changed=OUT_DIR
>   cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
>   cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
>   cargo:rerun-if-env-changed=SCCACHE
>   cargo:rerun-if-env-changed=V8_FORCE_DEBUG
>   cargo:rerun-if-env-changed=V8_FROM_SOURCE
>   cargo:rustc-link-lib=static=rusty_v8
>   download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
>   static lib URL: <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>   cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
>   Downloading <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>   Python downloader failed, trying with curl.
> 
>   — stderr
>   thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
>   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> warning: build failed, waiting for other jobs to finish…
> error: build failed
> error: in phase ’build’: uncaught exception:
> %exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
> phase `build’ failed after 105.5 seconds
> command “cargo” “build” “–release” failed with status 101
> builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
> la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
> Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
> guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-11-14 22:30                     ` Sébastien Rey-Coyrehourcq
  2022-11-14 22:57                       ` Wojtek Kosior via
@ 2022-11-15  7:58                       ` Efraim Flashner
  2022-11-16 20:38                         ` Sebastien Rey-Coyrehourcq
  1 sibling, 1 reply; 20+ messages in thread
From: Efraim Flashner @ 2022-11-15  7:58 UTC (permalink / raw)
  To: Sébastien Rey-Coyrehourcq; +Cc: Wojtek Kosior, zimoun, help-guix

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

On Mon, Nov 14, 2022 at 11:30:47PM +0100, Sébastien Rey-Coyrehourcq wrote:
> Hi,
> 
> After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.
> 
> I push the channel to reproduce the problem here :
> 
> The rust scm repo : git.sr.ht:~reyman/rust-channel
> Channel info to put into *channels.scm* : <https://paste.debian.net/1260722>
> The *rust-deno.scm* file to build : <https://paste.debian.net/1260723>
> The command : guix time-machine -C channels.scm – build -f rust-deno.scm
> 
> And the rust error :
> 
> —
> 
> error: failed to run custom build command for `v8 v0.49.0`
> 
> Caused by:
>   process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
>   — stdout
>   cargo:rerun-if-changed=.gn
>   cargo:rerun-if-changed=BUILD.gn
>   cargo:rerun-if-changed=src/binding.cc
>   cargo:rerun-if-env-changed=CCACHE
>   cargo:rerun-if-env-changed=CLANG_BASE_PATH
>   cargo:rerun-if-env-changed=DENO_TRYBUILD
>   cargo:rerun-if-env-changed=DOCS_RS
>   cargo:rerun-if-env-changed=GN
>   cargo:rerun-if-env-changed=GN_ARGS
>   cargo:rerun-if-env-changed=HOST
>   cargo:rerun-if-env-changed=NINJA
>   cargo:rerun-if-env-changed=OUT_DIR
>   cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
>   cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
>   cargo:rerun-if-env-changed=SCCACHE
>   cargo:rerun-if-env-changed=V8_FORCE_DEBUG
>   cargo:rerun-if-env-changed=V8_FROM_SOURCE
>   cargo:rustc-link-lib=static=rusty_v8
>   download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
>   static lib URL: <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>   cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
>   Downloading <https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>   Python downloader failed, trying with curl.

Looks like you need to patch rust-v8-0.49 to not try to download
librusty_v8_release... but instead you'll have to build it from source
and let it know where to find it.

>   — stderr
>   thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
>   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> warning: build failed, waiting for other jobs to finish…
> error: build failed
> error: in phase ’build’: uncaught exception:
> %exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
> phase `build’ failed after 105.5 seconds
> command “cargo” “build” “–release” failed with status 101
> builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
> la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
> Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
> guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* Re: Help packaging R Quarto Cli
  2022-11-15  7:58                       ` Efraim Flashner
@ 2022-11-16 20:38                         ` Sebastien Rey-Coyrehourcq
  2022-11-16 20:57                           ` Wojtek Kosior via
  0 siblings, 1 reply; 20+ messages in thread
From: Sebastien Rey-Coyrehourcq @ 2022-11-16 20:38 UTC (permalink / raw)
  To: Wojtek Kosior, zimoun, help-guix

Hi,

You're both right, seems there is a flag to skip binary downloading and 
compile the V8 lib.

 From the githubpage (https://github.com/denoland/rusty_v8) : "V8 is 
very large and takes a long time to compile. Many users will prefer to 
use a prebuilt version of V8. We publish static libs for every version 
of rusty v8 on Github <https://github.com/denoland/rusty_v8/releases>.

Binaries builds are turned on by default: |cargo build| will initiate a 
download from github to get the static lib. To disable this build using 
the |V8_FROM_SOURCE| environmental variable.

When making changes to rusty_v8 itself, it should be tested by build 
from source. The CI always builds from source"

So, my packaging friend :), what's the best way to push an "export 
V8_FROM_SOURCE=1" or something like that into my rust-deno.scm ?

Best,

SR

Le 15/11/2022 à 08:58, Efraim Flashner a écrit :
> On Mon, Nov 14, 2022 at 11:30:47PM +0100, Sébastien Rey-Coyrehourcq wrote:
>> Hi,
>>
>> After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.
>>
>> I push the channel to reproduce the problem here :
>>
>> The rust scm repo : git.sr.ht:~reyman/rust-channel
>> Channel info to put into *channels.scm* :<https://paste.debian.net/1260722>
>> The *rust-deno.scm* file to build :<https://paste.debian.net/1260723>
>> The command : guix time-machine -C channels.scm – build -f rust-deno.scm
>>
>> And the rust error :
>>
>> —
>>
>> error: failed to run custom build command for `v8 v0.49.0`
>>
>> Caused by:
>>    process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
>>    — stdout
>>    cargo:rerun-if-changed=.gn
>>    cargo:rerun-if-changed=BUILD.gn
>>    cargo:rerun-if-changed=src/binding.cc
>>    cargo:rerun-if-env-changed=CCACHE
>>    cargo:rerun-if-env-changed=CLANG_BASE_PATH
>>    cargo:rerun-if-env-changed=DENO_TRYBUILD
>>    cargo:rerun-if-env-changed=DOCS_RS
>>    cargo:rerun-if-env-changed=GN
>>    cargo:rerun-if-env-changed=GN_ARGS
>>    cargo:rerun-if-env-changed=HOST
>>    cargo:rerun-if-env-changed=NINJA
>>    cargo:rerun-if-env-changed=OUT_DIR
>>    cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
>>    cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
>>    cargo:rerun-if-env-changed=SCCACHE
>>    cargo:rerun-if-env-changed=V8_FORCE_DEBUG
>>    cargo:rerun-if-env-changed=V8_FROM_SOURCE
>>    cargo:rustc-link-lib=static=rusty_v8
>>    download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
>>    static lib URL:<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>>    cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
>>    Downloading<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>>    Python downloader failed, trying with curl.
> Looks like you need to patch rust-v8-0.49 to not try to download
> librusty_v8_release... but instead you'll have to build it from source
> and let it know where to find it.
>
>>    — stderr
>>    thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
>>    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
>> warning: build failed, waiting for other jobs to finish…
>> error: build failed
>> error: in phase ’build’: uncaught exception:
>> %exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
>> phase `build’ failed after 105.5 seconds
>> command “cargo” “build” “–release” failed with status 101
>> builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
>> la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
>> Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
>> guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed
>

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

* Re: Help packaging R Quarto Cli
  2022-11-16 20:38                         ` Sebastien Rey-Coyrehourcq
@ 2022-11-16 20:57                           ` Wojtek Kosior via
  2022-11-25 16:38                             ` Sébastien Rey-Coyrehourcq
  0 siblings, 1 reply; 20+ messages in thread
From: Wojtek Kosior via @ 2022-11-16 20:57 UTC (permalink / raw)
  To: Sebastien Rey-Coyrehourcq; +Cc: zimoun, help-guix

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

> Hi,
> 
> You're both right, seems there is a flag to skip binary downloading and 
> compile the V8 lib.
> 
> [...]

Good to see you found it :)

> So, my packaging friend :), what's the best way to push an "export 
> V8_FROM_SOURCE=1" or something like that into my rust-deno.scm ?
> 
> Best,
> 
> SR

When I first read your question, I did not know the exact function. But
I knew where to look. So I thought I'd better share my way of learning
rather than just the solution ;)

I started with

    grep -R 'export' ~/.config/guix/current/share/guile/site/3.0/gnu/packages/ | less

That showed a lot of results. I noticed a line like this

> /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm:             (setenv "HOME" (getcwd)) ;; cmake needs this to export modules

Thought it might be the thing I was looking for, so I did

    less /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm

and navigated to this line. This seems to be it. The (setenv) function.
Can be used as from a modified packaging phase function (as you can see
in engineering.scm).

Hope I helped. Good luck once again!

W.

P.S. Make sure you know some 'less' shortcuts if you're going to do
     things this way. It cad speed things up ^^

-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #12: saint Jadwiga Andegaweńska
Poznaj świętych krakowskich!  #12: święta Jadwiga Andegaweńska
https://pl.wikipedia.org/wiki/Jadwiga_Andegaweńska
-- (sig_end)


On Wed, 16 Nov 2022 21:38:47 +0100
Sebastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:

> Hi,
> 
> You're both right, seems there is a flag to skip binary downloading and 
> compile the V8 lib.
> 
>  From the githubpage (https://github.com/denoland/rusty_v8) : "V8 is 
> very large and takes a long time to compile. Many users will prefer to 
> use a prebuilt version of V8. We publish static libs for every version 
> of rusty v8 on Github <https://github.com/denoland/rusty_v8/releases>.
> 
> Binaries builds are turned on by default: |cargo build| will initiate a 
> download from github to get the static lib. To disable this build using 
> the |V8_FROM_SOURCE| environmental variable.
> 
> When making changes to rusty_v8 itself, it should be tested by build 
> from source. The CI always builds from source"
> 
> So, my packaging friend :), what's the best way to push an "export 
> V8_FROM_SOURCE=1" or something like that into my rust-deno.scm ?
> 
> Best,
> 
> SR
> 
> Le 15/11/2022 à 08:58, Efraim Flashner a écrit :
> > On Mon, Nov 14, 2022 at 11:30:47PM +0100, Sébastien Rey-Coyrehourcq wrote:  
> >> Hi,
> >>
> >> After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.
> >>
> >> I push the channel to reproduce the problem here :
> >>
> >> The rust scm repo : git.sr.ht:~reyman/rust-channel
> >> Channel info to put into *channels.scm* :<https://paste.debian.net/1260722>
> >> The *rust-deno.scm* file to build :<https://paste.debian.net/1260723>
> >> The command : guix time-machine -C channels.scm – build -f rust-deno.scm
> >>
> >> And the rust error :
> >>
> >> —
> >>
> >> error: failed to run custom build command for `v8 v0.49.0`
> >>
> >> Caused by:
> >>    process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
> >>    — stdout
> >>    cargo:rerun-if-changed=.gn
> >>    cargo:rerun-if-changed=BUILD.gn
> >>    cargo:rerun-if-changed=src/binding.cc
> >>    cargo:rerun-if-env-changed=CCACHE
> >>    cargo:rerun-if-env-changed=CLANG_BASE_PATH
> >>    cargo:rerun-if-env-changed=DENO_TRYBUILD
> >>    cargo:rerun-if-env-changed=DOCS_RS
> >>    cargo:rerun-if-env-changed=GN
> >>    cargo:rerun-if-env-changed=GN_ARGS
> >>    cargo:rerun-if-env-changed=HOST
> >>    cargo:rerun-if-env-changed=NINJA
> >>    cargo:rerun-if-env-changed=OUT_DIR
> >>    cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
> >>    cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
> >>    cargo:rerun-if-env-changed=SCCACHE
> >>    cargo:rerun-if-env-changed=V8_FORCE_DEBUG
> >>    cargo:rerun-if-env-changed=V8_FROM_SOURCE
> >>    cargo:rustc-link-lib=static=rusty_v8
> >>    download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
> >>    static lib URL:<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
> >>    cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
> >>    Downloading<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
> >>    Python downloader failed, trying with curl.  
> > Looks like you need to patch rust-v8-0.49 to not try to download
> > librusty_v8_release... but instead you'll have to build it from source
> > and let it know where to find it.
> >  
> >>    — stderr
> >>    thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
> >>    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> >> warning: build failed, waiting for other jobs to finish…
> >> error: build failed
> >> error: in phase ’build’: uncaught exception:
> >> %exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
> >> phase `build’ failed after 105.5 seconds
> >> command “cargo” “build” “–release” failed with status 101
> >> builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
> >> la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
> >> Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
> >> guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed  
> >  



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: Help packaging R Quarto Cli
  2022-11-16 20:57                           ` Wojtek Kosior via
@ 2022-11-25 16:38                             ` Sébastien Rey-Coyrehourcq
  0 siblings, 0 replies; 20+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-11-25 16:38 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: zimoun, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 9488 bytes --]

Hi,

Thanks a lot, that helps me to make one more step :)

I set :

┌────
│     (arguments
│         `(#:phases
│            (modify-phases %standard-phases
│          (add-before 'configure 'set-source
│            (lambda _
│              (setenv "V8_FROM_SOURCE" "1")
│              (setenv "RUST_BACKTRACE" "1")
│              (setenv "CLANG_BASE_PATH" (getenv "CMAKE_PREFIX_PATH"))
│              #t)))
└────

I also try C_INCLUDE_PATH

and native input :

┌────
│ 	(native-inputs (list ninja gn clang-toolchain ccache clang))
└────

I have now another problem during compilation of v8, i don’t understand why “clang” path is not well recognized by the buildscript, test is defined here :

<https://github.com/denoland/rusty_v8/blob/main/build.rs#L517>

The backtrace :

error: failed to run custom build command for `v8 v0.49.0`

Caused by:
  process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
  — stdout
  cargo:rerun-if-changed=.gn
  cargo:rerun-if-changed=BUILD.gn
  cargo:rerun-if-changed=src/binding.cc
  cargo:rerun-if-env-changed=CCACHE
  cargo:rerun-if-env-changed=CLANG_BASE_PATH
  cargo:rerun-if-env-changed=DENO_TRYBUILD
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=GN
  cargo:rerun-if-env-changed=GN_ARGS
  cargo:rerun-if-env-changed=HOST
  cargo:rerun-if-env-changed=NINJA
  cargo:rerun-if-env-changed=OUT_DIR
  cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
  cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
  cargo:rerun-if-env-changed=SCCACHE
  cargo:rerun-if-env-changed=V8_FORCE_DEBUG
  cargo:rerun-if-env-changed=V8_FROM_SOURCE
  cargo:rustc-link-lib=static=rusty_v8
  using Chromiums clang
  clang_base_path /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/clang

— stderr
thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: “No such file or directory” }’, /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:537:6
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: core::result::Result<T,E>::unwrap
   4: build_script_build::clang_download
   5: build_script_build::build_v8
   6: build_script_build::main
   7: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Best,


Wojtek Kosior <koszko@koszko.org> writes:

>> Hi,
>>
>> You’re both right, seems there is a flag to skip binary downloading and
>> compile the V8 lib.
>>
>> […]
>
> Good to see you found it :)
>
>> So, my packaging friend :), what’s the best way to push an “export
>> V8_FROM_SOURCE=1” or something like that into my rust-deno.scm ?
>>
>> Best,
>>
>> SR
>
> When I first read your question, I did not know the exact function. But
> I knew where to look. So I thought I’d better share my way of learning
> rather than just the solution ;)
>
> I started with
>
>     grep -R ’export’ ~/.config/guix/current/share/guile/site/3.0/gnu/packages/ | less
>
> That showed a lot of results. I noticed a line like this
>
>> /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm:             (setenv “HOME” (getcwd)) ;; cmake needs this to export modules
>
> Thought it might be the thing I was looking for, so I did
>
>     less /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm
>
> and navigated to this line. This seems to be it. The (setenv) function.
> Can be used as from a modified packaging phase function (as you can see
> in engineering.scm).
>
> Hope I helped. Good luck once again!
>
> W.
>
> P.S. Make sure you know some ’less’ shortcuts if you’re going to do
>      things this way. It cad speed things up ^^
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #12: saint Jadwiga Andegaweńska
> Poznaj świętych krakowskich!  #12: święta Jadwiga Andegaweńska
> <https://pl.wikipedia.org/wiki/Jadwiga_Andegaweńska>
> – (sig_end)
>
>
> On Wed, 16 Nov 2022 21:38:47 +0100
> Sebastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> Hi,
>>
>> You’re both right, seems there is a flag to skip binary downloading and
>> compile the V8 lib.
>>
>>  From the githubpage (<https://github.com/denoland/rusty_v8>) : “V8 is
>> very large and takes a long time to compile. Many users will prefer to
>> use a prebuilt version of V8. We publish static libs for every version
>> of rusty v8 on Github <https://github.com/denoland/rusty_v8/releases>.
>>
>> Binaries builds are turned on by default: |cargo build| will initiate a
>> download from github to get the static lib. To disable this build using
>> the |V8_FROM_SOURCE| environmental variable.
>>
>> When making changes to rusty_v8 itself, it should be tested by build
>> from source. The CI always builds from source”
>>
>> So, my packaging friend :), what’s the best way to push an “export
>> V8_FROM_SOURCE=1” or something like that into my rust-deno.scm ?
>>
>> Best,
>>
>> SR
>>
>> Le 15/11/2022 à 08:58, Efraim Flashner a écrit :
>> > On Mon, Nov 14, 2022 at 11:30:47PM +0100, Sébastien Rey-Coyrehourcq wrote:
>> >> Hi,
>> >>
>> >> After some day of packaging rust crate, i progress and deno start to compile … but after 1min i have this error when cargo start compiling *rust-v8-0.49* . Any rust + guix help appreciated.
>> >>
>> >> I push the channel to reproduce the problem here :
>> >>
>> >> The rust scm repo : git.sr.ht:~reyman/rust-channel
>> >> Channel info to put into *channels.scm* :<https://paste.debian.net/1260722>
>> >> The *rust-deno.scm* file to build :<https://paste.debian.net/1260723>
>> >> The command : guix time-machine -C channels.scm – build -f rust-deno.scm
>> >>
>> >> And the rust error :
>> >>
>> >> —
>> >>
>> >> error: failed to run custom build command for `v8 v0.49.0`
>> >>
>> >> Caused by:
>> >>    process didn’t exit successfully: `/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build` (exit status: 101)
>> >>    — stdout
>> >>    cargo:rerun-if-changed=.gn
>> >>    cargo:rerun-if-changed=BUILD.gn
>> >>    cargo:rerun-if-changed=src/binding.cc
>> >>    cargo:rerun-if-env-changed=CCACHE
>> >>    cargo:rerun-if-env-changed=CLANG_BASE_PATH
>> >>    cargo:rerun-if-env-changed=DENO_TRYBUILD
>> >>    cargo:rerun-if-env-changed=DOCS_RS
>> >>    cargo:rerun-if-env-changed=GN
>> >>    cargo:rerun-if-env-changed=GN_ARGS
>> >>    cargo:rerun-if-env-changed=HOST
>> >>    cargo:rerun-if-env-changed=NINJA
>> >>    cargo:rerun-if-env-changed=OUT_DIR
>> >>    cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
>> >>    cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
>> >>    cargo:rerun-if-env-changed=SCCACHE
>> >>    cargo:rerun-if-env-changed=V8_FORCE_DEBUG
>> >>    cargo:rerun-if-env-changed=V8_FROM_SOURCE
>> >>    cargo:rustc-link-lib=static=rusty_v8
>> >>    download lockfile: “/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
>> >>    static lib URL:<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>> >>    cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
>> >>    Downloading<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
>> >>    Python downloader failed, trying with curl.
>> > Looks like you need to patch rust-v8-0.49 to not try to download
>> > librusty_v8_release… but instead you’ll have to build it from source
>> > and let it know where to find it.
>> >
>> >>    — stderr
>> >>    thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value:
>> >> Os { code: 2, kind: NotFound, message: “No such file or directory” }’,
>> >> /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
>> >>    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
>> >> warning: build failed, waiting for other jobs to finish…
>> >> error: build failed
>> >> error: in phase ’build’: uncaught exception:
>> >> %exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) exit-status: 101 term-signal: #f stop-signal: #f>
>> >> phase `build’ failed after 105.5 seconds
>> >> command “cargo” “build” “–release” failed with status 101
>> >> builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed with exit code 1
>> >> la compilation de /gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
>> >> Vous trouverez le journal de compilation dans « /var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
>> >> guix build: erreur : build of `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed
>> >
>
>

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

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

end of thread, other threads:[~2022-11-25 16:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 11:43 Help packaging R Quarto Cli Sébastien Rey-Coyrehourcq
2022-10-24 16:00 ` Sebastien Rey-Coyrehourcq
2022-10-25 10:15   ` zimoun
2022-10-24 17:08 ` zimoun
2022-10-24 17:48   ` Csepp
2022-10-24 18:40   ` Wojtek Kosior via
2022-10-25 10:08     ` zimoun
2022-10-25 11:17       ` Wojtek Kosior via
2022-10-27  7:05         ` Sébastien Rey-Coyrehourcq
2022-10-27  9:54           ` Wojtek Kosior via
2022-10-28 16:19             ` Sébastien Rey-Coyrehourcq
2022-10-28 20:17               ` Wojtek Kosior via
2022-10-28 21:32                 ` Sébastien Rey-Coyrehourcq
2022-11-03 19:19                   ` Wojtek Kosior via
2022-11-14 22:30                     ` Sébastien Rey-Coyrehourcq
2022-11-14 22:57                       ` Wojtek Kosior via
2022-11-15  7:58                       ` Efraim Flashner
2022-11-16 20:38                         ` Sebastien Rey-Coyrehourcq
2022-11-16 20:57                           ` Wojtek Kosior via
2022-11-25 16:38                             ` Sébastien Rey-Coyrehourcq

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).