guix-origin 1.2 KB

123456789101112131415161718192021222324252627
  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. "bzr-fetch")})
  14. (uri ${1:$(cond ((equal yas-text "git-fetch") "git-reference...")
  15. ((equal yas-text "svn-fetch") "svn-reference...")
  16. ((equal yas-text "hg-fetch") "hg-reference...")
  17. ((equal yas-text "cvs-fetch") "cvs-reference...")
  18. ((equal yas-text "bzr-fetch") "bzr-reference...")
  19. (t "(string-append \\"https://\\" version \\".tar.gz\\")"))}$0)
  20. ${1:$(cond ((equal yas-text "git-fetch")
  21. "(file-name (git-file-name name version))")
  22. ((member yas-text '("svn-fetch" "hg-fetch" "cvs-fetch" "bzr-fetch"))
  23. "(file-name (string-append name \\"-\\" version \\"-checkout\\"))")
  24. (t ""))}
  25. (sha256
  26. (base32
  27. "$2")))