| 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 | (define-module (gnu packages graph)
|
| 35 | #:use-module ((guix licenses) #:prefix license:)
|
| 36 | #:use-module (guix build-system cmake)
|
| 37 | #:use-module (guix build-system gnu)
|
| 38 | #:use-module (guix build-system pyproject)
|
| 39 | #:use-module (guix build-system r)
|
| 40 | #:use-module (guix download)
|
| 41 | #:use-module (guix gexp)
|
| 42 | #:use-module (guix git-download)
|
| 43 | #:use-module (guix packages)
|
| 44 | #:use-module (guix utils)
|
| 45 | #:use-module (gnu packages)
|
| 46 | #:use-module (gnu packages autotools)
|
| 47 | #:use-module (gnu packages base)
|
| 48 | #:use-module (gnu packages bioconductor)
|
| 49 | #:use-module (gnu packages bioinformatics)
|
| 50 | #:use-module (gnu packages bison)
|
| 51 | #:use-module (gnu packages boost)
|
| 52 | #:use-module (gnu packages c)
|
| 53 | #:use-module (gnu packages check)
|
| 54 | #:use-module (gnu packages compression)
|
| 55 | #:use-module (gnu packages cran)
|
| 56 | #:use-module (gnu packages datastructures)
|
| 57 | #:use-module (gnu packages docbook)
|
| 58 | #:use-module (gnu packages compiler-tools)
|
| 59 | #:use-module (gnu packages fontutils)
|
| 60 | #:use-module (gnu packages gd)
|
| 61 | #:use-module (gnu packages graphics)
|
| 62 | #:use-module (gnu packages graphviz)
|
| 63 | #:use-module (gnu packages gtk)
|
| 64 | #:use-module (gnu packages image)
|
| 65 | #:use-module (gnu packages linux)
|
| 66 | #:use-module (gnu packages machine-learning)
|
| 67 | #:use-module (gnu packages maths)
|
| 68 | #:use-module (gnu packages mpi)
|
| 69 | #:use-module (gnu packages multiprecision)
|
| 70 | #:use-module (gnu packages ncurses)
|
| 71 | #:use-module (gnu packages pkg-config)
|
| 72 | #:use-module (gnu packages pretty-print)
|
| 73 | #:use-module (gnu packages python)
|
| 74 | #:use-module (gnu packages python-build)
|
| 75 | #:use-module (gnu packages python-check)
|
| 76 | #:use-module (gnu packages python-compression)
|
| 77 | #:use-module (gnu packages python-science)
|
| 78 | #:use-module (gnu packages python-web)
|
| 79 | #:use-module (gnu packages python-xyz)
|
| 80 | #:use-module (gnu packages qt)
|
| 81 | #:use-module (gnu packages statistics)
|
| 82 | #:use-module (gnu packages swig)
|
| 83 | #:use-module (gnu packages time)
|
| 84 | #:use-module (gnu packages xml))
|
| 85 |
|
| 86 | (define-public plfit
|
| 87 | (package
|
| 88 | (name "plfit")
|
| 89 | (version "0.9.4")
|
| 90 | (source (origin
|
| 91 | (method git-fetch)
|
| 92 | (uri (git-reference
|
| 93 | (url "https://github.com/ntamas/plfit")
|
| 94 | (commit version)))
|
| 95 | (file-name (git-file-name name version))
|
| 96 | (sha256
|
| 97 | (base32
|
| 98 | "042b60cnsz5wy27sz026xs0mnn9p58j46crgs78skncgkvzqyyc6"))))
|
| 99 | (build-system cmake-build-system)
|
| 100 | (arguments
|
| 101 | '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON")))
|
| 102 | (home-page "https://github.com/ntamas/plfit")
|
| 103 | (synopsis "Tool for fitting power-law distributions to empirical data")
|
| 104 | (description "The @command{plfit} command fits power-law distributions to
|
| 105 | empirical (discrete or continuous) data, according to the method of Clauset,
|
| 106 | Shalizi and Newman (@cite{Clauset A, Shalizi CR and Newman MEJ: Power-law
|
| 107 | distributions in empirical data. SIAM Review 51, 661-703 (2009)}).")
|
| 108 | (license license:gpl2+)))
|
| 109 |
|
| 110 | (define-public igraph
|
| 111 | (package
|
| 112 | (name "igraph")
|
| 113 | (version "0.10.15")
|
| 114 | (source
|
| 115 | (origin
|
| 116 | (method git-fetch)
|
| 117 | (uri (git-reference
|
| 118 | (url "https://github.com/igraph/igraph")
|
| 119 | (commit version)))
|
| 120 | (file-name (git-file-name name version))
|
| 121 | (modules '((guix build utils)
|
| 122 | (ice-9 ftw)
|
| 123 | (srfi srfi-26)))
|
| 124 | (snippet '(begin
|
| 125 |
|
| 126 | (delete-file-recursively "vendor")
|
| 127 | (delete-file-recursively "src/isomorphism/bliss")
|
| 128 | (substitute* '("src/CMakeLists.txt"
|
| 129 | "etc/cmake/benchmark_helpers.cmake")
|
| 130 | |
| 131 | ((".*_IS_VENDORED.*") "")
|
| 132 | ((".*add_sub.*isomorphism/bliss.*") "")
|
| 133 | (("(.*TARGETS.*)bliss(.*)cxsparse_vendored(.*)pcg(.*)"
|
| 134 | _ part1 part2 part3 part4)
|
| 135 | (string-append part1 part2 part3 part4))
|
| 136 | (("cxsparse_vendored") "cxsparse")
|
| 137 | ((" pcg ") " pcg_random "))
|
| 138 | (substitute* "CMakeLists.txt"
|
| 139 | (("add_sub.*vendor.*") ""))))
|
| 140 | (sha256
|
| 141 | (base32
|
| 142 | "0z9jqvl65j4z6brrjlfyykba2bs10az6dx6m8g41snlfnx21a82d"))))
|
| 143 | (build-system cmake-build-system)
|
| 144 | (arguments
|
| 145 | (list
|
| 146 | #:configure-flags
|
| 147 | #~(list "-DBUILD_SHARED_LIBS=ON"
|
| 148 | |
| 149 | |
| 150 | "-DIGRAPH_INTEGER_SIZE=64")
|
| 151 | #:modules '((guix build cmake-build-system)
|
| 152 | ((guix build gnu-build-system) #:prefix gnu:)
|
| 153 | (guix build utils))
|
| 154 | #:phases
|
| 155 | #~(modify-phases %standard-phases
|
| 156 | (add-after 'unpack 'version-file
|
| 157 | (lambda _
|
| 158 | (let ((port (open-file "IGRAPH_VERSION" "w")))
|
| 159 | (display #$version port)
|
| 160 | (close port))))
|
| 161 | (add-after 'unpack 'patch-suitesparse
|
| 162 | (lambda _
|
| 163 | (substitute* '("src/core/sparsemat.c"
|
| 164 | "include/igraph_sparsemat.h")
|
| 165 | (("<cs/cs\\.h>") "<cs.h>")
|
| 166 | (("cs_igraph") "cs_dl")
|
| 167 | (("__BEGIN_DECLS.*" all)
|
| 168 | (string-append all "\n#define CS_LONG\n")))))
|
| 169 | (add-after 'unpack 'patch-pcg
|
| 170 | (lambda _
|
| 171 | (substitute* '("src/random/rng_pcg32.c"
|
| 172 | "src/random/rng_pcg64.c")
|
| 173 | (("#include \"pcg/(.*)\"" _ name)
|
| 174 | (string-append "#include <" name ">")))))
|
| 175 | (add-after 'unpack 'patch-bliss
|
| 176 | (lambda _
|
| 177 | (substitute* "src/isomorphism/bliss.cc"
|
| 178 | (("#include \"bliss.*")
|
| 179 | (string-append
|
| 180 | "#include <bliss/graph.hh>\n"
|
| 181 | "#include <bliss/digraph.hh>\n")))))
|
| 182 | (add-after 'build 'build-doc
|
| 183 | (lambda _
|
| 184 | (invoke "cmake" "--build" "." "--target" "html")))
|
| 185 | (replace 'check (assoc-ref gnu:%standard-phases 'check))
|
| 186 | (add-after 'install 'install-doc
|
| 187 | (lambda _
|
| 188 | (copy-recursively
|
| 189 | "doc/html"
|
| 190 | (string-append #$output "/share/doc/"
|
| 191 | #$name "-" #$version "/html")))))))
|
| 192 | (native-inputs
|
| 193 | (list bison
|
| 194 | docbook-xml-4.3
|
| 195 | docbook-xsl
|
| 196 | flex
|
| 197 | pcg-c
|
| 198 | pkg-config
|
| 199 | |
| 200 | python
|
| 201 | source-highlight
|
| 202 | xmlto))
|
| 203 | (inputs
|
| 204 | (list arpack-ng
|
| 205 | bliss
|
| 206 | glpk
|
| 207 | |
| 208 | openblas
|
| 209 | plfit
|
| 210 | suitesparse-cxsparse))
|
| 211 | |
| 212 | (propagated-inputs (list libxml2))
|
| 213 | (home-page "https://igraph.org")
|
| 214 | (synopsis "Network analysis and visualization")
|
| 215 | (description
|
| 216 | "This package provides a library for the analysis of networks and graphs.
|
| 217 | It can handle large graphs very well and provides functions for generating
|
| 218 | random and regular graphs, graph visualization, centrality methods and much
|
| 219 | more.")
|
| 220 | (license license:gpl2+)))
|
| 221 |
|
| 222 | |
| 223 | |
| 224 | |
| 225 | (define-public igraph-for-r-rigraphlib
|
| 226 | (hidden-package
|
| 227 | (package
|
| 228 | (inherit igraph)
|
| 229 | (name "igraph")
|
| 230 | (version "1.0.1")
|
| 231 | (source
|
| 232 | (origin
|
| 233 | (inherit (package-source igraph))
|
| 234 | (patches '())
|
| 235 | (method git-fetch)
|
| 236 | (uri (git-reference
|
| 237 | (url "https://github.com/igraph/igraph")
|
| 238 | (commit version)))
|
| 239 | (file-name (git-file-name name version))
|
| 240 | (sha256
|
| 241 | (base32
|
| 242 | "01mynhbl2ph0gkc0zr5klwqvczwcimfs2kdn6didwg4k8gsrcxlr"))
|
| 243 | (modules '((guix build utils)
|
| 244 | (ice-9 ftw)
|
| 245 | (srfi srfi-26)))
|
| 246 | |
| 247 | (snippet '(begin
|
| 248 | (delete-file-recursively "src/isomorphism/bliss")
|
| 249 | (substitute* '("src/CMakeLists.txt"
|
| 250 | "etc/cmake/benchmark_helpers.cmake")
|
| 251 | |
| 252 | ((".*_IS_VENDORED.*") "")
|
| 253 | ((".*add_sub.*isomorphism/bliss.*") "")
|
| 254 | (("(.*TARGETS.*)bliss(.*)pcg(.*)"
|
| 255 | _ part1 part2 part3)
|
| 256 | (string-append part1 part2 part3))
|
| 257 | ((" pcg ") " pcg_random "))))))
|
| 258 | (arguments
|
| 259 | (substitute-keyword-arguments (package-arguments igraph)
|
| 260 | ((#:phases phases '%standard-phases)
|
| 261 | #~(modify-phases #$phases
|
| 262 | |
| 263 | |
| 264 | (delete 'patch-suitesparse)))
|
| 265 | ((#:configure-flags flags)
|
| 266 | #~(list "-DBUILD_SHARED_LIBS=ON"
|
| 267 | "-DIGRAPH_INFOMAP_SUPPORT=OFF"
|
| 268 | "-DCMAKE_C_FLAGS=-Wno-error=incompatible-pointer-types"
|
| 269 | |
| 270 | |
| 271 | "-DIGRAPH_INTEGER_SIZE=64"))))
|
| 272 | (inputs
|
| 273 | (modify-inputs (package-inputs igraph)
|
| 274 | (delete "suitesparse-cxsparse"))))))
|
| 275 |
|
| 276 | (define-public python-igraph
|
| 277 | (package
|
| 278 | (inherit igraph)
|
| 279 | (name "python-igraph")
|
| 280 | (version "0.11.8")
|
| 281 | (source (origin
|
| 282 | (method git-fetch)
|
| 283 | |
| 284 | (uri (git-reference
|
| 285 | (url "https://github.com/igraph/python-igraph")
|
| 286 | (commit version)))
|
| 287 | (file-name (git-file-name name version))
|
| 288 | (sha256
|
| 289 | (base32
|
| 290 | "1c73nypzm2apqqwzqxxhbh692h4ri2x8q4i8f7q2kwczz156v19k"))))
|
| 291 | (build-system pyproject-build-system)
|
| 292 | (arguments
|
| 293 | (list
|
| 294 | #:phases
|
| 295 | #~(modify-phases %standard-phases
|
| 296 | (add-after 'unpack 'specify-libigraph-location
|
| 297 | (lambda _
|
| 298 | (let ((igraph #$(this-package-input "igraph")))
|
| 299 | (substitute* "setup.py"
|
| 300 | (("(LIBIGRAPH_FALLBACK_INCLUDE_DIRS = ).*" _ var)
|
| 301 | (string-append
|
| 302 | var (format #f "[~s]~%"
|
| 303 | (string-append igraph "/include/igraph"))))
|
| 304 | (("(LIBIGRAPH_FALLBACK_LIBRARY_DIRS = ).*" _ var)
|
| 305 | (string-append
|
| 306 | var (format #f "[~s]~%"
|
| 307 | (string-append igraph "/lib")))))))))))
|
| 308 | (inputs (list igraph))
|
| 309 | (propagated-inputs
|
| 310 | (list python-texttable))
|
| 311 | (native-inputs
|
| 312 | (list python-pytest
|
| 313 | python-setuptools
|
| 314 | python-wheel))
|
| 315 | (home-page "https://igraph.org/python/")
|
| 316 | (synopsis "Python bindings for the igraph network analysis library")))
|
| 317 |
|
| 318 | (define-public r-rbiofabric
|
| 319 | (let ((commit "666c2ae8b0a537c006592d067fac6285f71890ac")
|
| 320 | (revision "1"))
|
| 321 | (package
|
| 322 | (name "r-rbiofabric")
|
| 323 | (version (string-append "0.3-" revision "." (string-take commit 7)))
|
| 324 | (source (origin
|
| 325 | (method git-fetch)
|
| 326 | (uri (git-reference
|
| 327 | (url "https://github.com/wjrl/RBioFabric")
|
| 328 | (commit commit)))
|
| 329 | (file-name (string-append name "-" version "-checkout"))
|
| 330 | (sha256
|
| 331 | (base32
|
| 332 | "1yahqrcrqpbcywv73y9rlmyz8apdnp08afialibrr93ch0p06f8z"))))
|
| 333 | (build-system r-build-system)
|
| 334 | (propagated-inputs
|
| 335 | (list r-igraph))
|
| 336 | (home-page "http://www.biofabric.org/")
|
| 337 | (synopsis "BioFabric network visualization")
|
| 338 | (description "This package provides an implementation of the function
|
| 339 | @code{bioFabric} for creating scalable network digrams where nodes are
|
| 340 | represented by horizontal lines, and edges are represented by vertical
|
| 341 | lines.")
|
| 342 | (license license:expat))))
|
| 343 |
|
| 344 | (define-public python-ece608-toposort
|
| 345 | |
| 346 | (let ((commit "c6c0187327de27139f58e944d488e025d901792c")
|
| 347 | (revision "0"))
|
| 348 | (package
|
| 349 | (name "python-ece608-toposort")
|
| 350 | (version (git-version "0.0.0" revision commit))
|
| 351 | (source
|
| 352 | (origin
|
| 353 | (method git-fetch)
|
| 354 | (uri (git-reference
|
| 355 | (url "https://github.com/suntosh/ece608-toposort")
|
| 356 | (commit commit)))
|
| 357 | (file-name (git-file-name name version))
|
| 358 | (sha256
|
| 359 | (base32 "1fs8mip83p7724yjnzrhxa4x3zyhx7x44jfyfy8vf3kp6nnrjg24"))))
|
| 360 | (build-system pyproject-build-system)
|
| 361 | (native-inputs
|
| 362 | (list python-hatchling python-pytest))
|
| 363 | (home-page "https://github.com/suntosh/ece608-toposort")
|
| 364 | (synopsis "Topological sorting of directed graphs")
|
| 365 | (description
|
| 366 | "This package provides a Python implementation of topological ordering
|
| 367 | of directed graphs by two independent routes - Kahn's algorithm and DFS
|
| 368 | reverse postorder - with cycle detection that tells you which nodes cycle, not
|
| 369 | merely that one exists.
|
| 370 |
|
| 371 | No runtime dependencies. The graph container is part of the package, in about
|
| 372 | 170 lines. That is a deliberate choice for a teaching implementation: the
|
| 373 | point is to show the algorithms, and a dependency on @code{networkx} would
|
| 374 | mean the interesting parts live in someone else's repository.")
|
| 375 | (license license:expat))))
|
| 376 |
|
| 377 | (define-public python-louvain
|
| 378 | |
| 379 | (let ((commit "def91793772c3e77ab4167d175903a5365c24b4b")
|
| 380 | (revision "0"))
|
| 381 | (package
|
| 382 | (name "python-louvain")
|
| 383 | (version (git-version "0.16" revision commit))
|
| 384 | (source
|
| 385 | (origin
|
| 386 | (method git-fetch)
|
| 387 | (uri (git-reference
|
| 388 | (url "https://github.com/taynaud/python-louvain")
|
| 389 | (commit commit)))
|
| 390 | (file-name (git-file-name name version))
|
| 391 | (sha256
|
| 392 | (base32 "014wzmwnbqgp1lrsc93p4mq3dqar01zv0v8cqrgm5jggvnskqn0c"))))
|
| 393 | (build-system pyproject-build-system)
|
| 394 | (arguments (list #:test-backend #~'unittest))
|
| 395 | (native-inputs (list python-setuptools))
|
| 396 | (propagated-inputs (list python-networkx python-numpy))
|
| 397 | (home-page "https://github.com/taynaud/python-louvain")
|
| 398 | (synopsis "Louvain algorithm for community detection")
|
| 399 | (description
|
| 400 | "This package provides a pure Python implementation of the Louvain
|
| 401 | algorithm for community detection in large networks.")
|
| 402 | (license license:bsd-3))))
|
| 403 |
|
| 404 | (define-public python-graphtools
|
| 405 | (package
|
| 406 | (name "python-graphtools")
|
| 407 | (version "2.1.0")
|
| 408 | (source
|
| 409 | (origin
|
| 410 | (method git-fetch)
|
| 411 | (uri (git-reference
|
| 412 | (url "https://github.com/KrishnaswamyLab/graphtools")
|
| 413 | (commit (string-append "v" version))))
|
| 414 | (file-name (git-file-name name version))
|
| 415 | (sha256
|
| 416 | (base32 "03zbdaqkg2ply7d0zr75rfjncg6xk45bamn1z6xpaqs9nh69hvk8"))))
|
| 417 | (build-system pyproject-build-system)
|
| 418 | (arguments
|
| 419 | (list
|
| 420 | |
| 421 | #:test-flags
|
| 422 | |
| 423 | #~(list "--deselect=test/test_mnn.py::test_mnn_graph_decay")
|
| 424 | #:phases
|
| 425 | #~(modify-phases %standard-phases
|
| 426 | (add-after 'unpack 'fix-pytest-config
|
| 427 | (lambda _
|
| 428 | (delete-file "pytest.ini"))))))
|
| 429 | (propagated-inputs
|
| 430 | (list python-deprecated
|
| 431 | python-future
|
| 432 | python-numpy
|
| 433 | python-pygsp
|
| 434 | python-scikit-learn
|
| 435 | python-scipy
|
| 436 | python-tasklogger))
|
| 437 | (native-inputs
|
| 438 | (list python-anndata
|
| 439 | python-igraph
|
| 440 | python-pandas
|
| 441 | python-parameterized
|
| 442 | python-pytest
|
| 443 | python-setuptools))
|
| 444 | (home-page "https://github.com/KrishnaswamyLab/graphtools")
|
| 445 | (synopsis "Tools for building and manipulating graphs in Python")
|
| 446 | (description "This package provides tools for building and manipulating
|
| 447 | graphs in Python.")
|
| 448 | (license license:gpl3)))
|
| 449 |
|
| 450 | (define-public python-louvain-igraph
|
| 451 | (package
|
| 452 | (name "python-louvain-igraph")
|
| 453 | (version "0.8.2")
|
| 454 | (source
|
| 455 | (origin
|
| 456 | (method git-fetch)
|
| 457 | (uri (git-reference
|
| 458 | (url "https://github.com/vtraag/louvain-igraph")
|
| 459 | (commit version)))
|
| 460 | (file-name (git-file-name name version))
|
| 461 | (sha256
|
| 462 | (base32
|
| 463 | "1aab6rnsnssi6wib939zy4vdzz3s2gcwwingn2dfjrijk05zjapv"))))
|
| 464 | (build-system pyproject-build-system)
|
| 465 | (arguments
|
| 466 | (list
|
| 467 | #:phases
|
| 468 | #~(modify-phases %standard-phases
|
| 469 | (add-after 'unpack 'find-igraph
|
| 470 | (lambda _
|
| 471 | (substitute* "setup.py"
|
| 472 | (("/usr/include/igraph")
|
| 473 | (string-append #$(this-package-input "igraph")
|
| 474 | "/include/igraph"))))))))
|
| 475 | (propagated-inputs (list python-igraph))
|
| 476 | (inputs (list igraph))
|
| 477 | (native-inputs
|
| 478 | (list pkg-config
|
| 479 | python-ddt
|
| 480 | python-pytest
|
| 481 | python-setuptools
|
| 482 | python-setuptools-scm))
|
| 483 | (home-page "https://github.com/vtraag/louvain-igraph")
|
| 484 | (synopsis "Implementation of the Louvain algorithm")
|
| 485 | (description "This package implements the Louvain algorithm for community
|
| 486 | detection in C++ and exposes it to Python. Besides the relative flexibility
|
| 487 | of the implementation, it also scales well, and can be run on graphs of
|
| 488 | millions of nodes (as long as they can fit in memory). The core function is
|
| 489 | @code{find_partition} which finds the optimal partition using the louvain
|
| 490 | algorithm for a number of different methods.")
|
| 491 | (license license:gpl3+)))
|
| 492 |
|
| 493 | (define-public python-pygsp
|
| 494 | (package
|
| 495 | (name "python-pygsp")
|
| 496 | (version "0.6.0")
|
| 497 | (source
|
| 498 | (origin
|
| 499 | (method url-fetch)
|
| 500 | (uri (pypi-uri "pygsp" version))
|
| 501 | (sha256
|
| 502 | (base32 "0zbyka8pvcy7rmw65cpkss2k6sn420k67wcrcp8nka36l9pjadam"))))
|
| 503 | (build-system pyproject-build-system)
|
| 504 | (arguments
|
| 505 | (list
|
| 506 | |
| 507 | #:test-flags
|
| 508 | |
| 509 | #~(list "--deselect=pygsp/tests/test_graphs.py::test_eigendecompositions"
|
| 510 | |
| 511 | "--deselect=pygsp/tests/test_graphs.py::test_nngraph"
|
| 512 | |
| 513 | "--deselect=pygsp/tests/test_plotting.py::TestGraphs::test_all_graphs")))
|
| 514 | (native-inputs
|
| 515 | (list python-matplotlib
|
| 516 | python-pytest
|
| 517 | python-pyunlocbox
|
| 518 | python-scikit-image
|
| 519 | python-setuptools))
|
| 520 | (propagated-inputs
|
| 521 | (list python-numpy
|
| 522 | python-scipy))
|
| 523 | (home-page "https://github.com/epfl-lts2/pygsp")
|
| 524 | (synopsis "Graph Signal Processing in Python")
|
| 525 | (description "The PyGSP is a Python package to ease signal processing on
|
| 526 | graphs.")
|
| 527 | (license license:bsd-3)))
|
| 528 |
|
| 529 | (define-public python-pyunlocbox
|
| 530 | (package
|
| 531 | (name "python-pyunlocbox")
|
| 532 | (version "0.6.1")
|
| 533 | (source
|
| 534 | (origin
|
| 535 | (method git-fetch)
|
| 536 | (uri (git-reference
|
| 537 | (url "https://github.com/epfl-lts2/pyunlocbox")
|
| 538 | (commit (string-append "v" version))))
|
| 539 | (file-name (git-file-name name version))
|
| 540 | (sha256
|
| 541 | (base32 "0pv3srpkyprp0vamlg1pgzqk5ws4ydjb8y9nabndjf2f8519kgv4"))))
|
| 542 | (build-system pyproject-build-system)
|
| 543 | (arguments
|
| 544 | (list
|
| 545 | |
| 546 | #:test-flags
|
| 547 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
|
| 548 | |
| 549 | "--deselect=pyunlocbox/tests/test_functions.py::TestFunctions::test_proj_b2")))
|
| 550 | (native-inputs
|
| 551 | (list python-pytest
|
| 552 | python-pytest-xdist
|
| 553 | python-setuptools
|
| 554 | python-setuptools-scm))
|
| 555 | (propagated-inputs
|
| 556 | (list python-numpy
|
| 557 | python-pytest-cov |
| 558 | python-scipy))
|
| 559 | (home-page "https://github.com/epfl-lts2/pyunlocbox")
|
| 560 | (synopsis "Convex Optimization in Python using Proximal Splitting")
|
| 561 | (description
|
| 562 | "PyUNLocBoX uses @url{https://en.wikipedia.org/wiki/Proximal_gradient_method,
|
| 563 | proximal splitting methods} to solve non-differentiable convex optimization
|
| 564 | problems.")
|
| 565 | (license license:bsd-3)))
|
| 566 |
|
| 567 | (define-public qvge
|
| 568 | (package
|
| 569 | (name "qvge")
|
| 570 | (version "0.7.0")
|
| 571 | (source
|
| 572 | (origin
|
| 573 | (method git-fetch)
|
| 574 | (uri (git-reference
|
| 575 | (url "https://github.com/ArsMasiuk/qvge")
|
| 576 | (commit (string-append "v" version))))
|
| 577 | (file-name (git-file-name name version))
|
| 578 | (sha256
|
| 579 | (base32 "1mijb0yr71xh9cq43vflbhz6zp1qvhjmvzrs2pbxka63hqk60pfk"))))
|
| 580 | (build-system gnu-build-system)
|
| 581 | (arguments
|
| 582 | (list
|
| 583 | #:configure-flags
|
| 584 | #~(list (string-append "PREFIX=" #$output))
|
| 585 | #:phases
|
| 586 | #~(modify-phases %standard-phases
|
| 587 | (replace 'configure
|
| 588 | (lambda* (#:key (configure-flags '())
|
| 589 | #:allow-other-keys)
|
| 590 | (chdir "src")
|
| 591 | (apply invoke "qmake" "-r" configure-flags))))))
|
| 592 | (inputs
|
| 593 | (list qtbase-5
|
| 594 | qtsvg-5
|
| 595 | qtx11extras))
|
| 596 | (home-page "https://arsmasiuk.github.io/qvge/")
|
| 597 | (synopsis "Visual graph editor")
|
| 598 | (description
|
| 599 | "QVGE is a multiplatform graph editor written in C++/Qt. Its main goal
|
| 600 | is to make possible visually edit two-dimensional graphs in a simple and
|
| 601 | intuitive way.")
|
| 602 | (license license:expat)))
|
| 603 |
|
| 604 | (define-public faiss
|
| 605 | (package
|
| 606 | (name "faiss")
|
| 607 | (version "1.10.0")
|
| 608 | (source
|
| 609 | (origin
|
| 610 | (method git-fetch)
|
| 611 | (uri (git-reference
|
| 612 | (url "https://github.com/facebookresearch/faiss")
|
| 613 | (commit (string-append "v" version))))
|
| 614 | (file-name (git-file-name name version))
|
| 615 | (sha256
|
| 616 | (base32
|
| 617 | "1x6z94f6vhh7ppsn7wll46k7i63lzcnc3r3rv5zfarljybqhrsjd"))
|
| 618 | |
| 619 | |
| 620 | (modules '((guix build utils)))
|
| 621 | (snippet #~(begin
|
| 622 | (delete-file-recursively "perf_tests")
|
| 623 | (substitute* "CMakeLists.txt"
|
| 624 | (("add_subdirectory\\(perf_tests\\)") ""))))
|
| 625 | (patches
|
| 626 | (search-patches "faiss-tests-CMakeLists-find-googletest.patch"))))
|
| 627 | (build-system cmake-build-system)
|
| 628 | (arguments
|
| 629 | (list #:configure-flags
|
| 630 | #~'("-DFAISS_ENABLE_C_API=ON"
|
| 631 | "-DFAISS_ENABLE_GPU=OFF" |
| 632 | "-DFAISS_ENABLE_PYTHON=OFF"
|
| 633 | "-DBUILD_SHARED_LIBS=ON")))
|
| 634 | (inputs
|
| 635 | (list openblas))
|
| 636 | (native-inputs
|
| 637 | (list googletest openmpi))
|
| 638 | (home-page "https://github.com/facebookresearch/faiss")
|
| 639 | (synopsis "Efficient similarity search and clustering of dense vectors")
|
| 640 | (description "Faiss is a library for efficient similarity search and
|
| 641 | clustering of dense vectors. It contains algorithms that search in sets of
|
| 642 | vectors of any size, up to ones that possibly do not fit in RAM. It also
|
| 643 | contains supporting code for evaluation and parameter tuning.")
|
| 644 | (license license:bsd-3)))
|
| 645 |
|
| 646 | (define-public faiss-for-go-faiss
|
| 647 | (let ((commit "608356b7c9630e891ff87cc49cc7bb460c3870d3")
|
| 648 | (revision "0"))
|
| 649 | (package
|
| 650 | (inherit faiss)
|
| 651 | (name "faiss-for-go-faiss")
|
| 652 | (version (git-version "1.11.0" revision commit))
|
| 653 | (source
|
| 654 | (origin
|
| 655 | (inherit (package-source faiss))
|
| 656 | (uri (git-reference
|
| 657 | (url "https://github.com/blevesearch/faiss")
|
| 658 | (commit commit)))
|
| 659 | (file-name (git-file-name name version))
|
| 660 | (sha256
|
| 661 | (base32 "0m0hyqn9db0xdbvan0lin7xf11dl4xdpjwwpagw01hl4z72w3al0"))))
|
| 662 | (arguments
|
| 663 | (substitute-keyword-arguments arguments
|
| 664 | ((#:configure-flags flags '())
|
| 665 | |
| 666 | #~(cons "-DCMAKE_CXX_FLAGS=-fpermissive"
|
| 667 | #$flags))
|
| 668 | ((#:test-exclude test-exclude #f)
|
| 669 | "Threading.openmp|IVF.list_context")
|
| 670 | ((#:phases phases #~%standard-phases)
|
| 671 | #~(modify-phases #$phases
|
| 672 | (add-after 'unpack 'fix-bugs
|
| 673 | (lambda _
|
| 674 | |
| 675 | (substitute* "c_api/CMakeLists.txt"
|
| 676 | (("add_library\\(faiss_c [^\n]*" line)
|
| 677 | (string-append line "\n"
|
| 678 | "target_include_directories(faiss_c PRIVATE ${CMAKE_SOURCE_DIR})\n")))
|
| 679 | |
| 680 | (substitute* "tests/test_hamming.cpp"
|
| 681 | (("\\{na, k, ids_ham_knn.data[^\n]*" all)
|
| 682 | (string-append "faiss::int_maxheap_array_t" all)))))))))
|
| 683 | (description "This package provides an alternative build of Faiss.")
|
| 684 | (license (list license:bsd-3 |
| 685 | license:expat))))) |
| 686 |
|
| 687 | (define-public python-faiss
|
| 688 | (package (inherit faiss)
|
| 689 | (name "python-faiss")
|
| 690 | (build-system cmake-build-system)
|
| 691 | (arguments
|
| 692 | (list
|
| 693 | #:imported-modules (append %cmake-build-system-modules
|
| 694 | %pyproject-build-system-modules)
|
| 695 | #:modules '((guix build cmake-build-system)
|
| 696 | ((guix build pyproject-build-system) #:prefix py:)
|
| 697 | (guix build utils))
|
| 698 | #:phases
|
| 699 | (with-extensions (list (pyproject-guile-json))
|
| 700 | #~(modify-phases %standard-phases
|
| 701 | (add-after 'unpack 'chdir
|
| 702 | (lambda _
|
| 703 | (chdir "faiss/python")))
|
| 704 | (add-before 'install 'python-build
|
| 705 | (assoc-ref py:%standard-phases 'build))
|
| 706 | (replace 'install
|
| 707 | (assoc-ref py:%standard-phases 'install))
|
| 708 | (add-after 'install 'cleanup
|
| 709 | (lambda _
|
| 710 | (let ((external "_*faiss_example_external_module\\.(so|py)$"))
|
| 711 | (for-each delete-file (find-files #$output external)))))
|
| 712 | |
| 713 | (delete 'check)
|
| 714 | (add-after 'install 'check
|
| 715 | (lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
| 716 | (if tests?
|
| 717 | (with-directory-excursion "../../tests"
|
| 718 | (setenv "PYTHONPATH"
|
| 719 | (string-append (py:site-packages inputs outputs)
|
| 720 | ":" (getenv "GUIX_PYTHONPATH")))
|
| 721 | (let ((ignored '( |
| 722 | "./external_module_test.py"
|
| 723 | |
| 724 | "./torch_test_contrib.py"
|
| 725 | "./torch_test_neural_net.py")))
|
| 726 | (for-each
|
| 727 | (lambda (file)
|
| 728 | (invoke "python" file))
|
| 729 | (find-files "." (lambda (file stat)
|
| 730 | (and (string-suffix? ".py" file)
|
| 731 | (not (member file ignored))))))))
|
| 732 | (format #t "test suite not run~%"))))))))
|
| 733 | (native-inputs
|
| 734 | (list python-scipy python-setuptools))
|
| 735 | (inputs
|
| 736 | (list faiss openblas python-wrapper swig-4.4))
|
| 737 | (propagated-inputs
|
| 738 | (list python-numpy))
|
| 739 | (description "Faiss is a library for efficient similarity search and
|
| 740 | clustering of dense vectors. This package provides Python bindings to the
|
| 741 | Faiss library.")))
|
| 742 |
|
| 743 | (define-public lemon-graph
|
| 744 | (package
|
| 745 | (name "lemon-graph")
|
| 746 | (version "1.3.1.1")
|
| 747 | (source
|
| 748 | (origin
|
| 749 | (method git-fetch)
|
| 750 | (uri (git-reference
|
| 751 | |
| 752 | (url "https://github.com/The-OpenROAD-Project/lemon-graph")
|
| 753 | (commit version)))
|
| 754 | (file-name (git-file-name name version))
|
| 755 | (sha256
|
| 756 | (base32 "0j4vwyghlcsyzbr3f8fm99zdl5zr25d2799ahbq0z9057brgm7r0"))))
|
| 757 | (build-system cmake-build-system)
|
| 758 | (arguments
|
| 759 | (list
|
| 760 | #:configure-flags
|
| 761 | #~(list "-DLEMON_ENABLE_COIN=OFF"
|
| 762 | "-DLEMON_ENABLE_GLPK=OFF"
|
| 763 | "-DLEMON_ENABLE_ILOG=OFF"
|
| 764 | "-DLEMON_ENABLE_SOPLEX=OFF")
|
| 765 | #:phases
|
| 766 | #~(modify-phases %standard-phases
|
| 767 | (add-after 'unpack 'fix-tests
|
| 768 | (lambda _
|
| 769 | |
| 770 | (substitute* "test/maps_test.cc"
|
| 771 | (("distance")
|
| 772 | "std::distance"))))
|
| 773 | (replace 'check
|
| 774 | (lambda* (#:key tests? #:allow-other-keys)
|
| 775 | (when tests?
|
| 776 | (invoke "make" "check")))))))
|
| 777 | (native-inputs (list python-minimal-wrapper))
|
| 778 | (home-page "https://lemon.cs.elte.hu/trac/lemon")
|
| 779 | (synopsis "C++ library of optimized algorithms and data structures")
|
| 780 | (description
|
| 781 | "@acronym{LEMON, Library for Efficient Modeling and Optimization in
|
| 782 | Networks} is a C++ template library providing efficient implementations of
|
| 783 | common data structures and algorithms with focus on combinatorial optimization
|
| 784 | tasks connected mainly with graphs and networks. This is the OpenROAD
|
| 785 | Project's fork with C++20 compatibility fixes.")
|
| 786 | (license license:boost1.0)))
|
| 787 |
|
| 788 | (define-public libleidenalg
|
| 789 | (package
|
| 790 | (name "libleidenalg")
|
| 791 | (version "0.11.1")
|
| 792 | (source (origin
|
| 793 | (method git-fetch)
|
| 794 | (uri (git-reference
|
| 795 | (url "https://github.com/vtraag/libleidenalg")
|
| 796 | (commit version)))
|
| 797 | (file-name (git-file-name name version))
|
| 798 | (sha256
|
| 799 | (base32
|
| 800 | "0fqy79yrgnrifhyc2lys5jv84siq01ph6038qyz7qagl1yq5gdw8"))))
|
| 801 | (build-system cmake-build-system)
|
| 802 | (arguments
|
| 803 | (list
|
| 804 | #:tests? #f |
| 805 | #:phases
|
| 806 | #~(modify-phases %standard-phases
|
| 807 | (add-after 'unpack 'version-file
|
| 808 | (lambda _
|
| 809 | (let ((port (open-file "VERSION" "w")))
|
| 810 | (display #$version port)
|
| 811 | (close port)))))))
|
| 812 | (inputs (list igraph))
|
| 813 | (home-page "https://github.com/vtraag/libleidenalg")
|
| 814 | (synopsis "Community detection in large networks")
|
| 815 | (description "Leiden is a general algorithm for methods of community
|
| 816 | detection in large networks and is an extension of the Louvain algorithm.
|
| 817 | This package implements the Leiden algorithm in C++ and can be run on graphs
|
| 818 | of millions of nodes (as long as they can fit in memory).")
|
| 819 | (license license:gpl3+)))
|
| 820 |
|
| 821 | (define-public python-leidenalg
|
| 822 | (package
|
| 823 | (name "python-leidenalg")
|
| 824 | (version "0.10.2")
|
| 825 | (source
|
| 826 | (origin
|
| 827 | (method git-fetch) |
| 828 | (uri (git-reference
|
| 829 | (url "https://github.com/vtraag/leidenalg")
|
| 830 | (commit version)))
|
| 831 | (file-name (git-file-name name version))
|
| 832 | (sha256
|
| 833 | (base32 "0p46g8drpnsciphy3iagrkagzh8hi3l5xmdab00q9z812bwdb951"))))
|
| 834 | (build-system pyproject-build-system)
|
| 835 | (native-inputs
|
| 836 | (list pkg-config
|
| 837 | python-ddt
|
| 838 | python-pytest
|
| 839 | python-setuptools
|
| 840 | python-setuptools-scm
|
| 841 | python-wheel))
|
| 842 | (inputs
|
| 843 | (list igraph
|
| 844 | libleidenalg))
|
| 845 | (propagated-inputs
|
| 846 | (list python-igraph))
|
| 847 | (home-page "https://github.com/vtraag/leidenalg")
|
| 848 | (synopsis "Community detection in large networks")
|
| 849 | (description
|
| 850 | "Leiden is a general algorithm for methods of community detection in
|
| 851 | large networks and is an extension of the Louvain algorithm. This packages
|
| 852 | provides a Python wrapper to the C++ implementation.")
|
| 853 | (license license:gpl3+)))
|
| 854 |
|
| 855 | (define-public edge-addition-planarity-suite
|
| 856 | (package
|
| 857 | (name "edge-addition-planarity-suite")
|
| 858 | (version "3.0.2.0")
|
| 859 | (source
|
| 860 | (origin
|
| 861 | (method git-fetch)
|
| 862 | (uri (git-reference
|
| 863 | (url (string-append "https://github.com/graph-algorithms/"
|
| 864 | name))
|
| 865 | (commit (string-append "Version_" version))))
|
| 866 | (file-name (git-file-name name version))
|
| 867 | (sha256
|
| 868 | (base32
|
| 869 | "1c7bnxgiz28mqsq3a3msznmjq629w0qqjynm2rqnnjn2qpc22h3i"))))
|
| 870 | (build-system gnu-build-system)
|
| 871 | (native-inputs
|
| 872 | (list autoconf automake libtool))
|
| 873 | (synopsis "Embedding of planar graphs")
|
| 874 | (description "The package provides a reference implementation of the
|
| 875 | linear time edge addition algorithm for embedding planar graphs and
|
| 876 | isolating planarity obstructions.")
|
| 877 | (license license:bsd-3)
|
| 878 | (home-page
|
| 879 | "https://github.com/graph-algorithms/edge-addition-planarity-suite")))
|
| 880 |
|
| 881 | (define-public plantri
|
| 882 | (package
|
| 883 | (name "plantri")
|
| 884 | (version "5.5")
|
| 885 | (source (origin
|
| 886 | (method url-fetch)
|
| 887 | (uri (string-append "https://users.cecs.anu.edu.au/~bdm/plantri/"
|
| 888 | "plantri" (string-join
|
| 889 | (string-split version #\.)
|
| 890 | "") ".tar.gz"))
|
| 891 | (sha256
|
| 892 | (base32
|
| 893 | "1vbxpjih293d9nmb65fsh6xgg0w12kygwycg1yw4wad7ridxy74i"))))
|
| 894 | (build-system gnu-build-system)
|
| 895 | (arguments
|
| 896 | (list
|
| 897 | #:tests? #f |
| 898 | #:phases #~(modify-phases %standard-phases
|
| 899 | (delete 'configure)
|
| 900 | (replace 'install
|
| 901 | (lambda _
|
| 902 | (for-each
|
| 903 | (lambda (bin)
|
| 904 | (install-file bin (string-append #$output "/bin")))
|
| 905 | '("fullgen" "plantri")))))))
|
| 906 | (home-page "https://users.cecs.anu.edu.au/~bdm/plantri/")
|
| 907 | (synopsis "Generate certain types of planar graphs")
|
| 908 | (description
|
| 909 | "@code{plantri} and @code{fullgen} (contained in the same package)
|
| 910 | are programs for the generation of certain types of planar graphs. Graphs
|
| 911 | are generated in such a way that exactly one member of each isomorphism
|
| 912 | class is output without the need for storing them.")
|
| 913 | (license license:asl2.0)))
|
| 914 |
|
| 915 | (define-public rw
|
| 916 | (package
|
| 917 | (name "rw")
|
| 918 | |
| 919 | |
| 920 | (version "0.9")
|
| 921 | (source (origin
|
| 922 | (method url-fetch)
|
| 923 | (uri (string-append "mirror://sourceforge/rankwidth/"
|
| 924 | "rw-" version ".tar.gz"))
|
| 925 | (sha256
|
| 926 | (base32
|
| 927 | "0hdlxxmlccb6fp7g58zv0rdzpbyjn9bgqlf052sgrk95zq33bq61"))
|
| 928 | (patches (search-patches "rw-igraph-0.10.patch"))))
|
| 929 | (build-system gnu-build-system)
|
| 930 | (native-inputs (list pkg-config))
|
| 931 | (inputs (list igraph))
|
| 932 | (home-page "https://sourceforge.net/projects/rankwidth/")
|
| 933 | (synopsis "Rank-width and rank-decomposition of graphs")
|
| 934 | (description "rw computes rank-width and rank-decompositions
|
| 935 | of graphs.")
|
| 936 | (license license:gpl2+)))
|
| 937 |
|
| 938 | (define-public mscgen
|
| 939 | (package
|
| 940 | (name "mscgen")
|
| 941 | (version "0.20")
|
| 942 | (source
|
| 943 | (origin
|
| 944 | (method url-fetch)
|
| 945 | (uri (string-append "http://www.mcternan.me.uk/mscgen/software/mscgen-src-"
|
| 946 | version ".tar.gz"))
|
| 947 | (sha256
|
| 948 | (base32
|
| 949 | "08yw3maxhn5fl1lff81gmcrpa4j9aas4mmby1g9w5qcr0np82d1w"))))
|
| 950 | (build-system gnu-build-system)
|
| 951 | (native-inputs
|
| 952 | (list pkg-config))
|
| 953 | (inputs
|
| 954 | (list fontconfig freetype gd libjpeg-turbo libpng zlib))
|
| 955 | (home-page "https://www.mcternan.me.uk/mscgen/")
|
| 956 | (synopsis "Message Sequence Chart Generator")
|
| 957 | (description "Mscgen is a small program that parses Message Sequence Chart
|
| 958 | descriptions and produces PNG, SVG, EPS or server side image maps (ismaps) as
|
| 959 | the output. Message Sequence Charts (MSCs) are a way of representing entities
|
| 960 | and interactions over some time period and are often used in combination with
|
| 961 | SDL. MSCs are popular in Telecoms to specify how protocols operate although
|
| 962 | MSCs need not be complicated to create or use. Mscgen aims to provide a simple
|
| 963 | text language that is clear to create, edit and understand, which can also be
|
| 964 | transformed into common image formats for display or printing.")
|
| 965 | (license license:gpl2+)))
|
| 966 |
|
| 967 | (define-public python-graph-tool
|
| 968 | (package
|
| 969 | (name "python-graph-tool")
|
| 970 | (version "2.98")
|
| 971 | (source (origin
|
| 972 | (method url-fetch)
|
| 973 | (uri (string-append
|
| 974 | "https://downloads.skewed.de/graph-tool/graph-tool-"
|
| 975 | version ".tar.bz2"))
|
| 976 | (sha256
|
| 977 | (base32
|
| 978 | "09y5djq70y73anfmx50xalvg1s6pqvh5zrzf94vh8pvzjf5r9wgf"))))
|
| 979 | (build-system gnu-build-system)
|
| 980 | (arguments
|
| 981 | (list
|
| 982 | |
| 983 | #:parallel-build? #f
|
| 984 | #:configure-flags
|
| 985 | #~(list (string-append "--with-boost=" #$(this-package-input "boost"))
|
| 986 | (string-append "--with-python-module-path=" #$output "/lib/python"
|
| 987 | #$(version-major+minor (package-version python))
|
| 988 | "/site-packages"))))
|
| 989 | (native-inputs
|
| 990 | (list ncurses pkg-config))
|
| 991 | (inputs
|
| 992 | (list boost-1.83
|
| 993 | cairomm-1.14
|
| 994 | cgal-5
|
| 995 | expat
|
| 996 | gmp
|
| 997 | gtk+
|
| 998 | python-wrapper
|
| 999 | sparsehash))
|
| 1000 | (propagated-inputs
|
| 1001 | (list python-matplotlib
|
| 1002 | python-numpy
|
| 1003 | python-pycairo
|
| 1004 | python-scipy
|
| 1005 | python-zstandard))
|
| 1006 | (synopsis "Manipulate and analyze graphs with Python efficiently")
|
| 1007 | (description "Graph-tool is an efficient Python module for manipulation
|
| 1008 | and statistical analysis of graphs (a.k.a. networks). Contrary to most other
|
| 1009 | Python modules with similar functionality, the core data structures and
|
| 1010 | algorithms are implemented in C++, making extensive use of template
|
| 1011 | metaprogramming, based heavily on the Boost Graph Library. This confers it a
|
| 1012 | level of performance that is comparable (both in memory usage and computation
|
| 1013 | time) to that of a pure C/C++ library.")
|
| 1014 | (home-page "https://graph-tool.skewed.de/")
|
| 1015 | (license license:lgpl3+)))
|