Re: Unable to edit pulseaudio config file

2020-06-20 Thread Jakub Kądziołka
On Fri, Jun 12, 2020 at 12:56:38AM -0500, Nathan Dehnel wrote:
> I made a modified config file in
> /home/nathan/.config/pulse/default.pa, and then added this to
> config.scm, per the manual:
> https://guix.gnu.org/manual/en/html_node/Sound-Services.html
> 
> (service pulseaudio-service-type
>  (pulseaudio-configuration (script-file (file-append
> pulseaudio "/home/nathan/.config/pulse/default.pa"
> 
> But guix system reconfigure gives:
> 
> guix system: error: duplicate 'pulse' entry for /etc
> 
> How do I fix this?

If you're using %desktop-services, they already contain a pulseaudio
service. You should use modify-services to change the configuration,
something like this should work:

(modify-services %desktop-services
  (pulseaudio-service-type config =>
(pulseaudio-configuration
  (inherit config)
  (script-file "/home/nathan/.config/pulse/default.pa"

Note that the file-append you've suggested would result in a path like
/gnu/store/...-pulseaudio/home/nathan/.config/pulse/default.pa

Regards,
Jakub Kądziołka


signature.asc
Description: PGP signature


Re: Gitlab CI

2020-06-20 Thread divoplade
Hello Jérémy,

The problem is that guix-install.sh asks you whether you want to
authorize the substitutes, but it can't because it is not used
interactively, so it fails.

There are other traps to avoid (do not forget to install ntp, call
guix-daemon with --disable-chroot because you are in an unprivileged
container, cache things to avoid pulling the world at each commit). I
have a solution based on caching a guix pack containing all your
packages: https://framagit.org/divoplade/guix-project

variables:
  GUIX_REF: "--branch=master"
  PACKAGES: "guile-hall hello"

before_script:
  - test -f cache.tar.gz || apt -qq update
  - test -f cache.tar.gz || apt -qq install -y wget gpg xz-utils ntp
  - test -f cache.tar.gz || wget 
https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --
import -
  - test -f cache.tar.gz || wget 
https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
  - test -f cache.tar.gz || chmod ugo+x guix-install.sh
  - test -f cache.tar.gz || (echo "" ; echo "y") | ./guix-install.sh ||
echo "Assume OK"
  - test -f cache.tar.gz || source
/root/.config/guix/current/etc/profile
  - test -f cache.tar.gz || guix-daemon --build-users-group=guixbuild
--disable-chroot &
  - test -f cache.tar.gz || guix pull $GUIX_REF
  - test -f cache.tar.gz || cp $(guix pack -C gzip $PACKAGES
-S/opt/bin=bin) cache.tar.gz
  - cp cache.tar.gz /
  - (cd / && tar xf cache.tar.gz)
  - export PATH=/opt/bin:$PATH

cache:
  key: "$GUIX_REF $PACKAGES"
  paths:
- cache.tar.gz

job:
  script:
- hello
- hall --help

After a very long set up (1/2 hour with a somewhat fast runner), you
will leverage the cached guix pack to run the jobs instantly, with the
default gitlab runner (unprivileged, debian-based).

If you want to update, clear the runner caches, or change the GUIX_REF
variable. You can pin a specific commit (better for reproducibility,
not so great for releases) with --commit=COMMIT.

I could not get guix to run within the job, even with "guix" added to
PACKAGES: it would need this in the script:

- apt -qq update
- apt -qq install -y ntp
- (groupadd --system guixbuild && for i in $(seq 1 10) ; do useradd
-g guixbuild -G guixbuild -d /var/empty -s $(which nologin) -c "Guix
build user $i" --system guixbuilder$i; done) || true
- guix-daemon --build-users-group=guixbuild --disable-chroot &
- guix archive --authorize < $(dirname $(readlink
/usr/local/bin/guix))/../share/guix/ci.guix.info.pub

However, if you try it, you will notice a crash.

I am looking forward to having guix shipped as a debian package, it
will be way easier.

divoplade

Le samedi 20 juin 2020 à 10:42 +0200, Jérémy Korwin-Zmijowski a écrit :
> Hey Guixters !
> 
> I am experimenting with Gitlab CI for a Guile project I am working
> on.
> It is managed with Hall and I would like to benefit the Guix
> features.
> 
> Currently, I struggle to run Guix inside the default Debian stable
> docker image (framagit.org).
> 
> Here is my .gitlab-ci.yml :
> 
>before_script:
> - apt -qq update
> - apt -qq install -y wget gpg xz-utils
> - wget 
>
> https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
>  - chmod +x guix-install.sh
>  - wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - |
> gpg --import -
>  - printf '\n' | ./guix-install.sh
>  - /root/.config/guix/current/bin/guix-daemon --build-users-
> group=guixbuild
>  - guix pull
> 
> stages:
>   - bootstrap
>   - configure
>   - build
>   - test
> 
> job:bootstrap:
>   stage: bootstrap
>   script: autoreconf -vfi
> 
> What I get :
> 
>[1592641832.155]: [ FAIL ] unsupported init system; run the daemon
>manually:
>   /root/.config/guix/current/bin/guix-daemon --build-users-
>group=guixbuild
>[1592641832.155]: [ INFO ] making the guix command available to
>other users
> 
> Does anyone has done that before ?
> Is there a way to get a Guix docker image instead of the Debian one ?
> 
> Have a nice weekend !
> 
> Jérémy
> 
> 




Re: Gitlab CI

2020-06-20 Thread Ricardo Wurmus


Jérémy Korwin-Zmijowski  writes:

> Hey Guixters !
>
> I am experimenting with Gitlab CI for a Guile project I am working on.
> It is managed with Hall and I would like to benefit the Guix features.
>
> Currently, I struggle to run Guix inside the default Debian stable
> docker image (framagit.org).

Can you specify a different Docker image?  Then you could create one
containing Guix with “guix pack -f docker”.

-- 
Ricardo



Unable to build derivation, even if inputs are available

2020-06-20 Thread Christopher Baines
Hey,

I thought I was beginning to understand derivations, but I've hit a
problem I can't explain.

I've got a derivation in my local store, and as far as I can work out,
all the outputs for all the required inputs of this derivation are in
the store as well.

  scheme@(guix-user)> (use-modules (srfi srfi-1) (guix derivations))
  scheme@(guix-user)> (define drv (read-derivation-from-file 
"/gnu/store/mafs37vw7k65ah071p8f080c9y1y3l7n-bbmap-35.82.drv"))
  scheme@(guix-user)> (define required-outputs (append-map 
derivation-input-output-paths (derivation-inputs drv)))
  scheme@(guix-user)> (define missing-outputs (remove file-exists? 
required-outputs))
  scheme@(guix-user)> missing-outputs
  $1 = ()

Despite that, I can't build it. If I try, Guix says I'll need to build
~80 [1] other things along with the derivation I actually want to build.

Any ideas?

Thanks,

Chris


1:

→ guix build --no-substitutes --dry-run 
/gnu/store/mafs37vw7k65ah071p8f080c9y1y3l7n-bbmap-35.82.drv
The following derivations would be built:
   /gnu/store/mafs37vw7k65ah071p8f080c9y1y3l7n-bbmap-35.82.drv
   /gnu/store/dyy7krbmvqv8ldqa6kgpcxkaymcbcsmp-java-eclipse-jdt-core-3.16.0.drv
   
/gnu/store/133nmv744dwvlw89q09x6x9sp34qd3xc-java-eclipse-equinox-preferences-3.6.1.drv
   
/gnu/store/5pfx47a7zxsjj4jflyq6qayb96d31488-java-eclipse-equinox-registry-3.6.100.drv
   /gnu/store/d4m0lmf4gaancq4ap8ng8bjh4qr9hi9f-java-eclipse-osgi-3.11.3.drv
   /gnu/store/08lmsg9pdr70qqxg365q0fq41xswh56g-java-osgi-annotation-6.0.0.drv
   
/gnu/store/biv4r4qjmgnl1brziyb7ghp82mamk6cy-org.osgi.annotation-6.0.0-sources.jar.drv
   /gnu/store/i4c735bl1vvpz9m50k1928xiw3qgqga0-icedtea-3.7.0.drv
   /gnu/store/f76mrvhlhpvm3imnwg2xcymnifiwmxl6-nss-certs-3.52.1.drv
   /gnu/store/4iz4887vs8rxsmfrgb74cxr4i8r4zdy3-nss-3.52.1.tar.gz.drv
   /gnu/store/gg1dcfivpfvwj64ciqmk6vy3r1mwn47p-nss-3.52.1.drv
   /gnu/store/0yd5aj9944f58k8d02482c4kq6xipra4-libfaketime-0.9.8.drv
   /gnu/store/31vb5rlr9jni0dsds6grr617fx2ca9r5-libfaketime-0.9.8-checkout.drv
   /gnu/store/mqyrmv7czc7gz7wjapz7vyw8w7n4vm67-nss-3.52.1.tar.xz.drv
   /gnu/store/hxklv8hc41ciglpxvdrg1an5f0y27b2q-gtk+-2.24.32.drv
   /gnu/store/8lzmrz9w5dr99rg1h33pqj07bd4amxh8-gtk+-2.24.32.tar.xz.drv
   /gnu/store/rlggx9zhj62xhkjbwbsknpdm2zrcfyn9-ant-bootstrap-1.8.4.drv
   /gnu/store/0af7banh3admdysplk2y2ziwg9zkmghr-jamvm-1.5.1.drv
   /gnu/store/d4p53xd6gq00kk91ayqyjzqqr2nxx0bn-jikes-1.22.drv
   /gnu/store/p1f97jv3y01s17pwsr4y9li7sa61lr09-jikes-1.22.tar.bz2.drv
   /gnu/store/m660sh2zna65xi34g00vmfrzz1aqbmmw-classpath-0.93.drv
   /gnu/store/s0ahlfd74aiahba9jymq52xl5s8ff5l6-gcc-5.5.0.drv
   /gnu/store/q1rq5zns4n0krnfpdc40mh0a1sbnhlgm-isl-0.18.drv
   /gnu/store/gsd1sjrxn8nzaj89q6dz43dv982b3gzy-isl-0.18.tar.bz2.drv
   /gnu/store/z911rn1zkyk4ww2q47y9syxjy5n72qym-gcc-5.5.0.tar.xz.drv
   /gnu/store/x6qrpg483b6n2xf3pj570xg7nwypacrn-glibc-2.28.drv
   /gnu/store/1bvwrb50d82nww53l7l2qrvlwj14in9n-glibc-2.28.tar.xz.drv
   /gnu/store/zkfd6bbyc6pr0bdlq6q5xkkz2hincds5-jamvm-1.5.1.tar.xz.drv
   /gnu/store/sm1aa0sag866j5dd80s5jr5mv1cmiahx-jamvm-1.5.1.tar.gz.drv
   /gnu/store/k0xyb3hkn9iipiwakvsrralmbn2pxk75-module-import-compiled.drv
   /gnu/store/zblv9cbgykrsnb3gf4q1qn3ki2g2pdnr-icedtea-2.6.13.drv
   /gnu/store/3w36gz9510br6z6bkl08d4dibm13b7h4-openjdk.tar.bz2.drv
   /gnu/store/bz0ymyyxxy27bzcwsm3gmqddp34np4sg-jdk.tar.bz2.drv
   /gnu/store/d9c2a63b5axx782yli2331nld4p98w6x-icedtea-1.13.13.drv
   /gnu/store/048ikdznq3v8xzp9i00ijfhwdqqv6l2l-hg-checkout.drv
   /gnu/store/q8a8banngk1r9fxgddf77m7h7v07lk32-module-import.drv
   /gnu/store/vkhhnzc5an39yllwq4h808jaa2zbzs54-module-import-compiled.drv
   /gnu/store/3vf2mlxygw0a7cxwa0ggzl6cakcs6sgj-classpath-0.99-1.e7c13ee0c.drv
   /gnu/store/4zgdsk49hizih1csqbgvwylzivcahld3-ecj-bootstrap-3.2.2.drv
   /gnu/store/i7sjd666ws6zxnhblwdfwjzy3whaxnkb-classpath-jamvm-wrappers-0.99.drv
   /gnu/store/6avfdqk11x3h04z5pvspih4qg6qgrsx4-classpath-0.99.drv
   /gnu/store/z210xfypx2qkh43abgw2ys16ik9cylly-ecj-javac-wrapper-3.2.2.drv
   /gnu/store/amhfwmfsdn7bpcybf6h04md4bygrid22-hg-checkout.drv
   /gnu/store/d3ma2pa070am1jrb436i96axfrciyfs7-icedtea6-1.13.13.tar.xz.drv
   /gnu/store/dpjvqz32iscd16dnd2bn7wmxh9q4hpxl-hg-checkout.drv
   /gnu/store/jdpp2nbs79gnlfbfaz18rfrp9rzzrl45-jamvm-2.0.0.drv
   /gnu/store/drp5h8dmiwwndi5c4gn1mjd7n93j0n64-jamvm-2.0.0.tar.xz.drv
   /gnu/store/a12x61chsp3kiffkfi092kr2ha15jqwd-jamvm-2.0.0.tar.gz.drv
   /gnu/store/jqaq3gkclrdf8nrq7vczmkbrfqfbpd37-hg.tar.xz.drv
   /gnu/store/7ynjjhwg56z48lxmvpf6b2n5sch2llsk-hg-checkout.drv
   /gnu/store/k4b1qz5jmysx8c96hdz41sw959hhm2mh-hg-checkout.drv
   /gnu/store/lz43mm39dmv3i0z7ibkhhw5k7zyzv28p-ecj-javac-wrapper-3.2.2.drv
   /gnu/store/qxwiarg819bkjmbaiydjj75vfr9f0i3v-hg-checkout.drv
   /gnu/store/xkn038hn97mmjnfkm5k5wr2fbrwai644-libnsl-1.2.0.drv
   /gnu/store/9nkc2ybyxjrv4aihhgavbrqc24gk2724-libnsl-1.2.0-checkout.drv
   /gnu/store/y8457razw21xw6pg1wwkglwq6bg8gsw9-hg-checkout.drv
   /gnu/store/gkc0w0pl0pnzv6854a7a99yzcmn06ryn-hotspot.tar.xz.drv
   

Gitlab CI

2020-06-20 Thread Jérémy Korwin-Zmijowski
Hey Guixters !

I am experimenting with Gitlab CI for a Guile project I am working on.
It is managed with Hall and I would like to benefit the Guix features.

Currently, I struggle to run Guix inside the default Debian stable
docker image (framagit.org).

Here is my .gitlab-ci.yml :

   before_script:
- apt -qq update
- apt -qq install -y wget gpg xz-utils
- wget 
   https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
 - chmod +x guix-install.sh
 - wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - |
gpg --import -
 - printf '\n' | ./guix-install.sh
 - /root/.config/guix/current/bin/guix-daemon --build-users-
group=guixbuild
 - guix pull

stages:
  - bootstrap
  - configure
  - build
  - test

job:bootstrap:
  stage: bootstrap
  script: autoreconf -vfi

What I get :

   [1592641832.155]: [ FAIL ] unsupported init system; run the daemon
   manually:
  /root/.config/guix/current/bin/guix-daemon --build-users-
   group=guixbuild
   [1592641832.155]: [ INFO ] making the guix command available to
   other users

Does anyone has done that before ?
Is there a way to get a Guix docker image instead of the Debian one ?

Have a nice weekend !

Jérémy