Add GTNetS (2009).

* modules/past/packages/simgrid.scm (S, gtnets-source)
(gtnets-zipball, gtnets-patch-tarball, gtnets): New variables.
parent a4afdca4
Pipeline #155677 failed with stages
in 26 seconds
......@@ -17,7 +17,9 @@
;;; along with Guix Past. If not, see <http://www.gnu.org/licenses/>.
(define-module (past packages simgrid)
#:use-module (gnu)
#:use-module (guix)
#:use-module (guix svn-download)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:))
......@@ -47,3 +49,112 @@ distributed systems such as grids, \"clouds\", HPC, and P2P systems. It can
be used to evaluate heuristics, prototype applications or even assess legacy
MPI applications.")
(license license:lgpl2.1+)))
;;; What follows is a 2009 variant of GTNetS tailored for the purposes of
;;; <https://github.com/ReScience/submissions/issues/39>.
(define S specification->package)
(define gtnets-source
;; This Subversion checkout contains a zip file, the GTNetS source, along
;; with a tarball containing patches.
(origin
(method svn-fetch)
(uri (svn-reference
(url "svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/")
(revision 7017)))
(file-name "gtnets-simgrid-checkout")
(sha256
(base32
"1inll6z4fvafcr1jh8knpswpxzzfdqbdxdplib8ivxvfwxp992xw"))))
(define gtnets-zipball
;; The zip file containing the original gtnets source. Here we make it
;; content-addressed (with #:hash) so it can be downloaded from Software
;; Heritage as a fallback.
(computed-file "gtnets-current.zip"
#~(copy-file #+(file-append gtnets-source
"/gtnets-current.zip")
#$output)
#:options
(list #:hash-algo 'sha256
#:hash
(base32
"1l06aalr925xnzxrlz3f3gc40hs6ac9w0z21vqyr9fljs71301h8"))))
(define gtnets-patch-tarball
;; Tarball containing patches.
(computed-file "gtnets-current-patch.tgz"
#~(copy-file #+(file-append gtnets-source
"/gtnets-current-patch.tgz")
#$output)
#:options
(list #:hash-algo 'sha256
#:hash
(base32
"16p8vrzhy1266l4pfyahcw4iccg3b9izdh3qp2fwh33kwkyjkcz3"))))
(define-public gtnets
(package
(name "gtnets")
(version "0")
(source gtnets-zipball)
(build-system gnu-build-system)
(arguments
;; Here we roughly follow the build instructions from the Dockerfile in
;; <https://github.com/ReScience/submissions/issues/39>.
'(#:phases (modify-phases %standard-phases
(add-before 'configure 'apply-patches
(lambda* (#:key inputs #:allow-other-keys)
;; Extract the patches
(let ((patches (assoc-ref inputs "patches")))
(invoke "tar" "xvf" patches)
(for-each (lambda (patch)
(invoke "patch" "-p1" "--batch"
"-i" patch))
(find-files "." "\\.patch$"))
#t)))
(replace 'configure
(lambda _
(delete-file "Makefile")
(symlink "Makefile.linux" "Makefile")
(substitute* "Makefile"
(("g\\+\\+")
"g++ -std=c++98 -fpermissive"))
#t))
(replace 'build
(lambda _
;; Build the library only (there's a GUI requiring Qt
;; that we don't build.)
(invoke "make" "libgtsim-opt.so" "-j"
(number->string (parallel-job-count)))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
;; Install the library and header.
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(include (string-append out "/include")))
(mkdir-p lib)
(copy-file "libgtsim-opt.so"
(string-append lib "/libgtnets.so"))
(for-each (lambda (header)
(install-file header include))
(find-files "SRC" "\\.h$"))
#t))))
#:tests? #f)) ;there are no tests
(native-inputs
`(("unzip" ,(S "unzip"))
("patches" ,gtnets-patch-tarball)))
(home-page "https://simgrid.org")
(synopsis "Network simulation environment (2009 version)")
(description
"The Georgia Tech Network Simulator (GTNets) is designed to allow
network researchers to conduct simulation-based experiments to observe the
behavior of moderate to large scale computer networks under a variety of
conditions. The GTNets environment allows the creation of simulation network
topologies (consisting of nodes and their associated communication links),
and end–user applications describing the flow of data over the simulated
topology.")
(license license:gpl2+)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment