hello-git.scm 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ;;; hello-git.scm -- job specification test for hello git repository
  2. ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
  3. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  4. ;;;
  5. ;;; This file is part of Cuirass.
  6. ;;;
  7. ;;; Cuirass is free software: you can redistribute it and/or modify
  8. ;;; it under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation, either version 3 of the License, or
  10. ;;; (at your option) any later version.
  11. ;;;
  12. ;;; Cuirass is distributed in the hope that it will be useful,
  13. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
  19. (use-modules (srfi srfi-1))
  20. (define (local-file file)
  21. ;; In the common case jobs will be defined relative to the repository.
  22. ;; However for testing purpose use local gnu-system.scm instead.
  23. (string-append (dirname (current-filename)) "/" file))
  24. (define (url->file-name url)
  25. (string-trim
  26. (string-map (lambda (c) (if (memq c (string->list ":/")) #\- c)) url)
  27. #\-))
  28. (define vc
  29. ;; where your version-control checkouts live
  30. (string-append (getenv "HOME") "/src"))
  31. (define guix-checkout (string-append vc "/guix"))
  32. ;; building GNU hello from git is too much work
  33. ;; (define hello-checkout (string-append vc "/hello"))
  34. ;; (define hello-git "http://git.savannah.gnu.org/r/hello.git")
  35. ;; ... so let's track cuirass' git
  36. (define cuirass-checkout (string-append vc "/cuirass"))
  37. (define cuirass-git "https://notabug.org/mthl/cuirass")
  38. ;;(define cuirass-git "https://gitlab.com/janneke/cuirass.git")
  39. (list
  40. `((#:name . ,(url->file-name cuirass-checkout))
  41. (#:url . ,cuirass-git)
  42. (#:branch . "master")
  43. (#:no-compile? . #t)
  44. (#:load-path . ,guix-checkout)
  45. (#:proc . guix-jobs)
  46. (#:file . ,(local-file "guix-track-git.scm"))
  47. (#:arguments (name . "cuirass") (url . ,cuirass-git))))