graph.scm 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
  3. ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
  4. ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;; Copyright © 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
  7. ;;; Copyright © 2020 Alexander Krotov <krotov@iitp.ru>
  8. ;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
  9. ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
  10. ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>
  11. ;;;
  12. ;;; This file is part of GNU Guix.
  13. ;;;
  14. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  15. ;;; under the terms of the GNU General Public License as published by
  16. ;;; the Free Software Foundation; either version 3 of the License, or (at
  17. ;;; your option) any later version.
  18. ;;;
  19. ;;; GNU Guix is distributed in the hope that it will be useful, but
  20. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. ;;; GNU General Public License for more details.
  23. ;;;
  24. ;;; You should have received a copy of the GNU General Public License
  25. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  26. (define-module (gnu packages graph)
  27. #:use-module (guix download)
  28. #:use-module (guix git-download)
  29. #:use-module (guix packages)
  30. #:use-module (guix utils)
  31. #:use-module (guix build-system cmake)
  32. #:use-module (guix build-system gnu)
  33. #:use-module (guix build-system python)
  34. #:use-module (guix build-system r)
  35. #:use-module ((guix licenses) #:prefix license:)
  36. #:use-module (gnu packages)
  37. #:use-module (gnu packages gcc)
  38. #:use-module (gnu packages autotools)
  39. #:use-module (gnu packages bioconductor)
  40. #:use-module (gnu packages bioinformatics)
  41. #:use-module (gnu packages boost)
  42. #:use-module (gnu packages check)
  43. #:use-module (gnu packages compression)
  44. #:use-module (gnu packages cran)
  45. #:use-module (gnu packages datastructures)
  46. #:use-module (gnu packages gd)
  47. #:use-module (gnu packages graphics)
  48. #:use-module (gnu packages graphviz)
  49. #:use-module (gnu packages gtk)
  50. #:use-module (gnu packages maths)
  51. #:use-module (gnu packages multiprecision)
  52. #:use-module (gnu packages ncurses)
  53. #:use-module (gnu packages pkg-config)
  54. #:use-module (gnu packages python)
  55. #:use-module (gnu packages python-science)
  56. #:use-module (gnu packages python-web)
  57. #:use-module (gnu packages python-xyz)
  58. #:use-module (gnu packages statistics)
  59. #:use-module (gnu packages swig)
  60. #:use-module (gnu packages time)
  61. #:use-module (gnu packages xml))
  62. (define-public igraph
  63. (package
  64. (name "igraph")
  65. (version "0.8.4")
  66. (source
  67. (origin
  68. (method url-fetch)
  69. (uri (string-append "https://github.com/igraph/igraph/releases/"
  70. "download/" version "/igraph-" version ".tar.gz"))
  71. (sha256
  72. (base32 "127q6q40kbmvd62yhbz6dlfk370qiq98s1iscyagpgbpjwb4xvyf"))))
  73. (build-system gnu-build-system)
  74. (arguments
  75. `(#:configure-flags
  76. (list "--disable-static"
  77. "--with-external-glpk"
  78. "--with-external-blas"
  79. "--with-external-lapack")))
  80. (inputs
  81. `(("gmp" ,gmp)
  82. ("glpk" ,glpk)
  83. ("libxml2" ,libxml2)
  84. ("lapack" ,lapack)
  85. ("openblas" ,openblas)
  86. ("zlib" ,zlib)))
  87. (home-page "https://igraph.org")
  88. (synopsis "Network analysis and visualization")
  89. (description
  90. "This package provides a library for the analysis of networks and graphs.
  91. It can handle large graphs very well and provides functions for generating
  92. random and regular graphs, graph visualization, centrality methods and much
  93. more.")
  94. (license license:gpl2+)))
  95. (define-public python-igraph
  96. (package (inherit igraph)
  97. (name "python-igraph")
  98. (version "0.8.2")
  99. (source
  100. (origin
  101. (method url-fetch)
  102. (uri (pypi-uri "python-igraph" version))
  103. (sha256
  104. (base32 "0wkxrs28qdvnrz7d4jzcf2bh6v2yqzx3wyfziihfgsi2gn6n60a6"))))
  105. (build-system python-build-system)
  106. (arguments
  107. '(#:configure-flags
  108. (list "--use-pkg-config")
  109. #:phases
  110. (modify-phases %standard-phases
  111. (replace 'build
  112. (lambda _
  113. (invoke "python" "./setup.py" "build" "--use-pkg-config")))
  114. (delete 'check)
  115. (add-after 'install 'check
  116. (lambda* (#:key inputs outputs #:allow-other-keys)
  117. (add-installed-pythonpath inputs outputs)
  118. (invoke "pytest" "-v"))))))
  119. (inputs
  120. `(("igraph" ,igraph)))
  121. (propagated-inputs
  122. `(("python-texttable" ,python-texttable)))
  123. (native-inputs
  124. `(("pkg-config" ,pkg-config)
  125. ("python-pytest" ,python-pytest)))
  126. (home-page "https://pypi.org/project/python-igraph/")
  127. (synopsis "Python bindings for the igraph network analysis library")))
  128. (define-public r-rbiofabric
  129. (let ((commit "666c2ae8b0a537c006592d067fac6285f71890ac")
  130. (revision "1"))
  131. (package
  132. (name "r-rbiofabric")
  133. (version (string-append "0.3-" revision "." (string-take commit 7)))
  134. (source (origin
  135. (method git-fetch)
  136. (uri (git-reference
  137. (url "https://github.com/wjrl/RBioFabric")
  138. (commit commit)))
  139. (file-name (string-append name "-" version "-checkout"))
  140. (sha256
  141. (base32
  142. "1yahqrcrqpbcywv73y9rlmyz8apdnp08afialibrr93ch0p06f8z"))))
  143. (build-system r-build-system)
  144. (propagated-inputs
  145. `(("r-igraph" ,r-igraph)))
  146. (home-page "http://www.biofabric.org/")
  147. (synopsis "BioFabric network visualization")
  148. (description "This package provides an implementation of the function
  149. @code{bioFabric} for creating scalable network digrams where nodes are
  150. represented by horizontal lines, and edges are represented by vertical
  151. lines.")
  152. (license license:expat))))
  153. (define-public python-plotly
  154. (package
  155. (name "python-plotly")
  156. (version "4.14.3")
  157. (source (origin
  158. (method git-fetch)
  159. (uri (git-reference
  160. (url "https://github.com/plotly/plotly.py")
  161. (commit (string-append "v" version))))
  162. (file-name (git-file-name name version))
  163. (sha256
  164. (base32
  165. "02wlgy7gf3v5ckiq9ab3prm53cckxkavlghqgkk9xw2sfmmrn61q"))))
  166. (build-system python-build-system)
  167. (arguments
  168. `(#:phases
  169. (modify-phases %standard-phases
  170. (add-after 'unpack 'chdir
  171. (lambda _
  172. (chdir "packages/python/plotly")
  173. #t))
  174. (replace 'check
  175. (lambda* (#:key tests? #:allow-other-keys)
  176. (when tests?
  177. (invoke "pytest" "-x" "plotly/tests/test_core")
  178. (invoke "pytest" "-x" "plotly/tests/test_io")
  179. ;; FIXME: Add optional dependencies and enable their tests.
  180. ;; (invoke "pytest" "-x" "plotly/tests/test_optional")
  181. (invoke "pytest" "_plotly_utils/tests"))
  182. #t))
  183. (add-before 'reset-gzip-timestamps 'make-files-writable
  184. (lambda* (#:key outputs #:allow-other-keys)
  185. (let ((out (assoc-ref outputs "out")))
  186. (for-each (lambda (file) (chmod file #o644))
  187. (find-files out "\\.gz"))
  188. #t))))))
  189. (native-inputs
  190. `(("python-ipywidgets" ,python-ipywidgets)
  191. ("python-pytest" ,python-pytest)
  192. ("python-xarray" ,python-xarray)))
  193. (propagated-inputs
  194. `(("python-ipython" ,python-ipython)
  195. ("python-pandas" ,python-pandas)
  196. ("python-pillow" ,python-pillow)
  197. ("python-requests" ,python-requests)
  198. ("python-retrying" ,python-retrying)
  199. ("python-six" ,python-six)
  200. ("python-statsmodels" ,python-statsmodels)))
  201. (home-page "https://plotly.com/python/")
  202. (synopsis "Interactive plotting library for Python")
  203. (description "Plotly's Python graphing library makes interactive,
  204. publication-quality graphs online. Examples of how to make line plots, scatter
  205. plots, area charts, bar charts, error bars, box plots, histograms, heatmaps,
  206. subplots, multiple-axes, polar charts, and bubble charts. ")
  207. (license license:expat)))
  208. (define-public python-plotly-2.4.1
  209. (package (inherit python-plotly)
  210. (version "2.4.1")
  211. (source
  212. (origin
  213. (method url-fetch)
  214. (uri (pypi-uri "plotly" version))
  215. (sha256
  216. (base32
  217. "0s9gk2fl53x8wwncs3fwii1vzfngr0sskv15v3mpshqmrqfrk27m"))))
  218. (native-inputs '())
  219. (propagated-inputs
  220. `(("python-decorator" ,python-decorator)
  221. ("python-nbformat" ,python-nbformat)
  222. ("python-pandas" ,python-pandas)
  223. ("python-pytz" ,python-pytz)
  224. ("python-requests" ,python-requests)
  225. ("python-six" ,python-six)))
  226. (arguments
  227. '(#:tests? #f)))) ; The tests are not distributed in the release
  228. (define-public python-louvain
  229. (package
  230. (name "python-louvain")
  231. (version "0.15")
  232. (source
  233. (origin
  234. (method url-fetch)
  235. (uri (pypi-uri "python-louvain" version))
  236. (sha256
  237. (base32 "1sqp97fwh4asx0jr72x8hil8z8fcg2xq92jklmh2m599pvgnx19a"))))
  238. (build-system python-build-system)
  239. (propagated-inputs
  240. `(("python-networkx" ,python-networkx)
  241. ("python-numpy" ,python-numpy)))
  242. (home-page "https://github.com/taynaud/python-louvain")
  243. (synopsis "Louvain algorithm for community detection")
  244. (description
  245. "This package provides a pure Python implementation of the Louvain
  246. algorithm for community detection in large networks.")
  247. (license license:bsd-3)))
  248. (define-public python-louvain-0.6
  249. (package
  250. (name "python-louvain")
  251. (version "0.6.1")
  252. ;; The tarball on Pypi does not include the tests.
  253. (source (origin
  254. (method git-fetch)
  255. (uri (git-reference
  256. (url "https://github.com/vtraag/louvain-igraph")
  257. (commit version)))
  258. (file-name (git-file-name name version))
  259. (sha256
  260. (base32
  261. "0w31537sifkf65sck1iaip5i6d8g64pa3wdwad83d6p9jwkck57k"))))
  262. (build-system python-build-system)
  263. (propagated-inputs
  264. `(("python-ddt" ,python-ddt)
  265. ("python-igraph" ,python-igraph)))
  266. (inputs
  267. `(("igraph" ,igraph)))
  268. (native-inputs
  269. `(("pkg-config" ,pkg-config)
  270. ("python-pytest" ,python-pytest)))
  271. (home-page "https://github.com/vtraag/louvain-igraph")
  272. (synopsis "Algorithm for methods of community detection in large networks")
  273. (description
  274. "This package provides an implementation of the Louvain algorithm for use
  275. with igraph. Louvain is a general algorithm for methods of community
  276. detection in large networks.
  277. This package has been superseded by the @code{leidenalg} package and should
  278. not be used for new projects.")
  279. (license license:gpl3+)))
  280. (define-public faiss
  281. (package
  282. (name "faiss")
  283. (version "1.5.0")
  284. (source (origin
  285. (method git-fetch)
  286. (uri (git-reference
  287. (url "https://github.com/facebookresearch/faiss")
  288. (commit (string-append "v" version))))
  289. (file-name (git-file-name name version))
  290. (sha256
  291. (base32
  292. "0pk15jfa775cy2pqmzq62nhd6zfjxmpvz5h731197c28aq3zw39w"))
  293. (modules '((guix build utils)))
  294. (snippet
  295. '(begin
  296. (substitute* "utils.cpp"
  297. (("#include <immintrin.h>")
  298. "#ifdef __SSE__\n#include <immintrin.h>\n#endif"))
  299. #t))))
  300. (build-system cmake-build-system)
  301. (arguments
  302. `(#:configure-flags
  303. (list "-DBUILD_WITH_GPU=OFF" ; thanks, but no thanks, CUDA.
  304. "-DBUILD_TUTORIAL=OFF") ; we don't need those
  305. #:phases
  306. (modify-phases %standard-phases
  307. (add-after 'unpack 'prepare-build
  308. (lambda _
  309. (let ((features (list ,@(let ((system (or (%current-target-system)
  310. (%current-system))))
  311. (cond
  312. ((string-prefix? "x86_64" system)
  313. '("-mavx" "-msse2" "-mpopcnt"))
  314. ((string-prefix? "i686" system)
  315. '("-msse2" "-mpopcnt"))
  316. (else
  317. '()))))))
  318. (substitute* "CMakeLists.txt"
  319. (("-m64") "")
  320. (("-mpopcnt") "") ; only some architectures
  321. (("-msse4")
  322. (string-append
  323. (string-join features)
  324. " -I" (getcwd)))
  325. ;; Build also the shared library
  326. (("ARCHIVE DESTINATION lib")
  327. "LIBRARY DESTINATION lib")
  328. (("add_library.*" m)
  329. "\
  330. add_library(objlib OBJECT ${faiss_cpu_headers} ${faiss_cpu_cpp})
  331. set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
  332. add_library(${faiss_lib}_static STATIC $<TARGET_OBJECTS:objlib>)
  333. add_library(${faiss_lib} SHARED $<TARGET_OBJECTS:objlib>)
  334. install(TARGETS ${faiss_lib}_static ARCHIVE DESTINATION lib)
  335. \n")))
  336. ;; See https://github.com/facebookresearch/faiss/issues/520
  337. (substitute* "IndexScalarQuantizer.cpp"
  338. (("#define USE_AVX") ""))
  339. ;; Make header files available for compiling tests.
  340. (mkdir-p "faiss")
  341. (for-each (lambda (file)
  342. (mkdir-p (string-append "faiss/" (dirname file)))
  343. (copy-file file (string-append "faiss/" file)))
  344. (find-files "." "\\.h$"))
  345. #t))
  346. (replace 'check
  347. (lambda _
  348. (invoke "make" "-C" "tests"
  349. (format #f "-j~a" (parallel-job-count)))))
  350. (add-after 'install 'remove-tests
  351. (lambda* (#:key outputs #:allow-other-keys)
  352. (delete-file-recursively
  353. (string-append (assoc-ref outputs "out")
  354. "/test"))
  355. #t)))))
  356. (inputs
  357. `(("openblas" ,openblas)))
  358. (native-inputs
  359. `(("googletest" ,googletest)))
  360. (home-page "https://github.com/facebookresearch/faiss")
  361. (synopsis "Efficient similarity search and clustering of dense vectors")
  362. (description "Faiss is a library for efficient similarity search and
  363. clustering of dense vectors. It contains algorithms that search in sets of
  364. vectors of any size, up to ones that possibly do not fit in RAM. It also
  365. contains supporting code for evaluation and parameter tuning.")
  366. (license license:bsd-3)))
  367. (define-public python-faiss
  368. (package (inherit faiss)
  369. (name "python-faiss")
  370. (build-system python-build-system)
  371. (arguments
  372. `(#:phases
  373. (modify-phases %standard-phases
  374. (add-after 'unpack 'chdir
  375. (lambda _ (chdir "python") #t))
  376. (add-after 'chdir 'build-swig
  377. (lambda* (#:key inputs #:allow-other-keys)
  378. (with-output-to-file "../makefile.inc"
  379. (lambda ()
  380. (let ((python-version ,(version-major+minor (package-version python))))
  381. (format #t "\
  382. PYTHONCFLAGS =-I~a/include/python~am/ -I~a/lib/python~a/site-packages/numpy/core/include
  383. LIBS = -lpython~am -lfaiss
  384. SHAREDFLAGS = -shared -fopenmp
  385. CXXFLAGS = -fpermissive -fopenmp -fPIC
  386. CPUFLAGS = ~{~a ~}~%"
  387. (assoc-ref inputs "python*") python-version
  388. (assoc-ref inputs "python-numpy") python-version
  389. python-version
  390. (list ,@(let ((system (or (%current-target-system)
  391. (%current-system))))
  392. (cond
  393. ((string-prefix? "x86_64" system)
  394. '("-mavx" "-msse2" "-mpopcnt"))
  395. ((string-prefix? "i686" system)
  396. '("-msse2" "-mpopcnt"))
  397. (else
  398. '()))))))))
  399. (substitute* "Makefile"
  400. (("../libfaiss.a") ""))
  401. (invoke "make" "cpu"))))))
  402. (inputs
  403. `(("faiss" ,faiss)
  404. ("openblas" ,openblas)
  405. ("python*" ,python)
  406. ("swig" ,swig)))
  407. (propagated-inputs
  408. `(("python-matplotlib" ,python-matplotlib)
  409. ("python-numpy" ,python-numpy)))
  410. (description "Faiss is a library for efficient similarity search and
  411. clustering of dense vectors. This package provides Python bindings to the
  412. Faiss library.")))
  413. (define-public python-leidenalg
  414. (package
  415. (name "python-leidenalg")
  416. (version "0.7.0")
  417. (source
  418. (origin
  419. (method url-fetch)
  420. (uri (pypi-uri "leidenalg" version))
  421. (sha256
  422. (base32
  423. "15fwld9hdw357rd026mzcwpah5liy4f33vc9x9kwy37g71b2rjf1"))))
  424. (build-system python-build-system)
  425. (arguments '(#:tests? #f)) ; tests are not included
  426. (native-inputs
  427. `(("pkg-config" ,pkg-config)))
  428. (inputs
  429. `(("igraph" ,igraph)))
  430. (propagated-inputs
  431. `(("python-igraph" ,python-igraph)))
  432. (home-page "https://github.com/vtraag/leidenalg")
  433. (synopsis "Community detection in large networks")
  434. (description
  435. "Leiden is a general algorithm for methods of community detection in
  436. large networks. This package implements the Leiden algorithm in C++ and
  437. exposes it to Python. Besides the relative flexibility of the implementation,
  438. it also scales well, and can be run on graphs of millions of nodes (as long as
  439. they can fit in memory). The core function is @code{find_partition} which
  440. finds the optimal partition using the Leiden algorithm, which is an extension
  441. of the Louvain algorithm, for a number of different methods.")
  442. (license license:gpl3+)))
  443. (define-public edge-addition-planarity-suite
  444. (package
  445. (name "edge-addition-planarity-suite")
  446. (version "3.0.0.5")
  447. (source
  448. (origin
  449. (method git-fetch)
  450. (uri (git-reference
  451. (url (string-append "https://github.com/graph-algorithms/"
  452. name))
  453. (commit (string-append "Version_" version))))
  454. (file-name (git-file-name name version))
  455. (sha256
  456. (base32
  457. "01cm7ay1njkfsdnmnvh5zwc7wg7x189hq1vbfhh9p3ihrbnmqzh8"))))
  458. (build-system gnu-build-system)
  459. (native-inputs
  460. `(("autoconf" ,autoconf)
  461. ("automake" ,automake)
  462. ("libtool" ,libtool)))
  463. (synopsis "Embedding of planar graphs")
  464. (description "The package provides a reference implementation of the
  465. linear time edge addition algorithm for embedding planar graphs and
  466. isolating planarity obstructions.")
  467. (license license:bsd-3)
  468. (home-page
  469. "https://github.com/graph-algorithms/edge-addition-planarity-suite")))
  470. (define-public rw
  471. (package
  472. (name "rw")
  473. ;; There is a version 0.8, but the tarball is broken with symlinks
  474. ;; to /usr/share.
  475. (version "0.7")
  476. (source (origin
  477. (method url-fetch)
  478. (uri (string-append "mirror://sourceforge/rankwidth/"
  479. "rw-" version ".tar.gz"))
  480. (sha256
  481. (base32
  482. "1rv2v42x2506x7f10349m1wpmmfxrv9l032bkminni2gbip9cjg0"))))
  483. (build-system gnu-build-system)
  484. (native-inputs
  485. `(("pkg-config" ,pkg-config)))
  486. (inputs
  487. `(("igraph" ,igraph)))
  488. (home-page "https://sourceforge.net/projects/rankwidth/")
  489. (synopsis "Rank-width and rank-decomposition of graphs")
  490. (description "rw computes rank-width and rank-decompositions
  491. of graphs.")
  492. (license license:gpl2+)))
  493. (define-public mscgen
  494. (package
  495. (name "mscgen")
  496. (version "0.20")
  497. (source
  498. (origin
  499. (method url-fetch)
  500. (uri (string-append "http://www.mcternan.me.uk/mscgen/software/mscgen-src-"
  501. version ".tar.gz"))
  502. (sha256
  503. (base32
  504. "08yw3maxhn5fl1lff81gmcrpa4j9aas4mmby1g9w5qcr0np82d1w"))))
  505. (build-system gnu-build-system)
  506. (native-inputs
  507. `(("pkg-config" ,pkg-config)))
  508. (inputs
  509. `(("gd" ,gd)))
  510. (home-page "http://www.mcternan.me.uk/mscgen/")
  511. (synopsis "Message Sequence Chart Generator")
  512. (description "Mscgen is a small program that parses Message Sequence Chart
  513. descriptions and produces PNG, SVG, EPS or server side image maps (ismaps) as
  514. the output. Message Sequence Charts (MSCs) are a way of representing entities
  515. and interactions over some time period and are often used in combination with
  516. SDL. MSCs are popular in Telecoms to specify how protocols operate although
  517. MSCs need not be complicated to create or use. Mscgen aims to provide a simple
  518. text language that is clear to create, edit and understand, which can also be
  519. transformed into common image formats for display or printing.")
  520. (license license:gpl2+)))
  521. (define-public python-graph-tool
  522. (package
  523. (name "python-graph-tool")
  524. (version "2.43")
  525. (source (origin
  526. (method url-fetch)
  527. (uri (string-append
  528. "https://downloads.skewed.de/graph-tool/graph-tool-"
  529. version ".tar.bz2"))
  530. (sha256
  531. (base32
  532. "0v58in4rwk9fhjarjw6xfxpx5zz2z13sy3yvd14b5kr0884yw6sz"))))
  533. (build-system gnu-build-system)
  534. (arguments
  535. `(#:configure-flags
  536. (list (string-append "--with-boost="
  537. (assoc-ref %build-inputs "boost"))
  538. (string-append "--with-python-module-path="
  539. (assoc-ref %outputs "out")
  540. "/lib/python"
  541. ,(version-major+minor
  542. (package-version
  543. (car (assoc-ref
  544. (package-inputs this-package)
  545. "python"))))
  546. "/site-packages/"))))
  547. (native-inputs
  548. `(("gcc-10" ,gcc-10)
  549. ("ncurses" ,ncurses)
  550. ("pkg-config" ,pkg-config)))
  551. (inputs
  552. `(("boost" ,boost)
  553. ("cairomm" ,cairomm)
  554. ("cgal" ,cgal)
  555. ("expat" ,expat)
  556. ("gmp" ,gmp)
  557. ("gtk+" ,gtk+)
  558. ("python" ,python-wrapper)
  559. ("sparsehash" ,sparsehash)))
  560. (propagated-inputs
  561. `(("python-matplotlib" ,python-matplotlib)
  562. ("python-numpy" ,python-numpy)
  563. ("python-pycairo" ,python-pycairo)
  564. ("python-scipy" ,python-scipy)))
  565. (synopsis "Manipulate and analyze graphs with Python efficiently")
  566. (description "Graph-tool is an efficient Python module for manipulation
  567. and statistical analysis of graphs (a.k.a. networks). Contrary to most other
  568. Python modules with similar functionality, the core data structures and
  569. algorithms are implemented in C++, making extensive use of template
  570. metaprogramming, based heavily on the Boost Graph Library. This confers it a
  571. level of performance that is comparable (both in memory usage and computation
  572. time) to that of a pure C/C++ library.")
  573. (home-page "https://graph-tool.skewed.de/")
  574. (license license:lgpl3+)))