blob: a46e161bbac6ae2625f32805c32c88c9043de008 (
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
|
;;
;; Test slurm deployment on tux04
;;
(use-modules ((gnu packages check) #:select (check))
((gnu packages databases) #:select (mariadb))
((gnu packages glib) #:select (dbus))
((gnu packages linux) #:select (linux-libre-headers))
((gnu packages networking) #:select (librdkafka))
((gnu packages parallel) #:select (slurm) #:prefix guix:)
((gnu packages pkg-config) #:select (pkg-config))
((gnu packages serialization) #:select (libyaml))
((gnu packages tls) #:select (openssl))
((gnu packages web) #:select (jansson json-c))
(guix download)
(guix build-system gnu)
(guix gexp)
(guix git-download)
((guix licenses) #:prefix license:)
(guix packages)
(guix utils))
(define-public http-parser
(package
(name "http-parser")
(version "2.9.4")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/nodejs/http-parser")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c"))))
(build-system gnu-build-system)
(arguments
(list #:make-flags #~(list (string-append "PREFIX=" #$output)
(string-append "CC=" #$(cc-for-target))
"library")
#:test-target "test"
#:phases
#~(modify-phases %standard-phases
(delete 'configure))))
(home-page "https://github.com/nodejs/http-parser")
(synopsis "C HTTP request/response parser")
(description "@code{http-parser} is a parser for HTTP messages
written in C. It parses both requests and responses. The parser is
designed to be used in performance HTTP applications. It does not
make any syscalls nor allocations, it does not buffer data, it can be
interrupted at anytime. Depending on your architecture, it only
requires about 40 bytes of data per message stream (in a web server
that is per connection).")
(license license:expat)))
(define-public libjwt
(package
(name "libjwt")
(version "1.17.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/benmcollins/libjwt/releases/download/v"
version "/libjwt-"
version ".tar.bz2"))
(sha256
(base32
"0wkdl2qnic2by0j8bj1n90m2hrzlxjm913gf19syxq655z6zzf0x"))))
(build-system gnu-build-system)
(inputs
(list jansson openssl))
(native-inputs
(list check pkg-config))
(home-page "https://github.com/benmcollins/libjwt")
(synopsis "C JWT library")
(description "@code{libjwt} is a JWT library for C.")
(license license:mpl2.0)))
(define slurm
(package
(inherit guix:slurm)
(arguments
(substitute-keyword-arguments (package-arguments guix:slurm)
((#:configure-flags flags #~'())
#~(cons* "--enable-slurmrestd"
(string-append "--with-http-parser="
#$(this-package-input "http-parser"))
(string-append "--with-rdkafka="
#$(this-package-input "librdkafka"))
(string-append "--with-bpf="
#$(this-package-input "linux-libre-headers"))
"--sysconfdir=/etc"
#$flags))
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(add-after 'install 'install-systemd-service-files
(lambda _
(for-each (lambda (file)
(install-file file
(string-append #$output "/etc")))
(list "etc/slurmrestd.service"
"etc/slurmdbd.service"
"etc/slurmd.service"
"etc/slurmctld.service"))
(substitute* (string-append #$output "/etc/slurmrestd.service")
;; Set user and group to run slurmrestd as.
(("# User=") "User=slurmrestd")
(("# Group=") "Group=slurmrestd")
;; Disable listening on Unix socket by default.
((" unix:[^ ]*") ""))))))))
(inputs
(modify-inputs (package-inputs guix:slurm)
(prepend dbus http-parser json-c libjwt
librdkafka libyaml linux-libre-headers
(list mariadb "dev"))))))
slurm
|