Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Guix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
inf
Guix
Commits
bef0db37
Unverified
Commit
bef0db37
authored
7 years ago
by
Ricardo Wurmus
Browse files
Options
Downloads
Patches
Plain Diff
guix: Add download-svn-to-store.
* guix/svn-download.scm (download-svn-to-store): New procedure.
parent
32fdad78
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
guix/svn-download.scm
+22
-1
22 additions, 1 deletion
guix/svn-download.scm
with
22 additions
and
1 deletion
guix/svn-download.scm
+
22
−
1
View file @
bef0db37
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
...
...
@@ -23,12 +24,15 @@ (define-module (guix svn-download)
#
:use-module
(
guix
store
)
#
:use-module
(
guix
monads
)
#
:use-module
(
guix
packages
)
#
:use-module
(
guix
utils
)
#
:use-module
((
guix
build
svn
)
#
:prefix
build:
)
#
:use-module
(
ice-9
match
)
#
:export
(
svn-reference
svn-reference?
svn-reference-url
svn-reference-revision
svn-fetch
))
svn-fetch
download-svn-to-store
))
;;; Commentary:
;;;
...
...
@@ -79,4 +83,21 @@ (define build
#
:guile-for-build
guile
#
:local-build?
#t
)))
(
define*
(
download-svn-to-store
store
ref
#
:optional
(
name
(
basename
(
svn-reference-url
ref
)))
#
:key
(
log
(
current-error-port
)))
"Download from REF, a <svn-reference> object to STORE. Write progress
reports to LOG."
(
call-with-temporary-directory
(
lambda
(
temp
)
(
let
((
result
(
parameterize
((
current-output-port
log
))
(
build:svn-fetch
(
svn-reference-url
ref
)
(
svn-reference-revision
ref
)
temp
#
:user-name
(
svn-reference-user-name
ref
)
#
:password
(
svn-reference-password
ref
)))))
(
and
result
(
add-to-store
store
name
#t
"sha256"
temp
))))))
;;; svn-download.scm ends here
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment