Re: Help packaging R Quarto Cli

2022-12-22 Thread Sébastien Rey-Coyrehourcq
-system.scm>)

But this is an hard job for beginner like me… Perhaps there is another way by 
modifying this wtf `virtual manifest' directly.

┌
│  (build-system cargo-build-system)
│  (arguments
│  `(#:skip-build? #f
│#:install-source? #f ; virtual manifest
│ ;   #:phases
│ ;   (modify-phases %standard-phases
│ ;(replace 'install
│ ; (lambda _
│ ;   #t)))
│#:cargo-inputs
│(("rust-html5ever" ,rust-html5ever-0.25.1)  ;;0.25.1
│  ("rust-markup5ever" ,rust-markup5ever-0.10.0)  ;0.10.0
│  ("rust-serde_json", rust-serde-json-1);1.0
│  ("rust-serde", rust-serde-1)) ; 1.0.111
│))
└

Well, long road never ends…

And ! an ! happy ! Christmas Hollidays ! for all of guixers !!

>> Thanks for your support and your kind word, that help me to continue :)
>
> Glad I could help even with my small Guix experience ^^
>
>> Hi,
>>
>> I’m happy to say, Deno is packaged (except the test, see the last conversion 
>> on this thread) compile and run on my machine :D
>>
>> ┌
>> │ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno 
>> –version
>> │ deno 1.25.2 (release, x86_64-unknown-linux-gnu)
>> │ v8 10.6.194.5
>> │ typescript 4.7.4
>> │
>> │ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno 
>> run hello-world.js
>> │ Hello John
>> │ Hello Sarah
>> │ Hello Kai
>> │
>> └
>
> Great! 
>
>> Next steps :
>> • Packaging Quarto (that need Deno).
>> • Merge and Cleaning mess with dependency.
>
> Just a question, out of curiosity - are there any serious freedom
> issues? I saw you are using some custom Guix channels in addition to
> your own one and that made me wonder
>
> Wojtek
>
>
> [1] 
> <https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/cargo-build-system.scm?id=408a4ed071c9c52de207d799a698781d49fa727d#n209>
> [2] <https://guix.gnu.org/manual/en/html_node/G_002dExpressions.html>
>
> – (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 Thu, 15 Dec 2022 09:32:48 +0100
> Sébastien Rey-Coyrehourcq  wrote:
>
>> Hi,
>>
>> I’m happy to say, Deno is packaged (except the test, see the last conversion 
>> on this thread) compile and run on my machine :D
>>
>> ┌
>> │ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno 
>> –version
>> │ deno 1.25.2 (release, x86_64-unknown-linux-gnu)
>> │ v8 10.6.194.5
>> │ typescript 4.7.4
>> │
>> │ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno 
>> run hello-world.js
>> │ Hello John
>> │ Hello Sarah
>> │ Hello Kai
>> │
>> └
>>
>> Next steps :
>> • Packaging Quarto (that need Deno).
>> • Merge and Cleaning mess with dependency.
>>
>> If you want to try :
>> <https://git.sr.ht/~reyman/build-deno-guix>
>>
>> Best regards,
>> SR
>>
>> “Sebastien Rey-Coyrehourcq”  writes:
>>
>> >
>> > Le Lundi, Octobre 24, 2022 13:43 CEST, Sébastien Rey-Coyrehourcq 
>> >  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 downl

Re: Help packaging R Quarto Cli

2022-12-15 Thread Sébastien Rey-Coyrehourcq
Hi,

I’m happy to say, Deno is packaged (except the test, see the last conversion on 
this thread) compile and run on my machine :D

┌
│ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno 
--version
│ deno 1.25.2 (release, x86_64-unknown-linux-gnu)
│ v8 10.6.194.5
│ typescript 4.7.4
│ 
│ /-> /gnu/store/xvjymz07g2dy112cz4x6pz7v4q8p7c6a-rust-deno-1.25.2/bin/deno run 
hello-world.js
│ Hello John
│ Hello Sarah
│ Hello Kai
│ 
└

Next steps :
• Packaging Quarto (that need Deno).
• Merge and Cleaning mess with dependency.

If you want to try :
<https://git.sr.ht/~reyman/build-deno-guix>

Best regards,
SR

“Sebastien Rey-Coyrehourcq”  writes:

>
> Le Lundi, Octobre 24, 2022 13:43 CEST, Sébastien Rey-Coyrehourcq 
>  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)
>

Re: Help packaging R Quarto Cli

2022-12-14 Thread Sébastien Rey-Coyrehourcq
gt; Also, the git-fetch issues will become nonexistent if you manage to do
> it this way :)
>

I will revert my code to manage the deno compilation without test phase.
My objective is quarto, and i don’t know much about the next obstacle :)
I see later for this nested crate.

> Since your rust-deno recipe uses `(method url-fetch)` with
> `(crate-uri)`, I’m starting to wonder if the tarball that’s being used
> in this case contains exactly the same files as the git checkout. I
> earlier assumed that it does when I suggested reusing the origin in
> your rust-deno-test-util recipe. But perhaps it doesn’t? I could
> imagine deno devs omitting e.g. `test_util/` from the source tarball
> they upload to the crates repo.:

As <https://github.com/denoland/deno/blob/v1.25.2/Cargo.toml#L5> say, the 
`deno_root_package/test_util/' folder is well downloaded even with `method 
url-fetch'

>
>> How do you reference/call/reuse a package that already exist in your 
>> /gnu/store in a .scm file ?
>
> You don’t :)
>
> That’s the point of a functional package manager - there’s never need
> to *explicitly* reference files in the store. They are always referenced
> indirectly through packages, derivations, plain-file’s, gexps, etc. And
> they get created or reused automatically.
>

So you directly say into the scm, passing this unique path 
`/gnu/store/x-deno-util-1-0-1' to input function ??

Thanks for your support and your kind word, that help me to continue :)

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!   #25: blessed Maksymilian Binkiewicz
> Poznaj świętych krakowskich!  #25: błogosławiony Maksymilian Binkiewicz
> <https://pl.wikipedia.org/wiki/Maksymilian_Binkiewicz>
> – (sig_end)
>
>
> On Wed, 14 Dec 2022 17:16:45 +0100
> Sébastien Rey-Coyrehourcq  wrote:
>
>> Wojtek Kosior  writes:
>>
>>
>> > Hello again
>> >
>> > I am impressed with your determination :)
>> >
>>
>> thx :D
>>
>> > I see most packages in Guix that use `(method git-fetch)` also use
>> > `(file-name (git-file-name name version))` in `(origin)`.
>> >
>> > Note that this only affects the name under which the git checkout is
>> > saved. Whether the source checkout directory under `/gnu/store` is
>> > named `8479xfpn9hp2b3kc9d3596kpncan9d8w-rust-deno-test-util-0.1.0.tar.gz/`
>> > or something else should not be relevant to the build.
>> >
>>
>> Yes, you’re right i correct this thing, but this is weird in all case, here i
> clone all deno repository (at tag v1.25.2), and this is renamed as
> `deno-test-util-checkout-0-1-0’ because i’m only interested by this folder
>>
>> <https://git.sr.ht/~reyman/rust-channel/commit/00e9ef93bbe5a853b8a196305b6d86451c036156>
>>
>> I found only one crate that use this method `git-fetch’ in the list :
>> <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/crates-io.scm#n1576>
>>
>> So i suppose this is possible to reuse as a dependency in another build…
>>
>> This is an intuition but i think i have a problem of ordering in my way to 
>> do things :
>>
>> When i read the `cargo-build-system’ sources here (
> <https://github.com/ecbrown/guix/blob/master/guix/build/cargo-build-system.scm#L76>
> ) i see that the build input wait for an /gnu/store link that contain a 
> `.crate’
> or the equivalent as `tar.gz’
>>
>> Or in my case, the /gnu/store link called by cargo contain only sources,
> because the `deno-util’ need to be built before creating .crate into the
> gnu/store. Perhaps i could cheating the system by providing myself a
> `gnu/store/.tar.gz’ that contain this sources.
>>
>> Inside my `rust-deno-test-util-1-0-0.scm` file i could `(invoke tar …)’
> command to generate a tar.gz at the root of the this folder. Do you think that
> could work ?
>>
>> Hum, not sure … the real problem is the fact that guix don’t build the
> derivation completely? (creating and storing a .crate for deno-test-util-0-1-0
> into /gnu/store) when i run build of main rust-deno.scm … only the source are
> present, and not the package resulting from the build of this derivation.
>>
>> Another way is to first compile deno-test-util.scm, that install the
> corresponding crate into /gnu/store, and after that i give this local path to
> the inputs of my main rust-deno.scm . But i don’t know how to give this path 
> to
> my cargo build system input . How do you reference/call/reuse a package that
> already ex

Re: Help packaging R Quarto Cli

2022-12-14 Thread Sébastien Rey-Coyrehourcq
Wojtek Kosior  writes:


> Hello again
>
> I am impressed with your determination :)
>

thx :D

> I see most packages in Guix that use `(method git-fetch)` also use
> `(file-name (git-file-name name version))` in `(origin)`.
>
> Note that this only affects the name under which the git checkout is
> saved. Whether the source checkout directory under `/gnu/store` is
> named `8479xfpn9hp2b3kc9d3596kpncan9d8w-rust-deno-test-util-0.1.0.tar.gz/`
> or something else should not be relevant to the build.
>

Yes, you’re right i correct this thing, but this is weird in all case, here i 
clone all deno repository (at tag v1.25.2), and this is renamed as 
`deno-test-util-checkout-0-1-0' because i’m only interested by this folder

<https://git.sr.ht/~reyman/rust-channel/commit/00e9ef93bbe5a853b8a196305b6d86451c036156>

I found only one crate that use this method `git-fetch' in the list :
<https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/crates-io.scm#n1576>

So i suppose this is possible to reuse as a dependency in another build…

This is an intuition but i think i have a problem of ordering in my way to do 
things :

When i read the `cargo-build-system' sources here ( 
<https://github.com/ecbrown/guix/blob/master/guix/build/cargo-build-system.scm#L76>
 ) i see that the build input wait for an /gnu/store link that contain a 
`.crate' or the equivalent as `tar.gz'

Or in my case, the /gnu/store link called by cargo contain only sources, 
because the `deno-util' need to be built before creating .crate into the 
gnu/store. Perhaps i could cheating the system by providing myself a 
`gnu/store/.tar.gz' that contain this sources.

Inside my `rust-deno-test-util-1-0-0.scm` file i could  `(invoke tar ...)' 
command to generate a tar.gz at the root of the this folder. Do you think that 
could work ?

Hum, not sure … the real problem is the fact that guix don’t build the 
derivation completely? (creating and storing a .crate for deno-test-util-0-1-0 
into /gnu/store) when i run build of main rust-deno.scm … only the source are 
present, and not the package resulting from the build of this derivation.

Another way is to first compile deno-test-util.scm, that install the 
corresponding crate into /gnu/store, and after that i give this local path to 
the inputs of my main rust-deno.scm . But i don’t know how to give this path to 
my cargo build system input . How do you reference/call/reuse a package that 
already exist in your /gnu/store in a .scm file ?

> Although I doubt I will be able to help with no knowledge of Rust, I’ll
> at least suggest that you attach the full rust-deno build logs here.
> This will perhaps at least enable others to help (the time needed to
> build it all does scare away!).
>
> Btw, it seems awkward to be required to provide the test_util package
> as a separate crate. I’d rather imagine Deno devs somehow using the
> test_util sources already in the deno tree.
>

Yeah, but now it’s packaged and the package compile, i try one more time like 
that :D

> Have you tried fiddling around inside the build container? If not, you
> may want to look at this manual node[1]. Perhaps after running some of
> the build commands manually you’ll get better ideas?

Thanks i will look on that
>
> At the end, in the worst case, you could resort to disabling tests for
> the package. Nobody likes this “solution” but sometimes it is the only
> way to go ¯\_(ツ)_/¯

Ahah right, i probably do that if i want to finish in 2022 :D

Best,
Sébastien Rey-Coyrehourcq

>
> Good luck,
> Wojtek
>
> [1] <https://guix.gnu.org/manual/en/html_node/Debugging-Build-Failures.html>
>
> – (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!   #24: blessed Ludwik Pius Bartosik
> Poznaj świętych krakowskich!  #24: błogosławiony Ludwik Pius Bartosik
> <https://pl.wikipedia.org/wiki/Ludwik_Pius_Bartosik>
> – (sig_end)
>
>
> On Wed, 14 Dec 2022 11:30:16 +0100
> Sébastien Rey-Coyrehourcq  wrote:
>
>> Hi,
>>
>> After two weeks of suffering and pain with this complex rust packaging, and
>> thanks to people on the libera #guix chat, my “rust packaging adventure” is
>> near ending… at least with deno, i see quarto after that…
>>
>> Everything compile by parts, and i need a final help to merge things.
>>
>> I only have a problem at `testing-phase’, with a local rust package defined 
>> on Deno `/test_util’ folder. This package is not published at all on 
>> crates.io and it’s needed at test-phase…
>>
>> This nested crate package is not detected/compiled by actual 
>> `cargo-build-system’, so i decide to package it myself , as 
>&g

Re: Help packaging R Quarto Cli

2022-12-14 Thread Sébastien Rey-Coyrehourcq
Hi,

After two weeks of suffering and pain with this complex rust packaging, and 
thanks to people on the libera #guix chat, my “rust packaging adventure” is 
near ending… at least with deno, i see quarto after that…

Everything compile by parts, and i need a final help to merge things.

I only have a problem at `testing-phase', with a local rust package defined on 
Deno `/test_util' folder. This package is not published at all on crates.io and 
it’s needed at test-phase…

This nested crate package is not detected/compiled by actual 
`cargo-build-system', so i decide to package it myself , as 
`rust-deno-test-util-0.1.0'

I tested and this crate compile well, with two derivation :

• `/gnu/store/ma04jfp0f33kf38cdn66qai60nhqxx7d-rust-deno-test-util-0.1.0/'
• `/gnu/store/zp5flzykz7y5n35kqrlryqkynvrvcw3z-rust-deno-test-util-0.1.0.drv'

`/gnu/store/ma04jfp0f33kf38cdn66qai60nhqxx7d-rust-deno-test-util-0.1.0/share/cargo/registry/'
  contain the test_util-0.1.0.crate

So … i added this *.scm* to my *deno/deno-dep* list of package in the 
*rust-channel* needed by deno to compile :
<https://git.sr.ht/~reyman/rust-channel/tree/543fee4cc3626ae27da5b41a7884cecb71b9dcf8/item/deno-dep/rust-deno-test-util-0-1-0.scm>

*My problem is simple?* i added this crate as a dependency of my main 
`rust-deno.scm' :
• `#:use-module (deno-dep rust-deno-test-util-0-1-0)'
• `#:cargo-development-inputs `((("rust-deno-test-util", 
rust-deno-test-util-0.1.0) ... )'

BUT BUT BUT … rust-deno-test-util is not found and not added to `/guix-vendor' 
during deno crate retrieval, so there is a problem somewhere during packaging 
retrieval from local `/gnu/store'. I found in the log that

`/gnu/store/8479xfpn9hp2b3kc9d3596kpncan9d8w-rust-deno-test-util-0.1.0.tar.gz/' 
 contain the sources and not a `tar.gz' like others crates. I suppose this is 
part of the problem, but i don’t know how to solve that.

See by yourself using :

guix time-machine -C channels.scm – build -f rust-deno.scm

that return :

error: no matching package named `deno_test_util` found

**Info to reproduce**

• All these package needed by Deno are defined into my-rust channel here : 
<https://git.sr.ht/~reyman/rust-channel>
• The building and channel scm needed to build deno are here : 
<https://git.sr.ht/~reyman/build-deno-guix>
• /Final Warning :/ Deno build (outside rust build) take at least 2 hours on my 
machine, rusty-v8 is huge and take itself ~30 to 45 minutes.

Any *final* help appreciated !

Best ,
Sébastien Rey-Coyrehourcq


Sébastien Rey-Coyrehourcq  writes:

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

Re: Help packaging R Quarto Cli

2022-11-25 Thread Sébastien Rey-Coyrehourcq
> 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 #< 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
>> >
>
>


signature.asc
Description: PGP signature


Re: Help packaging R Quarto Cli

2022-11-14 Thread Sébastien Rey-Coyrehourcq
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 #< 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  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 J

Re: Help packaging R Quarto Cli

2022-10-28 Thread Sébastien Rey-Coyrehourcq
Wojtek Kosior  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  wrote:
>
>> Hi,
>>
>> Wojtek Kosior  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. Altho

Re: Help packaging R Quarto Cli

2022-10-28 Thread Sébastien Rey-Coyrehourcq
Hi,

Wojtek Kosior  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  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  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@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
>> > 

Re: Help packaging R Quarto Cli

2022-10-27 Thread Sébastien Rey-Coyrehourcq
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  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: 
>
> 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: 
> PGP: 
> 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
> 
> – (sig_end)
>
>
> On Tue, 25 Oct 2022 12:08:59 +0200
> zimoun  wrote:
>
>> Hi,
>>
>> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via  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: 
>>
>> Cheers,
>> simon
>>
>
>


Help packaging R Quarto Cli

2022-10-24 Thread Sébastien Rey-Coyrehourcq
Hi,

I’m trying to package 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.


signature.asc
Description: PGP signature


Re: Lost all my guix home application packages from channels after guix update (pull, reconfigure)

2022-10-10 Thread Sébastien Rey-Coyrehourcq
Hi,

You’re right Ludovic, i run the command guix home describe –list-installed and 
everything is here but … my home applications are only accessible directly by 
using the store path “/gnu/store/” :

reyman@xxx ~> 
/gnu/store/rxjjk0qslv24cxk136z1ch3spgc781vp-emacs-native-comp-28.1.91-203.82bcd44/bin/emacs

Fish term and Gnome activity menu don’t see/recognize binary stored into 
/gnu/store.

So this is more linked to the way Fish manage environnement ?

Thanks,
A+

Ludovic Courtès  writes:

> Hi,
>
> “Sebastien Rey-Coyrehourcq” 
> skribis:
>
>> I used guix home without problem last month but with a recent guix pull, guix
> system reconfigure, guix home reconfigure, all my package defined into guix 
> home
> manifest disapear !!
>
> What do you mean by “disappear”?  What does this report:
>
>   guix home describe –list-installed
>
> ?
>
> Thanks,
> Ludo’.


signature.asc
Description: PGP signature


Re: Lost all my guix home application packages from channels after guix update (pull, reconfigure)

2022-10-07 Thread Sébastien Rey-Coyrehourcq
After some trial/error, i found that the problem is probably in link with 
“FISH” home-fish-service-type.

If i add these code to my guix home/system config, fish is installed yep, but 
all other packages declared in my guix home are removed …

In home.scm :

/–
━━━
 (service home-fish-service-type   
 (home-fish-configuration  
 (config   
 (list 
 (local-file “../config/fish/config.fish”) 
━━━
-

In system.scm :

/–
━━━
 (users (cons* (user-account   
 (name “reyman”)   
 (comment “Rey-Coyrehourcq”)   
 (group “users”)   
 (home-directory “/home/reyman”)   
 (supplementary-groups 
 ’(“wheel” “netdev” “audio” “video” “docker”)) 
 (shell (file-append fish “/bin/fish”)))   
 %base-user-accounts)) 
━━━
-

Is it a bug i suppose ?

Best regards,
SR

“Sebastien Rey-Coyrehourcq”  writes:

> Hi guix people,
>
> I used guix home without problem last month but with a recent guix pull, guix 
> system reconfigure, guix home reconfigure, all my package defined into guix 
> home manifest disapear !!
> And guix home say nothing (no error) about that. The only thing i change is 
> removing zshrc to move on fish-service-type.
>
> Here my configuration :
>
> - $myconfigfolder/base/home.scm : 
> - $myconfigfolder/base/package.scm : 
> - $myconfigfolder/base/system.scm : 
>
> - $myconfigfolder/machines/Sulayh-latitude-home : 
> 
> - $myconfigfolder/machines/Sulayh-latitude-system : 
> 
>
> To update system i run from : $myconfigfolder
>
> - guix home -L . reconfigure machines/Sulayh-latitude-home
> - sudo guix system -L . reconfigure machines/Sulayh-latitude-system
>
>
> My describe for home
>
> Génération 95 06 oct. 2022 10:55:04   (actuelle)
>   nom de fichier : /var/guix/profiles/per-user/reyman/guix-home-95-link
>   nom de fichier canonique : /gnu/store/mfylyvf57bpqjbxqvmxf1mj16cc9f17x-home
>   canaux :
> guix:
>   URL du dépôt : 
>   branche : master
>   commit : 40a42c4348635f186553938015f7e6a06be1e10c
> guix-android:
>   URL du dépôt : 
>   branche : master
>   commit : 1e149a2cdbd221c299c9105e316f36717f81b41e
> guix-science:
>   URL du dépôt : 
>   branche : master
>   commit : 0ee692ecbc32f1917be3512953ee39762e7410c2
> flat:
>   URL du dépôt : 
>   branche : master
>   commit : e57424b680e1724105e2598b68c30084b180cf58
> my-guix:
>   URL du dépôt : /
>   branche : master
>   commit : 85cc8aa8c301eda46147f9e62989a0a1ff85a6e7
> nonguix:
>   URL du dépôt : 
>   branche : master
>   commit : d7791ba66b806c54fbb16b531a79fe1793a61e35
>   fichier de configuration : 
> /gnu/store/vqb24jsz04kq9v5ldfbxjwh3744ak140-configuration.scm
>
> My describe for system
>
> Génération 65 06 oct. 2022 10:02:30   (actuelle)
>   nom de fichier : /var/guix/profiles/system-65-link
>   nom de fichier canonique : 
> /gnu/store/5hrlb2wkznyhm2h2y7n0z0ypydacizqb-system
>   étiquette : GNU with Linux 5.19.11
>   chargeur de démarrage : grub-efi
>   périphérique racine : /dev/mapper/cryptroot
>   noyau : /gnu/store/sf67y13f80gcpa9dal9q96h86788nnmh-linux-5.19.11/bzImage
>   canaux :
> guix:
>   URL du dépôt : 
>   branche : master
>   commit : 40a42c4348635f186553938015f7e6a06be1e10c
> guix-android:
>   URL du dépôt : 
>   branche : master
>   commit : 1e149a2cdbd221c299c9105e316f36717f81b41e
> guix-science:
>   URL du dépôt : 
>   branche : master
>   commit : 0ee692ecbc32f1917be3512953ee39762e7410c2
> flat:
>   URL du dépôt : 
>   branche : master
>   commit : e57424b680e1724105e2598b68c30084b180cf58
> my-guix:
>   URL du dépôt : /
>   branche : master
>   commit : 85cc8aa8c301eda46147f9e62989a0a1ff85a6e7
> nonguix:
>   URL du dépôt : 
>   branche : master
>   commit : d7791ba66b806c54fbb16b531a79fe1793a61e35
>   fichier de configuration : 
> 

Re: gpg: problem with the agent: No pinentry

2022-09-02 Thread Sébastien Rey-Coyrehourcq
About GPG + Gnome and Seahorse, the package modification  into dotfile ~ of 
dominicm work very well :

Redefine gnome keyring :


Other package (seahorse, ssh + gpg, etc.) :


Best regards,

Reza Housseini  writes:

>> I don’t recall this happening to me before. Anyone has had this issue or any
>  clue about how to solve it?
>
> I have this in my ~/.gnupg/gpg-agent.conf file:
>
> default-cache-ttl 600
> max-cache-ttl 7200
> enable-ssh-support
> use-agent
> pinentry-program /run/current-system/profile/bin/pinentry-gnome3
>
> Hope this solves your problem.
>
> Cheers
> Reza


signature.asc
Description: PGP signature


Using pass with tomb into guix home ? RW problems

2022-08-01 Thread Sébastien Rey-Coyrehourcq
Hi guix !

I continue to dig into guix home, and thanks of ~dominicm src hut dotfile repo 
(Yubikey config works !) and your help on previous message on this mailling 
list, everything goes pretty well …

But … actually, i’m stuck with a mutable configuration with my password 
management.

Using password-manager (pass) with tomb () 
and pass-tomb extension seems not possible due to read write problem. Guix home 
create  symbolic link with file in read mode, so how so you manage dotfile in 
this case ?

(simple-service `pass-secret-service
 home-files-service-type
   `((“.password.tomb” ,(local-file “../secrets/password.tomb”))
 


Output of tomb command :

bash-5.1$ tomb open .password.tomb
.tomb-real  .  Commanded to open tomb .password.tomb
.tomb-real [W] Tomb file is not writable: .password.tomb
.tomb-real [E] Tomb command failed: open

It’s possible to open passing option “-o ro” for mounting in read only, but 
it’s not very interesting if you want to create/store new password :)

Best regads,


signature.asc
Description: PGP signature


Help to debug a try with home-mcron-service-type on guix home

2022-06-29 Thread Sébastien Rey-Coyrehourcq


Hi guix !

I'm trying to config a mcron service type for mbsync, something 
simple, but there are few example on the web for the new 
home-mcron-service-type. I try something like this :


(use-modules (gnu packages mail)
(gnu packages tls)
(gnu home services mcron))


(define update-mail-service
 #~(job '(next-minute '(range 0 60 5))
(lambda ()
  (execl (string-append #$isync "/bin/mbsync")
 "mbync"
 "-a"))
"fetch mail"))

(define-public %mail-module
 (home-module
  (list mu
isync
imapfilter
msmtp
gnutls)

  (list
   (simple-service 'isync-mail-config-service
   home-files-service-type
   `(
 (".mbsyncrc" ,(local-file 
 "../config/mail/mbsyncrc"))
 (".msmtprc",(local-file 
 "../config/mail/msmtprc"))
 (".imapfilter/config.lua",(local-file 
 "../config/mail/config.lua"

   (simple-service `mcron-mail-update-service
   home-mcron-service-type
   (list update-mail-service))
   )))

but when i run reconfigure, i have an error in drv compilation :

Backtrace:
  7 (primitive-load 
  "/gnu/store/dpaczpr4j05437bk4dr1snqnfjx9ipfl-mcron-1.2.1/bin/mcron")

In mcron/scripts/mcron.scm:
   103:6  6 (main)
In ice-9/boot-9.scm:
  260:13  5 (for-each #  mcron/scripts/mcron.scm:103:16 (file)> _)

In unknown file:
  4 (eval-string "update-mail-service" #  job-specifier) 74035780>)

In ice-9/boot-9.scm:
  2835:4  3 (save-module-excursion #  ice-9/eval-string.scm:66:9 ()>)

In ice-9/eval-string.scm:
38:6  2 (read-and-eval # #:lang 
_)

In ice-9/eval.scm:
  223:20  1 (proc #  74035780>)

In unknown file:
  0 (%resolve-variable (7 . update-mail-service) 
  #)


ERROR: In procedure %resolve-variable:
Unbound variable: update-mail-service
Backtrace:
  2 (primitive-load 
  "/gnu/store/b3k8pm2gabw29rmb86r5j4j4jzz7847d-mcron-job-builder")

In ice-9/eval.scm:
   619:8  1 (_ #f)
In guix/build/utils.scm:
   762:6  0 (invoke 
   "/gnu/store/dpaczpr4j05437bk4dr1snqnfjx9ipfl-mcron-1.2.1/bin/mcron" 
   "--schedule=20" "prologue" "job")


guix/build/utils.scm:762:6: In procedure invoke:
ERROR:
 1. :
 program: 
 "/gnu/store/dpaczpr4j05437bk4dr1snqnfjx9ipfl-mcron-1.2.1/bin/mcron"

 arguments: ("--schedule=20" "prologue" "job")
 exit-status: 1
 term-signal: #f
 stop-signal: #f

Any help appreciated :) !
Best regards,



signature.asc
Description: PGP signature


Strange Wifi behavior with wpa_supplicant / gnome (eduroam)

2022-06-17 Thread Sébastien Rey-Coyrehourcq

Hi,

Like many european academic i use eduroam wifi.

a) I restart using "herd restart wpa-supplicant"

b) I generate the wpa supplicant .conf using the cat installer

c) wlo1 is up and running well, i already use it to connect on wifi with 
4G phone


d) Running sudo wpa_supplicant -c cat_installer.conf -i wlo1 -B return

Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports:could not set interface 'p2p-dev-wlo1' UP
nl80211: deinit ifname=p2p-dev-wlo1 disabled_11b_rates=0
p2p-dev-wlo1: Failed to initalize driver interface
p2p-dev-wlo1: CTRL-EVENT-DSCP-POLICY clear_all
P2P: failed to enable p2p device interface

e) running dmsg :

debugfs Directory 'netdev:p2p-dev-wlo1' with parent 'phy0' already present
... + lot of wlo1 thing : authenticate, send auth, etc. ...

f) Running sudo dhclient -v wlo1 i get an IP : BOUND to 10.0.89.236 
--renewal in 438 seconds


g) sudo nmcli return "wlo1:disconnected" ... and gnome doesn't display wifi

h) ip -a address return wlo1 bounded with inet 10.0.89.236

So Internet works (it seems, i need to rerun dhclient time to time) but 
this is not recognized by gnome, nmcli ... I also have error on running 
wpa_supplicant, i'm not sure this is normal.


I'm interested by config of other academics that use eduroam/wpa 
supplicant :)


**Bonus**

If you have some info to directly add this to some manifest : system.scm 
, i'm interested :)


Thanks

Best regards;






Some strange things :

- Gnome doesn't display the fact i'm connected to wifi

-



OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home package confusion

2022-06-15 Thread Sébastien Rey-Coyrehourcq

Hi,

Happy to see i'm not alone, a little lost when jumping into the guix 
home bath ;)


I think there is something to do (a schema, a table ?) to better 
visualize relation between guix home, guix system, guix install, guix 
package for the beginer. That could help a lot when you start your 
workflow from scratch and you don't know how thing relate each others.


A list with dotfile shared by others, like sqrtminus / dominicm could 
also help (copy / pasting and learning from others).


Best regards

Src

Le 15/06/2022 à 07:38, Tangonov a écrit :
With some more proper reading around I managed to find this thread 
from May:


https://www.mail-archive.com/help-guix@gnu.org/msg13655.html

The end of the conversation answered many of my questions. I think I 
know how I want to proceed from here.


Thanks for taking the time if you made it this far :)

Tangonov  writes:


Thanks for the reply. I of course felt the need to keep trying after I
messaged you. Call it determination (or impatience). I had manged to
do such a good job of addressing my own questions that I ended up
breaking my home environment.

In the end, I ended up logging in as root, deleting my profile
symlinks for my user and garbage collecting my user state.

From there I was able to install my manifest from scratch using guix
home.

I am still pretty confused about the relationship between guix
package, guix home and how they interact with packages. It seems like
I can install many packages by invoking guix install, and then one
system home reconfigure would undo my links to those packages if they
aren't included in the home configuration. So it seems like I should
maintain my package manifest should my interests in which packages to
keep or discard should change above and beyond a base system.

What's more confusing is after I installed from a clean slate, my
pinentry broke for gpg. It was fixed by invoking guix install
pinentry, which required no download or build for pinentry. It seems
like the de-duplication worked in that case, but I now have (again)
two divergent records of which packages I should, or should not have.

It feels like I am swinging at a nail with my thumb in the path of the
hammer.

What exactly is the intended use of guix home?

I am happy to provide my configurations, though, they have evolved
since my initial message.
Efraim Flashner  writes:


[[PGP Signed Part:Undecided]]
On Tue, Jun 14, 2022 at 08:05:45AM -0700, Tangonov wrote:

I am trying out guix for the first time and feel like I may have
jumped in
head-first into the shallow end of the pool.
I had started out with using guix package for my packages and
updated my env
for around 30 generations. Then I discovered guix home and thought
"hey,
that may be better".
I set up guix home following the documentation and it created my
first home
generation and completely re-installed my packages.
However, after subsequent changes to my home config, a guix home
reconfigure
is now attempting to re-install (and build) my packages all over
again,
despite never having run a guix pull.
I tried to "undo" the initialization of guix home as I feel like I
maybe
should stick to the "older way" for a while longer while I get the
hang of
Guile Scheme and try not to change too much at once. I have been
unable to
revert my initial revision, or find a clear path back without doing
something dramatic.
With all of my history in mind, I have 3 questions:
1. Is there a supported way to apply incremental changes in guix
home,
without re-doing (and re-compiling) all of my software?
2. Is there a supported way to revert back to just using GNU Stow
and guix
package?
3. If I can be happy with guix home, is there any supported way to
remove
potential bloat from having run guix package for 30 generations?
Thanks for the incredible software and help, if you're able.



I suppose the quick answer is to make sure you don't have 'guix' as
one
of the packages in your config.

If you share your config we might be able to see if anything sticks
out.







Re: Guix home, guix system, channels, some noob questions

2022-06-14 Thread Sébastien Rey-Coyrehourcq


Le 13/06/2022 à 21:31, Dominic Martinez a écrit :


sebastien rey-coyrehourcq  
writes:



Hi,

I jump into guile world by learning and copy/pasting Dominic Martinez 
config :)


Nice to know my config helped someone! Sorry it's a bit of a mess, I 
didn't really document anything.
I'm interested to better understand some Guile snippet of your config, 
if you're ok, is it possible to ask that in another mail or irc ?


Everything going pretty well but now i'm blocked with yubikey 
configuration.


And without yubikey that contain your only private key to 
sign/decrypt everything, that's a

little complicated ...

Running "gpg --card-status" my yubikey is correclty detected. That a 
good news ... BUT

that's all,
other command don't work, for example both :

gpg --list-secret-keys
gpg --list-keys


When you say it doesn't work, do you mean it doesn't list any keys? If 
you have keys on your Yubikey that you used with GPG on a different 
system, you'll have to re-export the key stubs for GPG to use the 
Yubikey for authentication (see 
https://github.com/drduh/YubiKey-Guide#switching-between-two-or-more-yubikeys).


Thanks! This only manipulation seems not enough and i finally found that 
importing public key is required, from server or directly from the key 


yourkey.asc | gpg --import

After that, everything goes well !

If you're getting other errors, you might need to enable some system 
services. For instance, you need the pcscd service 
(https://guix.gnu.org/manual/devel/en/guix.html#index-pcscd), and also 
the udev rules appropriate for your Yubikey model 
(https://github.com/Yubico/libfido2/blob/main/udev/70-u2f.rules). The 
below snippet should get all Yubikey functionality working:


#+begin_src scheme
(service pcscd-service-type)
(udev-rules-service 'yubikey-rules
    (udev-rule
 "70-u2f.rules"
 (string-append
  ;; All keys
  "ACTION!=\"add|change\",   
GOTO=\"u2f_end\"\n"

  ;; Yubikey
  "KERNEL==\"hidraw*\", "
  "SUBSYSTEM==\"hidraw\", "
  "ATTRS{idVendor}==\"1050\", "
"ATTRS{idProduct}==\"0113|0114|0115|0116|0120|0121|0200|0402|0403|0406|0407|0410\", 
   "

  "TAG+=\"uaccess\", MODE=\"0660\"\n"
  ;; End all keys
  "LABEL=\"u2f_end\"")))
#+end_src


I already copy paste this part from your config :)

Thanks again !

Sébastien RC.



OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home, guix system, channels, some noob questions

2022-06-01 Thread Sébastien Rey-Coyrehourcq
Thanks Julien, Daniel, Dominic, Efraim for these very detailed answers 
and snippets, that will be very useful in my current migration from 
Ubuntu to Guix.


I answer here if i need some highlights or if i found interesting 
questions or remarks to share with you.


Best regards,

Le 26/05/2022 à 02:31, Dominic Martinez a écrit :


Sébastien Rey-Coyrehourcq  
writes:



The only things holding me back at the moment is two things :

a) doom emacs flavour, how to manage the fact that doom use straigt.el
to maintain packages


I don't think it's possible to use Doom with Guix emacs packages, but 
you can just set up Doom as you would on another distro. I did this 
while I transitioned to a Guix config, using ~home-files-service-type~ 
to deploy my Doom config files.



b) "password / secrets" management ?

There are two things, file to directly encrypt (like ssh key) and
password to hide into configuration file (templating)

b.1) So, that need to encrypt/decrypt more or less "on-the-fly" the
files using gpg/yubikey or age like yadm ( 
https://yadm.io/docs/encryption ) or chezmoi

(https://www.chezmoi.io/user-guide/encryption/gpg/) do ?


I use small wrappers around GPG's built in encryption 
(https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L2663) 
and decryption 
(https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L2691) 
functions to manage secrets directly in my repository on the fly. Then 
I can have supported services call the script to get secrets without 
storing them in plain-text 
(https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L1648).



b.2) And for templating, like replacing ${mypassword} into some
configuration file by getting info stored into password manager like 
"pass", i also don't know how to do that.


Org makes this really convienent. Using noweb and shell scripts I can 
decrypt and insert secrets into templated areas when I tangle my 
configuration files. That way my repo only contains encrypted secrets, 
but as long as I have my GPG keys I can build my configuration files 
locally. See 
https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L5 and 
https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L1937.



c) synchronization of my .dotfiles between two different OS/System :
Ubuntu (home) / Guix (work & home)


I keep all my configuration in a git repository, then use ~guix home~ 
to put all the files in the right places. As others have noted, there 
are many ways to identify the current system and do system-specific 
operations. I personally use an environment variable to keep track, 
and wrap guix operations with scripts that detect the system and use 
different system/home configurations 
(https://git.sr.ht/~dominicm/dotfiles/tree/main/item/System.org#L2366). 
Then all I have to do is supply the script with the system name on the 
first run, and ~home-environment-variables-service-type~ takes it from 
there.


OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home, guix system, channels, some noob questions

2022-05-17 Thread Sébastien Rey-Coyrehourcq


Le 17/05/2022 à 12:15, Daniel Meißner a écrit :

Sébastien Rey-Coyrehourcq writes:


If you have some example of guix home profile that use dotfile manager
i'm interested :)
I'm planned to use chezmoi with pass (https://www.chezmoi.io/) in go
that use git to version file.

IIUC you can use Guix home directly and dispense with chezmoi.  However,
I did not know chezmoi before so there might be a use-case that is not
covered by Guix home, in principle though, Guix home is itself a dotfile
manager.


Thanks,  in fact when i see *guix home* that was my first intention 
(like home-manager in nix).


The only things holding me back at the moment is two things :

a) doom emacs flavour, how to manage the fact that doom use straigt.el 
to maintain packages


I suppose i only save the .doom.d and ignore the .emacs.d that contain 
all packages downloaded by .doom.d/init.el and config.el


b) "password / secrets" management ?

There are two things, file to directly encrypt (like ssh key) and 
password to hide into configuration file (templating)


b.1) So, that need to encrypt/decrypt more or less "on-the-fly" the 
files using gpg/yubikey or age like yadm ( 
https://yadm.io/docs/encryption ) or chezmoi 
(https://www.chezmoi.io/user-guide/encryption/gpg/) do ?


b.2) And for templating, like replacing ${mypassword} into some 
configuration file by getting info stored into password manager like 
"pass", i also don't know how to do that.


Actually I have no idea how to do that with guile / guix home for b.1 / b.2

c) synchronization of my .dotfiles between two different OS/System : 
Ubuntu (home) / Guix (work & home)


Lot of people use Ubuntu in my work environment, so i need to maintain 
some sort of compatibility between both systems for my dotfile (before 
everyone use guix in 2030 ? :D).


I suppose guix home work well with guix on top of ubuntu ?

Best.


  I use it for example to manage my Git config, Emacs config and
others.  The manual has a chapter about it:

https://guix.gnu.org/de/manual/devel/en/html_node/Home-Configuration.html#Home-Configuration

A simple example would be the following:

--8<---cut here---start->8---
(use-modules (gnu home)
  (gnu home services)
  (gnu home services shells)
  (gnu services)
  (gnu packages admin)
  (guix gexp))


(home-environment
  (packages (list htop))
  (services
   (list
(service home-bash-service-type
 (home-bash-configuration
  (environment-variables
   '(("HISTFILE" . "$XDG_STATE_HOME/bash_history")

(simple-service 'git-config
home-files-service-type
(list `(".gitconfig"
,(plain-file "gitconfig"
 "[user]
email = daniel.meissner-...@ruhr-uni-bochum.de
name = Daniel Meißner
")))
--8<---cut here---end--->8---

This would create a home-environment with the package ‘htop’, a bash
configuration that sets the HISTFILE env var as well as the .gitconfig
file with the above contents.  You can test this environment using:

   guix home container test-home.scm

This spawns a shell where your home environment is set up as specified
but using a container.  So your actual home directory is not modified.
You don’t have to embed all your config files inside the Scheme file
directly.  You can also load from other files, for example, you could
replace the ,(plain-file ...) call with a ,(local-file "gitconfig.txt")
which would use the contents of the file gitconfig.txt which lives next
to your Scheme file for the generation of the .gitconfig file.

Best

--
Daniel


OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home, guix system, channels, some noob questions

2022-05-17 Thread Sébastien Rey-Coyrehourcq


Le 17/05/2022 à 10:57, Daniel Meißner a écrit :

Hi Sébastien,

Sébastien Rey-Coyrehourcq writes:


Thanks Daniel,

So if i understand well, in the common use case, if you install guix
home and use it in parallel with guix install, these profile are
"cumulative",
software installed are available no matter how I set them up (guix
install or using guix home declarative file + reconfigure) ?

Yes, these two profiles are normally both loaded in the sense that the
shell scripts ~/.guix-profile/etc/profile and
~/.guix-home/setup-environment are sourced.

Ok !



It is a bit confusing at first for new user, what's the best workflow,
using the guix home declarative file and "reconfigure" or directly
guix install ?

It depends on what you want to achieve.  You could use also both at the
same time.  I like to use only Guix home to manage the packages that I
need on a regular basis.  However, this is mainly because I also have
some dotfiles in my home-environment.  If you just want to declaratively
manage the packages you use, you could also do it with manifests¹.
Additionally, sometimes, when I need a package, that I presumably only
use once, I use ‘guix shell’² for it.


Ok, i suppose manifest are similar to config.scm used for reconfiguring 
system for exemple.


If you have some example of guix home profile that use dotfile manager 
i'm interested :)
I'm planned to use chezmoi with pass (https://www.chezmoi.io/) in go 
that use git to version file.


Thanks !



Best


¹ https://guix.gnu.org/en/manual/devel/en/html_node/Writing-Manifests.html
² 
https://guix.gnu.org/en/manual/devel/en/html_node/Invoking-guix-shell.html#Invoking-guix-shell

--
Daniel


OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home, guix system, channels, some noob questions

2022-05-17 Thread Sébastien Rey-Coyrehourcq


Le 17/05/2022 à 09:26, Daniel Meißner a écrit :

Hi Guix,

Sébastien Rey-Coyrehourcq writes:


Thanks,

I made some test on my own to understand :

1 - Like you say, installing things with *guix install* is for current
user (for example *firefox* and *sshpass*)

2 - Adding a package that don't exist to * myhome.scm* and reconfigure
it with *guix home reconfigure* file will download a package (ex
"ncdu"), but this package doesn't appear into "guix package
--list-installed"

3 - Adding a package that already exist for user (ex : firefox already
installed with guix install) to *myhome.scm* doesn't reinstall
package, that's normal.

I don't understand the step 2, why *guix home* installed package
(*ncdu* here) are not listed with *guix install --list-installed*, is
there a difference ?

‘guix install’ installs into the current user’s profile which can be
found at ~/.guix-profile whereas ‘guix home’ creates an immutable
profile under ~/.guix-home/profile.¹  You can install the same package to
different profiles but of course they will be built only once (provided
you use the same Guix revision).  You can list the packages which are
installed in your Guix home profile via:

   guix package --profile="$HOME/.guix-home/profile" --list-installed

Best



¹ IIUC the profile under ~/.guix-profile is also immutable (as are all
   profiles).  ‘guix install icecat’, for example, would create a new
   profile that contains all packages from the previous generation of
   ~/.guix-profile plus the packages icecat and then it would link the
   new profile to ~/.guix-profile.  In contrast you cannot do the same
   with ‘guix install’ for ~/.guix-home/profile.  Invoking

 guix install --profile="$HOME/.guix-home/profile" icecat

   to try to install icecat to the profile ~/.guix-home/profile yields:

 guix install: error: open-file: Read-only file system: 
"/home/daniel/.guix-home/profile.lock"


Thanks Daniel,

So if i understand well, in the common use case, if you install guix 
home and use it in parallel with guix install, these profile are 
"cumulative",
software installed are available no matter how I set them up (guix 
install or using guix home declarative file + reconfigure) ?


It is a bit confusing at first for new user, what's the best workflow, 
using the guix home declarative file and "reconfigure" or directly guix 
install ?


SRC



--
Daniel


OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Guix home, guix system, channels, some noob questions

2022-05-12 Thread Sébastien Rey-Coyrehourcq

Thanks,

I made some test on my own to understand :

1 - Like you say, installing things with *guix install* is for current 
user (for example *firefox* and *sshpass*)


2 - Adding a package that don't exist to * myhome.scm* and reconfigure 
it with *guix home reconfigure* file will download a package (ex 
"ncdu"), but this package doesn't appear into "guix package 
--list-installed"


3 - Adding a package that already exist for user (ex : firefox already 
installed with guix install) to *myhome.scm* doesn't reinstall package, 
that's normal.


I don't understand the step 2, why *guix home* installed package (*ncdu* 
here) are not listed with *guix install --list-installed*, is there a 
difference ?


- using *which ncdu*, bin is located into .guix-home/profile/bin/ncdu

- using *which firefox*, bin is located into .guix-home/profile/bin/firefox

- using *which sshpass*, bin is located into .guix-home/profile/bin/sshpass

Ok for secrets, but i don't understand the "out-of-band" reference in 
your previous mail.


Thanks !

Best regards

Le 12/05/2022 à 11:28, Julien Lepiller a écrit :
guix install something installs for the current user. Note that, if 
you do that as root, the package is also only available to root. The 
only way to install or remove a global package is through guix system 
and its configuration file.


I don't know how guix home interacts with other solutions.

We don't have a good solution for secrets. We advise to manage the 
"out-of-band" to make sure that you don't share the secret 
accidentally (eg. publishing your configuration with others) and that 
the secret doesn't end up in the store (it's world-readable).


On May 12, 2022 10:40:18 AM GMT+02:00, "Sébastien Rey-Coyrehourcq" 
 wrote:


Thanks Julien,

Ok i see, like you say jpoiret also say me that the concept are
orthogonal, so if i understand well :

- adding emacs as system package, i suppose this is available for
all users

- adding emacs as home package, i suppose this is available only
for me

And *guix install something* install for which, system or home or
both ?

Some other general questions :

- About dotfile management, is it possible to use chezmoi, yadm,
stow in // of guix home ?

I'm interested by some example if you have.

- About secrets management, i know this is very complicated in nix
(there are one hundred way to do the things, more or less secure),
how that works if i want to inject *secrets* into guix home scm
file and maintain security when i share or publish my config
with/to others ?

Thanks,

Best regards


Le 11/05/2022 à 17:48, Julien Lepiller a écrit :

Guix home and guix system are pretty similar as they are used to
declaratively manage configuration. But, they are not mutually
exclusive. Guix system is the only way to install and update the
Guix System (hence the name ;)).

Guix home manages your user's configuration (in /home) while guix
system manages the system's configuration (traditionally in /etc,
though less true for guix). The two are acting in a very similar
on two different things.

Also, you can use guix home on a foreign distro, or choose to not
use guix home on the Guix System.

    HTH!

    On May 11, 2022 4:55:23 PM GMT+02:00, "Sébastien Rey-Coyrehourcq"
 wrote:

Hi,

My other question remain about guix home / guix system relation, and 
sudo, but jpoiret found my main problem, my channels.scm are not well defined / 
not good ...

- I made (cons * (channel ...)) (cons* (channel ...)) etc.

- and .. the correct way is (cons * (channel ...) (channel ...))

Everything run fine now with *guix system reconfigure 
/.config/guix/system.scm*

Best

Le 11/05/2022 à 16:36, Sébastien Rey-Coyrehourcq a écrit :

Hi, Thanks Julien, I see on the doc that *sudo* run
command as user and not as root like other distro. So, to
be sure, if i run *sudo guix something*, i don't change
user to run this command isn't it ? Actually i only work
with my account "myuser" into group
("users","wheel",etc.) using or not using *sudo* (this is
not clear when i need or not) for running *guix* command.
About the commands with /.config/guix/channels.scm (see
content here https://paste.debian.net/1240553)  : a)
*guix describe* and *sudo guix describe* and *sudo -E
guix describe* return Génération 7    11 mai 2022
16:01:25    (actuelle)   guix d24ad39     URL du dépôt :
https://git.savannah.gnu.org/git/guix.git     branche :
master     commit :
d24ad3949127a938cad306f0524c120afe5e2e4f b) *guix system
describe* return Génération 7    10 mai 2022 12:39:34   
 

Re: Guix home, guix system, channels, some noob questions

2022-05-12 Thread Sébastien Rey-Coyrehourcq

Thanks Julien,

Ok i see, like you say jpoiret also say me that the concept are 
orthogonal, so if i understand well :


- adding emacs as system package, i suppose this is available for all users

- adding emacs as home package, i suppose this is available only for me

And *guix install something* install for which, system or home or both ?

Some other general questions :

- About dotfile management, is it possible to use chezmoi, yadm, stow in 
// of guix home ?


I'm interested by some example if you have.

- About secrets management, i know this is very complicated in nix 
(there are one hundred way to do the things, more or less secure), how 
that works if i want to inject *secrets* into guix home scm file and 
maintain security when i share or publish my config with/to others ?


Thanks,

Best regards


Le 11/05/2022 à 17:48, Julien Lepiller a écrit :
Guix home and guix system are pretty similar as they are used to 
declaratively manage configuration. But, they are not mutually 
exclusive. Guix system is the only way to install and update the Guix 
System (hence the name ;)).


Guix home manages your user's configuration (in /home) while guix 
system manages the system's configuration (traditionally in /etc, 
though less true for guix). The two are acting in a very similar on 
two different things.


Also, you can use guix home on a foreign distro, or choose to not use 
guix home on the Guix System.


HTH!

On May 11, 2022 4:55:23 PM GMT+02:00, "Sébastien Rey-Coyrehourcq" 
 wrote:


Hi,

My other question remain about guix home / guix system relation, and sudo, 
but jpoiret found my main problem, my channels.scm are not well defined / not 
good ...

- I made (cons * (channel ...)) (cons* (channel ...)) etc.

- and .. the correct way is (cons * (channel ...) (channel ...))

Everything run fine now with *guix system reconfigure 
/.config/guix/system.scm*

Best

Le 11/05/2022 à 16:36, Sébastien Rey-Coyrehourcq a écrit :

Hi, Thanks Julien, I see on the doc that *sudo* run command as
user and not as root like other distro. So, to be sure, if i
run *sudo guix something*, i don't change user to run this
command isn't it ? Actually i only work with my account
"myuser" into group ("users","wheel",etc.) using or not using
*sudo* (this is not clear when i need or not) for running
*guix* command. About the commands with
/.config/guix/channels.scm (see content here
https://paste.debian.net/1240553)  : a) *guix describe* and
*sudo guix describe* and *sudo -E guix describe* return
Génération 7    11 mai 2022 16:01:25    (actuelle)   guix
d24ad39     URL du dépôt :
https://git.savannah.gnu.org/git/guix.git     branche : master
    commit : d24ad3949127a938cad306f0524c120afe5e2e4f b) *guix
system describe* return Génération 7    10 mai 2022
12:39:34    (actuelle)   nom de fichier :
/var/guix/profiles/system-7-link   nom de fichier canonique :
/gnu/store/az1ff4ll80dbrbkayc4y0jqgnc2m37mp-system   étiquette
: GNU with Linux 5.17.5   chargeur de démarrage : grub-efi  
périphérique racine : /dev/mapper/cryptroot   noyau :
/gnu/store/0ffifgs0ixgz0bf1pcahkfdkx9f7h720-linux-5.17.5/bzImage
  canaux :     nonguix:   URL du dépôt :
https://gitlab.com/nonguix/nonguix   branche : master
  commit : 1de0c32142c54bc73af5556d5e45c77152b31f0f    
guix:   URL du dépôt :
https://git.savannah.gnu.org/git/guix.git   branche :
master   commit : d775a24344d4a910f6a19072c595bdafcf104b6f
  fichier de configuration :
/gnu/store/idr8ds86m69gbx217g5h3qm6m353wliz-configuration.scm
c) *guix home describe* return Génération 1    10 mai 2022
16:59:14    (actuelle)   nom de fichier :
/var/guix/profiles/per-user/reyman/guix-home-1-link   nom de
fichier canonique :
/gnu/store/3q599hyjkx8c5ywsdy2gqfmx2bjzgzmm-home   canaux :
    flat:   URL du dépôt :
https://github.com/flatwhatson/guix-channel.git   branche
: master   commit :
094746c1e2e90f2df1e598ab1fd0abb4d75ce84d     guix:   URL
du dépôt : https://git.savannah.gnu.org/git/guix.git  
branche : master   commit :
0f705472126f7b935e0783bcd8fec831b7a0593b   fichier de
configuration :
/gnu/store/ip90ffd0bzlr7j6kw5ky2pgxpyq1x23c-configuration.scm
With jpoiret, i try to resolve the issue on chat, i also try
to run manually *guix pull -C ./config/guix/channels.scm*
without success. A *command -v guix* return
*/home/myuser/.config/current/bin/guix* Best regards, SR Le
11/05/2022 à 12:47, Julien Lepiller a écrit :

Hi Sébastien, When you run guix describe, it's running the
guix for your use

Re: Guix home, guix system, channels, some noob questions

2022-05-11 Thread Sébastien Rey-Coyrehourcq

Hi,

My other question remain about guix home / guix system relation, and 
sudo, but jpoiret found my main problem, my channels.scm are not well 
defined / not good ...


- I made (cons * (channel ...)) (cons* (channel ...)) etc.

- and .. the correct way is (cons * (channel ...) (channel ...))

Everything run fine now with *guix system reconfigure 
/.config/guix/system.scm*


Best

Le 11/05/2022 à 16:36, Sébastien Rey-Coyrehourcq a écrit :

Hi,

Thanks Julien,

I see on the doc that *sudo* run command as user and not as root like 
other distro. So, to be sure, if i run *sudo guix something*, i don't 
change user to run this command isn't it ?


Actually i only work with my account "myuser" into group 
("users","wheel",etc.) using or not using *sudo* (this is not clear 
when i need or not) for running *guix* command.


About the commands with /.config/guix/channels.scm (see content here 
https://paste.debian.net/1240553)  :


a) *guix describe* and *sudo guix describe* and *sudo -E guix 
describe* return


Génération 7    11 mai 2022 16:01:25    (actuelle)
  guix d24ad39
    URL du dépôt : https://git.savannah.gnu.org/git/guix.git
    branche : master
    commit : d24ad3949127a938cad306f0524c120afe5e2e4f

b) *guix system describe* return


Génération 7    10 mai 2022 12:39:34    (actuelle)
  nom de fichier : /var/guix/profiles/system-7-link
  nom de fichier canonique : 
/gnu/store/az1ff4ll80dbrbkayc4y0jqgnc2m37mp-system

  étiquette : GNU with Linux 5.17.5
  chargeur de démarrage : grub-efi
  périphérique racine : /dev/mapper/cryptroot
  noyau : 
/gnu/store/0ffifgs0ixgz0bf1pcahkfdkx9f7h720-linux-5.17.5/bzImage

  canaux :
    nonguix:
  URL du dépôt : https://gitlab.com/nonguix/nonguix
  branche : master
  commit : 1de0c32142c54bc73af5556d5e45c77152b31f0f
    guix:
  URL du dépôt : https://git.savannah.gnu.org/git/guix.git
  branche : master
  commit : d775a24344d4a910f6a19072c595bdafcf104b6f
  fichier de configuration : 
/gnu/store/idr8ds86m69gbx217g5h3qm6m353wliz-configuration.scm


c) *guix home describe* return


Génération 1    10 mai 2022 16:59:14    (actuelle)
  nom de fichier : /var/guix/profiles/per-user/reyman/guix-home-1-link
  nom de fichier canonique : 
/gnu/store/3q599hyjkx8c5ywsdy2gqfmx2bjzgzmm-home

  canaux :
    flat:
  URL du dépôt : https://github.com/flatwhatson/guix-channel.git
  branche : master
  commit : 094746c1e2e90f2df1e598ab1fd0abb4d75ce84d
    guix:
  URL du dépôt : https://git.savannah.gnu.org/git/guix.git
  branche : master
  commit : 0f705472126f7b935e0783bcd8fec831b7a0593b
  fichier de configuration : 
/gnu/store/ip90ffd0bzlr7j6kw5ky2pgxpyq1x23c-configuration.scm


With jpoiret, i try to resolve the issue on chat, i also try to run 
manually *guix pull -C ./config/guix/channels.scm* without success.


A *command -v guix* return */home/myuser/.config/current/bin/guix*

Best regards,

SR



Le 11/05/2022 à 12:47, Julien Lepiller a écrit :

Hi Sébastien,

When you run guix describe, it's running the guix for your user, 
which miggt be different from the one you run when you use sudo. That 
could explain why the modules are not found. I don't think guix home 
has anything to do with that.


I noticed that the first time you use sudo -E, whereas you use only 
sudo on step 5. Mayée that's why it fails?


I would run sudo guix describe and sudo -E guix describe to see how 
the two might be different from your user's guix :)


HTH!

On May 11, 2022 11:09:19 AM GMT+02:00, "Sébastien Rey-Coyrehourcq" 
 wrote:


    Hi Guix people :)

    I'm starting guix, picking information when needed into 
documentation.


    I'm facing difficulties with channels.scm since i start using 
"guix home", i read the doc page, but i need some other things to 
understand.


    Here my logic to start just after install :

    1 - I modify my //etc/guix/channels.scm/ file to add some modules 
: /nonguix/ (my computer don't work well without) and 
/emacs-native-dep/ from flatwhatson flat channel.


    2 - I /guix -E guix system reconfigure /etc/config.scm/, /guix 
pull/, and everything goes well


    3 - Like explained in the doc, I run /guix home import 
~/src/guix-config /that generate /a //home-configuration.scm//

    /

    /4 - /Into /home-configuration.scm///i add the package htop and 
/emacs-native-comp/


    5 - In the guix home doc the next command is /guix home 
reconfigure config.scm /but this is probably a typo and i run /guix 
home reconfigure ~/src/guix-config/home-configuration.scm/


    6 - Everything goes well, emacs-native-dep compile during 1 hour, 
problems arrive after that.


    7 - I'm moving the //etc/guix/config.scm/ and 
//etc/guix/channels.scm /to my home /~/.config/guix/ , /and i run 
/sudo guix system reconfigure ~/.config/guix/system.scm///*, that 
fail*/, /it seems the module (nongnu and emacs-native-dep) are not 
referenced, like the error say /"no code for modu

Re: Guix home, guix system, channels, some noob questions

2022-05-11 Thread Sébastien Rey-Coyrehourcq

Hi,

Thanks Julien,

I see on the doc that *sudo* run command as user and not as root like 
other distro. So, to be sure, if i run *sudo guix something*, i don't 
change user to run this command isn't it ?


Actually i only work with my account "myuser" into group 
("users","wheel",etc.) using or not using *sudo* (this is not clear when 
i need or not) for running *guix* command.


About the commands with /.config/guix/channels.scm (see content here 
https://paste.debian.net/1240553)  :


a) *guix describe* and *sudo guix describe* and *sudo -E guix describe* 
return


Génération 7    11 mai 2022 16:01:25    (actuelle)
  guix d24ad39
    URL du dépôt : https://git.savannah.gnu.org/git/guix.git
    branche : master
    commit : d24ad3949127a938cad306f0524c120afe5e2e4f

b) *guix system describe* return


Génération 7    10 mai 2022 12:39:34    (actuelle)
  nom de fichier : /var/guix/profiles/system-7-link
  nom de fichier canonique : 
/gnu/store/az1ff4ll80dbrbkayc4y0jqgnc2m37mp-system

  étiquette : GNU with Linux 5.17.5
  chargeur de démarrage : grub-efi
  périphérique racine : /dev/mapper/cryptroot
  noyau : /gnu/store/0ffifgs0ixgz0bf1pcahkfdkx9f7h720-linux-5.17.5/bzImage
  canaux :
    nonguix:
  URL du dépôt : https://gitlab.com/nonguix/nonguix
  branche : master
  commit : 1de0c32142c54bc73af5556d5e45c77152b31f0f
    guix:
  URL du dépôt : https://git.savannah.gnu.org/git/guix.git
  branche : master
  commit : d775a24344d4a910f6a19072c595bdafcf104b6f
  fichier de configuration : 
/gnu/store/idr8ds86m69gbx217g5h3qm6m353wliz-configuration.scm


c) *guix home describe* return


Génération 1    10 mai 2022 16:59:14    (actuelle)
  nom de fichier : /var/guix/profiles/per-user/reyman/guix-home-1-link
  nom de fichier canonique : 
/gnu/store/3q599hyjkx8c5ywsdy2gqfmx2bjzgzmm-home

  canaux :
    flat:
  URL du dépôt : https://github.com/flatwhatson/guix-channel.git
  branche : master
  commit : 094746c1e2e90f2df1e598ab1fd0abb4d75ce84d
    guix:
  URL du dépôt : https://git.savannah.gnu.org/git/guix.git
  branche : master
  commit : 0f705472126f7b935e0783bcd8fec831b7a0593b
  fichier de configuration : 
/gnu/store/ip90ffd0bzlr7j6kw5ky2pgxpyq1x23c-configuration.scm


With jpoiret, i try to resolve the issue on chat, i also try to run 
manually *guix pull -C ./config/guix/channels.scm* without success.


A *command -v guix* return */home/myuser/.config/current/bin/guix*

Best regards,

SR



Le 11/05/2022 à 12:47, Julien Lepiller a écrit :

Hi Sébastien,

When you run guix describe, it's running the guix for your user, which 
miggt be different from the one you run when you use sudo. That could 
explain why the modules are not found. I don't think guix home has 
anything to do with that.


I noticed that the first time you use sudo -E, whereas you use only 
sudo on step 5. Mayée that's why it fails?


I would run sudo guix describe and sudo -E guix describe to see how 
the two might be different from your user's guix :)


HTH!

On May 11, 2022 11:09:19 AM GMT+02:00, "Sébastien Rey-Coyrehourcq" 
 wrote:


Hi Guix people :)

I'm starting guix, picking information when needed into documentation.

I'm facing difficulties with channels.scm since i start using "guix home", 
i read the doc page, but i need some other things to understand.

Here my logic to start just after install :

1 - I modify my //etc/guix/channels.scm/ file to add some modules : 
/nonguix/ (my computer don't work well without) and /emacs-native-dep/ from 
flatwhatson flat channel.

2 - I /guix -E guix system reconfigure /etc/config.scm/, /guix pull/, and 
everything goes well

3 - Like explained in the doc, I run /guix home import ~/src/guix-config 
/that generate /a //home-configuration.scm//
/

/4 - /Into /home-configuration.scm///i add the package htop and 
/emacs-native-comp/

5 - In the guix home doc the next command is /guix home reconfigure 
config.scm /but this is probably a typo and i run /guix home reconfigure 
~/src/guix-config/home-configuration.scm/

6 - Everything goes well, emacs-native-dep compile during 1 hour, problems 
arrive after that.

7 - I'm moving the //etc/guix/config.scm/ and //etc/guix/channels.scm /to my home 
/~/.config/guix/ , /and i run /sudo guix system reconfigure 
~/.config/guix/system.scm///*, that fail*/, /it seems the module (nongnu and 
emacs-native-dep) are not referenced, like the error say /"no code for module ( 
nongnu ..." /But when i run /guix system describe/, the corresponding channel are 
well defined. /
/

After that, i try many thing, like moving channels.scm and system.scm back 
to /etc/guix/ but every reconfigure command fail in link with channel/module 
not recognized (emacs-native-dep or nongnu)

- /guix home reconfigure ~/src/guix-config/home-configuration.scm/

- /guix system reconfigure ~/.config/guix/system.scm/


Guix home, guix system, channels, some noob questions

2022-05-11 Thread Sébastien Rey-Coyrehourcq

Hi Guix people :)

I'm starting guix, picking information when needed into documentation.

I'm facing difficulties with channels.scm since i start using "guix 
home", i read the doc page, but i need some other things to understand.


Here my logic to start just after install :

1 - I modify my //etc/guix/channels.scm/ file to add some modules : 
/nonguix/ (my computer don't work well without) and /emacs-native-dep/ 
from flatwhatson flat channel.


2 - I /guix -E guix system reconfigure /etc/config.scm/, /guix pull/, 
and everything goes well


3 - Like explained in the doc, I run /guix home import ~/src/guix-config 
/that generate /a //home-configuration.scm//

/

/4 - /Into /home-configuration.scm///i add the package htop and 
/emacs-native-comp/


5 - In the guix home doc the next command is /guix home reconfigure 
config.scm /but this is probably a typo and i run /guix home reconfigure 
~/src/guix-config/home-configuration.scm/


6 - Everything goes well, emacs-native-dep compile during 1 hour, 
problems arrive after that.


7 - I'm moving the //etc/guix/config.scm/ and //etc/guix/channels.scm 
/to my home /~/.config/guix/ , /and i run /sudo guix system reconfigure 
~/.config/guix/system.scm///*, that fail*/, /it seems the module (nongnu 
and emacs-native-dep) are not referenced, like the error say /"no code 
for module ( nongnu ..." /But when i run /guix system describe/, the 
corresponding channel are well defined. /

/

After that, i try many thing, like moving channels.scm and system.scm 
back to /etc/guix/ but every reconfigure command fail in link with 
channel/module not recognized (emacs-native-dep or nongnu)


- /guix home reconfigure ~/src/guix-config/home-configuration.scm/

- /guix system reconfigure ~/.config/guix/system.scm/

- /guix system reconfigure ~/etc/guix/config.scm/

So my question is first, why that fail after switching to guix home ? 
and how and where i need to define/set correctly the /channel.scm/ file 
to repair that ?


For example, /guix system//describe/ and /guix home describe/ and /guix 
describe/ return all different channel referenced, how i manage that ?


I suppose there is a "workflow to use well guix home"? but this is not 
actually in the doc. For example, perhaps after creating and switching 
to guix home profile, running guix system is impossible or prohibited ? 
I suppose this will be added in the future.


Thanks a lot for your help.

---

Sebastien Rey-C


//



OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature