Skip to content

Commit

Permalink
Make repository's packages build on Windows 10
Browse files Browse the repository at this point in the history
The changes proposed in this pull request allow the respository's packages to be built on Windows 10 version 2004, with:

`stack --resolver nightly-2020-07-24 build --flag hmatrix:openblas`

See the discussion, including about the use of MSYS2 packages and import libraries, at: haskell-numerics#236

The `.gitignore` file is also updated to exclude `.stack-work`.
  • Loading branch information
mpilgrem committed Jul 26, 2020
1 parent 6b57a74 commit 6477dbb
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ title.md
/base-reinstall.sh
.cabal-sandbox
cabal.sandbox.config

# The Haskell Tool Stack-related
.stack-work
3 changes: 1 addition & 2 deletions examples/examples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ cabal-version: >=1.10

executable vectorShow
main-is: VectorShow.hs
build-depends: base >=4.10 && <4.11,
build-depends: base >=4.10 && <5,
hmatrix,
hmatrix-gsl
default-language: Haskell2010

3 changes: 1 addition & 2 deletions packages/base/hmatrix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ library

if os(windows)
if flag(openblas)
extra-libraries: libopenblas, libgcc_s_seh-1, libgfortran, libquadmath-0
extra-libraries: openblas, gcc_s
else
extra-libraries: blas lapack

Expand All @@ -159,4 +159,3 @@ library
source-repository head
type: git
location: https://github.com/albertoruiz/hmatrix

3 changes: 1 addition & 2 deletions packages/gsl/hmatrix-gsl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ library
extra-libraries: gsl

if os(windows)
extra-libraries: gsl-0
extra-libraries: gsl

if os(linux)
if arch(x86_64)
Expand All @@ -98,4 +98,3 @@ library
source-repository head
type: git
location: https://github.com/albertoruiz/hmatrix

26 changes: 26 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: diagrams-rasterific-1.4@sha256:725c29db134366d2c1e5e95b5e5f1ed6f364f04753e906773a81f84447709078,2027
pantry-tree:
size: 1212
sha256: 3b0c20d9f5cb8e431c7b2b884a7089c3b0b1189810f89780a785c3de64e03f09
original:
hackage: diagrams-rasterific-1.4
- completed:
hackage: plots-0.1.0.2@sha256:3d45b5b973339a50d0686153d77b0f1e438c1a890e75c2274830e878e9fd78d8,2131
pantry-tree:
size: 5210
sha256: ff47de4b79b97c735f5cc75ae52a32db807f94a1bd4f2324be9816d5a34f612d
original:
hackage: plots-0.1.0.2
snapshots:
- completed:
size: 569315
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/10/9.yaml
sha256: c85a3b35a7c2fa3771728a6f19e363c62ff5619afc2670f87450c19e6770c37f
original: lts-10.9

0 comments on commit 6477dbb

Please sign in to comment.