summaryrefslogtreecommitdiff
path: root/px/packages/ci.scm
blob: d2e39b74244ec0bfd22355b0c03de2889bf4cc3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;;; continuous integration related packages for PantherX
;;; Author: Reza Alizadeh Majd (r.majd@pantherx.org)

(define-module (px packages ci)
  #:use-module (gnu packages bash)
  ; #:use-module (guix build-system go)
  #:use-module (guix build-system trivial)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module ((guix licenses) #:prefix license:))

(define-public gitlab-runner
  (package
    (name "gitlab-runner")
    (version "v12.8.0")
    (source
      (origin
        (method url-fetch)
        ; (uri (string-append "https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v" 
        ;                     version "/gitlab-runner-v" version ".tar.gz"))
        ; (sha256 (base32 "1gb3mflz57niyyn4kj5l4m1g2sa2w4cn8gig5dfr04ns9w9kj8jr"))))
        (uri (string-append "https://s3.amazonaws.com/gitlab-runner-downloads/" 
                            version "/binaries/gitlab-runner-linux-386"))
        (sha256 (base32 "1lbri42l0bjz21gnq7prhi1g06mqz43qdgdzh5llq8vl49gfz0ap"))))
    ; (build-system go-build-system)
    (build-system trivial-build-system)
    (supported-systems '("x86_64-linux" "i686-linux")) ; As long as we download binaries
    ; (arguments '(#:import-path "gitlab.com/gitlab-org/gitlab-runner"))
    (arguments `(
      #:modules ((guix build utils))
      #:builder (begin
        (use-modules (guix build utils))
        (let* ((src (assoc-ref %build-inputs "source"))
               (bash (string-append (assoc-ref %build-inputs "bash") "/bin/sh"))
               (out (assoc-ref %outputs "out"))
               (target (string-append out "/bin/gitlab-runner")))
            (setenv "PATH" bash)
            (mkdir-p (string-append out "/bin"))
            (copy-file src target)
            (chmod target #o755)
            #t))))    (home-page "https://docs.gitlab.com/runner/")
    (native-inputs `(("bash" ,bash)))
    (synopsis "GitLab Runner")
    (description "GitLab Runner is the open source project that is used 
to run your jobs and send the results back to GitLab.")
    (license license:expat)))