summaryrefslogtreecommitdiff
path: root/packages/glpk
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-03-03 17:32:57 +0100
committerNiklas Hambüchen <mail@nh2.me>2017-03-03 17:32:57 +0100
commitbd722cbf3da9d290d0b6d6fc3c900efb914b417f (patch)
tree99421ec16e1451ec754a2922b9b1a8fef87df1ba /packages/glpk
parentd2d0066d2ff3d8e66ce902ee1b9d1317f1710a2c (diff)
Add disable-default-paths flags.
This makes it possible to disable hmatrix's usage of hardcoded default paths like /usr/..., which is important for hermetic builds such as on nix.
Diffstat (limited to 'packages/glpk')
-rw-r--r--packages/glpk/hmatrix-glpk.cabal16
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/glpk/hmatrix-glpk.cabal b/packages/glpk/hmatrix-glpk.cabal
index 7453398..6b0032b 100644
--- a/packages/glpk/hmatrix-glpk.cabal
+++ b/packages/glpk/hmatrix-glpk.cabal
@@ -22,6 +22,11 @@ extra-source-files: examples/simplex1.hs
22 examples/simplex4.hs 22 examples/simplex4.hs
23 examples/simplex5.hs 23 examples/simplex5.hs
24 24
25flag disable-default-paths
26 description: When enabled, don't add default hardcoded include/link dirs by default. Needed for hermetic builds like in nix.
27 default: False
28 manual: True
29
25library 30library
26 Build-Depends: base <5, hmatrix >= 0.17, containers 31 Build-Depends: base <5, hmatrix >= 0.17, containers
27 32
@@ -37,11 +42,12 @@ library
37 extra-libraries: glpk 42 extra-libraries: glpk
38 43
39 if os(OSX) 44 if os(OSX)
40 extra-lib-dirs: /usr/lib 45 if !flag(disable-default-paths)
41 extra-lib-dirs: /opt/local/lib/ 46 extra-lib-dirs: /usr/lib
42 include-dirs: /opt/local/include/ 47 extra-lib-dirs: /opt/local/lib/
43 extra-lib-dirs: /usr/local/lib/ 48 include-dirs: /opt/local/include/
44 include-dirs: /usr/local/include/ 49 extra-lib-dirs: /usr/local/lib/
50 include-dirs: /usr/local/include/
45 if arch(i386) 51 if arch(i386)
46 cc-options: -arch i386 52 cc-options: -arch i386
47 53