-
Notifications
You must be signed in to change notification settings - Fork 0
/
guix.scm
74 lines (71 loc) · 2.39 KB
/
guix.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
;; This file defines a guix package.
;; You can use it to launch an interactive development shell with
;; ```
;; guix shell
;; ```
;; or to build the package with
;; ```
;; guix build -f guix.scm
;; ```
(define-module (gnu packages dune-dpg)
#:use-module (srfi srfi-1)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages boost)
#:use-module (gnu packages gcc)
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python))
(define %source-dir (dirname (current-filename)))
(define-public dune-dpg
(package
(name "dune-dpg")
(version "git")
(source (local-file %source-dir
#:recursive? #t
#:select? (git-predicate %source-dir)))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DINSTALL_EXAMPLES=ON")
#:phases
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags parallel-build? #:allow-other-keys)
(apply invoke "make" "build_tests"
`(,@(if parallel-build?
`("-j" ,(number->string (parallel-job-count)))
'())
,@make-flags)))))))
(inputs
(list dune-common
dune-geometry
dune-istl
dune-localfunctions
dune-functions
dune-typetree
dune-grid
dune-subgrid
boost
eigen
python
suitesparse
metis
openblas
gmp))
(native-inputs
(list gfortran pkg-config))
(home-page "https://gitlab.dune-project.org/felix.gruber/dune-dpg")
(synopsis "Discontinuous Petrov–Galerkin finite element solver")
(description "The dune-dpg library allows to solve partial differential
equations using the Discontinuous Petrov–Galerkin finite element method.")
;; GPL version 2 with "runtime exception" to make it behave like LGPLv2.
(license license:gpl2+)))
;; Return the dune-dpg package to make it easier to use with guix shell.
dune-dpg