2022-08-12 08:58:48 +00:00
|
|
|
-*- mode: lisp-data -*-
|
|
|
|
|
|
|
|
scheme-mode
|
|
|
|
|
|
|
|
(package...
|
|
|
|
"(define-public " (s name)
|
|
|
|
n> "(package"
|
|
|
|
n > "(name \"" (s name) "\")"
|
|
|
|
n > "(version \"" p "\")"
|
|
|
|
n > "(source origin...)"
|
|
|
|
n > "(build-system " (p "gnu") "-build-system)"
|
|
|
|
n > "(home-page \"" p "\")"
|
|
|
|
n > "(synopsis \"" p "\")"
|
|
|
|
n > "(description \"" p "\")"
|
|
|
|
n > "(license license:" (p "unknown") ")))" n)
|
|
|
|
|
|
|
|
(origin...
|
|
|
|
"(origin"
|
|
|
|
n> "(method " (p "url-fetch" method) ")"
|
|
|
|
n> "(uri " (cl-case (and method (intern method))
|
2023-10-12 18:19:08 +00:00
|
|
|
(git-fetch "git-reference...")
|
|
|
|
(svn-fetch "svn-reference...")
|
|
|
|
(hg-fetch "hg-reference...")
|
|
|
|
(cvs-fetch "cvs-reference...")
|
|
|
|
(bzr-fetch "bzr-reference...")
|
|
|
|
(otherwise "\"https://...\""))
|
2022-08-12 08:58:48 +00:00
|
|
|
")"
|
|
|
|
n>
|
|
|
|
(cl-case (and method (intern method))
|
2023-10-12 18:19:08 +00:00
|
|
|
(git-fetch
|
2022-08-12 08:58:48 +00:00
|
|
|
(insert "(file-name (git-file-name name version))")
|
|
|
|
(newline)
|
|
|
|
(indent-according-to-mode))
|
2023-10-12 18:19:08 +00:00
|
|
|
(hg-fetch
|
2022-08-12 08:58:48 +00:00
|
|
|
(insert "(file-name (hg-file-name name version))")
|
|
|
|
(newline)
|
|
|
|
(indent-according-to-mode))
|
2023-10-12 18:19:08 +00:00
|
|
|
(svn-fetch
|
2022-08-12 08:58:48 +00:00
|
|
|
(insert "(file-name (string-append name \"-\" version \"-checkout\"))")
|
|
|
|
(newline)
|
|
|
|
(indent-according-to-mode))
|
2023-10-12 18:19:08 +00:00
|
|
|
(cvs-fetch
|
2022-08-12 08:58:48 +00:00
|
|
|
(insert "(file-name (string-append name \"-\" version \"-checkout\"))")
|
|
|
|
(newline)
|
|
|
|
(indent-according-to-mode))
|
2023-10-12 18:19:08 +00:00
|
|
|
(bzr-fetch
|
2022-08-12 08:58:48 +00:00
|
|
|
(insert "(file-name (string-append name \"-\" version \"-checkout\"))")
|
|
|
|
(newline)
|
|
|
|
(indent-according-to-mode))
|
|
|
|
(t ""))
|
|
|
|
> "(sha256"
|
|
|
|
n > "(base32 \""
|
|
|
|
;; hash of an empty directory
|
|
|
|
(p "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5") "\")))")
|
|
|
|
|
|
|
|
(git-reference...
|
|
|
|
"(git-reference"
|
|
|
|
n> "(url \"" p "\")"
|
2023-02-26 20:56:33 +00:00
|
|
|
n> "(commit " (p "commit") "))")
|
2022-08-12 08:58:48 +00:00
|
|
|
|
|
|
|
(svn-reference...
|
|
|
|
"(svn-reference"
|
|
|
|
n> "(url \"" p "\")"
|
2023-02-26 20:56:33 +00:00
|
|
|
n> "(revision " (p "revision") "))")
|
2022-08-12 08:58:48 +00:00
|
|
|
|
|
|
|
(cvs-reference...
|
|
|
|
"(cvs-reference"
|
|
|
|
n> "(root-directory \"" p "\")"
|
|
|
|
n> "(module \"" p "\")"
|
|
|
|
n> "(revision \"" p "\"))")
|
|
|
|
|
|
|
|
(hg-reference...
|
|
|
|
"(hg-reference"
|
|
|
|
n> "(url \"" p "\")"
|
2023-02-26 20:56:33 +00:00
|
|
|
n> "(changeset " (p "changeset") "))")
|
2022-08-12 08:58:48 +00:00
|
|
|
|
|
|
|
(bzr-reference...
|
|
|
|
"(bzr-reference"
|
|
|
|
n> "(url \"" p "\")"
|
2023-02-26 20:56:33 +00:00
|
|
|
n> "(revision " (p "revision") "))")
|
2022-08-12 08:58:49 +00:00
|
|
|
|
|
|
|
(:phases\ "#:phases (modify-phases %standard-phases"
|
|
|
|
n> p ")")
|
|
|
|
|
|
|
|
(add-before\ "(add-before '" p " '" p
|
|
|
|
n > p ")")
|
|
|
|
(add-after\ "(add-after '" p " '" p
|
|
|
|
n > p ")")
|
|
|
|
(replace\ "(replace '" p " " p")")
|