guix-origin 1.0 KB

12345678910111213141516171819202122232425
  1. # -*- mode: snippet -*-
  2. # name: guix-origin
  3. # key: origin...
  4. # --
  5. (origin
  6. (method ${1:$$(yas-choose-value "url-fetch"
  7. "url-fetch/tarbomb"
  8. "url-fetch/zipbomb"
  9. "cvs-fetch"
  10. "git-fetch"
  11. "hg-fetch"
  12. "svn-fetch")})
  13. (uri ${1:$(cond ((equal yas-text "git-fetch") "git-reference...")
  14. ((equal yas-text "svn-fetch") "svn-reference...")
  15. ((equal yas-text "hg-fetch") "hg-reference...")
  16. ((equal yas-text "cvs-fetch") "cvs-reference...")
  17. (t "(string-append \\"https://\\" version \\".tar.gz\\")"))}$0)
  18. ${1:$(cond ((equal yas-text "git-fetch")
  19. "(file-name (git-file-name name version))")
  20. ((member yas-text '("svn-fetch" "hg-fetch" "cvs-fetch"))
  21. "(file-name (string-append name \\"-\\" version \\"-checkout\\"))")
  22. (t ""))}
  23. (sha256
  24. (base32
  25. "$2")))