all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: 66633@debbugs.gnu.org
Subject: bug#66633: (no subject)
Date: Thu, 19 Oct 2023 11:36:11 +0200	[thread overview]
Message-ID: <87fs27ned0.fsf@gmail.com> (raw)

Hi,

Trying to answer to this message [1], I notice something unexpected for
me.  I read from the manual:

--8<---------------cut here---------------start------------->8---
-- Procedure: url-fetch url hash-algo hash [name] [#:executable? #f]
     Return a fixed-output derivation that fetches data from URL (a
     string, or a list of strings denoting alternate URLs), which is
     expected to have hash HASH of type HASH-ALGO (a symbol).  By
     default, the file name is the base name of URL; optionally, NAME
     can specify a different file name.  When EXECUTABLE? is true, make
     the downloaded file executable.

     When one of the URL starts with ‘mirror://’, then its host part is
     interpreted as the name of a mirror scheme, taken from
     ‘%mirror-file’.

     Alternatively, when URL starts with ‘file://’, return the
     corresponding file name in the store.
--8<---------------cut here---------------end--------------->8---

Therefore, I do:

--8<---------------cut here---------------start------------->8---
(define-module (pkg)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages gnome))

(define-public zathura-custom
  (package
   (inherit zathura)
   (name "zathura-custom")
   (version "4.0")
   (source
    (origin
     (method url-fetch)
     (uri
      ;"https://pwmt.org/projects/zathura/download/zathura-0.5.2.tar.xz"
      "file:///tmp/zathura-custom/zathura-mine.tar.xz"
      )
     (sha256
      (base32
       "0000000000000000000000000000000000000000000000000000"))))))
--8<---------------cut here---------------end--------------->8---

And then:

--8<---------------cut here---------------start------------->8---
$ guix build -L /tmp/zathura-custom zathura-custom -S -d
Backtrace:
          12 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
   2323:7 11 (run-guix . _)
  2286:10 10 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/status.scm:
    839:4  8 (call-with-status-report _ _)
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   659:37  6 (thunk)
   1298:8  5 (call-with-build-handler #<procedure 7f31d1cb85d0 at guix/ui.scm:1219:2 (continue store things mode)> _)
In guix/scripts/build.scm:
   797:43  4 (_)
In srfi/srfi-1.scm:
   586:17  3 (map1 ("/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"))
In guix/derivations.scm:
    136:0  2 (%derivation-file-name-procedure "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz")
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"
--8<---------------cut here---------------end--------------->8---


Note:

    $ guix hash /tmp/zathura-custom/zathura-mine.tar.xz
    15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6

    $ guix download https://pwmt.org/projects/zathura/download/zathura-0.5.2.tar.xz
    Starting download of /tmp/guix-file.d3GzTC
[...]
    15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6


Cheers,
simon


1: [TIL] guix doesn't check hash when uri starts with file:///
Rodrigo Morales <moralesrodrigo1100@gmail.com>
Wed, 20 Sep 2023 19:18:57 +0000
id:CAGxMbPbuP1HOFU1UwfV0AojP+7z62Q2wv_FGUYY6kvkK4XytiQ@mail.gmail.com
https://lists.gnu.org/archive/html/help-guix/2023-09
https://yhetil.org/guix/CAGxMbPbuP1HOFU1UwfV0AojP+7z62Q2wv_FGUYY6kvkK4XytiQ@mail.gmail.com




                 reply	other threads:[~2023-10-19  9:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fs27ned0.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=66633@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.