[commit: ghc] wip/nfs-locking: Add build.stack.sh (93605e1)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:56:13 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/93605e1d7e6644f011c7202f2a3431e927f0d87f/ghc

>---------------------------------------------------------------

commit 93605e1d7e6644f011c7202f2a3431e927f0d87f
Author: Joe Hillenbrand <joehillen at gmail.com>
Date:   Fri Jan 22 15:41:24 2016 -0800

    Add build.stack.sh


>---------------------------------------------------------------

93605e1d7e6644f011c7202f2a3431e927f0d87f
 .gitignore                       |  1 +
 build.cabal.sh => build.stack.sh | 13 +++----------
 stack.yaml                       | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index 39cd693..6cc5501 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ cfg/system.config
 cabal.sandbox.config
 dist/
 .cabal-sandbox/
+.stack-work/
diff --git a/build.cabal.sh b/build.stack.sh
similarity index 77%
copy from build.cabal.sh
copy to build.stack.sh
index 8add516..1cc968b 100755
--- a/build.cabal.sh
+++ b/build.stack.sh
@@ -31,16 +31,9 @@ function rl {
 absoltueRoot="$(dirname "$(rl "$0")")"
 cd "$absoltueRoot"
 
-# Initialize sandbox if necessary
-if ! ( cabal sandbox hc-pkg list 2>&1 > /dev/null ); then
-    cabal sandbox init
-    cabal install                   \
-        --dependencies-only         \
-        --disable-library-profiling \
-        --disable-shared
-fi
-
-cabal run ghc-shake --             \
+stack build --no-library-profiling
+
+stack exec ghc-shake --            \
     --lint                         \
     --directory "$absoltueRoot/.." \
     --colour                       \
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
index 0000000..2bc3b0e
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,35 @@
+# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html
+
+# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
+resolver: lts-4.2
+
+# Local packages, usually specified by relative directory name
+packages:
+- '.'
+
+# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
+extra-deps: []
+
+# Override default flag values for local packages and extra-deps
+flags: {}
+
+# Extra package databases containing global packages
+extra-package-dbs: []
+
+# Control whether we use the GHC we find on the path
+# system-ghc: false
+
+# Require a specific version of stack, using version ranges
+# require-stack-version: -any # Default
+# require-stack-version: >= 1.0.0
+
+# Override the architecture used by stack, especially useful on Windows
+# arch: i386
+# arch: x86_64
+
+# Extra directories used by stack for building
+# extra-include-dirs: [/path/to/dir]
+# extra-lib-dirs: [/path/to/dir]
+
+# Allow a newer minor version of GHC than the snapshot specifies
+# compiler-check: newer-minor



More information about the ghc-commits mailing list