aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/julia.scm
blob: b55efde87783605da957c9e8ff22ea412b43c607 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
(define-module (gn packages julia)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system julia)
  #:use-module (gn packages cran)
  #:use-module (gnu packages bioinformatics)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages cran)
  #:use-module (gnu packages statistics)
  #:use-module (ice-9 match))

(define-public julia-lmgpu
  (let ((commit "e9e95b5fa46f1905ca1ff32a3684a2616a7e482c")
        (revision "1"))
    (package
      (name "julia-lmgpu")
      (version (git-version "0.1.1" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                       (url "https://github.com/ChelseaTrotter/LMGPU.jl")
                       (commit commit)))
                ;(file-name (git-file-name name version))
                (file-name "LMGPU")
                (sha256
                 (base32
                  "1ddx2np1lakw1l2dclpcaihxd0fcj6bjxsvaxr6g5brxjqk5j7b1"))))
      (build-system julia-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           ;; This is a super ugly hack. Some JULIA environment variable should
           ;; be tuned so it can find the artifact directory.
           (add-after 'unpack 'symlink-zlib-into-artifact-directory
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let ((julia-dir (string-append (assoc-ref outputs "out")
                                               "/share/julia")))
                 (mkdir-p julia-dir)
                 (symlink
                   (string-append (assoc-ref inputs "julia-zlib-jll")
                                  "/share/julia/artifacts")
                   (string-append julia-dir "/artifacts")))
               #t))
           (add-after 'precompile 'check
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (builddir (string-append out "/share/julia/")))
                 (setenv "JULIA_LOAD_PATH"
                         (string-append builddir "packages/" ":"
                                        (or (getenv "JULIA_LOAD_PATH")
                                            "")))
                 (setenv "HOME" (getcwd))
                 (invoke "julia" "test/runtests.jl")))))))
      (native-inputs
       `(("r" ,r-minimal)
         ("r-mice" ,r-mice)
         ("r-qtl2" ,r-qtl2)
         ("r-tictoc" ,r-tictoc)
         ("r-tidyverse" ,r-tidyverse)))
      (propagated-inputs
       `(("julia-zipfile" ,julia-zipfile)))
      (home-page "https://github.com/ChelseaTrotter/LMGPU.jl")
      (synopsis "")
      (description "")
      (license license:expat))))

(define-public julia-lmgpu-myapp
  (package
    (inherit julia-lmgpu)
    (name "julia-lmgpu-myapp")
    (source
      (origin (inherit (package-source julia-lmgpu))
              (file-name "MyApp")))
    (arguments
     (substitute-keyword-arguments (package-arguments julia-lmgpu)
       ((#:phases phases)
        `(modify-phases ,phases
           (add-after 'unpack 'change-directory
             (lambda _
               (chdir "bin/MyApp") #t))))))
    (propagated-inputs
     `(("julia-lmgpu" ,julia-lmgpu)
       ,@(package-propagated-inputs julia-lmgpu)))
    (native-inputs
     `(("julia-packagecompiler" ,julia-packagecompiler)))))

(define-public julia-zipfile
  (package
    (name "julia-zipfile")
    (version "0.9.1")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/fhs/ZipFile.jl")
               (commit (string-append "v" version))))
        ;(file-name (git-file-name name version))
        (file-name "ZipFile")
        (sha256
         (base32
          "1fpvlhfqg5kgq5vchlf8dyc73r6dzki0dz7plddc3bnr0ld00rlw"))))
    (build-system julia-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         ;; This is a super ugly hack. Some JULIA environment variable should
         ;; be tuned so it can find the artifact directory.
         (add-after 'unpack 'symlink-zlib-into-artifact-directory
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((julia-dir (string-append (assoc-ref outputs "out")
                                             "/share/julia")))
               (mkdir-p julia-dir)
               (symlink
                 (string-append (assoc-ref inputs "julia-zlib-jll")
                                "/share/julia/artifacts")
                 (string-append julia-dir "/artifacts")))
             #t)))))
    (propagated-inputs
     `(("julia-zlib-jll" ,julia-zlib-jll)))
    (home-page "https://github.com/fhs/ZipFile.jl")
    (synopsis "Read/Write ZIP archives in Julia")
    (description "This module provides support for reading and writing ZIP
archives in Julia.")
    (license license:expat)))

(define-public julia-zlib-jll
  (package
    (name "julia-zlib-jll")
    (version "1.2.11+9")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/JuliaBinaryWrappers/Zlib_jll.jl")
               (commit (string-append "Zlib-v" version))))
        ;(file-name (git-file-name name version))
        (file-name "Zlib_jll")
        (sha256
         (base32
          "0m9n8dp4bwhkyjag1szmhz02k0bxzm4ka2ia2jh8crnd1qi8w9dz"))))
    (build-system julia-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'symlink-zlib-into-artifact-directory
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((artifacts (string-append (assoc-ref outputs "out")
                                             "/share/julia/artifacts")))
               (mkdir-p artifacts)
               (symlink
                 (assoc-ref inputs "zlib")
                 ;; from git-tree-sha1 in Artifacts.toml
                 (string-append
                   artifacts
                   ,(match (%current-system)
                      ("x86_64-linux" "/7846a2956a213715c2c76632f3461cef87d9d545")
                      ("i686-linux" "/c8456cbd00982236828623bbc63f21b9b7b03821")
                      ("armhf-linux" "/748c38025b5596a5005a87ac2b9476603cf8615b")
                      ("aarch64-linux" "/3dd0c7cd5424c8746a1a32034ba1b10458f20b3b")
                      (_ "/UNSUPPORTED")))))
             #t)))))
    (native-inputs
     `(("zlib" ,zlib)))
    (home-page "https://github.com/JuliaBinaryWrappers/Zlib_jll.jl")
    (synopsis "Autogenerated package constructed using BinaryBuilder.jl")
    (description "This is an autogenerated package constructed using
@url{https://github.com/JuliaPackaging/BinaryBuilder.jl, BinaryBuilder.jl}.")
    (license license:expat)))

(define-public julia-packagecompiler
  (package
    (name "julia-packagecompiler")
    (version "1.1.1")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/JuliaLang/PackageCompiler.jl")
               (commit (string-append "v" version))))
        ;(file-name (git-file-name name version))
        (file-name "PackageCompiler")
        (sha256
         (base32
          "1s9xc17i308fdpyvkz1w6qb1h7yncdr2jgk1szfvygxd6yzkv1b4"))))
    (build-system julia-build-system)
    (home-page "https://github.com/JuliaLang/PackageCompiler.jl")
    (synopsis "Compile your Julia Package")
    (description "PackageCompiler is a Julia package with two main purposes:
@itemize
@item Creating custom sysimages for reduced latency when working locally with
packages that has a high startup time.
@item Creating \"apps\" which are a bundle of files including an executable that
can be sent and run on other machines without Julia being installed on that machine.
@end itemize")
    (license license:expat)))