Re: Failure with “guix copy“

2022-09-05 Thread zimoun
Hi Ludo,

On ven., 02 sept. 2022 at 15:35, Ludovic Courtès  wrote:

>> Well, I was expecting that the items were just copied.  Why ‘guix copy’
>> tries to locally build something?
>
> My guess: use ‘--no-grafts’ and it’ll copy the ungrafted package.

No, nothing is “grafted”. :-) Well, it is from a weird design of the
haskell-build-system applying a minor revision update via ’arguments’
and not via ’source’.  See the discussion here [1].

1: 


> Otherwise, Guix starts by building the package so it can compute the
> grafting derivation, at which point it’ll happily copy the grafted
> variant from that other machine.  But that’s typically not what you
> want.

What I want is just transfer ghc-lucid from one machine having it to
another.


Cheers,
simon






Re: Failure with “guix copy“

2022-09-02 Thread Ludovic Courtès
Hi,

zimoun  skribis:

> $ guix copy --from=desktop hledger
> The following derivations will be built:
>   /gnu/store/gz1qzalbg3dzwvfvj81f13n8pd47rzw2-hledger-1.21.drv
>   /gnu/store/9m71fs1i0anv89f5zq44hbh2wn2lavxz-ghc-lucid-2.9.12.1.drv
>   /gnu/store/i62zr0ykqyxfwyc270csnhbwyrk3l3bb-ghc-lucid-2.9.12.1-1.cabal.drv
>   /gnu/store/vhxlqj1d5pll79vfdi06wl77k5mx45vb-ghc-hledger-lib-1.21.drv
> process 307420 acquired build slot '/var/guix/offload/x.x.x.x:22/0'
> normalized load on machine 'x.x.x.x' is 0.01
> building 
> /gnu/store/vhxlqj1d5pll79vfdi06wl77k5mx45vb-ghc-hledger-lib-1.21.drv...
> building 
> /gnu/store/i62zr0ykqyxfwyc270csnhbwyrk3l3bb-ghc-lucid-2.9.12.1-1.cabal.drv...
>
> Starting download of 
> /gnu/store/rj33x41i86vgw6c0iwffzwrgzrib1shb-ghc-lucid-2.9.12.1-1.cabal
> From https://hackage.haskell.org/package/lucid-2.9.12.1/revision/1.cabal...
> downloading from 
> https://hackage.haskell.org/package/lucid-2.9.12.1/revision/1.cabal ...
>
> sha256 hash mismatch for 
> /gnu/store/rj33x41i86vgw6c0iwffzwrgzrib1shb-ghc-lucid-2.9.12.1-1.cabal:
>   expected hash: 1f0whk5ncanxfjjanrf6rqyncig2xgc5mh2j0sqy3nrlyjr9aqq9
>   actual hash:   1xllyf26ypk37k807g5v6fl1449mhpvk18dljmqgwj723n0v8rpj
> hash mismatch for store item 
> '/gnu/store/rj33x41i86vgw6c0iwffzwrgzrib1shb-ghc-lucid-2.9.12.1-1.cabal'
> build of 
> /gnu/store/i62zr0ykqyxfwyc270csnhbwyrk3l3bb-ghc-lucid-2.9.12.1-1.cabal.drv 
> failed
> View build log at 
> '/var/log/guix/drvs/i6/2zr0ykqyxfwyc270csnhbwyrk3l3bb-ghc-lucid-2.9.12.1-1.cabal.drv.gz'.
> cannot build derivation 
> `/gnu/store/9m71fs1i0anv89f5zq44hbh2wn2lavxz-ghc-lucid-2.9.12.1.drv': 1 
> dependencies couldn't be built
> cannot build derivation 
> `/gnu/store/gz1qzalbg3dzwvfvj81f13n8pd47rzw2-hledger-1.21.drv': 1 
> dependencies couldn't be built
> guix copy: error: build of 
> `/gnu/store/gz1qzalbg3dzwvfvj81f13n8pd47rzw2-hledger-1.21.drv' failed
>
>
> Well, I was expecting that the items were just copied.  Why ‘guix copy’
> tries to locally build something?

My guess: use ‘--no-grafts’ and it’ll copy the ungrafted package.

Otherwise, Guix starts by building the package so it can compute the
grafting derivation, at which point it’ll happily copy the grafted
variant from that other machine.  But that’s typically not what you
want.

I suppose we could do better, for instance by computing the derivation
on the remote store, though that can be a bit slow.

Ludo’.