|
From: | swedebugia |
Subject: | Go importer - help with git-fetch |
Date: | Tue, 6 Aug 2019 12:23:17 +0200 |
Hi :) I'm stuck trying to write a git-fetch -> hash procedure for the go importer. This is what I am trying to do in pseudocode: (base32-nix-hash (sha256 (git-fetch url commit temp-path))) I got this far by using (guix build git): (display (let* ((name "github.com/gogo/protobuf") (url (go-name->url name)) (commit "28a6bbf47e48e0b2220b2a244750b660c83d4942")) (with-store store (run-with-store store (let ((path "test")) (git-fetch url commit path)))))) But I'm pretty new to this derivation 2nd order code stuff and I
don't understand the errors. It gives me: Initialized empty Git repository in /home/egil/src/guix/test2/.git/ remote: Enumerating objects: 924, done. remote: Counting objects: 100% (924/924), done. remote: Compressing objects: 100% (745/745), done. remote: Total 924 (delta 476), reused 330 (delta 132), pack-reused 0 Receiving objects: 100% (924/924), 1.45 MiB | 944.00 KiB/s, done. Resolving deltas: 100% (476/476), done. >From https://github.com/gogo/protobuf * branch 28a6bbf47e48e0b2220b2a244750b660c83d4942 -> FETCH_HEAD Note: checking out 'FETCH_HEAD'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new-branch-name> HEAD is now at 28a6bbf [merge] Fix merge of non-nullable slices (#569) Backtrace: 8 (apply-smob/1 #<catch-closure 1f4e1c0>) In ice-9/boot-9.scm: 705:2 7 (call-with-prompt _ _ #<procedure default-prompt-handle…>) In ice-9/eval.scm: 619:8 6 (_ #(#(#<directory (guile-user) 1fe0140>))) In ice-9/boot-9.scm: 2312:4 5 (save-module-excursion _) 3831:12 4 (_) In guix/import/go.scm: 262:11 3 (_) In guix/store.scm: 623:10 2 (call-with-store #<procedure 2607960 at guix/import/go.…>) 1803:24 1 (run-with-store #<store-connection 256.99 29f4ae0> _ # _ …) In unknown file: 0 (_ #<store-connection 256.99 29f4ae0>) ERROR: Wrong type to apply: #t What does this error mean? I looked into derivations.scm and found out about a port-sha256 from gcrypt - is that usable here to compute the hash? How do I get it to download to a temporary path? --
Cheers Swedebugia |
0001-guix-import-Add-golang-importer-via-the-Go-search-AP.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |