c.scm 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016, 2018 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
  4. ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
  6. ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
  8. ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
  9. ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  10. ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
  11. ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
  12. ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  13. ;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com>
  14. ;;; Copyright © 2021 David Dashyan <mail@davie.li>
  15. ;;;
  16. ;;; This file is part of GNU Guix.
  17. ;;;
  18. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  19. ;;; under the terms of the GNU General Public License as published by
  20. ;;; the Free Software Foundation; either version 3 of the License, or (at
  21. ;;; your option) any later version.
  22. ;;;
  23. ;;; GNU Guix is distributed in the hope that it will be useful, but
  24. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  25. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. ;;; GNU General Public License for more details.
  27. ;;;
  28. ;;; You should have received a copy of the GNU General Public License
  29. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  30. (define-module (gnu packages c)
  31. #:use-module ((guix licenses) #:prefix license:)
  32. #:use-module (guix utils)
  33. #:use-module (guix packages)
  34. #:use-module (guix download)
  35. #:use-module (guix git-download)
  36. #:use-module (guix build-system cmake)
  37. #:use-module (guix build-system gnu)
  38. #:use-module (guix build-system trivial)
  39. #:use-module (gnu packages)
  40. #:use-module (gnu packages bash)
  41. #:use-module (gnu packages bootstrap)
  42. #:use-module (gnu packages bison)
  43. #:use-module (gnu packages check)
  44. #:use-module (gnu packages flex)
  45. #:use-module (gnu packages perl)
  46. #:use-module (gnu packages texinfo)
  47. #:use-module (gnu packages guile)
  48. #:use-module (gnu packages lua)
  49. #:use-module (gnu packages multiprecision)
  50. #:use-module (gnu packages pcre)
  51. #:use-module (gnu packages python)
  52. #:use-module (gnu packages python-xyz)
  53. #:use-module (gnu packages autotools)
  54. #:use-module (gnu packages gettext)
  55. #:use-module (gnu packages pkg-config)
  56. #:use-module (gnu packages tls)
  57. #:use-module (gnu packages xml))
  58. (define-public tcc
  59. (package
  60. (name "tcc") ;aka. "tinycc"
  61. (version "0.9.27")
  62. (source (origin
  63. (method url-fetch)
  64. (uri (string-append "mirror://savannah/tinycc/tcc-"
  65. version ".tar.bz2"))
  66. (sha256
  67. (base32
  68. "177bdhwzrnqgyrdv1dwvpd04fcxj68s5pm1dzwny6359ziway8yy"))))
  69. (build-system gnu-build-system)
  70. (native-inputs `(("perl" ,perl)
  71. ("texinfo" ,texinfo)))
  72. (arguments
  73. `(#:configure-flags (list (string-append "--elfinterp="
  74. (assoc-ref %build-inputs "libc")
  75. ,(glibc-dynamic-linker))
  76. (string-append "--crtprefix="
  77. (assoc-ref %build-inputs "libc")
  78. "/lib")
  79. (string-append "--sysincludepaths="
  80. (assoc-ref %build-inputs "libc")
  81. "/include:"
  82. (assoc-ref %build-inputs
  83. "kernel-headers")
  84. "/include:{B}/include")
  85. (string-append "--libpaths="
  86. (assoc-ref %build-inputs "libc")
  87. "/lib")
  88. ,@(if (string-prefix? "armhf-linux"
  89. (or (%current-target-system)
  90. (%current-system)))
  91. `("--triplet=arm-linux-gnueabihf")
  92. '()))
  93. #:test-target "test"))
  94. (native-search-paths
  95. (list (search-path-specification
  96. (variable "CPATH")
  97. (files '("include")))
  98. (search-path-specification
  99. (variable "LIBRARY_PATH")
  100. (files '("lib" "lib64")))))
  101. ;; Fails to build on MIPS: "Unsupported CPU"
  102. (supported-systems (delete "mips64el-linux" %supported-systems))
  103. (synopsis "Tiny and fast C compiler")
  104. (description
  105. "TCC, also referred to as \"TinyCC\", is a small and fast C compiler
  106. written in C. It supports ANSI C with GNU and extensions and most of the C99
  107. standard.")
  108. (home-page "http://www.tinycc.org/")
  109. ;; An attempt to re-licence tcc under the Expat licence is underway but not
  110. ;; (if ever) complete. See the RELICENSING file for more information.
  111. (license license:lgpl2.1+)))
  112. (define-public pcc
  113. (package
  114. (name "pcc")
  115. (version "20170109")
  116. (source (origin
  117. (method url-fetch)
  118. (uri (string-append "http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-"
  119. version ".tgz"))
  120. (sha256
  121. (base32
  122. "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww"))))
  123. (build-system gnu-build-system)
  124. (arguments
  125. `(#:phases
  126. (modify-phases %standard-phases
  127. (replace 'check
  128. (lambda _ (invoke "make" "-C" "cc/cpp" "test") #t)))))
  129. (native-inputs
  130. `(("bison" ,bison)
  131. ("flex" ,flex)))
  132. (synopsis "Portable C compiler")
  133. (description
  134. "PCC is a portable C compiler. The project goal is to write a C99
  135. compiler while still keeping it small, simple, fast and understandable.")
  136. (home-page "http://pcc.ludd.ltu.se")
  137. (supported-systems (delete "aarch64-linux" %supported-systems))
  138. ;; PCC incorporates code under various BSD licenses; for new code bsd-2 is
  139. ;; preferred. See http://pcc.ludd.ltu.se/licenses/ for more details.
  140. (license (list license:bsd-2 license:bsd-3))))
  141. (define-public libbytesize
  142. (package
  143. (name "libbytesize")
  144. (version "2.2")
  145. (source (origin
  146. (method url-fetch)
  147. (uri (string-append
  148. "https://github.com/storaged-project/libbytesize/releases/"
  149. "download/" version "/libbytesize-" version ".tar.gz"))
  150. (sha256
  151. (base32
  152. "1aivwypmnqcaj2230pifvf3jcgl5chja8rspkxf0j3480asm8g5r"))))
  153. (build-system gnu-build-system)
  154. (arguments
  155. `(#:tests? #f))
  156. (native-inputs
  157. `(("gettext" ,gettext-minimal)
  158. ("pkg-config" ,pkg-config)
  159. ("python" ,python)))
  160. (inputs
  161. `(("mpfr" ,mpfr)
  162. ("pcre2" ,pcre2)))
  163. (home-page "https://github.com/storaged-project/libbytesize")
  164. (synopsis "Tiny C library for working with arbitrary big sizes in bytes")
  165. (description
  166. "The goal of this project is to provide a tiny library that would
  167. facilitate the common operations with sizes in bytes. Many projects need to
  168. work with sizes in bytes (be it sizes of storage space, memory...) and all of
  169. them need to deal with the same issues like:
  170. @itemize
  171. @item How to get a human-readable string for the given size?
  172. @item How to store the given size so that no significant information is lost?
  173. @item If we store the size in bytes, what if the given size gets over the
  174. MAXUINT64 value?
  175. @item How to interpret sizes entered by users according to their locale and
  176. typing conventions?
  177. @item How to deal with the decimal/binary units (MB versus MiB) ambiguity?
  178. @end itemize
  179. @code{libbytesize} offers a generally usable solution that could be used by
  180. every project that needs to deal with sizes in bytes. It is written in the C
  181. language with thin bindings for other languages.")
  182. (license license:lgpl2.1+)))
  183. (define-public udunits
  184. (package
  185. (name "udunits")
  186. ;; Four-part version numbers are development snapshots, not releases. See
  187. ;; <https://github.com/Unidata/UDUNITS-2/issues/99#issuecomment-732323472>.
  188. (version "2.2.28")
  189. (source (origin
  190. (method url-fetch)
  191. (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/udunits/"
  192. "udunits-" version ".tar.gz"))
  193. (sha256
  194. (base32
  195. "17jpbp6f0rr132jn2gqy8ry8mv1w27v6dyhfq1igv8v1674aw2sr"))))
  196. (build-system gnu-build-system)
  197. (arguments
  198. `(#:configure-flags
  199. (list "--disable-static")))
  200. (inputs
  201. `(("expat" ,expat)))
  202. (home-page "https://www.unidata.ucar.edu/software/udunits/")
  203. (synopsis "C library for units of physical quantities and value-conversion utils")
  204. (description
  205. "The UDUNITS-2 package provides support for units of physical quantities.
  206. Its three main components are:
  207. @enumerate
  208. @item @code{udunits2lib}, a C library for units of physical quantities;
  209. @item @code{udunits2prog}, a utility for obtaining the definition of a unit
  210. and for converting numeric values between compatible units; and
  211. @item an extensive database of units.
  212. @end enumerate\n")
  213. ;; Like the BSD-3 license but with an extra anti patent clause.
  214. (license (license:non-copyleft "file://COPYRIGHT"))))
  215. (define-public libfixposix
  216. (package
  217. (name "libfixposix")
  218. (version "0.4.3")
  219. (home-page "https://github.com/sionescu/libfixposix")
  220. (source
  221. (origin
  222. (method git-fetch)
  223. (uri (git-reference
  224. (url home-page)
  225. (commit (string-append "v" version))))
  226. (file-name (git-file-name name version))
  227. (sha256
  228. (base32
  229. "1x4q6yspi5g2s98vq4qszw4z3zjgk9l5zs8471w4d4cs6l97w08j"))))
  230. (build-system gnu-build-system)
  231. (native-inputs
  232. `(("autoconf" ,autoconf)
  233. ("automake" ,automake)
  234. ("libtool" ,libtool)
  235. ("pkg-config" ,pkg-config)
  236. ("check" ,check)))
  237. (synopsis "Thin wrapper over POSIX syscalls")
  238. (description
  239. "The purpose of libfixposix is to offer replacements for parts of POSIX
  240. whose behaviour is inconsistent across *NIX flavours.")
  241. (license license:boost1.0)))
  242. (define-public libhx
  243. (package
  244. (name "libhx")
  245. (version "3.25")
  246. (source
  247. (origin
  248. (method url-fetch)
  249. (uri (string-append "mirror://sourceforge/libhx/libHX/"
  250. "libHX-" version ".tar.xz"))
  251. (sha256
  252. (base32 "12avn16f8aqb0cq6jplz0sv7rh6f07m85dwc8dasnnwsvijwbpbj"))))
  253. (build-system gnu-build-system)
  254. (home-page "http://libhx.sourceforge.net")
  255. (synopsis "C library with common data structures and functions")
  256. (description
  257. "This is a C library (with some C++ bindings available) that provides data
  258. structures and functions commonly needed, such as maps, deques, linked lists,
  259. string formatting and autoresizing, option and config file parsing, type
  260. checking casts and more.")
  261. (license license:lgpl2.1+)))
  262. (define-public libwuya
  263. ;; This commit is the one before "wuy_pool.h" was removed from libwuya,
  264. ;; which libleak currently requires.
  265. (let ((revision "1")
  266. (commit "883502041044f4616cfbf75c8f2bb60059f704a9"))
  267. (package
  268. (name "libwuya")
  269. (version (git-version "0.0" revision commit))
  270. (source (origin
  271. (method git-fetch)
  272. (uri (git-reference
  273. (url "https://github.com/WuBingzheng/libwuya")
  274. (commit commit)))
  275. (file-name (git-file-name name version))
  276. (sha256
  277. (base32
  278. "1xrsqbgr13g2v0ag165ryp7xrwzv41xfygzk2a3445ca98c1qpdc"))))
  279. (build-system gnu-build-system)
  280. (arguments
  281. `(#:tests? #f ;no test suite
  282. #:phases (modify-phases %standard-phases
  283. (add-after 'unpack 'patch-lua-includes
  284. (lambda _
  285. (substitute* '("wuy_cflua.h" "wuy_cflua.c")
  286. (("<lua5\\.1/") "<"))
  287. #t))
  288. (add-after 'unpack 'add--fPIC-to-CFLAGS
  289. (lambda _
  290. (substitute* "Makefile"
  291. (("CFLAGS[^\n]*" all)
  292. (string-append all " -fPIC")))
  293. #t))
  294. (add-before 'build 'set-CC
  295. (lambda _
  296. (setenv "CC" "gcc")
  297. #t))
  298. (delete 'configure) ;no configure script
  299. (replace 'install
  300. (lambda* (#:key outputs #:allow-other-keys)
  301. (let* ((out (assoc-ref outputs "out"))
  302. (include-dir (string-append out "/include"))
  303. (headers (find-files "." "\\.h$")))
  304. (for-each (lambda (h)
  305. (install-file h include-dir))
  306. headers)
  307. (install-file "libwuya.a" (string-append out "/lib"))
  308. #t))))))
  309. (inputs `(("lua" ,lua)))
  310. (home-page "https://github.com/WuBingzheng/libwuya/")
  311. (synopsis "C library implementing various data structures")
  312. (description "The @code{libwuya} library implements data structures such
  313. as dictionaries, skip lists, and memory pools.")
  314. ;; There is no clear information as to what license this is distributed
  315. ;; under, but it is included (bundled) with libleak from the same author
  316. ;; under the GNU GPL v2 or later license, so use this here until it is
  317. ;; clarified (see: https://github.com/WuBingzheng/libwuya/issues/2).
  318. (license license:gpl2+))))
  319. (define-public packcc
  320. (package
  321. (name "packcc")
  322. (version "1.5.0")
  323. (home-page "https://github.com/arithy/packcc")
  324. (source (origin
  325. (method git-fetch)
  326. (uri (git-reference
  327. (url home-page)
  328. (commit (string-append "v" version))))
  329. (file-name (git-file-name name version))
  330. (sha256
  331. (base32
  332. "1n9ivsa6b9ps2jbh34bycjqjpbwbk85l4jjg46pfhqxzz96793wy"))))
  333. (build-system gnu-build-system)
  334. (arguments
  335. '(#:phases (modify-phases %standard-phases
  336. (delete 'configure)
  337. (add-before 'build 'chdir
  338. (lambda _
  339. (chdir "build/gcc")))
  340. (add-before 'check 'pre-check
  341. (lambda _
  342. (setenv "CC" "gcc")
  343. ;; The style tests are supposed to be skipped when
  344. ;; uncrustify is unavailable, but a stray version
  345. ;; check prevents it from working. This can be
  346. ;; removed for future versions of PackCC.
  347. (substitute* "../../tests/style.d/style.bats"
  348. (("^[[:blank:]]+check_uncrustify_version")
  349. ""))))
  350. (replace 'install
  351. (lambda* (#:key outputs #:allow-other-keys)
  352. (let ((out (assoc-ref outputs "out")))
  353. (install-file "release/bin/packcc"
  354. (string-append out "/bin"))
  355. (install-file "../../README.md"
  356. (string-append out "/share/doc/packcc"))
  357. #t))))))
  358. (native-inputs
  359. `(("bats" ,bats)))
  360. (synopsis "Packrat parser generator for C")
  361. (description
  362. "PackCC is a packrat parser generator for the C programming language.
  363. Its main features are:
  364. @itemize
  365. @item Generates a parser in C from a grammar described in a PEG.
  366. @item Gives your parser great efficiency by packrat parsing.
  367. @item Supports direct and indirect left-recursive grammar rules.
  368. @end itemize
  369. The grammar of your parser can be described in a @acronym{PEG, Parsing
  370. Expression Grammar}. The PEG is a top-down parsing language, and is similar
  371. to the regular-expression grammar. The PEG does not require tokenization to
  372. be a separate step, and tokenization rules can be written in the same way as
  373. any other grammar rules.")
  374. (license license:expat)))
  375. (define-public sparse
  376. (package
  377. (name "sparse")
  378. (version "0.6.3")
  379. (source (origin
  380. (method url-fetch)
  381. (uri
  382. (string-append "mirror://kernel.org/software/devel/sparse/dist/"
  383. "sparse-" version ".tar.xz"))
  384. (sha256
  385. (base32
  386. "16d8c4dhipjzjf8z4z7pix1pdpqydz0v4r7i345f5s09hjnxpxnl"))))
  387. (build-system gnu-build-system)
  388. (inputs `(("perl" ,perl)))
  389. (arguments
  390. '(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out")))
  391. #:phases (modify-phases %standard-phases
  392. (delete 'configure)
  393. (add-after 'unpack 'patch-cgcc
  394. (lambda _
  395. (substitute* "cgcc"
  396. (("'cc'") (string-append "'" (which "gcc") "'")))
  397. #t)))))
  398. (synopsis "Semantic C parser for Linux development")
  399. (description
  400. "Sparse is a semantic parser for C and is required for Linux development.
  401. It provides a compiler frontend capable of parsing most of ANSI C as well as
  402. many GCC extensions, and a collection of sample compiler backends, including a
  403. static analyzer also called @file{sparse}. Sparse provides a set of
  404. annotations designed to convey semantic information about types, such as what
  405. address space pointers point to, or what locks a function acquires or
  406. releases.")
  407. (home-page "https://sparse.wiki.kernel.org/index.php/Main_Page")
  408. (license license:expat)))
  409. (define-public libestr
  410. (package
  411. (name "libestr")
  412. (version "0.1.11")
  413. (source
  414. (origin
  415. (method git-fetch)
  416. (uri (git-reference
  417. (url "https://github.com/rsyslog/libestr")
  418. (commit (string-append "v" version))))
  419. (file-name (git-file-name name version))
  420. (sha256
  421. (base32
  422. "1ca4rj90c0dn7kqpbcchkflxjw88a7rxcnwbr0gply4a28i01nd8"))))
  423. (build-system gnu-build-system)
  424. (arguments
  425. `(#:phases
  426. (modify-phases %standard-phases
  427. ;; autogen.sh calls configure at the end of the script.
  428. (replace 'bootstrap
  429. (lambda _ (invoke "autoreconf" "-vfi"))))))
  430. (native-inputs
  431. `(("autoconf" ,autoconf)
  432. ("automake" ,automake)
  433. ("pkg-config" ,pkg-config)
  434. ("libtool" ,libtool)))
  435. (home-page "https://github.com/rsyslog/libestr")
  436. (synopsis "Helper functions for handling strings")
  437. (description
  438. "This C library contains some essential string manipulation functions and
  439. more, like escaping special characters.")
  440. (license license:lgpl2.1+)))
  441. (define-public libfastjson
  442. (package
  443. (name "libfastjson")
  444. (version "0.99.9")
  445. (source
  446. (origin
  447. (method git-fetch)
  448. (uri (git-reference
  449. (url "https://github.com/rsyslog/libfastjson")
  450. (commit (string-append "v" version))))
  451. (file-name (git-file-name name version))
  452. (sha256
  453. (base32 "12rqcdqxazw8czzxbivdapdgj19pcswpw1jp2915sxbljis83g6q"))))
  454. (build-system gnu-build-system)
  455. (native-inputs
  456. `(("autoconf" ,autoconf)
  457. ("automake" ,automake)
  458. ("libtool" ,libtool)))
  459. (home-page "https://github.com/rsyslog/libfastjson")
  460. (synopsis "Fast JSON library for C")
  461. (description
  462. "libfastjson is a fork from json-c aiming to provide: a small library
  463. with essential JSON handling functions, sufficiently good JSON support (not
  464. 100% standards compliant), and very fast processing.")
  465. (license license:expat)))
  466. (define-public liblogging
  467. (package
  468. (name "liblogging")
  469. (version "1.0.6")
  470. (source
  471. (origin
  472. (method git-fetch)
  473. (uri (git-reference
  474. (url "https://github.com/rsyslog/liblogging")
  475. (commit (string-append "v" version))))
  476. (file-name (git-file-name name version))
  477. (sha256
  478. (base32
  479. "1l32m0y65svf5vxsgw935jnqs6842rcqr56dmzwqvr00yfrjhjkp"))))
  480. (build-system gnu-build-system)
  481. (arguments
  482. `(#:phases
  483. (modify-phases %standard-phases
  484. ;; autogen.sh calls configure at the end of the script.
  485. (replace 'bootstrap
  486. (lambda _ (invoke "autoreconf" "-vfi"))))))
  487. (native-inputs
  488. `(("autoconf" ,autoconf)
  489. ("automake" ,automake)
  490. ("pkg-config" ,pkg-config)
  491. ("libtool" ,libtool)
  492. ;; For rst2man.py
  493. ("python-docutils" ,python-docutils)))
  494. (home-page "https://github.com/rsyslog/liblogging")
  495. (synopsis "Easy to use and lightweight signal-safe logging library")
  496. (description
  497. "Liblogging is an easy to use library for logging. It offers an enhanced
  498. replacement for the syslog() call, but retains its ease of use.")
  499. (license license:bsd-2)))
  500. (define-public unifdef
  501. (package
  502. (name "unifdef")
  503. (version "2.12")
  504. (source (origin
  505. (method url-fetch)
  506. ;; https://dotat.at/prog/unifdef/unifdef-2.12.tar.xz
  507. (uri (string-append "https://dotat.at/prog/" name "/"
  508. name "-" version ".tar.xz"))
  509. (sha256
  510. (base32
  511. "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3"))
  512. (modules '((guix build utils)))
  513. (snippet
  514. '(begin (delete-file-recursively "FreeBSD")
  515. (delete-file-recursively "win32")
  516. #t))))
  517. (build-system gnu-build-system)
  518. (arguments
  519. `(#:phases (modify-phases %standard-phases
  520. (delete 'configure))
  521. #:make-flags (list (string-append "CC=" ,(cc-for-target))
  522. (string-append "prefix=" %output))
  523. #:tests? #f)) ;no test suite
  524. (native-inputs
  525. `(("perl" ,perl)))
  526. (home-page "https://dotat.at/prog/unifdef/")
  527. (synopsis "Utility to selectively processes conditional C preprocessor")
  528. (description "The @command{unifdef} utility selectively processes
  529. conditional C preprocessor @code{#if} and @code{#ifdef} directives. It
  530. removes from a file both the directives and the additional text that they
  531. delimit, while otherwise leaving the file alone. It can be useful for
  532. avoiding distractions when studying code that uses @code{#ifdef} heavily for
  533. portability.")
  534. (license (list license:bsd-2 ;all files except...
  535. license:bsd-3)))) ;...the unidef.1 manual page
  536. (define-public aws-c-common
  537. (package
  538. (name "aws-c-common")
  539. (version "0.5.3")
  540. (source (origin
  541. (method git-fetch)
  542. (uri (git-reference
  543. (url (string-append "https://github.com/awslabs/" name))
  544. (commit (string-append "v" version))))
  545. (file-name (git-file-name name version))
  546. (sha256
  547. (base32
  548. "03fcvh3l1l6fkzkcbaprk10qmy8l77zhmh60h1px2ik09sqd9p72"))))
  549. (build-system cmake-build-system)
  550. (arguments
  551. '(#:configure-flags
  552. '("-DBUILD_SHARED_LIBS=ON")))
  553. (synopsis "Amazon Web Services core C library")
  554. (description
  555. "This library provides common C99 primitives, configuration, data
  556. structures, and error handling for the @acronym{AWS,Amazon Web Services} SDK.")
  557. (home-page "https://github.com/awslabs/aws-c-common")
  558. (license license:asl2.0)))
  559. (define-public aws-checksums
  560. (package
  561. (name "aws-checksums")
  562. (version "0.1.11")
  563. (source (origin
  564. (method git-fetch)
  565. (uri (git-reference
  566. (url (string-append "https://github.com/awslabs/" name))
  567. (commit (string-append "v" version))))
  568. (file-name (git-file-name name version))
  569. (sha256
  570. (base32
  571. "1pjs31x3cq9wyw511y00kksz660m8im9zxk30hid8iwlilcbnyvx"))
  572. (patches (search-patches "aws-checksums-cmake-prefix.patch"))))
  573. (build-system cmake-build-system)
  574. (arguments
  575. '(#:configure-flags
  576. '("-DBUILD_SHARED_LIBS=ON")))
  577. (inputs
  578. `(("aws-c-common" ,aws-c-common)))
  579. (synopsis "Amazon Web Services checksum library")
  580. (description
  581. "This library provides cross-Platform hardware accelerated CRC32c and CRC32
  582. with fallback to efficient C99 software implementations.")
  583. (home-page "https://github.com/awslabs/aws-checksums")
  584. (license license:asl2.0)))
  585. (define-public aws-c-event-stream
  586. (package
  587. (name "aws-c-event-stream")
  588. (version "0.2.7")
  589. (source (origin
  590. (method git-fetch)
  591. (uri (git-reference
  592. (url (string-append "https://github.com/awslabs/" name))
  593. (commit (string-append "v" version))))
  594. (file-name (git-file-name name version))
  595. (sha256
  596. (base32
  597. "0xwwr7gdgfrphk6j7vk12rgimfim6m4qnj6hg8hgg16cplhvsfzh"))
  598. (patches (search-patches "aws-c-event-stream-cmake-prefix.patch"))))
  599. (build-system cmake-build-system)
  600. (arguments
  601. '(#:configure-flags
  602. '("-DBUILD_SHARED_LIBS=ON")))
  603. (propagated-inputs
  604. `(("aws-c-common" ,aws-c-common)
  605. ("aws-c-io" ,aws-c-io)
  606. ("aws-checksums" ,aws-checksums)))
  607. (inputs
  608. `(("aws-c-cal" ,aws-c-cal)
  609. ("s2n" ,s2n)))
  610. (synopsis "Amazon Web Services client-server message format library")
  611. (description
  612. "This library is a C99 implementation for @acronym{AWS,Amazon Web Services}
  613. event stream encoding, a binary format for bidirectional client-server
  614. communication.")
  615. (home-page "https://github.com/awslabs/aws-c-event-stream")
  616. (license license:asl2.0)))
  617. (define-public aws-c-io
  618. (package
  619. (name "aws-c-io")
  620. (version "0.9.2")
  621. (source (origin
  622. (method git-fetch)
  623. (uri (git-reference
  624. (url (string-append "https://github.com/awslabs/" name))
  625. (commit (string-append "v" version))))
  626. (file-name (git-file-name name version))
  627. (sha256
  628. (base32
  629. "1vwyf1pm0hhcypyjc9xh9x7y50ic79xlbck1yf9d9wz0bnh43p7v"))
  630. (patches
  631. (search-patches
  632. "aws-c-io-cmake-prefix.patch"
  633. "aws-c-io-disable-networking-tests.patch"))))
  634. (build-system cmake-build-system)
  635. (arguments
  636. '(#:configure-flags
  637. '("-DBUILD_SHARED_LIBS=ON")))
  638. (propagated-inputs
  639. `(("aws-c-cal" ,aws-c-cal)
  640. ("aws-c-common" ,aws-c-common)
  641. ("s2n" ,s2n)))
  642. (synopsis "Event driven framework for implementing application protocols")
  643. (description "This library provides a C99 framework for constructing
  644. event-driven, asynchronous network application protocols.")
  645. (home-page "https://github.com/awslabs/aws-c-io")
  646. (license license:asl2.0)))
  647. (define-public aws-c-cal
  648. (package
  649. (name "aws-c-cal")
  650. (version "0.4.5")
  651. (source (origin
  652. (method git-fetch)
  653. (uri (git-reference
  654. (url (string-append "https://github.com/awslabs/" name))
  655. (commit (string-append "v" version))))
  656. (file-name (git-file-name name version))
  657. (sha256
  658. (base32
  659. "04acra1mnzw9q7jycs5966akfbgnx96hkrq90nq0dhw8pvarlyv6"))
  660. (patches (search-patches "aws-c-cal-cmake-prefix.patch"))))
  661. (build-system cmake-build-system)
  662. (arguments
  663. '(#:configure-flags
  664. '("-DBUILD_SHARED_LIBS=ON")))
  665. (propagated-inputs
  666. `(("aws-c-common" ,aws-c-common)))
  667. (inputs
  668. `(("openssl" ,openssl)
  669. ("openssl:static" ,openssl "static")))
  670. (synopsis "Amazon Web Services Crypto Abstraction Layer")
  671. (description "This library provides a C99 wrapper for hash, HMAC, and ECC
  672. cryptographic primitives for the @acronym{AWS,Amazon Web Services} SDK.")
  673. (home-page "https://github.com/awslabs/aws-c-cal")
  674. (license license:asl2.0)))
  675. (define-public pcl
  676. (package
  677. (name "pcl")
  678. (version "1.12")
  679. (source
  680. (origin
  681. (method url-fetch)
  682. (uri (string-append
  683. "http://www.xmailserver.org/pcl-" version ".tar.gz"))
  684. (sha256
  685. (base32
  686. "06ly65rq4iyj2p4704i215c8y4rgspwl8sxfaifmf4ahfr30bcz7"))))
  687. (build-system gnu-build-system)
  688. (home-page "http://www.xmailserver.org/libpcl.html")
  689. (synopsis "Portable Coroutine Library")
  690. (description "The @acronym{PCL, Portable Coroutine Library} implements the
  691. low level functionality for coroutines.")
  692. (license license:gpl2+)))