doc: Update the example VCS snapshot package definition.
In commit ee17a9e06e
, the helpers git-version
and git-file-name removed the need to build version and file name strings
manually for packages that use VCS snapshots.
doc/guix.texi (Version Numbers): Use git-version and git-file-name.
This commit is contained in:
parent
34a28c13f5
commit
9ce07f2dba
|
@ -19898,16 +19898,14 @@ definition may look like this:
|
||||||
(let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")
|
(let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")
|
||||||
(revision "1")) ;Guix package revision
|
(revision "1")) ;Guix package revision
|
||||||
(package
|
(package
|
||||||
(version (string-append "0.9-" revision "."
|
(version (git-version "0.9" revision commit))
|
||||||
(string-take commit 7)))
|
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "git://example.org/my-package.git")
|
(url "git://example.org/my-package.git")
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(sha256 (base32 "1mbikn@dots{}"))
|
(sha256 (base32 "1mbikn@dots{}"))
|
||||||
(file-name (string-append "my-package-" version
|
(file-name (git-file-name name version))))
|
||||||
"-checkout"))))
|
|
||||||
;; @dots{}
|
;; @dots{}
|
||||||
)))
|
)))
|
||||||
@end example
|
@end example
|
||||||
|
|
Loading…
Reference in New Issue