Skip to content

Commit ee043bc

Browse files
authored
Use hpack package.yaml to build Stack
1 parent 1a9d326 commit ee043bc

8 files changed

Lines changed: 348 additions & 475 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ tags
2323
/_site/
2424
/.dir-locals.el
2525
/.git/
26+
/stack.cabal
27+
/etc/scripts/stack-scripts.cabal

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Other enhancements:
107107
* Addition of `--ghc-options` to `stack script` to pass options directly
108108
to GHC. See:
109109
[#3454](https://github.com/commercialhaskell/stack/issues/3454)
110+
* Add hpack `package.yaml` to build Stack itself
110111

111112
Bug fixes:
112113

etc/scripts/stack-scripts.cabal

Lines changed: 0 additions & 42 deletions
This file was deleted.

package.yaml

Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
1+
name: stack
2+
version: '1.6.0'
3+
synopsis: The Haskell Tool Stack
4+
description: ! 'Please see the README.md for usage information, and
5+
the wiki on Github for more details. Also, note that
6+
the API for the library is not currently stable, and may
7+
change significantly, even between minor releases. It is
8+
currently only intended for use by the executable.'
9+
category: Development
10+
author: Commercial Haskell SIG
11+
maintainer: manny@fpcomplete.com
12+
license: BSD3
13+
github: commercialhaskell/stack.git
14+
homepage: http://haskellstack.org
15+
custom-setup:
16+
dependencies:
17+
- base
18+
- Cabal
19+
- filepath
20+
extra-source-files:
21+
- CONTRIBUTING.md
22+
- ChangeLog.md
23+
- README.md
24+
- doc/*.md
25+
- src/setup-shim/StackSetupShim.hs
26+
- stack.yaml
27+
- test/package-dump/ghc-7.10.txt
28+
- test/package-dump/ghc-7.8.4-osx.txt
29+
- test/package-dump/ghc-7.8.txt
30+
ghc-options:
31+
- -Wall
32+
- -fwarn-tabs
33+
- -fwarn-incomplete-uni-patterns
34+
- -fwarn-incomplete-record-updates
35+
dependencies:
36+
- Cabal
37+
- aeson
38+
- annotated-wl-pprint
39+
- ansi-terminal
40+
- async
41+
- attoparsec
42+
- base >=4.9 && < 5
43+
- base64-bytestring
44+
- blaze-builder
45+
- bytestring
46+
- clock
47+
- conduit
48+
- conduit-extra
49+
- containers
50+
- cryptonite
51+
- cryptonite-conduit
52+
- deepseq
53+
- directory
54+
- echo
55+
- exceptions
56+
- extra
57+
- fast-logger
58+
- file-embed
59+
- filelock
60+
- filepath
61+
- fsnotify
62+
- generic-deriving
63+
- hackage-security
64+
- hashable
65+
- hastache
66+
- hpack
67+
- hpc
68+
- http-client
69+
- http-client-tls
70+
- http-conduit
71+
- http-types
72+
- memory
73+
- microlens
74+
- microlens-mtl
75+
- mintty
76+
- monad-logger
77+
- mono-traversable
78+
- mtl
79+
- neat-interpolation
80+
- network-uri
81+
- open-browser
82+
- optparse-applicative
83+
- path
84+
- path-io
85+
- persistent
86+
- persistent-sqlite
87+
- persistent-template
88+
- pretty
89+
- primitive
90+
- process
91+
- project-template
92+
- regex-applicative-text
93+
- resourcet
94+
- retry
95+
- semigroups
96+
- split
97+
- stm
98+
- store
99+
- store-core
100+
- streaming-commons
101+
- tar
102+
- template-haskell
103+
- temporary
104+
- text
105+
- text-metrics
106+
- th-reify-many
107+
- time
108+
- tls
109+
- transformers
110+
- unicode-transforms
111+
- unix-compat
112+
- unliftio
113+
- unordered-containers
114+
- vector
115+
- yaml
116+
- zip-archive
117+
- zlib
118+
when:
119+
- condition: os(windows)
120+
then:
121+
cpp-options: -DWINDOWS
122+
dependencies:
123+
- Win32
124+
else:
125+
build-tools:
126+
- hsc2hs
127+
dependencies:
128+
- bindings-uname
129+
- pid1
130+
- unix
131+
library:
132+
source-dirs: src/
133+
ghc-options:
134+
- -fwarn-identities
135+
exposed-modules:
136+
- Control.Concurrent.Execute
137+
- Data.Aeson.Extended
138+
- Data.Attoparsec.Args
139+
- Data.Attoparsec.Combinators
140+
- Data.Attoparsec.Interpreter
141+
- Data.IORef.RunOnce
142+
- Data.Store.VersionTagged
143+
- Network.HTTP.Download
144+
- Network.HTTP.Download.Verified
145+
- Options.Applicative.Args
146+
- Options.Applicative.Builder.Extra
147+
- Options.Applicative.Complicated
148+
- Path.CheckInstall
149+
- Path.Extra
150+
- Path.Find
151+
- Paths_stack
152+
- Stack.Build
153+
- Stack.Build.Cache
154+
- Stack.Build.ConstructPlan
155+
- Stack.Build.Execute
156+
- Stack.Build.Haddock
157+
- Stack.Build.Installed
158+
- Stack.Build.Source
159+
- Stack.Build.Target
160+
- Stack.BuildPlan
161+
- Stack.Clean
162+
- Stack.Config
163+
- Stack.Config.Build
164+
- Stack.Config.Urls
165+
- Stack.Config.Docker
166+
- Stack.Config.Nix
167+
- Stack.ConfigCmd
168+
- Stack.Constants
169+
- Stack.Constants.Config
170+
- Stack.Coverage
171+
- Stack.Docker
172+
- Stack.Docker.GlobalDB
173+
- Stack.Dot
174+
- Stack.Exec
175+
- Stack.Fetch
176+
- Stack.FileWatch
177+
- Stack.GhcPkg
178+
- Stack.Ghci
179+
- Stack.Ghci.Script
180+
- Stack.Hoogle
181+
- Stack.IDE
182+
- Stack.Image
183+
- Stack.Init
184+
- Stack.New
185+
- Stack.Nix
186+
- Stack.Options.BenchParser
187+
- Stack.Options.BuildMonoidParser
188+
- Stack.Options.BuildParser
189+
- Stack.Options.CleanParser
190+
- Stack.Options.ConfigParser
191+
- Stack.Options.Completion
192+
- Stack.Options.DockerParser
193+
- Stack.Options.DotParser
194+
- Stack.Options.ExecParser
195+
- Stack.Options.GhcBuildParser
196+
- Stack.Options.GhciParser
197+
- Stack.Options.GhcVariantParser
198+
- Stack.Options.GlobalParser
199+
- Stack.Options.HaddockParser
200+
- Stack.Options.HpcReportParser
201+
- Stack.Options.LogLevelParser
202+
- Stack.Options.NewParser
203+
- Stack.Options.NixParser
204+
- Stack.Options.PackageParser
205+
- Stack.Options.ResolverParser
206+
- Stack.Options.ScriptParser
207+
- Stack.Options.SDistParser
208+
- Stack.Options.SolverParser
209+
- Stack.Options.TestParser
210+
- Stack.Options.Utils
211+
- Stack.Package
212+
- Stack.PackageDump
213+
- Stack.PackageIndex
214+
- Stack.PackageLocation
215+
- Stack.Path
216+
- Stack.Prelude
217+
- Stack.PrettyPrint
218+
- Stack.Runners
219+
- Stack.Script
220+
- Stack.SDist
221+
- Stack.Setup
222+
- Stack.Setup.Installed
223+
- Stack.SetupCmd
224+
- Stack.Sig
225+
- Stack.Sig.GPG
226+
- Stack.Sig.Sign
227+
- Stack.Snapshot
228+
- Stack.Solver
229+
- Stack.StaticBytes
230+
- Stack.Types.Build
231+
- Stack.Types.BuildPlan
232+
- Stack.Types.CompilerBuild
233+
- Stack.Types.Urls
234+
- Stack.Types.Compiler
235+
- Stack.Types.Config
236+
- Stack.Types.Config.Build
237+
- Stack.Types.Docker
238+
- Stack.Types.FlagName
239+
- Stack.Types.GhcPkgId
240+
- Stack.Types.Image
241+
- Stack.Types.Nix
242+
- Stack.Types.Package
243+
- Stack.Types.PackageDump
244+
- Stack.Types.PackageIdentifier
245+
- Stack.Types.PackageIndex
246+
- Stack.Types.PackageName
247+
- Stack.Types.Resolver
248+
- Stack.Types.Runner
249+
- Stack.Types.Sig
250+
- Stack.Types.TemplateName
251+
- Stack.Types.Version
252+
- Stack.Types.VersionIntervals
253+
- Stack.Upgrade
254+
- Stack.Upload
255+
- Text.PrettyPrint.Leijen.Extended
256+
- System.Process.Log
257+
- System.Process.PagerEditor
258+
- System.Process.Read
259+
- System.Process.Run
260+
- System.Terminal
261+
other-modules:
262+
- Hackage.Security.Client.Repository.HttpLib.HttpClient
263+
when:
264+
- condition: 'os(windows)'
265+
then:
266+
source-dirs: windows/
267+
else:
268+
source-dirs: unix/
269+
executables:
270+
stack:
271+
main: Main.hs
272+
source-dirs: src/main
273+
ghc-options:
274+
- -threaded
275+
dependencies:
276+
- stack
277+
other-modules:
278+
- Paths_stack
279+
when:
280+
- condition: flag(static)
281+
ld-options:
282+
- -static
283+
- -pthread
284+
- condition: ! '!(flag(disable-git-info))'
285+
cpp-options: -DUSE_GIT_INFO
286+
dependencies:
287+
- gitrev
288+
- optparse-simple
289+
- condition: flag(hide-dependency-versions)
290+
cpp-options: -DHIDE_DEP_VERSIONS
291+
- condition: flag(supported-build)
292+
cpp-options: -DSUPPORTED_BUILD
293+
tests:
294+
stack-test:
295+
main: Test.hs
296+
source-dirs: src/test
297+
ghc-options:
298+
- -threaded
299+
dependencies:
300+
- QuickCheck
301+
- hspec
302+
- stack
303+
- smallcheck
304+
stack-integration-test:
305+
main: IntegrationSpec.hs
306+
source-dirs:
307+
- test/integration
308+
- test/integration/lib
309+
ghc-options:
310+
- -threaded
311+
- -rtsopts
312+
- -with-rtsopts=-N
313+
dependencies:
314+
- hspec
315+
when:
316+
- condition: ! '!(flag(integration-tests))'
317+
buildable: false
318+
flags:
319+
static:
320+
description: Pass -static/-pthread to ghc when linking the stack binary.
321+
manual: true
322+
default: false
323+
disable-git-info:
324+
description: Disable compile-time inclusion of current git info in stack
325+
manual: true
326+
default: false
327+
hide-dependency-versions:
328+
description: Hides dependency versions from "stack --version", used only by building
329+
with stack.yaml
330+
manual: true
331+
default: false
332+
integration-tests:
333+
description: Run the integration test suite
334+
manual: true
335+
default: false
336+
supported-build:
337+
description: If false, causes "stack --version" to issue a warning about the build being unsupported. True only if building with stack.yaml
338+
manual: true
339+
default: false

0 commit comments

Comments
 (0)