git.iko.soy/typeable/cabal2nix
on master help sign in
.gitignore+24−4
since splitsnapshots
unifiedsplit
@@ -1,10 +1,30 @@
1# ignore build Cabal build files
1# ignore build Cabal build files
2
2
3−/dist/*
3+/.cabal-sandbox
4+/.ghc.environment.*
5+/Setup
6+/Setup.hi
4−Setup.o
7+/Setup.o
5−Setup.hi
8+/cabal.sandbox.config
6−Setup
9+/dist
10+/dist-newstyle
7
11
8# vim tmp files
12# vim tmp files
13+
9*.swo
14*.swo
10*.swp
15*.swp
16+
17+# haskell-mode generates files, too
18+
19+TAGS
20+
21+# ignore stack build directory
22+
23+.stack-work
24+/src/highlight.js
25+/src/style.css
26+
27+# hackage2nix ususally needs those two repositories around
28+
29+/hackage/*
30+/nixpkgs/*
.travis.yml+161−1
@@ -1 +1,161 @@
1+# This Travis job script has been generated by a script via
2+#
3+# haskell-ci '--installed=+all -Cabal' '--hlint' '--doctest' '--doctest-options=-i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen' '-o' '.travis.yml' 'cabal2nix.cabal' '--head-hackage' '--head-hackage-jobs' '> 8.8'
4+#
5+# For more information, see https://github.com/haskell-CI/haskell-ci
6+#
7+# version: 0.9.20200306
8+#
9+version: ~> 1.0
1−language: haskell
10+language: c
11+os: linux
12+dist: xenial
13+git:
14+ # whether to recursively clone submodules
15+ submodules: false
16+cache:
17+ directories:
18+ - $HOME/.cabal/packages
19+ - $HOME/.cabal/store
20+ - $HOME/.hlint
21+before_cache:
22+ - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
23+ # remove files that are regenerated by 'cabal update'
24+ - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
25+ - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
26+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
27+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
28+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
29+ - rm -rfv $CABALHOME/packages/head.hackage
30+jobs:
31+ include:
32+ - compiler: ghc-8.10.1
33+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.2"]}}
34+ os: linux
35+ - compiler: ghc-8.8.3
36+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.0"]}}
37+ os: linux
38+ - compiler: ghc-8.6.5
39+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
40+ os: linux
41+ allow_failures:
42+ - compiler: ghc-8.8.3
43+ - compiler: ghc-8.10.1
44+before_install:
45+ - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
46+ - WITHCOMPILER="-w $HC"
47+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
48+ - HCPKG="$HC-pkg"
49+ - unset CC
50+ - CABAL=/opt/ghc/bin/cabal
51+ - CABALHOME=$HOME/.cabal
52+ - export PATH="$CABALHOME/bin:$PATH"
53+ - TOP=$(pwd)
54+ - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
55+ - echo $HCNUMVER
56+ - CABAL="$CABAL -vnormal+nowrap"
57+ - set -o pipefail
58+ - TEST=--enable-tests
59+ - BENCH=--enable-benchmarks
60+ - HEADHACKAGE=false
61+ - if [ $HCNUMVER -ge 80800 ] ; then HEADHACKAGE=true ; fi
62+ - rm -f $CABALHOME/config
63+ - |
64+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
65+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
66+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
67+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
68+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
69+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
70+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
71+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
72+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
73+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
74+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
75+ echo "install-dirs user" >> $CABALHOME/config
76+ echo " prefix: $CABALHOME" >> $CABALHOME/config
77+ echo "repository hackage.haskell.org" >> $CABALHOME/config
78+ echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
79+ - |
80+ if $HEADHACKAGE; then
81+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config
82+ echo "repository head.hackage.ghc.haskell.org" >> $CABALHOME/config
83+ echo " url: https://ghc.gitlab.haskell.org/head.hackage/" >> $CABALHOME/config
84+ echo " secure: True" >> $CABALHOME/config
85+ echo " root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d" >> $CABALHOME/config
86+ echo " 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329" >> $CABALHOME/config
87+ echo " f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89" >> $CABALHOME/config
88+ echo " key-threshold: 3" >> $CABALHOME/config
89+ fi
90+install:
91+ - ${CABAL} --version
92+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
93+ - |
94+ echo "program-default-options" >> $CABALHOME/config
95+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
96+ - cat $CABALHOME/config
97+ - rm -fv cabal.project cabal.project.local cabal.project.freeze
98+ - travis_retry ${CABAL} v2-update -v
99+ - (cd /tmp && ${CABAL} v2-install $WITHCOMPILER -j2 doctest --constraint='doctest ==0.16.2.*')
100+ - if [ $HCNUMVER -lt 80800 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $WITHCOMPILER --dry-run hlint --constraint='hlint ==2.2.*' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
101+ - "if [ $HCNUMVER -lt 80800 ] ; then if [ ! -e $HOME/.hlint/hlint-$HLINTVER/hlint ]; then echo \"Downloading HLint version $HLINTVER\"; mkdir -p $HOME/.hlint; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\\n' --silent --location --output $HOME/.hlint/hlint-$HLINTVER.tar.gz \"https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz\"; tar -xzv -f $HOME/.hlint/hlint-$HLINTVER.tar.gz -C $HOME/.hlint; fi ; fi"
102+ - if [ $HCNUMVER -lt 80800 ] ; then mkdir -p $CABALHOME/bin && ln -sf "$HOME/.hlint/hlint-$HLINTVER/hlint" $CABALHOME/bin/hlint ; fi
103+ - if [ $HCNUMVER -lt 80800 ] ; then hlint --version ; fi
104+ # Generate cabal.project
105+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
106+ - touch cabal.project
107+ - |
108+ echo "packages: ." >> cabal.project
109+ - |
110+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(Cabal|cabal2nix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
111+ - cat cabal.project || true
112+ - cat cabal.project.local || true
113+ - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
114+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
115+ - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
116+ - rm cabal.project.freeze
117+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
118+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
119+script:
120+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
121+ # Packaging...
122+ - ${CABAL} v2-sdist all
123+ # Unpacking...
124+ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
125+ - cd ${DISTDIR} || false
126+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
127+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
128+ - PKGDIR_cabal2nix="$(find . -maxdepth 1 -type d -regex '.*/cabal2nix-[0-9.]*')"
129+ # Generate cabal.project
130+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
131+ - touch cabal.project
132+ - |
133+ echo "packages: ${PKGDIR_cabal2nix}" >> cabal.project
134+ - |
135+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(Cabal|cabal2nix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
136+ - cat cabal.project || true
137+ - cat cabal.project.local || true
138+ # Building...
139+ # this builds all libraries and executables (without tests/benchmarks)
140+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
141+ # Building with tests and benchmarks...
142+ # build & run tests, build benchmarks
143+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
144+ # Testing...
145+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
146+ # Doctest...
147+ - (cd ${PKGDIR_cabal2nix} && doctest -i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen src)
148+ # HLint..
149+ - if [ $HCNUMVER -lt 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint src) ; fi
150+ - if [ $HCNUMVER -lt 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint hackage2nix) ; fi
151+ - if [ $HCNUMVER -lt 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint cabal2nix) ; fi
152+ # cabal check...
153+ - (cd ${PKGDIR_cabal2nix} && ${CABAL} -vnormal check)
154+ # haddock...
155+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
156+ # Building without installed constraints for packages in global-db...
157+ - rm -f cabal.project.local
158+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
159+
160+# REGENDATA ("0.9.20200306",["--installed=+all -Cabal","--hlint","--doctest","--doctest-options=-i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","-o",".travis.yml","cabal2nix.cabal","--head-hackage","--head-hackage-jobs","> 8.8"])
161+# EOF
README.md+61−144
@@ -1,144 +1,61 @@
1−How to maintain Haskell Packages in Nix
2−=======================================
3−
4−## Overview over the tool-chain
5−
6−There are two utilities, `cabal2nix` and `hackage4nix`, that automate
7−maintenance to a large extend. We intend to merge them into one program,
8−eventually, but the necessary re-factoring hasn't been done yet since
9−this is not a high priority.
10−
11−### Cabal2nix
1+Cabal2nix
12−
2+=========
3+
4+[![hackage release](https://img.shields.io/hackage/v/cabal2nix.svg?label=hackage)](http://hackage.haskell.org/package/cabal2nix)
5+[![stackage LTS package](http://stackage.org/package/cabal2nix/badge/lts)](http://stackage.org/lts/package/cabal2nix)
6+[![stackage Nightly package](http://stackage.org/package/cabal2nix/badge/nightly)](http://stackage.org/nightly/package/cabal2nix)
7+[![travis build status](https://img.shields.io/travis/NixOS/cabal2nix/master.svg?label=travis+build)](https://travis-ci.org/NixOS/cabal2nix)
8+
13−`cabal2nix` converts a single Cabal file into a single Nix build
9+`cabal2nix` converts a single Cabal file into a single Nix build expression.
14−expression. For example:
10+For example:
15−
11+
16− $ cabal2nix cabal://yesod-0.9.1
12+ $ cabal2nix cabal://mtl
17− { cabal, attoparsecText, blazeBuilder, blazeHtml, hamlet, httpTypes
13+ { mkDerivation, base, stdenv, transformers }:
18− , monadControl, parsec, shakespeareCss, shakespeareJs, text, time
19− , transformers, unixCompat, wai, waiExtra, warp, yesodAuth
20− , yesodCore, yesodForm, yesodJson, yesodPersistent
21− }:
22−
23− cabal.mkDerivation (self: {
14+ mkDerivation {
24− pname = "yesod";
15+ pname = "mtl";
25− version = "0.9.1";
16+ version = "2.2.1";
26− sha256 = "1ag3lca75lrriycbscspb5yyishacgxjx0rybc3x4z1dqnkn1r71";
17+ sha256 = "1icdbj2rshzn0m1zz5wa7v3xvkf6qw811p4s7jgqwvx1ydwrvrfa";
27− isLibrary = true;
18+ libraryHaskellDepends = [ base transformers ];
28− isExecutable = true;
29− buildDepends = [
30− attoparsecText blazeBuilder blazeHtml hamlet httpTypes monadControl
31− parsec shakespeareCss shakespeareJs text time transformers
32− unixCompat wai waiExtra warp yesodAuth yesodCore yesodForm
33− yesodJson yesodPersistent
34− ];
35− meta = {
36− homepage = "http://www.yesodweb.com/";
19+ homepage = "http://github.com/ekmett/mtl";
37− description = "Creation of type-safe, RESTful web applications";
20+ description = "Monad classes, using functional dependencies";
38− license = self.stdenv.lib.licenses.bsd3;
21+ license = stdenv.lib.licenses.bsd3;
39− platforms = self.ghc.meta.platforms;
40− };
41− })
22+ }
42−
23+
43−Cabal files can be referred to using the magic URL
24+Cabal files can be referred to using the magic URL `cabal://NAME-VERSION`,
44−`cabal://NAME-VERSION`, which will automatically download the file from
25+which will automatically download the file from Hackage. Alternatively, a
45−Hackage. Alternatively, a direct `http://host/path/pkg.cabal` URL can be
26+direct `http://host/path/pkg.cabal` URL can be provided, as well as a
46−provided, as well as a `file:///local/path/pkg.cabal` URI that doesn't
27+`file:///local/path/pkg.cabal` URI that doesn't depend on network access.
47−depend on network access. Run the utility with `--help` to see the
28+However, if the source hash is not already in `cabal2nix`'s cache or provided
29+using the `--sha256` option, `cabal2nix` still needs to download the source
30+code to compute the hash, which still causes network traffic. Run the utility
48−complete list of supported command line flags.
31+with `--help` to see the complete list of supported command-line flags.
49−
32+
50−To add a new package to Nix, the following steps need to be performed:
33+Detailed instructions on how to use those generated files with Nix can be found at
51−
34+https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages.
52− $ cd $NIXPKGS_ALL/pkgs/development/libraries/haskell
35+
53− $ mkdir foo
36+`cabal2nix` can also build derivations for projects from other sources than
54− $ cabal2nix cabal://foo-1.0 >foo/default.nix
37+Hackage. You only need to provide a URI that points to a cabal project. The
55−
38+most common use-case for this is probably to generate a derivation for a
56−Then add an appropriate attribute to
39+project on the local file system:
57−`pkgs/top-level/haskell-packages.nix`, for example:
40+
58−
41+ $ cabal get mtl-2.2.1 && cd mtl-2.2.1
59− foo = callPackage ../development/libraries/haskell/foo {};
42+ $ cabal2nix .
60−
43+ { mkDerivation, base, stdenv, transformers }:
61−### Hackage4nix
44+ mkDerivation {
62−
45+ pname = "mtl";
63−The `hackage4nix` utility re-generates *all* expressions found in the
46+ version = "2.2.1";
64−`nixpkgs` database in place. This is useful to ensure that all packages
47+ src = ./.;
65−have been generated with a recent version of the tool-chain.
48+ libraryHaskellDepends = [ base transformers ];
66−Furthermore, `hackage4nix` adds default settings for the
49+ homepage = "http://github.com/ekmett/mtl";
67−`meta.maintainers` and `meta.platforms` attribute if these aren't
50+ description = "Monad classes, using functional dependencies";
68−configured yet. Generally speaking, running
51+ license = stdenv.lib.licenses.bsd3;
69−
52+ }
70− $ hackage4nix $NIXPKGS_ALL
53+
71−
54+This derivation will not fetch from hackage, but instead use the directory which
72−should be a *no-op* --- i.e. no files should change! If there are
55+contains the derivation as the source repository.
73−changes, these indicate that a file has been modified manually, and then
56+
74−these changes must be investigated to find out what is going on.
57+`cabal2nix` currently supports the following repository types:
75−
58+
76−Last but not least, `hackage4nix` generates a list of all updates
59+* directory
77−available from Hackage. (Run `cabal update` to make sure that your local
60+* source archive (zip, tar.gz, ...) from http or https URL or local file.
78−copy of the Hackage database is up-to-date!) For example:
61+* git, mercurial, svn or bazaar repository
79−
80− $ hackage4nix $NIXPKGS_ALL
81− The following updates are available:
82−
83− WebBits-Html-1.0.1:
84− cabal2nix cabal://WebBits-Html-1.0.2 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/WebBits-Html/default.nix
85−
86− happstack-server-6.1.6:
87− cabal2nix cabal://happstack-server-6.2.1 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/happstack/happstack-server.nix
88− cabal2nix cabal://happstack-server-6.2.2 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/happstack/happstack-server.nix
89−
90− primitive-0.3.1:
91− cabal2nix cabal://primitive-0.4 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/primitive/default.nix
92−
93− repa-2.1.1.5:
94− cabal2nix cabal://repa-2.1.1.6 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/repa/default.nix
95−
96− unix-compat-0.2.2.1:
97− cabal2nix cabal://unix-compat-0.3 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/unix-compat/default.nix
98−
99− vector-0.7.1:
100− cabal2nix cabal://vector-0.8 >$NIXPKGS_ALL/pkgs/development/libraries/haskell/vector/default.nix
101−
102−These updates can be performed automatically by running the `cabal2nix`
103−command given by `hackage4nix`. If there is more than one possible
104−update, then all of them will be shown. Note, however, that some updates
105−break compilation of other packages, because they depend on very
106−specific versions of their build inputs, so please be careful when
107−performing updates!
108−
109−## Current State of Affairs
110−
111−The tool-chain is stable. As of today, 2011-08-30, almost all Haskell
112−packages available in Nix have been generated automatically from their
113−Cabal files. The exceptions are:
114−
115−* "Bad packages" that cannot be generated automatically because there
116− is no proper Cabal file for them, or because their builds are so
117− complicated that the `cabal.nix` build doesn't suffice to do the
118− trick. The list of bad packages is hard-coded into
119− [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs),
120− in the functions `badPackagePaths` and `patchedPackages`. Any
121− package list in there is going to be ignored by `hackage4nix`.
122−
123−* "Patched packages" cannot be generated automatically, because their
124− build instructions need patches that `cabal2nix` doesn't (yet) know
125− about. There is a hard-coded list of patched packages in
126− [`hackage4nix`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs).
127− Furthermore, all build expressions that define any of the attributes
128−
129− (pre|post)Configure
130− (pre|post)Install
131− patchPhase
132− patches
133−
134− are considered "patched". That list of attributes is hard-coded in
135− [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
136− in the function `regenerateDerivation`.
137−
138−The complete list of Haskell packages available in Nix is generated by
139−the tool [`package-list`](http://github.com/peti/package-list),
140−and published at <http://cryp.to/haskell-in-nixpkgs.txt>. Hackage picks
141−it up from there and generates links on each package's homepage to the
142−corresponding page in Hydra automatically. See [ticket
143−875](http://hackage.haskell.org/trac/hackage/ticket/875) for further
144−details.
Setup.hsmode 100755 → 100644+2−11
@@ -1,15 +1,6 @@
1−module Main ( main ) where
1+module Main (main) where
2
2
3import Distribution.Simple
3import Distribution.Simple
4−import Distribution.Simple.LocalBuildInfo ( withPrograms )
5−import Distribution.Simple.Program ( userSpecifyArgs )
6
4
7main :: IO ()
5main :: IO ()
8−main = defaultMainWithHooks $
6+main = defaultMain
9− simpleUserHooks `modify_haddockHook` \oldHH pkg lbi hooks flags ->
10− (\lbi' -> oldHH pkg lbi' hooks flags) $
11− lbi `modify_withPrograms` \oldWP ->
12− userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] oldWP
13− where
14− modify_haddockHook hooks f = hooks { haddockHook = f (haddockHook hooks) }
15− modify_withPrograms lbi f = lbi { withPrograms = f (withPrograms lbi) }
cabal2nix.cabal+147−85
@@ -1,90 +1,152 @@
1−Name: cabal2nix
1+name: cabal2nix
2−Version: 1.43
2+version: 2.15.1
3−Copyright: Peter Simons, Andres Loeh
3+synopsis: Convert Cabal files into Nix build instructions.
4−License: BSD3
4+description:
5−License-File: LICENSE
6−Author: Peter Simons <simons@cryp.to>, Andres Loeh <mail@andres-loeh.de>
7−Maintainer: Nix Developers <nix-dev@lists.science.uu.nl>
8−Homepage: http://github.com/NixOS/cabal2nix
9−Category: Distribution
10−Synopsis: Convert Cabal files into Nix build instructions
11−Cabal-Version: >= 1.8
12−Build-Type: Custom
13−Tested-With: GHC >= 6.12.3 && <= 7.6.1
14−Data-files: README.md
15−Description:
16− The @cabal2nix@ utility converts Cabal files into Nix build instructions. The
5+ Convert Cabal files into Nix build instructions. Users of Nix can install the latest
17− commandline syntax is:
6+ version by running:
18 .
7 .
19− > Usage: cabal2nix [options] url-to-cabal-file
8+ > nix-env -i cabal2nix
20− > -h --help show this help text
9+license: BSD3
21− > --sha256=HASH sha256 hash of source tarball
10+license-file: LICENSE
22− > -m MAINTAINER --maintainer=MAINTAINER maintainer of this package (may be specified multiple times)
11+author: Peter Simons, Andres Loeh, Benno Fünfstück, Mateusz Kowalczyk,
23− > -p PLATFORM --platform=PLATFORM supported build platforms (may be specified multiple times)
12+ Michael Alan Dorman, Tom Smalley, Mathijs Kwik, Shea Levy, Dmitry
24− > --no-check don't run regression test suites of this package
13+ Malikov, Eric Seidel, Jacob Mitchell, Graham Christensen,
25− >
14+ Hamish Mackenzie, Nikolay Amiantov, Aycan iRiCAN, Bryan
26− > Recognized URI schemes:
15+ Gardiner, Joe Hermaszewski, John Wiegley, Philipp Hausmann,
27− >
16+ Spencer Janssen, Tom Hunger, William Casarin, koral,
28− > cabal://pkgname-pkgversion download the specified package from Hackage
17+ ksaric, Adam Vogt, Alexey Shmalko, Corey O'Connor, Cray
29− > cabal://pkgname download latest version of the specified package from Hackage
18+ Elliott, David Johnson, Dmitry Bushev, Domen Kožar, Felix
30− > http://host/path fetch the Cabal file via HTTP
19+ Kunzmann, Gabriel Ebner, Gergely Risko, Joachim Fasting,
31− > file:///local/path load the Cabal file from the local disk
20+ John Albietz, John Chee, Jussi Maki, Lisanna Dettwyler,
32− > /local/path abbreviated version of file URI
21+ Mark Laws, Mark Wotton, Matthew Pickering, Matthew Stewart,
33− .
22+ Matvey Aksenov, Nicholas Clarke, Nicolas Rolland, Oliver
34− The only required argument is the path to the cabal file. For example:
23+ Charles, Pascal Wittmann, Patrick John Wheeler, Phil de
35− .
24+ Joux, Piotr Bogdan, Profpatsch, Raymond Gauthier, Renzo
36− > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.43/cabal2nix.cabal
25+ Carbonara, Rodney Lorrimar, Sibi, Sukant Hajra, Tanner
37− > cabal2nix cabal://cabal2nix-1.43
26+ Doshier, Vaibhav Sagar, Viktar Basharymau, danbst, karsten
38− .
27+ gebbert, laMudri, Александр Цамутали
39− If the @--sha256@ option has not been specified, cabal2nix calls
28+maintainer: Peter Simons <simons@cryp.to>
40− @nix-prefetch-url@ to determine the hash automatically. This causes
29+stability: stable
41− network traffic, obviously.
30+tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1
31+category: Distribution, Nix
32+homepage: https://github.com/nixos/cabal2nix#readme
33+bug-reports: https://github.com/nixos/cabal2nix/issues
34+build-type: Simple
35+extra-source-files: README.md
36+ test/golden-test-cases/*.cabal
37+ test/golden-test-cases/*.nix.golden
38+cabal-version: 1.24
39+
40+source-repository head
41+ type: git
42+ location: https://github.com/nixos/cabal2nix
42
43
43−Source-Repository head
44+library
44− Type: git
45+ exposed-modules: Cabal2nix
45− Location: git://github.com/NixOS/cabal2nix.git
46+ Distribution.Nixpkgs.Fetch
47+ Distribution.Nixpkgs.Haskell
48+ Distribution.Nixpkgs.Haskell.BuildInfo
49+ Distribution.Nixpkgs.Haskell.Constraint
50+ Distribution.Nixpkgs.Haskell.Derivation
51+ Distribution.Nixpkgs.Haskell.FromCabal
52+ Distribution.Nixpkgs.Haskell.FromCabal.Configuration
53+ Distribution.Nixpkgs.Haskell.FromCabal.Flags
54+ Distribution.Nixpkgs.Haskell.FromCabal.License
55+ Distribution.Nixpkgs.Haskell.FromCabal.Name
56+ Distribution.Nixpkgs.Haskell.FromCabal.Normalize
57+ Distribution.Nixpkgs.Haskell.FromCabal.PostProcess
58+ Distribution.Nixpkgs.Haskell.Hackage
59+ Distribution.Nixpkgs.Haskell.OrphanInstances
60+ Distribution.Nixpkgs.Haskell.PackageSourceSpec
61+ other-modules: Paths_cabal2nix
62+ hs-source-dirs: src
63+ build-depends: base > 4.11
64+ , Cabal == 3.0.*
65+ , aeson > 1
66+ , ansi-wl-pprint
67+ , bytestring
68+ , containers >= 0.5.9
69+ , deepseq >= 1.4
70+ , directory
71+ , distribution-nixpkgs >= 1.3.1
72+ , filepath
73+ , hackage-db >= 2.0.1
74+ , hopenssl >= 2
75+ , hpack >= 0.29.6
76+ , language-nix
77+ , lens
78+ , optparse-applicative
79+ , pretty >= 1.1.2
80+ , process
81+ , split
82+ , text
83+ , time
84+ , transformers
85+ , yaml
86+ default-language: Haskell2010
87+ other-extensions: MultiParamTypeClasses
88+ ScopedTypeVariables
89+ FlexibleInstances
90+ CPP
91+ TemplateHaskell
92+ StandaloneDeriving
93+ RecordWildCards
94+ OverloadedStrings
95+ DeriveGeneric
96+ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates
97+ -Wredundant-constraints
46
98
47−Executable cabal2nix
99+executable cabal2nix
48− main-is: Cabal2Nix.hs
100+ main-is: Main.hs
49− hs-source-dirs: src
101+ hs-source-dirs: cabal2nix
50− Build-Depends: base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.8,
102+ build-depends: base, cabal2nix
51− filepath, directory, process, HTTP, hackage-db
103+ default-language: Haskell2010
52− Extensions: PatternGuards, RecordWildCards, CPP
104+ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates
53− Ghc-Options: -Wall
105+ -Wredundant-constraints
54− other-modules: Cabal2Nix.CorePackages
55− Cabal2Nix.Flags
56− Cabal2Nix.Generate
57− Cabal2Nix.Hackage
58− Cabal2Nix.License
59− Cabal2Nix.Name
60− Cabal2Nix.Normalize
61− Cabal2Nix.PostProcess
62− Distribution.NixOS.Derivation.Cabal
63− Distribution.NixOS.Derivation.License
64− Distribution.NixOS.Derivation.Meta
65− Distribution.NixOS.PrettyPrinting
66
106
67−Executable hackage4nix
107+executable hackage2nix
68− main-is: Hackage4Nix.hs
108+ main-is: Main.hs
109+ other-modules: HackageGit
110+ Paths_cabal2nix
69− hs-source-dirs: src
111+ hs-source-dirs: hackage2nix
70− Build-Depends: base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.8,
112+ build-depends: base < 5
113+ , Cabal
114+ , aeson
115+ , bytestring
116+ , cabal2nix
71− mtl, containers, directory, filepath, hackage-db
117+ , containers
72− Extensions: PatternGuards, RecordWildCards, CPP
118+ , directory
73− Ghc-Options: -Wall
119+ , distribution-nixpkgs >= 1.2
74− other-modules: Cabal2Nix.CorePackages
120+ , filepath
75− Cabal2Nix.Flags
121+ , hopenssl >= 2
76− Cabal2Nix.Generate
122+ , language-nix
77− Cabal2Nix.License
123+ , lens
78− Cabal2Nix.Name
124+ , monad-par
79− Cabal2Nix.Normalize
125+ , monad-par-extras
80− Cabal2Nix.PostProcess
126+ , mtl
81− Distribution.NixOS.Derivation.Cabal
127+ , optparse-applicative
82− Distribution.NixOS.Derivation.License
128+ , pretty >= 1.1.2
83− Distribution.NixOS.Derivation.Meta
129+ default-language: Haskell2010
84− Distribution.NixOS.PrettyPrinting
130+ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates
131+ -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-maxN16
85
132
86−Test-Suite doctest-cabal2nix
133+test-suite regression-test
87− type: exitcode-stdio-1.0
134+ type: exitcode-stdio-1.0
88− main-is: doc-test.hs
135+ main-is: Main.hs
89− hs-source-dirs: test
136+ hs-source-dirs: test
90− build-depends: base, doctest
137+ build-depends: base
138+ , Cabal
139+ , cabal2nix
140+ , containers
141+ , directory
142+ , filepath
143+ , language-nix
144+ , lens
145+ , pretty
146+ , process > 1.2
147+ , tasty
148+ , tasty-golden
149+ default-language: Haskell2010
150+ build-tools: cabal2nix
151+ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates
152+ -Wredundant-constraints -threaded -with-rtsopts=-K64K
cabal2nix/Main.hsnew file+4
@@ -0,0 +1,4 @@
1+import qualified Cabal2nix as C
2+
3+main :: IO ()
4+main = C.main
doc/.gitignorenew file+13
@@ -0,0 +1,13 @@
1+# ignored files in the doc hierarchy
2+
3+/*.aux
4+/*.csv
5+/*.eps
6+/*.html
7+/*.json
8+/*.log
9+/*.out
10+/*.pdf
11+/*~
12+/.RData
13+/.Rhistory
doc/00-future-of-haskell-packaging-in-nixpkgs.mdnew file+41
@@ -0,0 +1,41 @@
1+The Future of Haskell Packaging in Nix
2+======================================
3+
4+Fellow Nixers and Haskellers,
5+
6+the [Haskell NG][1] effort allowed us for the first time to distribute the
7+latest version of every package known to Hackage --- well over 8,000 builds in
8+total ---, and this seemed like a crazy leap forward at the time. These days, we
9+distribute [60+ Haskell package sets][2] that represent different views into
10+Hackage built with 8+ different compilers, and there's probably a lot more
11+variety out there, living in our user's `config.nix` files, that we don't even
12+know about. The requirements on our Haskell infrastructure become ever more
13+complex. New questions pop up due to the growing popularity of Stack; our
14+support for old compiler versions is somewhat lacking; and we still don't have
15+convincing answers to questions like: how do I compile my package with
16+profiling support?
17+
18+The issues we have to address are mostly known and understood. What we lack are
19+brilliant ideas how to solve them.
20+
21+This thread is an attempt to make some headway towards that end through open
22+discussion and collaboration. Instead of everyone having to browse a couple of
23+thousand Github tickets to find out what's going on, I'll regularly pick one
24+particular aspect that needs improvement and post a short article outlining the
25+issues we have and potential solutions that we know of so that constructive
26+dialogue can ensue.
27+
28+Everyone is invited to participate in the conversation with ideas, questions,
29+suggestions, or references to Github Pull Requests that implement a perfect,
30+production-ready solution waiting to be merged.
31+
32+The issues we've identified so far are:
33+
34+- [Use Function Application To Escape Override Hell](01-use-function-application-to-escape-override-hell.md)
35+- [Guarantee Consistent Builds and Obsolete `overrideScope`](02-guarantee-consistent-builds-and-obsolete-overridescope.md)
36+- [Map Cabal Files To Nix Without Information Loss](03-map-cabal-files-to-nix-without-information-loss.md)
37+- [Set up a Sufficiently Powerful Build Farm](04-set-up-a-sufficiently-powerful-build-farm.md)
38+- [Publish All of Hackage](05-publish-all-of-hackage.md)
39+
40+[1]: https://github.com/NixOS/nixpkgs/commit/c0c82ea2ebbcf0632260a931cf832cac1c8a014e
41+[2]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/haskell-packages.nix
doc/01-use-function-application-to-escape-override-hell.mdnew file+320
@@ -0,0 +1,320 @@
1+Use Function Application To Escape Override Hell
2+================================================
3+
4+The Problem
5+-----------
6+
7+The architecture of the `haskell.packages.*` hierarchy worked fine when Nixpkgs
8+shipped a handful of manually maintained package sets. The addition of LTS
9+Haskell, however, increased the number of active package sets by a factor of
10+10, and that number will grow further since there is a new LTS release coming
11+out every week. Our preferred mechanism to cope with that diversity is the
12+override: `haskellPackages` provides the foundation that other package sets
13+override according to their needs. As of today, this approach requires
14+approximately 25,000 overrides. Furthermore, we use 3 different types of
15+overrides (`override`, `overrideCabal`, and `overrideScope`) that have subtly
16+different purposes and capabilities. The complexity of this technique caused
17+non-trivial issues in the past that manifested in [severe memory leaks][5],
18+[insufficient flexibility][6], and [counter-intuitive behavior][7]. The current
19+approach is not going to scale forever --- particularly in terms of
20+maintainability. We need a better architecture to define Haskell package sets
21+that supports variant builds in a fashion that's simpler and thus easier to
22+understand and maintain.
23+
24+The Situation Today
25+-------------------
26+
27+Nixpkgs distributes over 50 Haskell package sets that differ in which packages
28+they contain, which versions of those packages they contain, and how those
29+builds are configured. For example, package sets intended for use with GHC
30+versions prior to 7.4.x neither build nor run regression test suites, because
31+Cabal introduced that feature only in later versions of the compiler. Package
32+sets compiling with GHC versions prior to 7.8.x don't support shared library
33+builds, because that feature never worked reliably until more recent versions
34+of the compiler. And builds running on Darwin don't generate the Haddock
35+documentation when compiling with GHC versions 7.6.x or earlier, because the
36+Haddock binary on that platform used to interact poorly with Darwin's `cpp` and
37+thus failed until that bug was eventually fixed in GHC 7.8.1.
38+
39+This means that seemingly similar builds like `haskell.packages.ghc763.foo` and
40+`haskell.packages.ghc784.foo` actually differ in multiple dimensions: those two
41+`foo`s may be different versions of the same package; they are almost certainly
42+compiled with different versions of their respective dependencies; and their
43+configurations potentially differ, i.e both builds use different Cabal flags
44+and have different features enabled. In fact, a build of `haskellPackages.foo`
45+that's run on Linux/x86_64 most likely differs non-trivially from the exact
46+same build run on Darwin/x86_64.
47+
48+Nix can handle this diversity, because it describes builds in a Turing-complete
49+functional language. Builds that exist in multiple variants are functions that
50+take the necessary dependencies plus a set of flags to enable/disable the
51+features we intend to support, and then map that information to appropriate
52+build instructions. Those functions live in one central place,
53+[`hackage-packages.nix`][1], and all our crazy package sets simply call those
54+functions with appropriate arguments to define exactly those build variants
55+that they need.
56+
57+What sounds simple and obvious in theory, however, is a bit of a mess in
58+practice. Consider the package `hslua` as an example. `hackage-packages.nix`
59+defines builds for versions 0.3.13, 0.4.0, and 0.4.1. Those definitions look
60+all quite similar, so we'll omit the third definition for brevity:
61+
62+ "hslua_0_3_13" = callPackage
63+ ({ mkDerivation, base, lua5_1, mtl }:
64+ mkDerivation {
65+ pname = "hslua";
66+ version = "0.3.13";
67+ sha256 = "e95774d21ac4378e799af4b8dce9068bfedd3109bf13b717d9ecb5817f86430a";
68+ configureFlags = [ "-fsystem-lua" ];
69+ libraryHaskellDepends = [ base mtl ];
70+ libraryPkgconfigDepends = [ lua5_1 ];
71+ testHaskellDepends = [ base ];
72+ description = "A Lua language interpreter embedding in Haskell";
73+ license = stdenv.lib.licenses.mit;
74+ hydraPlatforms = stdenv.lib.platforms.none;
75+ }) { inherit (pkgs) lua5_1; };
76+
77+ "hslua" = callPackage
78+ ({ mkDerivation, base, bytestring, hspec, hspec-contrib, HUnit
79+ , lua5_1, QuickCheck, quickcheck-instances, text
80+ }:
81+ mkDerivation {
82+ pname = "hslua";
83+ version = "0.4.1";
84+ sha256 = "2df2b4f0566ef2244506f9830e0207fce3bece7c331129f69f446c722136173f";
85+ configureFlags = [ "-fsystem-lua" ];
86+ libraryHaskellDepends = [ base bytestring ];
87+ librarySystemDepends = [ lua5_1 ];
88+ testHaskellDepends = [
89+ base bytestring hspec hspec-contrib HUnit QuickCheck
90+ quickcheck-instances text
91+ ];
92+ description = "A Lua language interpreter embedding in Haskell";
93+ license = stdenv.lib.licenses.mit;
94+ }) { inherit (pkgs) lua5_1; };
95+
96+Let's go through that code step by step. The basic structure of those
97+definitions is
98+
99+ name_version = callPackage f { ... system dependencies ... };
100+
101+where `f` is a function that given a set of build inputs produces a build. The
102+code invokes that function right away, so apparently `name_version` defines a
103+*build*, not a function that generates a build. The arguments passed to `f`
104+contain only system-level dependencies like `lua5_1`. Haskell dependencies like
105+`mtl` are not passed explicitly since the magic `callPackage` function can find
106+them automatically. Haskell attributes have a `_version` suffix only if the
107+attribute refers to an old version, like `hslua_0_3_13`. The latest version,
108+0.4.1, is simply called `hslua`. Last but not least, every Haskell build
109+expects a parameter `mkDerivation` --- our generic Haskell builder, which turns
110+those attribute sets into build instructions that Nix can execute. This
111+argument is also not passed explicitly but found by `callPackage`.
112+
113+The `callPackage` magic relies on two advanced techniques: fixed points and
114+reflection. Nixpkgs defines the Haskell package set recursively as a function
115+`self: { ... }` that takes as an argument the attribute set it's going to
116+produce and then uses that information to the produce the attribute set it's
117+already received as an argument. It's a mind-boggling way to define a recursive
118+attribute set `rec { ... }` without actually using the `rec` keyword. Every
119+computable function of this kind has a fixed point: a value `x` that satisfies
120+`f x = x`. That `x` is the result we actually want --- it's an ordinary
121+attribute set with all the `self`-references resolved and replaced by actual
122+values. The details of fixed points aren't important, though. What's important
123+is that our package set knows its final value already while we're still
124+defining it! This allows for the existence of the `callPackage` function:
125+
126+ self: let
127+ callPackage = stdenv.lib.callPackageWith self;
128+ in
129+ self // { ... Haskell package definitions here ... }
130+
131+The expression `callPackage f args` translates to `stdenv.lib.callPackageWith
132+self f args`. [`callPackageWith`][2] then uses reflection to determine the
133+names of all arguments expected by `f`. It finds those names that don't exist
134+in `args` in `self` and adds them to `args` to complete the function call. In
135+other words, parameters of `f` that are not specified in `args` are
136+automatically filled in from `self` --- the Haskell package set. This is why
137+system packages are passed explicitly (`self` doesn't contain them), but
138+Haskell dependencies are not (`self` does contain them).
139+
140+This feature is nice in package sets human beings write manually, because it
141+allows us to keep function calls short and concise. A computer program
142+generates the file `hackage-packages.nix`, though, so arguably we could have it
143+bind all Haskell names explicitly with `inherit (self) base mtl` just as well.
144+But `callPackage` has another feature that's more important than implicit name
145+resolution: it adds the method `override` to the generated derivation, which
146+can "undo" the function application to change the value of arguments that were
147+used originally. We can say
148+
149+ hslua.override { mtl = self.mtl_2_1_3_1; }
150+
151+to instantiate a variant of `hslua` that compiles with that particular version
152+of `mtl` rather than the default one. The same way, we can change the behavior
153+of `mkDerivation`! For example, the expression
154+
155+ hsload.override {
156+ mkDerivation = args: self.mkDerivation (args // { doCheck=false; });
157+ }
158+
159+gives us a variant of `hslua` that has the test suite disabled. These kind of
160+overrides are so useful that we've defined a whole [set of helper functions][3]
161+that use this technique to customize the default definitions from
162+`hackage-packages.nix` in any way we need.
163+to define
164+Now, Haskell packages sets are just collections of overrides that change the
165+default choices made in `hackage-packages.nix` as required. For example, the
166+package set for [LTS Haskell version 2.8][4] specifies:
167+
168+ "hslua" = doDistribute super."hslua_0_3_13";
169+
170+It renames `hslua_0_3_13` to `hslua` to ensure that all Haskell builds in that
171+package set use the older version instead of the latest one. Furthermore, we
172+would like Hydra builds of `haskell.packages.lts-2_8.hslua` enabled. The
173+original definition from `hackage-packages.nix` disabled those builds via
174+
175+ hydraPlatforms = stdenv.lib.platforms.none
176+
177+which makes sense in `haskellPackages`, because it prefers the latest version
178+of the package, but the older LTS set isn't happy with that choice, so it uses
179+a `doDistribute` override to replace the original empty set of `hydraPlatforms`
180+with something more appropriate.
181+
182+Generally speaking, all of our 50+ Haskell package sets are essentially just
183+variants of `hackage-packages.nix` with certain choices overridden if
184+necessary.
185+
186+Possible Improvements
187+---------------------
188+
189+It's unclear how to improve upon the current architecture.
190+
191+The override approach produces a weird structure: first, we define a build
192+function for every Haskell package --- like one would expect in a purely
193+functional language ---, but then that function isn't exposed. Instead, we call
194+the function right away to create a derivation. However, we can't use an honest
195+function call, because we really need a *function* later, so we're forced to
196+use freaky lazy-evaluation features that allow us to undo the function call
197+with `override` later to make the derivation look like the function again that
198+it probably should have been in the first place.
199+
200+One possible approach is to take `callPackage` out of `hackage-packages.nix`.
201+Instead of derivations, `hackage-packages.nix` could provide functions that
202+package sets then call with appropriate parameters to define the actual build.
203+This would require some 10,000 functions plus another ~7,000 function
204+applications per package set. In the current architecture, some attributes from
205+`hackage-packages.nix` are passed through unmodified, whereas the new approach
206+requires each package set to define every build explicitly. It's unclear how
207+that would affect the Nix interpreter in terms of memory requirements and
208+performance.
209+
210+Furthermore, just taking `callPackage` out of `hackage-packages.nix` won't
211+remedy the need for overriding, because our definitions don't mention any of
212+the build configuration flags, like `doCheck`. It's not possible to call the
213+function
214+
215+ "hslua" =
216+ { mkDerivation, base, bytestring, [... more inputs omitted ...] }:
217+
218+ mkDerivation {
219+ pname = "hslua";
220+ version = "0.4.1";
221+ [... more attributes omitted ...]
222+ };
223+
224+with `hslua { doCheck = false; ... }` because `doCheck` is an argument of
225+`mkDerivation`, which is hidden inside of that function. The established
226+approach to solve that problem is to wrap `mkDerivation`, i.e.
227+
228+ hslua {
229+ mkDerivation = args: self.mkDerivation (args // { doCheck=false; });
230+ }
231+
232+but this feels cumbersome compared to straight function application. We can
233+lift all those `mkDerivation` arguments into the outer function:
234+
235+ "hslua" =
236+ { mkDerivation, base, bytestring, [... more inputs omitted ...]
237+ , doCheck ? true, doHaddock ? true, enableSharedLibraries ? true
238+ }:
239+ mkDerivation {
240+ pname = "hslua";
241+ version = "0.4.1";
242+ inherit doCheck doHaddock;
243+ [... more attributes omitted ...]
244+ };
245+
246+but this adds a dozen highly redundant arguments to every single definition!
247+There might be clever ways around mentioning each of them explicitly, like:
248+
249+ "hslua" =
250+ { mkDerivation, base, bytestring, [... more inputs omitted ...]
251+ , ...
252+ } @ args:
253+ stdenv.lib.callPackageWith args mkDerivation {
254+ pname = "hslua";
255+ version = "0.4.1";
256+ [... more attributes omitted ...]
257+ };
258+
259+Yet that is exactly the kind of stuff we wanted to avoid in the first place. So
260+maybe it would be best to batch all those variant options in an attribute set
261+of their own?
262+
263+ "hslua" =
264+ { mkDerivation, base, bytestring, [... more inputs omitted ...]
265+ , config ? {}
266+ }:
267+ mkDerivation ({
268+ pname = "hslua";
269+ version = "0.4.1";
270+ [... more attributes omitted ...]
271+ } // config);
272+
273+This approach allows us to call `hslua { config.doCheck = false; }`, which
274+seems nice enough. At the same time, it allows us to call
275+
276+ hslua { config.pname = "this-is-not-hslua"; }
277+
278+as well, which feels like a bug.
279+
280+An entirely different approach is to take advantage of lazy evaluation to
281+define all possible build variants at once:
282+
283+ let
284+ showFlag = str: b: (if b then "with" else "without") + "-" + str;
285+
286+ mkDerivation = { pname, version, buildDepends ? []
287+ , doCheck ? true
288+ } @ args:
289+ {
290+ name = pname + "-" + version + "-" + showFlag "check" doCheck;
291+
292+ enableChecking = mkDerivation (args // { doCheck = true; });
293+ disableChecking = mkDerivation (args // { doCheck = false; });
294+ };
295+
296+ "hslua" = { base ? null }:
297+ mkDerivation {
298+ pname = "hslua";
299+ version = "0.4.1";
300+ buildDepends = [ base ];
301+ };
302+ in
303+ [ ((hslua { base = "base"; }).name)
304+ ((hslua { base = "base"; }).disableChecking.name)
305+ ((hslua { base = "base"; }).disableChecking.disableChecking.enableChecking.name)
306+ ]
307+
308+Each of those styles has its own advantages and disadvantages which aren't
309+fully understood yet. Hopefully, this summary provides some food for thought
310+and helps kick off a fruitful discussion.
311+
312+
313+
314+[1]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/hackage-packages.nix
315+[2]: https://github.com/NixOS/nixpkgs/blob/master/lib/customisation.nix#L72-L97
316+[3]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
317+[4]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-lts-2.8.nix#L4171
318+[5]: https://github.com/NixOS/nixpkgs/issues/6192
319+[6]: https://github.com/NixOS/nixpkgs/issues/7953
320+[7]: https://github.com/NixOS/nixpkgs/issues/9871
doc/02-guarantee-consistent-builds-and-obsolete-overridescope.mdnew file+182
@@ -0,0 +1,182 @@
1+Guarantee Consistent Builds and Obsolete `overrideScope`
2+========================================================
3+
4+The Problem
5+-----------
6+
7+A lot of effort goes into curated package sets like Stackage, but even so we
8+can compile only ~50% of the packages available from Hackage. It appears to be
9+the nature of the game: when `lens` 2.x comes out with a fundamentally new API,
10+then some packages will adopt the new version and others won't. A consistent
11+package set must chose on which side of the fence it wants to live. Either
12+those packages that depend on `lens` 1.x compile or those that depend on 2.x
13+compile --- but not both.
14+
15+Now, Nix is not limited to one particular version of `lens` --- we can have
16+both versions available at the same time. But it's difficult to take advantage
17+of that feature, because once you start mixing `lens` 1.x and 2.x in the same
18+package set, you risk inconsistent builds, i.e. builds where some part of the
19+dependency tree refers to `lens` 1.x and another part refers to `lens` 2.x.
20+It's a bad idea to try and link those two trees together into one executable;
21+we are fortunate that `Cabal` detects this error during the configure phase and
22+aborts the build!
23+
24+We need a mechanism that can mix multiple package versions within a package
25+set, but that also guarantees consistency for every single build. We hoped
26+`overrideScope` would be that mechanism, but somehow it hasn't quite lived up
27+to the promise, mostly because it is hard to understand.
28+
29+The Situation Today
30+-------------------
31+
32+Consider an executable package `foobar` that depends on the libraries `foo` and
33+`bar`, each of which depends on `lens`. The corresponding definitions in
34+`hackage-packages.nix` --- stripped down to the relevant bits --- look as
35+follows:
36+
37+ "lens" = ... lens version 1.x ...;
38+ "lens_2_0" = ... lens version 2.x ...;
39+
40+ "foo" = callPackage
41+ ({ mkDerivation, lens }:
42+ mkDerivation {
43+ pname = "foo";
44+ libraryHaskellDepends = [lens];
45+ }) {};
46+
47+ "bar" = callPackage
48+ ({ mkDerivation, lens }:
49+ mkDerivation {
50+ pname = "bar";
51+ libraryHaskellDepends = [lens];
52+ }) {};
53+
54+ "foobar" = callPackage
55+ ({ mkDerivation, lens }:
56+ mkDerivation {
57+ pname = "foobar"; [...]
58+ libraryHaskellDepends = [foo bar];
59+ }) {};
60+
61+Let's assume that `foo` won't compile in that setup because it requires `lens`
62+version 2.x. We can remedy that by adding an override to
63+`configuration-common.nix` that says:
64+
65+ foo = super.foo.override { lens = self.lens_2_0; };
66+
67+That change fixes the build of `foo`, but `foobar` remains broken, because now
68+it pulls in both `lens` 1.x and 2.x simultaneously through its dependencies. If
69+`bar` works only with `lens` 1.x, then there is nothing we can do: the version
70+constraints conflict and we cannot compile `foobar`. If `bar` *does* support
71+`lens` 2.x, however, then we can just switch it to the newer version with:
72+
73+ bar = super.bar.override { lens = self.lens_2_0; };
74+
75+Now we can compile `foobar`! Unfortunately, that change may break other builds.
76+There is a reason why `lens` 1.x is our default choice. If any other package
77+depends on `bar` as well as `lens` 1.x (directly or indirectly), then it will
78+no longer compile after that change.
79+
80+We can avoid that side-effect by localizing the override to `foobar`:
81+
82+ foobar = super.foobar.override {
83+ bar = self.bar.override { lens = self.lens_2_0; };
84+ };
85+
86+That approach allows us to compile `foobar`, while still leaving the default
87+version of `bar` at `lens` 1.x, like most of our packages require. Overriding
88+build inputs this way works fine, and we have used this technique for many
89+years to fix builds that require non-default versions to compile. The downside
90+of these nested overrides is that the tend to become freaky complicated if a
91+package needs overriding that is sufficiently deep in the dependency tree. The
92+GHC 7.8.4 package set, for example, needed many such overrides because its
93+default version of `mtl` was stuck at version 2.1.x all the while large parts
94+of Hackage had moved on to `mtl` 2.2.x. Since `mtl` is a rather fundamental
95+package, we had nested overrides 3-4 levels deep that were highly repetitious,
96+too. It was a mess.
97+
98+Haskell NG improved on that situation by adding `overrideScope`. That function
99+changes the package set ("scope") in which Nix evaluates a build expression.
100+The override
101+
102+ foobar = super.foobar.overrideScope (self: super: { lens = self.lens_2_0; });
103+
104+creates a new temporary package set, replaces `lens` with `lens_2_0` in it, and
105+then evaluates `foobar`. The `callPackage` function picks up the re-written
106+`lens` attribute, which means that there's no need to override that choice
107+explicitly in all dependencies of `foobar`. One could say that `overrideScope`
108+implements "deep overriding", i.e. it applies an override to the given
109+derivation as well as all sub-derivations that it refers to.
110+
111+Unfortunately, we lack a proper understanding of how expensive that technique
112+is memory and performance-wise. In the past, we've occasionally crashed Nix
113+with this kind of stuff --- keep in mind that the interpreter creates a whole
114+new package set for every build that uses this mechanism ---, but when used
115+sparingly, `overrideScope` seems to work okay.
116+
117+In some cases, `overrideScope` won't work at all, i.e. when confronted with
118+builds that have explicitly passed arguments. For example, let's say that
119+`lens` 3.x comes. So we try to compile `foobar` like this:
120+
121+ foobar = super.foobar.overrideScope (self: super: { lens = self.lens_3_0; });
122+
123+That build will fail, because we added an explicit override for `foo` earlier
124+that committed the build to `lens_2_0`, and `overrideScope` will not affect
125+that choice since that build input is not picked up with `callPackage`. So
126+`foobar` will pull in both `lens` 2.x and 3.x despite the use of
127+`overrideScope`.
128+
129+
130+Possible Improvements
131+---------------------
132+
133+We generate Haskell build expressions automatically with `cabal2nix`, and that
134+tool knows the complete dependency tree for every package. So it would be
135+possible to generate builds that expect as function arguments not just their
136+immediate dependencies but the transitive closure of all dependencies. Build
137+expressions would then call their direct dependencies, passing in appropriate
138+versions of their respective dependencies, etc. For example:
139+
140+ "foobar" = callPackage
141+ ({ mkDerivation, foo, bar, many, other, inputs, of, lens }:
142+ let lens' = lens.override { inherit many other inputs of lens; };
143+ foo' = foo.override { lens = lens'; };
144+ bar' = bar.override { lens = lens'; };
145+ in
146+ mkDerivation {
147+ pname = "foobar"; [...]
148+ libraryHaskellDepends = [foo' bar'];
149+ }) {};
150+
151+Now, `foobar` expects every single package that occurs anywhere inside of its
152+dependency tree as an argument, and it constructs the dependency tree using
153+those arguments. So the build must be consistent. It's impossible for `foobar`
154+to refer to two incompatible versions of `lens`, because its inputs always use
155+the same version.
156+
157+Consequently,
158+
159+ foobar.override { mtl = self.mtl_2.4.0; }
160+
161+gives us is a version of `foobar` that has its entire dependency tree built
162+with `mtl` 2.4.x. We could even get rid of the override altogether if we adopt
163+the suggestions from "Use Function Application To Escape Override Hell" and
164+remove `callPackage` from `hackage-packages.nix`. We'd define all builds as
165+straight functions
166+
167+ "foobar" =
168+ { mkDerivation, foo, bar, many, other, inputs, of, lens }:
169+ let lens' = lens { inherit many other inputs of lens; };
170+ foo' = foo { lens = lens'; };
171+ bar' = bar { lens = lens'; };
172+ in
173+ mkDerivation {
174+ pname = "foobar"; [...]
175+ libraryHaskellDepends = [foo' bar'];
176+ };
177+
178+and invoke them from inside of a package set with:
179+
180+ callPackage foobar { mtl = self.mtl_2.4.0; }
181+
182+This would give us a guarantee for consistent builds without any overrides.
doc/03-map-cabal-files-to-nix-without-information-loss.mdnew file+110
@@ -0,0 +1,110 @@
1+Map Cabal Files To Nix Without Information Loss
2+===============================================
3+
4+The Problem
5+-----------
6+
7+Our implementation of `cabal2nix` loses important information, because its
8+mapping from Cabal to Nix is too simplistic. Cabal supports conditional values
9+that depend on
10+
11+- the OS and architecture on which the build takes place,
12+- the compiler version,
13+- the respective versions of the build dependencies, and
14+- Cabal flags.
15+
16+But we don't capture those conditional settings in the generate Nix file.
17+Instead, we resolve those conditions with a set of hard-coded assumptions that
18+work well for Linux/x86_64 using GHC 7.10.2, but other build environments often
19+fail to compile the expression because some essential information is missing.
20+
21+
22+The Situation Today
23+-------------------
24+
25+Consider the Cabal file for [`conduit-1.2.5`][2]. Among other things, it says:
26+
27+ Library
28+ Build-depends: base >= 4.3 && < 5
29+ , resourcet >= 1.1 && < 1.2
30+ , exceptions >= 0.6
31+ , lifted-base >= 0.1
32+ , transformers-base >= 0.4.1 && < 0.5
33+ , transformers >= 0.2.2 && < 0.5
34+ , mtl
35+ , mmorph
36+ if !impl(ghc>=7.9)
37+ build-depends: void >= 0.5.5
38+
39+The library depends on the module `Data.Void`, which GHC's `base` library
40+contains starting with version 7.9.x, but older versions of GHC don't have that
41+module, so the build needs an additional 3rd-party library, `void`, to provide
42+that code. The Nix build expression for `conduit`, however, does not capture
43+that information. `cabal2nix` omits `void` from the list of dependencies
44+entirely:
45+
46+ libraryHaskellDepends = [
47+ base exceptions lifted-base mmorph mtl resourcet transformers
48+ transformers-base
49+ ];
50+
51+The [conversion function][1] used by `cabal2nix` doesn't translate the
52+conditional from Cabal into Nix. Instead, the function
53+[resolves all conditionals][3], assuming that
54+
55+- the build will take place with the same architecture, OS, and compiler
56+version as were used to compile `cabal2nix`,
57+
58+- all Haskell dependencies are available in all versions, and
59+
60+- all Cabal flags have their default value unless specified otherwise in a
61+[hard-coded list][4].
62+
63+For the majority of packages, that heuristic produces build expressions that
64+work fine, but In case of `conduit` the result won't compile with compilers
65+prior to GHC 7.10.x, and thus a
66+[manually configured override is necessary to fix the build][5].
67+
68+The lack of support for conditionals is particularly annoying when it comes to
69+packages that make extensive use of Cabal flags, like `git-annex`. There are
70+numerous flags that determine the feature set supported by the build, i.e.
71+whether to include the "assistant" or not. Now, Stackage package sets like LTS
72+Haskell do contain `git-annex`, but they don't contain all the dependencies
73+that are necessary to build the assistant. Consequently, `git-annex` ought to
74+compile with `-f-assistant` within a context of Stackage. At the same time, we
75+want to provide the assistant feature to Nixpkgs users --- and we can, because
76+we have all of Hackage, not just Stackage!
77+
78+So what we do is this: our generated build expression for `git-annex` by
79+default includes the assistant, and that is the build `gitAndTools.git-annex`
80+refers to. Then we define [variants of that build without the assistant][5],
81+and these are the ones `haskell.packages.lts-x_y.git-annex` refers to. Now, we
82+define that variant by setting the Cabal flag `-f-assistant`, but that override
83+does not change the fact that all those dependencies needed only to build the
84+assistant are still listed as build inputs in the Nix expression for
85+`git-annex`! Cabal won't use these dependencies during the build, but Nix will
86+create them and include them into the build environment nonetheless, which
87+defeats the purpose of having that flag in the first place.
88+
89+Possible Improvements
90+---------------------
91+
92+Nix expressions must capture the complete logic that the underlying Cabal file
93+specifies. In case of the `conduit` example, the generated code should say:
94+
95+ libraryHaskellDepends = [
96+ base exceptions lifted-base mmorph mtl resourcet transformers
97+ transformers-base
98+ ] ++ stdenv.lib.optional (stdenv.lib.versionOlder ghc.version "7.9") void;
99+
100+Furthermore, Cabal flags should be mapped to boolean function arguments that
101+enable/disable the underlying feature and thereby modify how the Nix expression
102+evaluates, so that no extraneous build inputs occur.
103+
104+
105+[1]: https://github.com/NixOS/cabal2nix/blob/master/distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal.hs#L36
106+[2]: http://hackage.haskell.org/package/conduit-1.2.5/conduit.cabal
107+[3]: http://hackage.haskell.org/package/Cabal-1.22.4.0/docs/Distribution-PackageDescription-Configuration.html#v:finalizePackageDescription
108+[4]: https://github.com/NixOS/cabal2nix/blob/master/distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs
109+[5]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix#L142
110+[5]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-common.nix#L66-L80
doc/04-set-up-a-sufficiently-powerful-build-farm.mdnew file+208
@@ -0,0 +1,208 @@
1+Set up a Sufficiently Powerful Build Farm
2+=========================================
3+
4+The Problem
5+-----------
6+
7+`hydra.nixos.org` compiles and provides binaries only for the `haskellPackages`
8+package set. The build farm compiles none of our LTS Haskell package sets,
9+which means that users of `haskell.packages.lts-x_y` cannot get any
10+pre-compiled binaries. It also means that those builds aren't verified, i.e. we
11+won't notice when changes to Nixpkgs break builds in those package sets.
12+
13+Furthermore, we have [no pre-compiled binaries with profiling support][1] for
14+any of our package sets.
15+
16+The Situation Today
17+-------------------
18+
19+We have 66 active package sets that define the following number of active
20+builds per platform:
21+
22+ pkgset builds
23+ 1: ghc6123 5173
24+ 2: ghc704 5182
25+ 3: ghc7102 5189
26+ 4: ghc722 5183
27+ 5: ghc742 5183
28+ 6: ghc763 5182
29+ 7: ghc783 5173
30+ 8: ghc784 5173
31+ 9: ghcHEAD 5188
32+ 10: ghcNokinds 5188
33+ 11: ghcjs 5172
34+ 12: lts-0_0 795
35+ 13: lts-0_1 795
36+ 14: lts-0_2 795
37+ 15: lts-0_3 795
38+ 16: lts-0_4 795
39+ 17: lts-0_5 795
40+ 18: lts-0_6 795
41+ 19: lts-0_7 795
42+ 20: lts-1_0 827
43+ 21: lts-1_1 827
44+ 22: lts-1_10 828
45+ 23: lts-1_11 829
46+ 24: lts-1_12 829
47+ 25: lts-1_13 829
48+ 26: lts-1_14 830
49+ 27: lts-1_15 831
50+ 28: lts-1_2 828
51+ 29: lts-1_4 828
52+ 30: lts-1_5 828
53+ 31: lts-1_7 828
54+ 32: lts-1_8 828
55+ 33: lts-1_9 827
56+ 34: lts-2_0 1019
57+ 35: lts-2_1 1019
58+ 36: lts-2_10 1023
59+ 37: lts-2_11 1023
60+ 38: lts-2_12 1023
61+ 39: lts-2_13 1022
62+ 40: lts-2_14 1022
63+ 41: lts-2_15 1022
64+ 42: lts-2_16 1022
65+ 43: lts-2_17 1023
66+ 44: lts-2_18 1022
67+ 45: lts-2_19 1022
68+ 46: lts-2_2 1018
69+ 47: lts-2_20 1024
70+ 48: lts-2_21 1023
71+ 49: lts-2_22 1023
72+ 50: lts-2_3 1018
73+ 51: lts-2_4 1018
74+ 52: lts-2_5 1018
75+ 53: lts-2_6 1017
76+ 54: lts-2_7 1017
77+ 55: lts-2_8 1023
78+ 56: lts-2_9 1023
79+ 57: lts-3_0 1322
80+ 58: lts-3_1 1322
81+ 59: lts-3_2 1321
82+ 60: lts-3_3 1321
83+ 61: lts-3_4 1321
84+ 62: lts-3_5 1322
85+ 63: lts-3_6 1321
86+ 64: lts-3_7 1323
87+ 65: lts-3_8 1323
88+ 66: lts-3_9 1324
89+ pkgset builds
90+
91+That gives a total of 111,647 active builds, many of which are identical. All
92+package sets combined define 77,445 distinct store paths, i.e. some 34,202
93+builds are shared across package sets.
94+
95+Now, `hydra.nixos.org` compiles only `haskellPackages` at the moment. Out of a
96+total of [46,862 builds in trunk][2], 15,446 (33%) come from the Haskell
97+package set. If we'd enable every Haskell package set on Linux/i686,
98+Linux/x86_64, and Darwin/x86_64, then we'd have a total of 263,751 builds ---
99+5.6 times as much as before ---, and 88% of all builds would be related to
100+Haskell.
101+
102+A complete build of the active derivations in `haskellPackages` takes up
103+approx. 27 GByte of disk space per platform. That gives about 80 GByte for all
104+of our 3 active platforms. How would that number develop if we'd enable
105+everything? The store path sizes in MByte are distributed as follows (based on
106+7,620 samples excluding `ghc`):
107+
108+ Minimum 1st Quart. Median Mean 3rd Quart. Maximum
109+ 0.0169 0.3557 0.9497 4.6300 3.0640 678.9000
110+
111+Multiplying the average store path size by the number of distinct store paths
112+tells us that storing *everything* requires approx. 360 GByte per platform.
113+With 3 active platforms, we'd need about 1 TByte of disk space for one complete
114+set of Haskell packages.
115+
116+Now, we might be able to reduce that number by disabling some particularly
117+large builds. The store path size distribution is skewed to the left, i.e.
118+towards smaller builds. Approximately 82% of all store paths are actually
119+smaller than the numerical average. Our top-20 biggest Haskell builds are:
120+
121+ pkg size
122+ 1: ghc 895.5
123+ 2: metadata 678.9
124+ 3: uhc-light 253.5
125+ 4: OpenGLRaw 249.3
126+ 5: FpMLv53 229.5
127+ 6: amazonka-ec2 214.8
128+ 7: Agda 212.6
129+ 8: xhb 189.0
130+ 9: unicode-properties 175.0
131+ 10: scholdoc-texmath 165.0
132+ 11: idris 137.7
133+ 12: gf 126.4
134+ 13: pandoc 124.8
135+ 14: unicode-names 118.4
136+ 15: wxcore 113.8
137+ 16: java-character 112.1
138+ 17: hat 111.1
139+ 18: texmath 109.6
140+ 19: open-symbology 107.6
141+ 20: turkish-deasciifier 104.0
142+
143+If we'd make an effort to disable some of those expensive builds --- or maybe
144+reduce their output size ---, then we'd make a noticeable dent into the space
145+requirements. Even so, it's clear that `hydra.nixos.org` cannot provide that
146+much disk space today.
147+
148+Curiously enough, the CPU power necessary to compile all those packages is the
149+least of our problems. Our build farm can easily re-compile everything from
150+scratch within 2-3 days, which is "good enough" for all practical purposes.
151+Also, changes to `stdenv` occur rarely (and we typically know about them in
152+advance). The normal update cycle triggers only a handful of builds -- maybe
153+20-300 per day --, because the versions fundamental Haskell packages are fixed
154+in the LTS package sets.
155+
156+It's unclear whether the Hydra software would cope with 66 package sets with
157+some 111,000 derivations in them that need to be evaluated, say, once an hour.
158+Hydra has undergone some architectural changes recently that might make such a
159+load possible --- i.e. `hydra-evaluator` is more efficient than it used to be
160+---, but I don't have any reliable data concerning the performance of the
161+process, so I cannot say what is possible and what is not.
162+
163+We know for sure that the currently available disk space doesn't suffice. Disk
164+space is notoriously low on `hydra.nixos.org`, and storing another terabyte
165+Haskell data is certainly impossible at the moment.
166+
167+Possible Improvements
168+---------------------
169+
170+We have basically two alternatives:
171+
172+1. Throw hardware (money) at `hydra.nixos.org`.
173+2. Establish a separate build farm for Haskell packages.
174+
175+Either solution requires money, which we could probably raise through crowd
176+funding. At the moment, the NixOS Foundation collects donations for purposes of
177+NixOS in general, but it should be possible to start a funding campaign that
178+collects donations specifically for the purposes of establishing a Haskell
179+build farm so that people who care about that particular topic have an
180+incentive to participate.
181+
182+Now, if we'd go for approach (1), then we could use those funds to buy bigger
183+disks and more RAM for `hydra.nixos.org`, which would be beneficial for
184+everyone -- not just Haskell users. The downside is that `hydra.nixos.org` is a
185+bit of a black box. Only very few people have access to those machines, and
186+that situation is not going to change any time soon. Personally, I have no idea
187+whether adding RAM or disks to the cluster is feasible at all, and whether
188+those upgrades would enable the build farm to cope with the number of builds
189+that we're considering here.
190+
191+Solution (2) seems more manageable, because we could set up an environment from
192+scratch as we see fit. Experience from managing `hydra.cryp.to` suggests that
193+one powerful KVM-based virtual server can serve as the Hydra master. In
194+addition, we'd need 2-3 additional build slaves to compile packages. For
195+massive re-builds, we could spawn another 10-15 builds slaves in EC2 to reduce
196+the time it takes to re-build everything from scratch. Such a setup would
197+probably work well in practice, and it should be available at a yearly cost of
198+1,000 dollars or less.
199+
200+Anyhow, that's just a rough estimate. I don't know, really, what an ideal
201+hardware / service platform for running such a virtual service would be. It
202+would be great if a resident virtual server / NAS / system management guru
203+could chime in with suggestions; I'm sure the NixOS crowd has people who know
204+that kind of stuff and who can design the infrastructure for such a build farm.
205+
206+
207+[1]: https://github.com/NixOS/nixpkgs/issues/10143
208+[2]: http://hydra.nixos.org/jobset/nixpkgs/trunk
doc/05-publish-all-of-hackage.mdnew file+69
@@ -0,0 +1,69 @@
1+Publish All of Hackage
2+======================
3+
4+The Problem
5+-----------
6+
7+Users of Nixpkgs want to build Haskell packages that have no recent release,
8+i.e. the software's authors have not updated their code to deal with modern
9+versions of the respective build dependencies. The required old versions,
10+however, may not be available in Nixpkgs, and then the build cannot succeed. At
11+that point, we recommend our users to
12+[add the missing package versions themselves][1] through the override mechanism
13+in `~/.nixpkgs/config.nix`. That approach works fine, but it's challenging for
14+new users and it's certainly inconvenient.
15+
16+The Situation Today
17+-------------------
18+
19+We publish 11,216 package versions out of 62,354 available ones, i.e. 18% of
20+Hackage. We select packages for distribution using the following criteria:
21+
22+1. the latest version of every package (9,058 builds),
23+
24+2. old versions required by LTS Haskell (2,137 builds), and
25+
26+3. old versions manually configured in the `extra-packages` field of
27+ [`configuration-hackage2nix.yaml`][2] (21 builds).
28+
29+The resulting [`hackage-packages.nix`][3] file is ~8.3 MByte large.
30+
31+Now, we could simply publish all of Hackage, i.e. all 62,354 available builds.
32+That would certainly make the lives of many Haskell hackers easier, but
33+unfortunately the resulting `hackage-packages.nix` file would require 52 MByte
34+of space. Furthermore, simple benchmarks suggest that `nix-instantiate` needs a
35+whopping 4 seconds to instantiate a `ghcWithPackages` environment from the new
36+database where instantiating the same environment used to take 0.45 seconds
37+before --- a performance drop by a factor of 8.
38+
39+Possible Improvements
40+---------------------
41+
42+We could continue to publish the "small" `hackage-packages.nix` database by
43+default, but generate an additional large database that we'd store in a
44+separate location. We would then add support for an option to
45+`~/.nixpkgs/config.nix` users could set to opt in to using the large database
46+if they want to. That way, Haskell users would have an option to get all of
47+Hackage without causing a performance drop for everyone else.
48+
49+One issue is that checking that ~50MB file into Nixpkgs might be a bad idea,
50+because it sets a dangerous precedent. Arguably, if we check all of Hackage
51+into Nixpkgs, then we cannot reasonably say *no* to someone who wants to check
52+all of CPAN into Nixpkgs too, and before we know it our Git repository triples
53+in size. So it might be wise to put the full Hackage variant of
54+`hackage-packages.nix` into a separate repository that we fetch via
55+`builtins.fetchurl` if the corresponding option is enabled.
56+
57+An altogether different approach is to improve our tools like `cabal2nix` to
58+make it convenient to add old versions from Hackage into a local Nixpkgs
59+instance, i.e. by extending the program to generate builds for all missing
60+versions to complete the transitive closure of the requested build so that
61+users don't have to run it a dozen times because multiple old versions are
62+missing. Conceivably, we could also provide tools that manage
63+`~/.nixpkgs/config.nix`, which might be a good idea independent of these
64+Haskell-specific issues.
65+
66+
67+[1]: http://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages
68+[2]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
69+[3]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/hackage-packages.nix
doc/GNUmakefilenew file+62
@@ -0,0 +1,62 @@
1+# doc/GNUmakefile
2+
3+PANDOC_FLAGS := --smart -V papersize:"a4paper"
4+
5+.PHONY: all clean
6+
7+all:: hal8.pdf hal8.html hal8-folien.pdf nixos-meetup-3-slides.pdf
8+all:: 00-future-of-haskell-packaging-in-nixpkgs.pdf
9+all:: 01-use-function-application-to-escape-override-hell.pdf
10+all:: 02-guarantee-consistent-builds-and-obsolete-overridescope.pdf
11+all:: 03-map-cabal-files-to-nix-without-information-loss.pdf
12+all:: 04-set-up-a-sufficiently-powerful-build-farm.pdf
13+all:: 05-publish-all-of-hackage.pdf
14+all:: nixcon-2015-slides.pdf
15+
16+%.tex : %.md
17+ pandoc -s $(PANDOC_FLAGS) -f markdown -t latex $< -o $@
18+
19+%.html : %.md
20+ pandoc -s $(PANDOC_FLAGS) -f markdown -t html $< -o $@
21+
22+%.pdf : %.tex
23+ pdflatex $<
24+ while grep -i >/dev/null "rerun to.*get.*right" $*.log; do \
25+ pdflatex $<; \
26+ done
27+
28+%.eps : %.dia
29+ dia -e $@ -t eps $<
30+
31+%.pdf : %.eps
32+ ps2pdf -dEPSCrop $< $@
33+
34+hal8-folien.pdf : hal8-folien.md
35+ pandoc -t beamer $< -o $@
36+
37+nixos-meetup-3-slides.pdf : nixos-meetup-3-slides.md
38+ pandoc -t beamer $< -o $@
39+
40+nixcon-2015-slides.pdf : nixcon-2015-slides.md pipeline-overview.pdf pipeline-details.pdf \
41+ hackage-version-boxplot.pdf
42+ pandoc -t beamer $< -o $@
43+
44+hackage-version-boxplot.pdf : analyze-hackage.r hackage.csv
45+ Rscript $<
46+
47+hackage.csv:
48+ { set -eu -o pipefail; \
49+ cd ../hackage; \
50+ echo package,version; \
51+ for n in *; do \
52+ test -d $$n || continue; \
53+ for v in $$n/*; do \
54+ echo $$n,$$(basename $$v); \
55+ done; \
56+ done \
57+ } >$@.tmp
58+ mv $@.tmp $@
59+
60+clean:
61+ @rm -f *.aux *.html *.log *.out *.pdf *.toc
62+ @rm -f .Rhistory builds.csv hackage.csv
doc/analyze-hackage.rnew file+16
@@ -0,0 +1,16 @@
1+# cabal2nix/doc/analyze-hackage.r
2+
3+library(data.table)
4+
5+hackage <- within(as.data.table(read.csv("hackage.csv", header=T, stringsAsFactors=F)), {
6+ package <- ordered(package)
7+})
8+setkey(hackage, package)
9+
10+t <- hackage[,list(versions=length(version)),by=package][order(versions, decreasing=T)]
11+
12+pdf("hackage-version-boxplot.pdf",width=8, height=1.25)
13+opar <- par(mai=c(0.4,0.1,0.1,0.1))
14+boxplot(t$versions, outline=T, horizontal=TRUE, log="x", range=0)
15+par(opar)
16+dev.off()
doc/analyze-hydra-builds.rnew file+54
@@ -0,0 +1,54 @@
1+# cabal2nix/doc/analyze-hydra-builds.r
2+#
3+# Generate the input file "builds.csv" by running
4+#
5+# sudo -u hydra psql -c "Copy (select b.project, b.jobset, b.job, b.timestamp, b.drvpath, b.system, b.buildstatus, b.size, b.closuresize, bs.type, bs.starttime, bs.stoptime, bs.machine from builds b left join buildsteps bs on b.id=bs.build and b.drvpath=bs.drvpath where finished=1 and iscachedbuild=0) to stdout With CSV HEADER;" >builds.csv
6+#
7+# on Hydra.
8+
9+library(data.table)
10+
11+builds <- within(as.data.table(read.csv("builds.csv", header=T, stringsAsFactors=T)), {
12+ timestamp <- as.POSIXct(timestamp, origin="1970-01-01")
13+ starttime <- as.POSIXct(starttime, origin="1970-01-01")
14+ stoptime <- as.POSIXct(stoptime, origin="1970-01-01")
15+ runtime <- difftime(stoptime, starttime, units="mins")
16+ machine <- sub("^(hydra|root)@", "", machine)
17+})
18+builds[machine=="", machine:="localhost"]
19+setkey(builds, project, jobset, job, timestamp)
20+
21+## Determine the average build runtime of all successful Haskell builds that
22+## ran on "work".
23+
24+hs <- builds[project=="nixpkgs" & jobset=="haskell-updates",]
25+hs <- hs[machine=="work" & buildstatus==0 & system == "x86_64-linux" & runtime > 0,]
26+hs <- hs[,job:=sub("\\.x86_64-linux$", "", job)]
27+hs <- hs[,job:=sub("^haskell(ng)?Packages\\.", "", job)]
28+hs <- hs[,job:=sub(".*git-?annex.*", "git-annex", job, ignore.case=T)]
29+hs <- hs[,job:=sub("idris_plain$", "idris", job)]
30+hs <- hs[!grep("haskell(-ng)?\\.compiler\\.", job),]
31+hs <- hs[!grep("^ghc\\.ghc", job),]
32+hs <- hs[!grep("ghc[0-9]+$", job),]
33+hs <- hs[!duplicated(hs$drvpath)]
34+hs <- hs[
35+ , list(builds=length(runtime),runtime=sum(runtime),runtime.median=median(runtime),runtime.mean=mean(runtime),runtime.sd=sd(runtime))
36+ , by=job
37+ ]
38+hs <- hs[builds>10,]
39+head(hs[order(runtime.mean, decreasing=T)], n=30)
40+head(hs[order(builds, decreasing=T)], n=20)
41+summary(as.numeric(hs$runtime.mean,units="mins"))
42+quantile(as.numeric(hs$runtime.mean,units="mins"), 0.82)
43+
44+## Determine the number of builds per day.
45+
46+hs <- builds[ project=="nixpkgs" & jobset=="haskell-updates" & starttime >= as.POSIXct("2015-01-01")
47+ , list(builds=length(timestamp))
48+ , by=list(day=as.Date(timestamp))
49+ ]
50+hs <- merge(hs, data.table(day=seq(min(hs$day), max(hs$day), by="days"), ignore=0), by="day", all=T)
51+hs[is.na(builds)] <- 0
52+hs$ignore <- NULL
53+summary(hs$builds)
54+quantile(hs$builds, .8)
doc/analyze-hydra-space-requirements.rnew file+57
@@ -0,0 +1,57 @@
1+# cabal2nix/doc/analyze-hydra-space-requirements.r
2+
3+library(data.table)
4+library(rjson)
5+library(foreach)
6+library(doParallel)
7+
8+### Set up the workspace.
9+
10+cores <- detectCores()
11+options(cores=cores, mc.cores=cores)
12+cl <- makeForkCluster(cores)
13+registerDoParallel(cl)
14+setDefaultCluster(cl)
15+
16+builds <- foreach (i=list.files(".", "*.json"), .combine="rbind") %dopar% {
17+ print(i)
18+ l <- fromJSON(file=i)
19+ pkgset <- names(l)
20+ data.table(pkgset, pkg=names(l[[pkgset]]), out=unlist(l[[pkgset]]))
21+}
22+setkey(builds, pkgset, pkg)
23+
24+t <- foreach (out=unique(builds$out), .combine="rbind") %dopar% {
25+ size <- system(paste("( du -sb", out, "| cut -f1 ) 2>/dev/null || true"), intern=TRUE)
26+ size <- if (identical(size, character(0))) "" else size
27+ data.table(out, size=as.integer(size))
28+}
29+
30+builds <- merge(builds, t, by="out")
31+
32+### Analyze the data.
33+
34+# Total number of attributes in all package sets.
35+builds_total <- nrow(builds)
36+
37+# Number of distict builds (output paths).
38+builds_unique <- length(unique(builds$out))
39+
40+# Size of haskellPackages per platform.
41+haskellPackages <- unique(builds[pkgset != "ghc7102" & !is.na(size),list(out,size)])
42+haskellPackages_size <- sum(as.numeric(haskellPackages$size))
43+
44+# List of distinct sizes.
45+sizes <- unique(builds[pkg != "ghc" & !is.na(size),list(out,size)])$size
46+
47+# Average output path size.
48+avg_build_size <- mean(sizes)
49+sd_build_size <- sd(sizes)
50+summary(sizes / 1e6)
51+
52+# Biggest builds.
53+biggest_builds <- head(builds[!is.na(size),list(size=mean(size)),by=pkg][order(size, decreasing=T)], n=20)
54+biggest_builds$size <- round(biggest_builds$size / 1e6, 1)
55+
56+# Number of builds, distinguished by package set.
57+builds_by_pkgset <- builds[,list(attributes=length(pkg)), by=pkgset][order(pkgset)]
doc/future.orgnew file+60
@@ -0,0 +1,60 @@
1+#+TITLE: The Future of Haskell Packaging in Nix
2+
3+* DONE Use Function Application To Escape Override Hell
4+* DONE Guarantee Consistent Builds and Obsolete =overrideScope=
5+* DONE Map Cabal Files To Nix Without Information Loss
6+* TODO Implement Proper Dependency Resolution
7+* TODO Develop Intelligent Policies for Post-processing and Patching
8+* TODO Users Need a Configuration Mechanism That Is Both Simpler and More Powerful
9+* TODO Deal With Infinite Recursions in Test Dependencies
10+* DONE Set up a Sufficiently Powerful Build Farm
11+* TODO Define and Publish Processes for Managing the Package Set(s)
12+* DONE Publish All of Hackage
13+
14+ We publish 10,745 package versions out of 60,504 available ones, i.e. 18% of
15+ Hackage. Those packages are selected as follows: we distribute the latest
16+ version of every package --- 8,764 builds --- plus an additional 1,981 older
17+ versions that are required by the various LTS Haskell and Stackage Nightly
18+ package sets we support.
19+
20+* TODO Generate Differential Build Expressions
21+* TODO Generate Build Expressions for Hydra
22+* TODO Add Support for Mega Repositories to =cabal2nix=
23+* TODO Support Building With =stack=
24+* TODO Support multi-output derivations
25+
26+ Put static, shared, and profiled library variants into separate output so
27+ that we can build everything without forcing users to download all that stuff
28+ if they just want the regular build.
29+* TODO Write a =ghcWithPackages= combinator to create conglomerate workspaces
30+
31+ Thomas Strobel <thomas@strobel.eu> suggested this:
32+
33+ I want to hack on a set of libraries, say transformers and mtl, and I'd like
34+ to do that in an environment that contains criterion, QuickCheck, etc. So I
35+ run
36+
37+ stackWithPackages (hp: {
38+ sources = with hp; [transformers mtl];
39+ env = with hp; [criterion QuickCheck];
40+ })
41+
42+ This should create a conglomerate workspace / nix-shell environment that
43+ contains the source code for transformers and lens in subdirectories plus a
44+ stack.yaml file that builds them both:
45+
46+ stack.yaml
47+ mtl / ...
48+ transformers ...
49+
50+ The environment would contain a GHC with criterion and QuickCheck registered
51+ in appropriate LTS versions so that the stack builds don't compile anything
52+ except the packages I'm hacking on.
53+
54+ The value of env could possibly be auto-determined from the dependencies of
55+ transformers and mtl.
56+* TODO Solve the too-eager evaluation of meta.broken
57+
58+ We'd like to mark builds that are known to fail with `meta.broken = true`,
59+ but this is impractical because users have no way to override that setting if
60+ they discover that the package has been fixed in a new version.
doc/hal8-folien.mdnew file+289
@@ -0,0 +1,289 @@
1+% Managing the Haskell Dependency Hell with Nix
2+% Peter Simons \<simons@cryp.to\>
3+% 2013-06-21
4+
5+-------------------------------------------------------------------------------
6+
7+# Ablauf der Präsentation
8+
9+1) Vorstellung des Nix Paket-Managers
10+
11+ - Übersicht der besonderen Features
12+ - Die Paket-Datenbank
13+ - Nix als Programmiersprache
14+
15+2) Installation von Haskell-Paketen
16+
17+ - Einfache Installation
18+ - Mehrere Versionen gleichzeitig installieren
19+ - Funktionsweise von `ghc-wrapper`
20+ - Nix in Kombination mit `cabal-dev`
21+
22+3) Erweiterung der Nix Paket-Datenbank mit `cabal2nix`
23+
24+4) Continuous-Integration mit der Hydra Build-Farm
25+
26+5) Fragen & Antworten
27+
28+-------------------------------------------------------------------------------
29+
30+# Was ist Nix und warum will ich das wissen?
31+
32+- Nix ist ein rein funktionaler Paket-Manager.
33+
34+- Nix kann mehrere Paket-Versionen gleichzeitig installieren.
35+
36+- Nix garantiert, dass alle Paket-Abhängigkeiten bekannt sind.
37+
38+- Nix erlaubt atomische Updates.
39+
40+- Nix erlaubt das Zurücknehmen von Updates.
41+
42+- Nix erlaubt die Installation von Binär-Paketen.
43+
44+- Nix ist unabhängig vom Betriebsystem.
45+
46+- Nix hat erstklassige Unterstützung für Multi-User-Systeme.
47+
48+- Nix ist freie Software unter GNU LGPL 2.1.
49+
50+-------------------------------------------------------------------------------
51+
52+# Wie sieht eine Nix-Installation aus?
53+
54+- Nix lebt komplett unterhalb des Verzeichnisses `/nix`.
55+
56+ - Nix deinstallieren: `rm -rf /nix`
57+ - Backup erstellen: `tar cfz nix-backup.tar.gz /nix`
58+
59+- Meta-Daten liegen unterhalb von `/nix/var`.
60+
61+- Alle Pakete werden unterhalb von `/nix/store` installiert:
62+
63+ /nix/store/3768znryvs7nmnr3p2cdlr95hj-ghc-6.12.3
64+ /nix/store/8z0v9s56nc2f5zgdn6hgzchwba-ghc-7.0.4
65+ /nix/store/njwikqrziy7nsc18bpxlvncq1q-ghc-7.6.3
66+
67+- In `/nix/store` installierte Pakete referenzieren niemals
68+ Dateien außerhalb des Stores.
69+
70+-------------------------------------------------------------------------------
71+
72+# Die Paketdatenbank
73+
74+- Nixpkgs ist eine Sammlung von Build-Rezepten, die in der rein
75+funktionalen Sprache *Nix* geschrieben sind.
76+
77+- Ein Paket wird erzeugt durch die Funktion `derivation`:
78+
79+ derivation :: String -- Arch-OS
80+ -> String -- Name-Version
81+ -> [String] -- Build-Kommando
82+ -> [StorePath] -- Abhängigkeiten
83+ -> [(String,String)] -- Shell-Umgebung
84+ -> IO StorePath
85+
86+- Nixpkgs bietet verschiedene `mkDerivation`-Wrapper, um die Verwendung
87+von `derivation` vereinfachen.
88+
89+-------------------------------------------------------------------------------
90+
91+# Das Paket `parsec-3.1.3`
92+
93+ { cabal, mtl, text }:
94+
95+ cabal.mkDerivation (self: {
96+ pname = "parsec";
97+ version = "3.1.3";
98+ sha256 = "1a64gzirgpa1i78gbbp9z059nh29xmcja4g8vgjb1";
99+ buildDepends = [ mtl text ];
100+ })
101+
102+-------------------------------------------------------------------------------
103+
104+# Installation von `parsec-3.1.3`
105+
106+ $ nix-env -iA haskellPackages.parsec_3_1_3
107+ installing `haskell-parsec-ghc7.6.3-3.1.3'
108+ these paths will be fetched:
109+ /nix/store/09zlb...-haskell-parsec-ghc7.6.3-3.1.3
110+ /nix/store/4p1rb...-haskell-mtl-ghc7.6.3-2.1.2
111+ /nix/store/i0k3s...-haskell-text-ghc7.6.3-0.11.3.1
112+ /nix/store/q8163...-haskell-transformers-ghc7.6.3-0.3.0.0
113+ [...]
114+ building path(s) `/nix/store/0xfxh...-user-environment'
115+ created 22 symlinks in user environment
116+
117+-------------------------------------------------------------------------------
118+
119+# Das Paket für `yesod-1.2.1`
120+
121+ { cabal, aeson, blazeHtml, blazeMarkup, dataDefault,
122+ , hamlet monadControl, networkConduit, safe,
123+ , shakespeareCss shakespeareJs text, transformers,
124+ , unorderedContainers wai, waiExtra, warp yaml,
125+ , yesodAuth, yesodCore yesodForm, yesodPersistent
126+ }:
127+ cabal.mkDerivation (self: {
128+ pname = "yesod";
129+ version = "1.2.1";
130+ sha256 = "19gwhav6sr6gd2kh92ga8a09hq9grllmnacdqk6zg";
131+ buildDepends = [ aeson blazeHtml blazeMarkup
132+ dataDefault hamlet monadControl networkConduit safe
133+ shakespeareCss shakespeareJs text transformers
134+ unorderedContainers wai waiExtra warp yaml yesodAuth
135+ yesodCore yesodForm yesodPersistent
136+ ];
137+ })
138+
139+-------------------------------------------------------------------------------
140+
141+# Die Programmiersprache Nix
142+
143+- Nix ist lazy-evaluiertes, ungetyptes Lambda-Kalkül.
144+
145+- Strings: `"hello world"`, `http://example.org/`
146+
147+- Listen: `[ 12 "abc" http://example.org ]`
148+
149+- Funktionen: `list: element: list ++ [element]`
150+
151+- Dictionaries: { foo = "foo"; foo = "bar; }
152+
153+- Rekursive Dictionaries:
154+
155+ rec { bar = "foo"; bar = "bar; foobar = foo + bar; }
156+
157+- Let-Statements:
158+
159+ let append = { list ? [], element }: list++[element];
160+ in append { list = ["abc" 3]; element = null; }
161+
162+- With-Statements: `with { foo = "foobar"; }; foo`
163+
164+-------------------------------------------------------------------------------
165+
166+# Haskell in Nixpkgs
167+
168+- Unterstützt werden Haskell Platform 2009.2.0.2, 2010.1.0.0,
169+2010.2.0.0, 2011.2.0.0, 2011.2.0.1, 2011.4.0.0, 2012.2.0.0, 2012.4.0.0
170+und 2013.2.0.0 auf Linux und Darwin.
171+
172+- Mehr als 850 Bibliotheken von Hackage:
173+
174+ nix-env -qaP \* | grep haskellPackages
175+
176+- Haskell Platform installieren:
177+
178+ nix-env -iA haskellPackages.haskellPlatform
179+ nix-env -iA haskellPackages_ghc763.haskellPlatform
180+
181+- Pakete von Hackage installieren:
182+
183+ nix-env -iA haskellPackages_ghc763.cabalInstall
184+ nix-env -iA haskellPackages_ghc763.darcs
185+
186+-------------------------------------------------------------------------------
187+
188+# Mehrere GHC Versionen installieren
189+
190+ $ nix-env -p ~/ghc-7.6.3 -iA haskellPackages_ghc763.ghc
191+ $ nix-env -p ~/ghc-7.4.2 -iA haskellPackages_ghc742.ghc
192+ $ nix-env -p ~/ghc-7.0.4 -iA haskellPackages_ghc704.ghc
193+ [...]
194+
195+ $ export PATH=~/ghc-7.6.3/bin:~/ghc-7.4.2/bin:...:$PATH
196+
197+ $ ghc --version
198+ The Glorious Glasgow Haskell Compiler, version 7.6.3
199+
200+ $ ghc-7.0.4 --version
201+ The Glorious Glasgow Haskell Compiler, version 7.0.4
202+
203+-------------------------------------------------------------------------------
204+
205+# Wie findet `ghc` die installierten Bibliotheken?
206+
207+- `ghc-wrapper` findet zur Laufzeit alle Pakete, die im selben Profil
208+installiert sind wie der Wrapper selber.
209+
210+- `ghcWithPackages` baut einen speziellen Wrapper, dessen Paket-Liste
211+statisch konfiguriert ist:
212+
213+ # ~/.nixpkgs/config.nix
214+ {
215+ packageOverrides = pkgs:
216+ {
217+ ghcEnv = with pkgs.haskellPackages_ghc763;
218+ ghcWithPackages (self: [
219+ parsec xmonad hsdns
220+ ]);
221+ };
222+ }
223+
224+- `cabal-install` und `cabal-dev` funktionieren wunderbar mit
225+`ghcWithPackages`, mit `ghc-wapper` aber nur so mittel.
226+
227+-------------------------------------------------------------------------------
228+
229+# Wie erweitert man Nixpkgs um neue Haskell-Pakete?
230+
231+- `cabal2nix` generiert Build-Instruktionen für Nix automatisch:
232+
233+ $ nix-env -iA haskellPackages.cabal2nix
234+ $ cabal2nix cabal://pkgname-version
235+ $ cabal2nix cabal://pkgname # neueste Version
236+
237+- `--no-haddock` schaltet das Generieren der Haddock-Dokumentation aus.
238+
239+- `--no-check` schaltet die Test-Suite aus.
240+
241+- `--jailbreak` löscht in der Cabal-Datei die Versions-Einschränkungen
242+aller Abhängigkeiten.
243+
244+-------------------------------------------------------------------------------
245+
246+# Wie erweitert man Nixpkgs um neue Haskell-Pakete?
247+
248+1) `git checkout git://github.com/NixOS/nixpkgs.git`
249+2) `cd pkgs/development/libraries/haskell`
250+2) `mkdir foobar`
251+3) `cabal2nix cabal://foobar >foobar/default.nix`
252+4) `cd ../../../`
253+5) In `pkgs/top-level/haskell-packages.nix` die Zeile
254+
255+ foobar = callPackage
256+ ../development/libraries/haskell/foobar {};
257+
258+ einfügen.
259+6) `nix-env -f . -iA haskellPackages.foobar`
260+
261+-------------------------------------------------------------------------------
262+
263+# Die Hydra Build-Farm
264+
265+- `http://hydra.nixos.org/` ist die Haupt-Buildfarm von Nix.
266+
267+- Eigene Hydra-Instanzen können über Nix installiert werden.
268+
269+- Im Fehlerfall benachrichtigt Hydra den Inhaber des Pakets.
270+
271+- Alle erfolgreich gebauten Pakete können von Nix-Nutzern in Binärform
272+heruntergeladen werden.
273+
274+- Hydra kann verteilte Builds auf den Plattformen Linux, Darwin, Cygwin,
275+BSD, etc. ausführen.
276+
277+-------------------------------------------------------------------------------
278+
279+# Noch Fragen?
280+
281+- `https://nixos.org/`
282+
283+- `https://github.com/nixos/`
284+
285+- `http://nixos.org/wiki/Haskell`
286+
287+- `https://groups.google.com/forum/#!forum/nix-devel`
288+
289+- `#nixos` auf `irc.freenode.org`
doc/hal8.mdnew file+208
@@ -0,0 +1,208 @@
1+% Managing the Haskell Dependency Hell with Nix
2+% Peter Simons
3+% 2013-04-02
4+
5+# Abstract
6+
7+The Nix package manager has proven very well suited for managing sophisticated
8+Haskell development environments. It has out-of-the-box support for installing
9+Haskell Platforms 2009.2.0.2, 2010.1.0.0, 2010.2.0.0, 2011.2.0.0, 2011.2.0.1,
10+2011.4.0.0, 2012.2.0.0, and 2012.4.0.0 on any machine running Linux or Darwin.
11+Furthermore, Nix provides easy access to well over 700 popular Haskell packages
12+from Hackage. Developers can use Nix to automate building and testing of their
13+Haskell packages, either by running those builds locally on-demand, or by
14+relying on the Continuous Integration service Hydra. Last but not least,
15+Haskell programmers will probably enjoy the fact that Nix packages are written
16+in a language that is, essentially, lazily evaluated lambda calculus.
17+
18+This presentation introduces the principles of the Nix package manager, and
19+provides a hands-on tour through its essential features, teaching Haskell
20+developers how to
21+
22+ - manage their working environment with Nix,
23+ - extend the Nix packages database with their own packages, and
24+ - utilize the advanced continuous integration features.
25+
26+# Introduction
27+
28+Purely functional programming languages like Haskell encourage software
29+engineers to write re-usable code. As of today, the Haskell community's central
30+repository "Hackage" registers 5015 packages, 3944 of which provide function
31+libraries. This means that approximately 78% of all Haskell packages are
32+intended to be re-used by other developers. For Haskell programmers, this is a
33+good situation to be in! There is a lot of re-usable code out there, and the
34+pool to choose from is growing steadily.
35+
36+However, the fact that Haskell packages re-use each other a lot comes at a
37+price: a phenomenon lovingly referred to as "dependency hell". The task of
38+installing a Haskell package includes the installation of all its dependencies
39+(and their respective dependencies). Updating a Haskell package typically
40+requires updates of that package's dependencies as well. And if a package is
41+de-installed, then chances are that some of its dependencies become unused in
42+the process and ought to be de-installed, too.
43+
44+Many Haskell programmers turn to Cabal for help --- only to find that Cabal
45+doesn't really address those tasks. Cabal can install a package, alright, but
46+it cannot perform reliable updates or clean up the system after a
47+de-installation. Arguably, Cabal doesn't even address the installation part
48+satisfactorily, because it is unaware of all software outside of the domain of
49+Haskell. The package "hsdns", for example, needs the GNU ADNS library installed
50+to compile, but Cabal doesn't know anything about GNU ADNS. It cannot install
51+that library as part of the hsdns build. All it can do is abort with an error
52+message, saying "the adns library is missing", but it's the users problem to
53+remedy that situation somehow.
54+
55+Traditional package managers like `apt-get`, `rpm`, `pacman`, or `BSD ports`
56+are designed to solve exactly those issues. These programs are really good at
57+installing system packages. They know how to keep the installation up-to-date
58+without breaking anything, and they know how clean-up after themselves when a
59+package has been removed. Yet, those package managers are somewhat unprepared
60+for the complexity of Haskell's package system. For example, most package
61+managers assume that for any given package `A`, only one version of `A` can be
62+installed at the same time. This is certainly not true for Haskell, where
63+oftentimes a whole zoo of mutually incompatible library versions need to be
64+installed at the same time to build all installation targets. The same problem
65+applies to the installation of the compiler. Developers who care about portable
66+code need many different versions of GHC installed in parallel, so that their
67+code can be tested with different compiler variants, but the ability to manage
68+an installation of this complexity is far out of the reach of traditional
69+package managers.
70+
71+# The Nix Package Manager
72+
73+Nix [1] is a package manager very much like `apt-get` or `rpm`. At the same
74+time, Nix differs from traditional package managers, because it breaks with the
75+established Unix file system layout. Instead of installing executable programs
76+into `/usr/bin` and libraries into `/usr/lib`, Nix installs every package into
77+a directory hierarchy of its own. For example, all files that belong to the
78+package GHC 7.6.2 reside underneath the prefix:
79+
80+ $ ls /nix/store/f2c7ia72ial5y8h5k1w7z5n87xnr5gm6-ghc-7.6.2/
81+ bin lib share
82+
83+This installation scheme allows any number of GHC versions to co-exist, because
84+they live in completely different places:
85+
86+ $ ls /nix/store/*-ghc-*/bin/ghc
87+ /nix/store/cczdxjhrx27wmf4rpk4rk70zabw2fggd-ghc-6.10.4/bin/ghc
88+ /nix/store/n6ygpkh29dfp9di27l70681k7llnhama-ghc-6.12.3/bin/ghc
89+ /nix/store/frziw92yvb0rgm7sx7zzsmgy7cyl16d9-ghc-7.0.4/bin/ghc
90+ /nix/store/82lkfs5c4l41p244apv7q5dmd91h712d-ghc-7.4.2/bin/ghc
91+ /nix/store/ch0cq5l0l8p7g80skifivrg4d40s8sdm-ghc-7.6.2/bin/ghc
92+
93+Furthermore, packages compiled by Nix generally don't refer to any system path
94+outside of `/nix/store`. GHC depends on system libraries like glibc, libgmp,
95+and curses, but all those dependencies are satisfied entirely within Nix:
96+
97+ $ ldd ghc
98+ /nix/store/ml128hlikbl14q4cwviafpaskskx1a3f-ncurses-5.9/lib/libncursesw.so.5
99+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/librt.so.1
100+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/libutil.so.1
101+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/libdl.so.2
102+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/libm.so.6
103+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/libpthread.so.0
104+ /nix/store/zpr8jdx10napidkyz62f3nzl5fm87jyr-glibc-2.17/lib/libc.so.6
105+ /nix/store/989njbbf770sxyqqpyrw2m0cbfdynzbb-gmp-5.0.5/lib/libgmp.so.10
106+
107+The `/nix/store` hierarchy is completely self-contained. A Haskell development
108+environment that's been created on one machine can be copied to any other
109+machine simply by running "`rsync -a /nix other-machine:/`".
110+
111+A quick glance at the store paths shown above reveals yet another powerful
112+feature. The exact path used to store an installed package contains a
113+cryptographic hash that uniquely identifies
114+
115+ 1. the shell command sequence that built this particular package and
116+ 2. all other store paths that this package depends on.
117+
118+Suppose that GHC 7.6.2 would be compiled two times. The first build uses GCC
119+version 4.6.3 to build the Haskell compiler, but the second build uses GCC 4.7.
120+Then the results of those two builds would be stored in paths like
121+
122+ - `/nix/store/ch0cq5l0l8p7g80skifivrg4d40s8sdm-ghc-7.6.2` and
123+ - `/nix/store/f2c7ia72ial5y8h5k1w7z5n87xnr5gm6-ghc-7.6.2`.
124+
125+The cryptographic hashes assigned to those two paths differs because both
126+variants of GHC 7.6.2 have different dependencies (GCC 4.6.3 and 4.7
127+respectively). Because of this approach, Nix is able to satisfy the
128+requirements of the Haskell package system, which needs to keep multiple
129+versions of the same package around concurrently. Nix can easily do that,
130+simply by having a separate store path for each variant of the package.
131+
132+These capabilities make Nix rather well suited for maintaining sophisticated
133+Haskell development environments, and the remainder of this article is intended
134+to provide a hands-on tutorial of how to use Nix for exactly that purpose.
135+
136+# Installing the Haskell Platform
137+
138+The installation procedure of Nix itself is fairly straightforward.
139+Ready-to-use binary packages are available for many Linux platforms
140+(particularly on x86, x86_64, and PowerPC), for Mac OS X, and for FreeBSD.
141+Furthermore, Nix can be compiled from source code on any POSIX-like operating
142+system. Detailed installation instructions can be found at [2].
143+
144+Once Nix itself is installed, it can be used to obtain an up-to-date copy of
145+the Nix package database by running:
146+
147+ $ nix-channel --add http://nixos.org/channels/nixpkgs-unstable
148+ $ nix-channel --update
149+
150+Now, it is possible to see the entire set of packages known to Nix by running:
151+
152+ $ nix-env -qaP '*'
153+ pkgs.pong3d 3dpong-0.5.0
154+ pkgs.rdf4store 4store-v1.1.5
155+ pkgs.foursuite 4suite-1.0.2
156+ ... ...
157+
158+The output consists of two columns. The right hand-side shows the
159+human-readable name and version of the package. The left hand-side shows a
160+unique identifier for that particular package in the Nix package database. Both
161+identifiers can be used to install packages:
162+
163+ $ nix-env -i 3dpong-0.5.0 # install by name
164+ $ nix-env -iA pkgs.pong3d # install by attribute
165+
166+Now, to install the Haskell Platform, we first need to make up our mind which
167+version we want, because there are plenty to choose from. The command
168+
169+ $ nix-env -qaP '*' | grep haskell-platform
170+
171+shows that all of the versions 2009.2.0.2, 2010.1.0.0, 2010.2.0.0, 2011.2.0.0,
172+2011.2.0.1, 2011.4.0.0, 2012.2.0.0, and 2012.4.0.0 are available, and each of
173+those versions of Haskell Platform can be compiled with GHC versions 6.10.4,
174+6.12.1, 6.12.2, 6.12.3, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.2.1, 7.2.2, 7.4.1, 7.4.2,
175+7.6.1, and 7.6.2 respectively!
176+
177+For the sake of the example, let's just choose the latest official version:
178+
179+ $ nix-env -iA haskellPackages.haskellPlatform
180+ installing `haskell-haskell-platform-ghc7.4.2-2012.4.0.0'
181+ ...
182+ building path(s) `/nix/store/j1gq9xciqj3390himzi3p9xcln9hnxl4-user-environment'
183+ created 1159 symlinks in user environment
184+
185+When that command is run for the first time, it will download and install a
186+*lot* of packages, because the Haskell Platform depends on many other things
187+such as the Linux kernel headers, glibc, GCC, GMP, Perl, and so on. Of course,
188+these packages will be re-used when installing a different version of the
189+Haskell Platform later, so one doesn't have to worry that every single install
190+is going to be that expensive.
191+
192+In its last step, `nix-env` creates a "user environment" at
193+`$HOME/.nix-profile`, which simplifies use of the installed packages a lot. That
194+environment uses symlinks to create a view of the Nix store that combines those
195+packages that have been installed into a single hierarchy. For example, the
196+path `~/.nix-profile/bin/ghc` will be a symlink to
197+`/nix/store/vlx3ikjjxlfvqjjlx74cg07p79y43mdq-ghc-7.4.2/bin/ghc`. The path
198+`~/.nix-profile/bin/alex`, on the other hand, points to
199+`/nix/store/7rfilvshj9wzm3rx86m4mkpf76l24fhs-alex-3.0.2/bin/alex`. The binaries
200+`alex` and `ghc` live in different store paths, but the user environment joins
201+all those paths into a single hierarchy. This means that it is sufficient to
202+add `$HOME/.nix-profile/bin` to `$PATH` to use the Haskell Platform from Nix.
203+
204+# References
205+
206+[1] Nix, the purely functional package manager: <http://nixos.org/nix/>
207+
208+[2] Nix Installation Instructions: <http://hydra.nixos.org/build/4480483/download/1/manual/#chap-installation>
doc/list-haskell-store-paths.nixnew file+27
@@ -0,0 +1,27 @@
1+# list-haskell-store-paths.nix
2+
3+let
4+
5+ inherit (import <nixpkgs> { config.allowBroken = true; }) lib haskell;
6+
7+ listStorePaths = pkgset: lib.mapAttrs
8+ (attr: drv: builtins.toPath drv)
9+ (lib.filterAttrs isActiveBuild haskell.packages.${pkgset});
10+
11+ isActiveBuild = name: drv: let r = builtins.tryEval (hasNonEmptyPlatforms drv && isNotBroken drv);
12+ in if r.success then r.value else false;
13+
14+ hasNonEmptyPlatforms = drv: lib.isDerivation drv && getPlatforms drv != [];
15+
16+ isNotBroken = drv: !(lib.attrByPath ["meta" "broken"] false drv);
17+
18+ getPlatforms = drv: lib.attrByPath ["hydraPlatforms"]
19+ (lib.attrByPath ["Platforms"] [])
20+ (drv.meta or {});
21+
22+in
23+
24+# Using "lib.attrNames haskell.packages" instead of pkgset would be nice, but
25+# nix-instantiate doesn't cope.
26+
27+{ pkgset }: lib.genAttrs [pkgset] listStorePaths
doc/list-haskell-store-paths.shnew file+11
@@ -0,0 +1,11 @@
1+#! /usr/bin/env bash
2+
3+set -eu -o pipefail
4+
5+pkgsets=( $(nix-instantiate --eval -E 'with (import <nixpkgs> {}); builtins.attrNames haskell.packages') )
6+n=$(( ${#pkgsets[@]} - 2 ))
7+
8+for n in ${pkgsets[@]:1:$n}; do
9+ eval n=$n
10+ nix-instantiate --eval --strict --json list-haskell-store-paths.nix --argstr pkgset $n >$n.json
11+done
doc/nixcon-2015-slides.mdnew file+357
@@ -0,0 +1,357 @@
1+% The Nixpkgs Haskell Infrastructure
2+% Peter Simons \<simons@cryp.to\>
3+% NixCon 2015
4+
5+-------------------------------------------------------------------------------
6+
7+# Players Involved in Haskell Packaging
8+
9+![](pipeline-overview.pdf)\
10+
11+
12+-------------------------------------------------------------------------------
13+
14+# The Packaging Process
15+
16+![](pipeline-details.pdf)\
17+
18+
19+-------------------------------------------------------------------------------
20+
21+# Hackage
22+
23+- 62,423 Cabal files (+41.6 per day)
24+
25+- 9,028 distinct packages (+4.9 per day)
26+
27+- $\mu=6.9, \sigma=\pm 10.3$ releases per package:
28+ ![](hackage-version-boxplot.pdf)
29+
30+- Top 10 most active packages: egison (149), git-annex (145), hakyll (145),
31+ purescript (141), yesod-core (140), warp (136), lens (129), wai-extra (119),
32+ yesod (116), and hlint (114).
33+
34+-------------------------------------------------------------------------------
35+
36+# Hackage: Structure of the Git Repository
37+
38+ 3d-graphics-examples
39+ 3dmodels
40+ 4Blocks
41+ [...]
42+ mtl
43+ +-- 1.0
44+ | +-- mtl.cabal
45+ | +-- mtl.json
46+ +-- [...]
47+ +-- 2.2.1
48+ +-- mtl.cabal
49+ +-- mtl.json
50+ [...]
51+ ztail
52+ Zwaluw
53+
54+-------------------------------------------------------------------------------
55+
56+# Hackage: `mtl/2.2.1/mtl.cabal`
57+
58+ name: mtl
59+ version: 2.2.1
60+ license: BSD3
61+ synopsis: Monad classes, using functional dependencies
62+ homepage: http://github.com/ekmett/mtl
63+ build-type: Simple
64+
65+ Library
66+ exposed-modules:
67+ Control.Monad.Cont
68+ [...]
69+ build-depends: base < 6, transformers == 0.4.*
70+ extensions:
71+ MultiParamTypeClasses
72+ FunctionalDependencies
73+ FlexibleInstances
74+
75+-------------------------------------------------------------------------------
76+
77+# Hackage: `mtl/2.2.1/mtl.json`
78+
79+ { "package-hashes" : { "MD5" : "96a2f12b...",
80+ "Skein512_512" : "73b5858d...",
81+ "SHA1" : "c244f8ec...",
82+ "SHA256" : "cae59d79...",
83+ "SHA512" : "5c31626b..."
84+ },
85+ "package-locations" : [
86+ "https://hackage.haskell.org/package/mtl-2.2.1/" \
87+ "mtl-2.2.1.tar.gz",
88+ "https://s3.amazonaws.com/hackage.fpcomplete.com/" \
89+ "package/mtl-2.2.1.tar.gz"
90+ ],
91+ "package-size" : 15391
92+ }
93+
94+-------------------------------------------------------------------------------
95+
96+# Hackage: Nix Build for mtl 2.2.1
97+
98+ { mkDerivation, base, stdenv, transformers }:
99+
100+ mkDerivation {
101+ pname = "mtl";
102+ version = "2.2.1";
103+ sha256 = "cae59d79f3a16f8e9f3c9adc1010c7c6...";
104+ libraryHaskellDepends = [ base transformers ];
105+ homepage = "http://github.com/ekmett/mtl";
106+ description = "Monad classes, using functional ...";
107+ license = stdenv.lib.licenses.bsd3;
108+ }
109+
110+-------------------------------------------------------------------------------
111+
112+# Hackage: Destructive Editing
113+
114+`MonadRandom/0.4/MonadRandom.cabal` contains a line:
115+
116+ x-revision: 2
117+
118+This translates to Nix:
119+
120+ revision = "2";
121+ editedCabalFile = "2e218afd5b29c868...";
122+
123+The build log will say:
124+
125+> Replace Cabal file with edited version from
126+> http://hackage.haskell.org/package/MonadRandom-0.4/revision/2.cabal.
127+
128+-------------------------------------------------------------------------------
129+
130+# Hackage: Conditional Values
131+
132+Values in Cabal files may depend on OS, architecture, compiler, and flags.
133+For example, hint 0.4.2.3 specifies:
134+
135+ Library
136+ if impl(ghc >= 6.8)
137+ build-depends: random, directory
138+ if impl(ghc >= 6.10)
139+ build-depends: base >= 4, base < 5,
140+ ghc-mtl == 1.2.1.*
141+ else
142+ build-depends: base >= 3, base < 4
143+ else
144+ build-depends: utf8-string < 0.3
145+ if !os(windows)
146+ build-depends: unix >= 2.2.0.0
147+
148+-------------------------------------------------------------------------------
149+
150+# Hackage: Cabal Flags
151+
152+Flags can be specified by the user or auto-configured by the build to fit the
153+environment. For example, pandoc 1.15.1.1 defines:
154+
155+ Flag https
156+ Description: Enable support for downloading over https.
157+
158+ Library
159+ Build-Depends: base >= 4.2 && <5,
160+ syb >= 0.1 && < 0.7,
161+ [...]
162+ ghc-prim >= 0.2
163+ if flag(https)
164+ Build-Depends: http-client >= 0.3.2 && < 0.5,
165+ http-client-tls >= 0.2 && < 0.3,
166+ http-types >= 0.8 && < 0.10
167+
168+-------------------------------------------------------------------------------
169+
170+# Stackage: Stable Hackage
171+
172+- 1,605 packages (18% of Hackage)
173+
174+- Build instructions published via Git specify parameters such as "don't run
175+ test suite", "don't run Haddock", etc.
176+
177+- Testing takes place on 64-bit Linux.
178+
179+- Nightly Snapshots contain the latest version of every package such that the
180+ package set is consistent.
181+
182+- LTS minor releases are created weekly and contain only point releases that
183+ don't change the API.
184+
185+- LTS major releases contain API-breaking changes and usually conincide with a
186+ compiler update.
187+
188+-------------------------------------------------------------------------------
189+
190+# cabal2nix & hackage2nix
191+
192+- Code lives at <https://github.com/NixOS/cabal2nix>:
193+ - `distribution-nixpkgs` library
194+ - `cabal2nix` executable
195+ - `hackage2nix` executable
196+
197+- [`update-nixpkgs.sh`](https://github.com/NixOS/cabal2nix/blob/master/hackage2nix/update-nixpkgs.sh)
198+ script runs automatically once per hour.
199+
200+- Changes go to `haskell-updates` branch in [peti's Nixpkgs fork on Github](https://github.com/peti/nixpkgs).
201+
202+- [`hydra.cryp.to`](http://hydra.cryp.to/jobset/nixpkgs/haskell-updates)
203+ continuously builds Stackage Nightly and the latest LTS Haskell package set.
204+
205+- If Hydra builds work sufficiently well, updates are manually merged into
206+ `master` branch of main repository.
207+
208+- [`generate-nixpkgs-haskell-package-list`](https://github.com/peti/package-list)
209+ utility manually publishes new state of Nixpkgs on Hackage.
210+
211+-------------------------------------------------------------------------------
212+
213+# Nixpkgs: `hackage-packages.nix`
214+
215+The package set is represented as a primitive recursive function:
216+
217+ ps = self: {
218+ "3d-graphics-examples" = callPackage ...;
219+ ...
220+ "mtl_2_1_3_1" = callPackage ...;
221+ "mtl" = callPackage ...;
222+ ...
223+ "ztail" = callPackage ...;
224+ };
225+
226+The Nixpkgs attribute set `haskellPackages` refers to the fixpoint of that
227+function which is computed by the expression:
228+
229+ let self = ps self;
230+ in # = ps (ps self) = ps (ps (ps (self))) = ...
231+ self
232+
233+-------------------------------------------------------------------------------
234+
235+# Nixpkgs: hackage-packages.nix
236+
237+We can modify the package set using OO-style inheritance:
238+
239+ fix = f: let self = f self; in self;
240+ extend = rattrs: f: self: let super = rattrs self;
241+ in super // f self super;
242+
243+ ps = self: {
244+ foo = "foo"; bar = "bar";
245+ foobar = self.foo + self.bar;
246+ };
247+
248+ f = self: super: { foo = reverse super.foo; };
249+
250+- `(fix ps).foobar` $\equiv$ `"foobar"`
251+- `(fix (extend ps f)).foobar` $\equiv$ `"oofbar"`
252+- `(fix (extend (extend ps f) f)).foobar` $\equiv$ `"foobar"`
253+
254+-------------------------------------------------------------------------------
255+
256+# Nixpkgs: pkgs/development/haskell-modules/default.nix
257+
258+ { compilerConfig ? (self: super: {})
259+ , packageSetConfig ? (self: super: {})
260+ , overrides ? (self: super: {})
261+ }:
262+
263+ fix
264+ (extend
265+ (extend
266+ (extend
267+ (extend haskellPackages commonConfiguration)
268+ compilerConfig)
269+ packageSetConfig)
270+ overrides)
271+
272+-------------------------------------------------------------------------------
273+
274+# Nixpkgs: Multiple Views Of The Package Set
275+
276+- `hackage-packages.nix` represents "Stackage Nightly".
277+
278+- `configuration-common.nix` "extends" that to work around deficiencies in
279+ `hackage2nix`.
280+
281+- `configuration-ghc-x.y.nix` "extends" that with fixes relevant only for
282+ particular compiler versions: `haskell.packages.ghcXY`.
283+
284+- `configuration-lts-v.w.nix` "extends" those sets to choose default versions
285+ according to "LTS Haskell x.y": `haskell.packages.lts-x_y`.
286+
287+-------------------------------------------------------------------------------
288+
289+# Nixpkgs: `overrideCabal`
290+
291+Haskell derivations take the `mkDerivation` function as an argument:
292+
293+ { mkDerivation, ... }: mkDerivation {
294+ pname = "mtl";
295+ version = "2.2.1";
296+ ...
297+ }
298+
299+The `override` method changes the arguments passed to a derivation --- so we
300+can change the definition of `mkDerivation`:
301+
302+ overrideCabal = drv: f: drv.override (args: args // {
303+ mkDerivation = drv: args.mkDerivation (drv // f drv);
304+ });
305+
306+-------------------------------------------------------------------------------
307+
308+# Nixpkgs: `haskell.lib` Helper Functions
309+
310+ doHaddock = ...;
311+ dontHaddock = drv: overrideCabal drv (drv: {
312+ doHaddock = false;
313+ });
314+
315+ enableLibraryProfiling = ...;
316+ disableLibraryProfiling = drv: overrideCabal drv (drv: {
317+ enableLibraryProfiling = false;
318+ });
319+
320+ addBuildTool = drv: x: addBuildTools drv [x];
321+ addBuildTools = drv: xs: overrideCabal drv (drv: {
322+ buildTools = (drv.buildTools or []) ++ xs;
323+ });
324+
325+-------------------------------------------------------------------------------
326+
327+# Nixpkgs: Deep Overriding
328+
329+ fix = f: let x = f x // { __unfix__ = f; }; in x;
330+
331+ haskellPackages = self:
332+ let
333+ callPackage = callPackageWithScope self;
334+
335+ callPackageWithScope = scope: drv: args:
336+ (stdenv.lib.callPackageWith scope drv args) // {
337+ overrideScope = f:
338+ callPackageWithScope
339+ (fix (extend scope.__unfix__ f))
340+ drv args;
341+ };
342+ in
343+ { "git-annex" = callPackage ...; };
344+
345+-------------------------------------------------------------------------------
346+
347+# Other Resources
348+
349+- <http://hackage.haskell.org/>
350+
351+- <http://www.stackage.org/>
352+
353+- <http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure>
354+
355+- <https://groups.google.com/forum/#!forum/nix-devel>
356+
357+- `#nixos` at `irc.freenode.org`
doc/nixos-meetup-3-slides.mdnew file+357
@@ -0,0 +1,357 @@
1+% Nix loves Haskell
2+% Peter Simons \<simons@cryp.to\>
3+% 2015-05-21
4+
5+-------------------------------------------------------------------------------
6+
7+# Road-map of this presentation
8+
9+- Install Haskell packages from Hackage
10+- Install one (or many) Haskell compiler(s)
11+- Create a Haskell development environment
12+ - permanent environments with `ghcWithPackages`
13+ - ad-hoc environments for `nix-shell`
14+- Integrate your own (non-public) packages into Nix
15+- Take advantage of the central build farm
16+- Pitfalls to avoid
17+
18+-------------------------------------------------------------------------------
19+
20+# Install Haskell packages from Hackage
21+
22+Lookups based on package names like
23+
24+ $ nix-env -i cabal-install
25+
26+don't work! You have to use attribute paths:
27+
28+ $ nix-env -iA haskellPackages.cabal-install
29+
30+To list all Haskell packages, run:
31+
32+ $ nix-env -qaP -A haskellPackages
33+
34+-------------------------------------------------------------------------------
35+
36+# Install Haskell packages from Hackage
37+
38+There is one Haskell package set per compiler:
39+
40+ $ nix-env -qaP -A haskellPackages
41+ $ nix-env -qaP -A haskell.packages.ghc6123
42+ $ nix-env -qaP -A haskell.packages.ghc763
43+ $ nix-env -qaP -A haskell.packages.ghc7101
44+
45+The default `haskellPackages` currently refers to
46+`haskell.packages.ghc7101`.
47+
48+-------------------------------------------------------------------------------
49+
50+# Install a Haskell compiler
51+
52+ $ nix-env -iA haskell.compiler.ghc784
53+
54+ $ nix-env -qaP -A haskell.compiler
55+ haskell.compiler.ghc6104 ghc-6.10.4
56+ haskell.compiler.ghc6123 ghc-6.12.3
57+ haskell.compiler.ghc704 ghc-7.0.4
58+ haskell.compiler.ghc722 ghc-7.2.2
59+ haskell.compiler.ghc742 ghc-7.4.2
60+ haskell.compiler.ghc763 ghc-7.6.3
61+ haskell.compiler.ghc784 ghc-7.8.4
62+ haskell.compiler.ghc7101 ghc-7.10.1
63+ haskell.compiler.ghcHEAD ghc-7.11.20150402
64+ haskell.compiler.ghcjs ghcjs-0.1.0
65+ haskell.compiler.jhc jhc-0.8.2
66+ haskell.compiler.uhc uhc-1.1.9.0
67+
68+-------------------------------------------------------------------------------
69+
70+# Install a Haskell compiler
71+
72+For every compiler version XYZ, the attributes
73+
74+ haskell.compiler.ghcXYC
75+
76+and
77+
78+ haskell.packages.ghcXYC.ghc
79+
80+are synonymous.
81+
82+-------------------------------------------------------------------------------
83+
84+# Install more than one Haskell compiler (temporary)
85+
86+ $ nix-shell -p haskell.compiler.ghc7101
87+ [nix-shell:~]$ ghc --numeric-version
88+ 7.10.1
89+ [nix-shell:~]$ exit
90+
91+ $ nix-shell -p haskell.compiler.ghc784 \
92+ --command "cabal configure"
93+ $ cabal build
94+
95+-------------------------------------------------------------------------------
96+
97+# Install several Haskell compilers (transient)
98+
99+ $ nix-env -p ~/ghc-7.6.3 -iA haskell.compiler.ghc763
100+ $ nix-env -p ~/ghc-7.8.4 -iA haskell.compiler.ghc784
101+ [...]
102+
103+ $ export PATH=$HOME/ghc-7.6.3/bin:$PATH
104+ $ ghc --numeric-version
105+ 7.6.3
106+
107+ $ cabal configure --with-compiler=$HOME/ghc-7.6.3/bin/ghc
108+
109+-------------------------------------------------------------------------------
110+
111+# Install several Haskell compilers (permanent)
112+
113+ $ PROFILE_DIR=/nix/var/nix/profiles/per-user/$USER
114+ $ nix-env -p $PROFILE_DIR/ghc-7.6.3 -iA ...
115+
116+On NixOS, `/etc/profile` defines `$NIX_USER_PROFILE_DIR` automatically.
117+
118+-------------------------------------------------------------------------------
119+
120+# Create a Haskell development environment
121+
122+Edit the file `~/.nixpkgs/config.nix`:
123+
124+ {
125+ packageOverrides = super: let self = super.pkgs; in
126+ {
127+ myHaskellEnv =
128+ self.haskell.packages.ghc7101.ghcWithPackages
129+ (haskellPackages: with haskellPackages; [
130+ arrows async cabal-install case-insensitive
131+ cgi criterion hspec HStringTemplate
132+ ]);
133+ };
134+ }
135+
136+Now installl with `nix-env -iA myHaskellEnv`.
137+
138+-------------------------------------------------------------------------------
139+
140+# Create a Haskell development environment
141+
142+The generated `ghc` program is a wrapper script that re-directs the real
143+`ghc` to use a "libdir" with all the specified packages installed:
144+
145+ #! /nix/store/xlxjcjbnbwnz...-bash-4.3-p33/bin/bash -e
146+ realGhc=/nix/store/zzhasddj77xhwdban95...-ghc-7.10.1
147+ ghcEnv=/nix/store/cgddwzz9hkdgprvbymph...-ghc-7.10.1
148+ export NIX_GHC=$ghcEnv/bin/ghc
149+ export NIX_GHCPKG=$ghcEnv/bin/ghc-pkg
150+ export NIX_GHC_DOCDIR=$ghcEnv/share/doc/ghc/html
151+ export NIX_GHC_LIBDIR=$ghcEnv/lib/ghc-7.10.1
152+ exec $realGhc/bin/ghc "-B$NIX_GHC_LIBDIR" \
153+ "${extraFlagsArray[@]}" "$@"
154+
155+
156+-------------------------------------------------------------------------------
157+
158+# Create a Haskell development environment
159+
160+Define the same environment variables in your `~/.bashrc`:
161+
162+ NIX_GHC="$HOME/.nix-profile/bin/ghc"
163+ ghcVersion=$($NIX_GHC --numeric-version)
164+ NIX_GHCPKG="$HOME/.nix-profile/bin/ghc-pkg"
165+ NIX_GHC_DOCDIR="$HOME/.nix-profile/share/doc/ghc/html"
166+ NIX_GHC_LIBDIR="$HOME/.nix-profile/lib/ghc-$ghcVersion"
167+ export NIX_GHC NIX_GHCPKG NIX_GHC_DOCDIR NIX_GHC_LIBDIR
168+ unset ghcVersion
169+
170+
171+Or:
172+
173+ if [ -e ~/.nix-profile/bin/ghc ]; then
174+ eval $(grep export ~/.nix-profile/bin/ghc)
175+ fi
176+
177+-------------------------------------------------------------------------------
178+
179+# Create a temporary Haskell development environment
180+
181+Save as `shell.nix`:
182+
183+ with (import <nixpkgs> {}).pkgs;
184+ let
185+ ghc = haskell.packages.ghc7101.ghcWithPackages
186+ (pkgs: with pkgs; [ aeson lens monad-par ]);
187+ in
188+ stdenv.mkDerivation {
189+ name = "my-haskell-env-0";
190+ buildInputs = [ ghc ];
191+ shellHook = "eval $(grep export ${ghc}/bin/ghc)";
192+ }
193+
194+Now run `nix-shell`, or even `nix-shell --pure`.
195+
196+-------------------------------------------------------------------------------
197+
198+# Create a temporary Haskell development environment
199+
200+To parameterize the compiler version, edit the file as follows:
201+
202+ { compiler ? "ghc7101" }:
203+
204+ with (import <nixpkgs> {}).pkgs;
205+ let
206+ ghc = haskell.packages.${compiler}.ghcWithPackages
207+ (pkgs: with pkgs; [ aeson lens monad-par ]);
208+ in
209+ [...]
210+
211+Now run "`nix-shell --argstr compiler ghc784`" to select a different
212+compiler.
213+
214+-------------------------------------------------------------------------------
215+
216+# Create a temporary Haskell development environment
217+
218+Every Haskell package has an `env` attribute that provides a temporary shell environment in which that package can be built:
219+
220+ $ cabal get lens && cd lens-4.10
221+ Downloading lens-4.10...
222+ Unpacking to lens-4.10/
223+
224+ $ nix-shell "<nixpkgs>" -A haskellPackages.lens.env
225+ [nix-shell:/tmp/lens-4.10]$ cabal configure
226+ Resolving dependencies...
227+ Configuring lens-4.10...
228+ [...]
229+
230+-------------------------------------------------------------------------------
231+
232+# Create a development environment for your own packages
233+
234+ $ nix-env -iA cabal2nix
235+
236+ $ cabal2nix --shell . >shell.nix
237+ $ nix-shell --command "cabal configure"
238+
239+ $ cabal build
240+ [...]
241+
242+-------------------------------------------------------------------------------
243+
244+# Create a development environment for your own packages
245+
246+ $ cabal2nix --shell .
247+ with (import <nixpkgs> {}).pkgs;
248+ let pkg = haskellPackages.callPackage
249+ ({ mkDerivation, base, stdenv, transformers }:
250+ mkDerivation {
251+ pname = "mtl";
252+ version = "2.2.1";
253+ src = ./.;
254+ buildDepends = [ base transformers ];
255+ homepage = "http://github.com/ekmett/mtl";
256+ license = stdenv.lib.licenses.bsd3;
257+ }) {};
258+ in
259+ pkg.env
260+
261+-------------------------------------------------------------------------------
262+
263+# Create builds for your own packages
264+
265+ $ cd ~/src/foo
266+ $ cabal2nix . > default.nix
267+
268+Now edit `~/.nixpkgs/config.nix`:
269+
270+ {
271+ packageOverrides = super: let self = super.pkgs; in
272+ {
273+ foo = self.haskellPackages.callPackage
274+ ../src/foo {};
275+ };
276+ }
277+
278+Build it by running "`nix-env -iA foo`".
279+
280+-------------------------------------------------------------------------------
281+
282+# Create builds for your own packages
283+
284+Use this `~/.nixpkgs/config.nix` file to register the build inside of
285+`haskellPackages`, so that other libraries may depend on it:
286+
287+ {
288+ packageOverrides = super: let self = super.pkgs; in
289+ {
290+ haskellPackages = super.haskellPackages.override {
291+ overrides = self: super: {
292+ foo = self.callPackage ../src/foo {};
293+ bar = self.callPackage ../src/bar {};
294+ };
295+ };
296+ };
297+ }
298+
299+-------------------------------------------------------------------------------
300+
301+# How to download binary packages
302+
303+NixOS users add this setting to `/etc/nixos/configuration.nix`:
304+
305+ nix.trustedBinaryCaches = [
306+ http://hydra.cryp.to
307+ http://hydra.nixos.org
308+ ];
309+
310+Everyone else adds this setting to `/etc/nix/nix.conf`:
311+
312+ trusted-binary-caches = http://hydra.nixos.org \
313+ http://hydra.cryp.to
314+
315+Now run `nix-env`, `nix-build`, and `nix-shell` with this option:
316+
317+ --option extra-binary-caches http://hydra.nixos.org
318+
319+-------------------------------------------------------------------------------
320+
321+# GHC's infamous non-deterministic library ID bug
322+
323+GHC and distributed build farms don't get along well:
324+
325+ https://ghc.haskell.org/trac/ghc/ticket/4012
326+ https://github.com/NixOS/nixpkgs/issues/7792
327+
328+When you see an error like this one
329+
330+ package foo-0.7.1.0 is broken due to missing package
331+ text-1.2.0.4-98506efb1b9ada233bb5c2b2db516d91
332+
333+then you have to garbage collect `foo` and all its dependents,
334+and re-install from scratch.
335+
336+-------------------------------------------------------------------------------
337+
338+# Where to get help ...
339+
340+Haskell-specific resources:
341+
342+- https://github.com/NixOS/nixpkgs/issues/4941
343+
344+- A Journey into the Haskell NG infrastructure
345+ - Part 1: https://nixos.org/nix-dev/2015-January/015591.html
346+ - Part 2: https://nixos.org/nix-dev/2015-January/015608.html
347+ - Part 3: https://nixos.org/nix-dev/2015-April/016912.html
348+
349+- Oliver Charles Wiki: http://wiki.ocharles.org.uk/Nix
350+
351+General Nix resources:
352+
353+- `https://nixos.org/`
354+
355+- https://groups.google.com/forum/#!forum/nix-devel
356+
357+- `#nixos` auf `irc.freenode.org`
doc/pipeline-details.dianew file+1767
@@ -0,0 +1,1767 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3+ <dia:diagramdata>
4+ <dia:attribute name="background">
5+ <dia:color val="#ffffff"/>
6+ </dia:attribute>
7+ <dia:attribute name="pagebreak">
8+ <dia:color val="#000099"/>
9+ </dia:attribute>
10+ <dia:attribute name="paper">
11+ <dia:composite type="paper">
12+ <dia:attribute name="name">
13+ <dia:string>#A4#</dia:string>
14+ </dia:attribute>
15+ <dia:attribute name="tmargin">
16+ <dia:real val="2.8199999332427979"/>
17+ </dia:attribute>
18+ <dia:attribute name="bmargin">
19+ <dia:real val="2.8222000598907471"/>
20+ </dia:attribute>
21+ <dia:attribute name="lmargin">
22+ <dia:real val="2.8222000598907471"/>
23+ </dia:attribute>
24+ <dia:attribute name="rmargin">
25+ <dia:real val="2.8222000598907471"/>
26+ </dia:attribute>
27+ <dia:attribute name="is_portrait">
28+ <dia:boolean val="true"/>
29+ </dia:attribute>
30+ <dia:attribute name="scaling">
31+ <dia:real val="0.50346225500106812"/>
32+ </dia:attribute>
33+ <dia:attribute name="fitto">
34+ <dia:boolean val="true"/>
35+ </dia:attribute>
36+ <dia:attribute name="fitwidth">
37+ <dia:int val="1"/>
38+ </dia:attribute>
39+ <dia:attribute name="fitheight">
40+ <dia:int val="1"/>
41+ </dia:attribute>
42+ </dia:composite>
43+ </dia:attribute>
44+ <dia:attribute name="grid">
45+ <dia:composite type="grid">
46+ <dia:attribute name="width_x">
47+ <dia:real val="1"/>
48+ </dia:attribute>
49+ <dia:attribute name="width_y">
50+ <dia:real val="1"/>
51+ </dia:attribute>
52+ <dia:attribute name="visible_x">
53+ <dia:int val="1"/>
54+ </dia:attribute>
55+ <dia:attribute name="visible_y">
56+ <dia:int val="1"/>
57+ </dia:attribute>
58+ <dia:composite type="color"/>
59+ </dia:composite>
60+ </dia:attribute>
61+ <dia:attribute name="color">
62+ <dia:color val="#d8e5e5"/>
63+ </dia:attribute>
64+ <dia:attribute name="guides">
65+ <dia:composite type="guides">
66+ <dia:attribute name="hguides"/>
67+ <dia:attribute name="vguides"/>
68+ </dia:composite>
69+ </dia:attribute>
70+ </dia:diagramdata>
71+ <dia:layer name="Background" visible="true" active="true">
72+ <dia:object type="Standard - Box" version="0" id="O0">
73+ <dia:attribute name="obj_pos">
74+ <dia:point val="-3,16.3"/>
75+ </dia:attribute>
76+ <dia:attribute name="obj_bb">
77+ <dia:rectangle val="-3.05,16.25;5.95,29.75"/>
78+ </dia:attribute>
79+ <dia:attribute name="elem_corner">
80+ <dia:point val="-3,16.3"/>
81+ </dia:attribute>
82+ <dia:attribute name="elem_width">
83+ <dia:real val="8.9000000000000021"/>
84+ </dia:attribute>
85+ <dia:attribute name="elem_height">
86+ <dia:real val="13.399999999999999"/>
87+ </dia:attribute>
88+ <dia:attribute name="border_width">
89+ <dia:real val="0.10000000149011612"/>
90+ </dia:attribute>
91+ <dia:attribute name="inner_color">
92+ <dia:color val="#bfbfbf"/>
93+ </dia:attribute>
94+ <dia:attribute name="show_background">
95+ <dia:boolean val="true"/>
96+ </dia:attribute>
97+ <dia:attribute name="line_style">
98+ <dia:enum val="4"/>
99+ </dia:attribute>
100+ </dia:object>
101+ <dia:object type="Standard - Box" version="0" id="O1">
102+ <dia:attribute name="obj_pos">
103+ <dia:point val="14.85,12.965"/>
104+ </dia:attribute>
105+ <dia:attribute name="obj_bb">
106+ <dia:rectangle val="14.8,12.915;27.45,29.65"/>
107+ </dia:attribute>
108+ <dia:attribute name="elem_corner">
109+ <dia:point val="14.85,12.965"/>
110+ </dia:attribute>
111+ <dia:attribute name="elem_width">
112+ <dia:real val="12.549999999999995"/>
113+ </dia:attribute>
114+ <dia:attribute name="elem_height">
115+ <dia:real val="16.634999999999987"/>
116+ </dia:attribute>
117+ <dia:attribute name="border_width">
118+ <dia:real val="0.10000000149011612"/>
119+ </dia:attribute>
120+ <dia:attribute name="inner_color">
121+ <dia:color val="#bfbfbf"/>
122+ </dia:attribute>
123+ <dia:attribute name="show_background">
124+ <dia:boolean val="true"/>
125+ </dia:attribute>
126+ <dia:attribute name="line_style">
127+ <dia:enum val="4"/>
128+ </dia:attribute>
129+ </dia:object>
130+ <dia:group>
131+ <dia:object type="Flowchart - Parallelogram" version="0" id="O2">
132+ <dia:attribute name="obj_pos">
133+ <dia:point val="17.2356,25.9784"/>
134+ </dia:attribute>
135+ <dia:attribute name="obj_bb">
136+ <dia:rectangle val="17.1856,25.9284;26.9072,28.0284"/>
137+ </dia:attribute>
138+ <dia:attribute name="elem_corner">
139+ <dia:point val="17.2356,25.9784"/>
140+ </dia:attribute>
141+ <dia:attribute name="elem_width">
142+ <dia:real val="9.6216166559453669"/>
143+ </dia:attribute>
144+ <dia:attribute name="elem_height">
145+ <dia:real val="2"/>
146+ </dia:attribute>
147+ <dia:attribute name="show_background">
148+ <dia:boolean val="true"/>
149+ </dia:attribute>
150+ <dia:attribute name="shear_angle">
151+ <dia:real val="70"/>
152+ </dia:attribute>
153+ <dia:attribute name="padding">
154+ <dia:real val="0.5"/>
155+ </dia:attribute>
156+ <dia:attribute name="text">
157+ <dia:composite type="text">
158+ <dia:attribute name="string">
159+ <dia:string>#configuration-lts-x.y.nix#</dia:string>
160+ </dia:attribute>
161+ <dia:attribute name="font">
162+ <dia:font family="sans" style="0" name="Helvetica"/>
163+ </dia:attribute>
164+ <dia:attribute name="height">
165+ <dia:real val="0.80000000000000004"/>
166+ </dia:attribute>
167+ <dia:attribute name="pos">
168+ <dia:point val="22.0464,27.1734"/>
169+ </dia:attribute>
170+ <dia:attribute name="color">
171+ <dia:color val="#000000"/>
172+ </dia:attribute>
173+ <dia:attribute name="alignment">
174+ <dia:enum val="1"/>
175+ </dia:attribute>
176+ </dia:composite>
177+ </dia:attribute>
178+ </dia:object>
179+ <dia:object type="Flowchart - Parallelogram" version="0" id="O3">
180+ <dia:attribute name="obj_pos">
181+ <dia:point val="16.4139,26.4093"/>
182+ </dia:attribute>
183+ <dia:attribute name="obj_bb">
184+ <dia:rectangle val="16.3639,26.3593;26.0855,28.4593"/>
185+ </dia:attribute>
186+ <dia:attribute name="elem_corner">
187+ <dia:point val="16.4139,26.4093"/>
188+ </dia:attribute>
189+ <dia:attribute name="elem_width">
190+ <dia:real val="9.6216166559453669"/>
191+ </dia:attribute>
192+ <dia:attribute name="elem_height">
193+ <dia:real val="2"/>
194+ </dia:attribute>
195+ <dia:attribute name="show_background">
196+ <dia:boolean val="true"/>
197+ </dia:attribute>
198+ <dia:attribute name="shear_angle">
199+ <dia:real val="70"/>
200+ </dia:attribute>
201+ <dia:attribute name="padding">
202+ <dia:real val="0.5"/>
203+ </dia:attribute>
204+ <dia:attribute name="text">
205+ <dia:composite type="text">
206+ <dia:attribute name="string">
207+ <dia:string>#configuration-lts-x.y.nix#</dia:string>
208+ </dia:attribute>
209+ <dia:attribute name="font">
210+ <dia:font family="sans" style="0" name="Helvetica"/>
211+ </dia:attribute>
212+ <dia:attribute name="height">
213+ <dia:real val="0.80000000000000004"/>
214+ </dia:attribute>
215+ <dia:attribute name="pos">
216+ <dia:point val="21.2247,27.6043"/>
217+ </dia:attribute>
218+ <dia:attribute name="color">
219+ <dia:color val="#000000"/>
220+ </dia:attribute>
221+ <dia:attribute name="alignment">
222+ <dia:enum val="1"/>
223+ </dia:attribute>
224+ </dia:composite>
225+ </dia:attribute>
226+ </dia:object>
227+ <dia:object type="Flowchart - Parallelogram" version="0" id="O4">
228+ <dia:attribute name="obj_pos">
229+ <dia:point val="15.7148,26.8153"/>
230+ </dia:attribute>
231+ <dia:attribute name="obj_bb">
232+ <dia:rectangle val="15.6648,26.7653;25.3864,28.8653"/>
233+ </dia:attribute>
234+ <dia:attribute name="elem_corner">
235+ <dia:point val="15.7148,26.8153"/>
236+ </dia:attribute>
237+ <dia:attribute name="elem_width">
238+ <dia:real val="9.6216166559453669"/>
239+ </dia:attribute>
240+ <dia:attribute name="elem_height">
241+ <dia:real val="2"/>
242+ </dia:attribute>
243+ <dia:attribute name="show_background">
244+ <dia:boolean val="true"/>
245+ </dia:attribute>
246+ <dia:attribute name="shear_angle">
247+ <dia:real val="70"/>
248+ </dia:attribute>
249+ <dia:attribute name="padding">
250+ <dia:real val="0.5"/>
251+ </dia:attribute>
252+ <dia:attribute name="text">
253+ <dia:composite type="text">
254+ <dia:attribute name="string">
255+ <dia:string>#configuration-lts-x.y.nix#</dia:string>
256+ </dia:attribute>
257+ <dia:attribute name="font">
258+ <dia:font family="sans" style="0" name="Helvetica"/>
259+ </dia:attribute>
260+ <dia:attribute name="height">
261+ <dia:real val="0.80000000000000004"/>
262+ </dia:attribute>
263+ <dia:attribute name="pos">
264+ <dia:point val="20.5256,28.0103"/>
265+ </dia:attribute>
266+ <dia:attribute name="color">
267+ <dia:color val="#000000"/>
268+ </dia:attribute>
269+ <dia:attribute name="alignment">
270+ <dia:enum val="1"/>
271+ </dia:attribute>
272+ </dia:composite>
273+ </dia:attribute>
274+ </dia:object>
275+ </dia:group>
276+ <dia:object type="Standard - Line" version="0" id="O5">
277+ <dia:attribute name="obj_pos">
278+ <dia:point val="21.5216,23.6895"/>
279+ </dia:attribute>
280+ <dia:attribute name="obj_bb">
281+ <dia:rectangle val="21.2119,23.6383;21.9353,26.5211"/>
282+ </dia:attribute>
283+ <dia:attribute name="conn_endpoints">
284+ <dia:point val="21.5216,23.6895"/>
285+ <dia:point val="21.5887,26.4093"/>
286+ </dia:attribute>
287+ <dia:attribute name="numcp">
288+ <dia:int val="1"/>
289+ </dia:attribute>
290+ <dia:attribute name="end_arrow">
291+ <dia:enum val="22"/>
292+ </dia:attribute>
293+ <dia:attribute name="end_arrow_length">
294+ <dia:real val="0.5"/>
295+ </dia:attribute>
296+ <dia:attribute name="end_arrow_width">
297+ <dia:real val="0.5"/>
298+ </dia:attribute>
299+ <dia:connections>
300+ <dia:connection handle="0" to="O7" connection="14"/>
301+ <dia:connection handle="1" to="O3" connection="2"/>
302+ </dia:connections>
303+ </dia:object>
304+ <dia:group>
305+ <dia:object type="Flowchart - Manual Input" version="1" id="O6">
306+ <dia:attribute name="obj_pos">
307+ <dia:point val="17.5436,21.2235"/>
308+ </dia:attribute>
309+ <dia:attribute name="obj_bb">
310+ <dia:rectangle val="17.4936,21.1687;26.3211,23.2735"/>
311+ </dia:attribute>
312+ <dia:attribute name="meta">
313+ <dia:composite type="dict"/>
314+ </dia:attribute>
315+ <dia:attribute name="elem_corner">
316+ <dia:point val="17.5436,21.2235"/>
317+ </dia:attribute>
318+ <dia:attribute name="elem_width">
319+ <dia:real val="8.7275000000000009"/>
320+ </dia:attribute>
321+ <dia:attribute name="elem_height">
322+ <dia:real val="2"/>
323+ </dia:attribute>
324+ <dia:attribute name="line_width">
325+ <dia:real val="0.10000000000000001"/>
326+ </dia:attribute>
327+ <dia:attribute name="line_colour">
328+ <dia:color val="#000000"/>
329+ </dia:attribute>
330+ <dia:attribute name="fill_colour">
331+ <dia:color val="#ffffff"/>
332+ </dia:attribute>
333+ <dia:attribute name="show_background">
334+ <dia:boolean val="true"/>
335+ </dia:attribute>
336+ <dia:attribute name="line_style">
337+ <dia:enum val="0"/>
338+ <dia:real val="1"/>
339+ </dia:attribute>
340+ <dia:attribute name="padding">
341+ <dia:real val="0.10000000000000001"/>
342+ </dia:attribute>
343+ <dia:attribute name="text">
344+ <dia:composite type="text">
345+ <dia:attribute name="string">
346+ <dia:string>#configuration-ghc-x.y.nix#</dia:string>
347+ </dia:attribute>
348+ <dia:attribute name="font">
349+ <dia:font family="sans" style="0" name="Helvetica"/>
350+ </dia:attribute>
351+ <dia:attribute name="height">
352+ <dia:real val="0.80000000000000004"/>
353+ </dia:attribute>
354+ <dia:attribute name="pos">
355+ <dia:point val="21.9074,22.8235"/>
356+ </dia:attribute>
357+ <dia:attribute name="color">
358+ <dia:color val="#000000"/>
359+ </dia:attribute>
360+ <dia:attribute name="alignment">
361+ <dia:enum val="1"/>
362+ </dia:attribute>
363+ </dia:composite>
364+ </dia:attribute>
365+ <dia:attribute name="flip_horizontal">
366+ <dia:boolean val="false"/>
367+ </dia:attribute>
368+ <dia:attribute name="flip_vertical">
369+ <dia:boolean val="false"/>
370+ </dia:attribute>
371+ <dia:attribute name="subscale">
372+ <dia:real val="1"/>
373+ </dia:attribute>
374+ </dia:object>
375+ <dia:object type="Flowchart - Manual Input" version="1" id="O7">
376+ <dia:attribute name="obj_pos">
377+ <dia:point val="17.1578,21.6895"/>
378+ </dia:attribute>
379+ <dia:attribute name="obj_bb">
380+ <dia:rectangle val="17.1078,21.6347;25.9353,23.7395"/>
381+ </dia:attribute>
382+ <dia:attribute name="meta">
383+ <dia:composite type="dict"/>
384+ </dia:attribute>
385+ <dia:attribute name="elem_corner">
386+ <dia:point val="17.1578,21.6895"/>
387+ </dia:attribute>
388+ <dia:attribute name="elem_width">
389+ <dia:real val="8.7275000000000009"/>
390+ </dia:attribute>
391+ <dia:attribute name="elem_height">
392+ <dia:real val="2"/>
393+ </dia:attribute>
394+ <dia:attribute name="line_width">
395+ <dia:real val="0.10000000000000001"/>
396+ </dia:attribute>
397+ <dia:attribute name="line_colour">
398+ <dia:color val="#000000"/>
399+ </dia:attribute>
400+ <dia:attribute name="fill_colour">
401+ <dia:color val="#ffffff"/>
402+ </dia:attribute>
403+ <dia:attribute name="show_background">
404+ <dia:boolean val="true"/>
405+ </dia:attribute>
406+ <dia:attribute name="line_style">
407+ <dia:enum val="0"/>
408+ <dia:real val="1"/>
409+ </dia:attribute>
410+ <dia:attribute name="padding">
411+ <dia:real val="0.10000000000000001"/>
412+ </dia:attribute>
413+ <dia:attribute name="text">
414+ <dia:composite type="text">
415+ <dia:attribute name="string">
416+ <dia:string>#configuration-ghc-x.y.nix#</dia:string>
417+ </dia:attribute>
418+ <dia:attribute name="font">
419+ <dia:font family="sans" style="0" name="Helvetica"/>
420+ </dia:attribute>
421+ <dia:attribute name="height">
422+ <dia:real val="0.80000000000000004"/>
423+ </dia:attribute>
424+ <dia:attribute name="pos">
425+ <dia:point val="21.5216,23.2895"/>
426+ </dia:attribute>
427+ <dia:attribute name="color">
428+ <dia:color val="#000000"/>
429+ </dia:attribute>
430+ <dia:attribute name="alignment">
431+ <dia:enum val="1"/>
432+ </dia:attribute>
433+ </dia:composite>
434+ </dia:attribute>
435+ <dia:attribute name="flip_horizontal">
436+ <dia:boolean val="false"/>
437+ </dia:attribute>
438+ <dia:attribute name="flip_vertical">
439+ <dia:boolean val="false"/>
440+ </dia:attribute>
441+ <dia:attribute name="subscale">
442+ <dia:real val="1"/>
443+ </dia:attribute>
444+ </dia:object>
445+ <dia:object type="Flowchart - Manual Input" version="1" id="O8">
446+ <dia:attribute name="obj_pos">
447+ <dia:point val="16.7028,22.1633"/>
448+ </dia:attribute>
449+ <dia:attribute name="obj_bb">
450+ <dia:rectangle val="16.6528,22.1085;25.4803,24.2133"/>
451+ </dia:attribute>
452+ <dia:attribute name="meta">
453+ <dia:composite type="dict"/>
454+ </dia:attribute>
455+ <dia:attribute name="elem_corner">
456+ <dia:point val="16.7028,22.1633"/>
457+ </dia:attribute>
458+ <dia:attribute name="elem_width">
459+ <dia:real val="8.7275000000000009"/>
460+ </dia:attribute>
461+ <dia:attribute name="elem_height">
462+ <dia:real val="2"/>
463+ </dia:attribute>
464+ <dia:attribute name="line_width">
465+ <dia:real val="0.10000000000000001"/>
466+ </dia:attribute>
467+ <dia:attribute name="line_colour">
468+ <dia:color val="#000000"/>
469+ </dia:attribute>
470+ <dia:attribute name="fill_colour">
471+ <dia:color val="#ffffff"/>
472+ </dia:attribute>
473+ <dia:attribute name="show_background">
474+ <dia:boolean val="true"/>
475+ </dia:attribute>
476+ <dia:attribute name="line_style">
477+ <dia:enum val="0"/>
478+ <dia:real val="1"/>
479+ </dia:attribute>
480+ <dia:attribute name="padding">
481+ <dia:real val="0.10000000000000001"/>
482+ </dia:attribute>
483+ <dia:attribute name="text">
484+ <dia:composite type="text">
485+ <dia:attribute name="string">
486+ <dia:string>#configuration-ghc-x.y.nix#</dia:string>
487+ </dia:attribute>
488+ <dia:attribute name="font">
489+ <dia:font family="sans" style="0" name="Helvetica"/>
490+ </dia:attribute>
491+ <dia:attribute name="height">
492+ <dia:real val="0.80000000000000004"/>
493+ </dia:attribute>
494+ <dia:attribute name="pos">
495+ <dia:point val="21.0666,23.7633"/>
496+ </dia:attribute>
497+ <dia:attribute name="color">
498+ <dia:color val="#000000"/>
499+ </dia:attribute>
500+ <dia:attribute name="alignment">
501+ <dia:enum val="1"/>
502+ </dia:attribute>
503+ </dia:composite>
504+ </dia:attribute>
505+ <dia:attribute name="flip_horizontal">
506+ <dia:boolean val="false"/>
507+ </dia:attribute>
508+ <dia:attribute name="flip_vertical">
509+ <dia:boolean val="false"/>
510+ </dia:attribute>
511+ <dia:attribute name="subscale">
512+ <dia:real val="1"/>
513+ </dia:attribute>
514+ </dia:object>
515+ </dia:group>
516+ <dia:object type="Standard - Box" version="0" id="O9">
517+ <dia:attribute name="obj_pos">
518+ <dia:point val="6.4325,18.1"/>
519+ </dia:attribute>
520+ <dia:attribute name="obj_bb">
521+ <dia:rectangle val="6.3825,18.05;14.4,29.7"/>
522+ </dia:attribute>
523+ <dia:attribute name="elem_corner">
524+ <dia:point val="6.4325,18.1"/>
525+ </dia:attribute>
526+ <dia:attribute name="elem_width">
527+ <dia:real val="7.9174999999999933"/>
528+ </dia:attribute>
529+ <dia:attribute name="elem_height">
530+ <dia:real val="11.550000000000015"/>
531+ </dia:attribute>
532+ <dia:attribute name="border_width">
533+ <dia:real val="0.10000000149011612"/>
534+ </dia:attribute>
535+ <dia:attribute name="inner_color">
536+ <dia:color val="#bfbfbf"/>
537+ </dia:attribute>
538+ <dia:attribute name="show_background">
539+ <dia:boolean val="true"/>
540+ </dia:attribute>
541+ <dia:attribute name="line_style">
542+ <dia:enum val="4"/>
543+ </dia:attribute>
544+ </dia:object>
545+ <dia:object type="Flowchart - Parallelogram" version="0" id="O10">
546+ <dia:attribute name="obj_pos">
547+ <dia:point val="-2.10183,21.785"/>
548+ </dia:attribute>
549+ <dia:attribute name="obj_bb">
550+ <dia:rectangle val="-2.15183,21.735;5.50479,23.835"/>
551+ </dia:attribute>
552+ <dia:attribute name="elem_corner">
553+ <dia:point val="-2.10183,21.785"/>
554+ </dia:attribute>
555+ <dia:attribute name="elem_width">
556+ <dia:real val="7.5566166559453665"/>
557+ </dia:attribute>
558+ <dia:attribute name="elem_height">
559+ <dia:real val="2"/>
560+ </dia:attribute>
561+ <dia:attribute name="show_background">
562+ <dia:boolean val="true"/>
563+ </dia:attribute>
564+ <dia:attribute name="shear_angle">
565+ <dia:real val="70"/>
566+ </dia:attribute>
567+ <dia:attribute name="padding">
568+ <dia:real val="0.5"/>
569+ </dia:attribute>
570+ <dia:attribute name="text">
571+ <dia:composite type="text">
572+ <dia:attribute name="string">
573+ <dia:string>#Stackage Nightly#</dia:string>
574+ </dia:attribute>
575+ <dia:attribute name="font">
576+ <dia:font family="sans" style="0" name="Helvetica"/>
577+ </dia:attribute>
578+ <dia:attribute name="height">
579+ <dia:real val="0.80000000000000004"/>
580+ </dia:attribute>
581+ <dia:attribute name="pos">
582+ <dia:point val="1.67648,22.98"/>
583+ </dia:attribute>
584+ <dia:attribute name="color">
585+ <dia:color val="#000000"/>
586+ </dia:attribute>
587+ <dia:attribute name="alignment">
588+ <dia:enum val="1"/>
589+ </dia:attribute>
590+ </dia:composite>
591+ </dia:attribute>
592+ </dia:object>
593+ <dia:object type="Flowchart - Parallelogram" version="0" id="O11">
594+ <dia:attribute name="obj_pos">
595+ <dia:point val="-1.97933,17.3272"/>
596+ </dia:attribute>
597+ <dia:attribute name="obj_bb">
598+ <dia:rectangle val="-2.02933,17.2772;5.38229,19.3772"/>
599+ </dia:attribute>
600+ <dia:attribute name="elem_corner">
601+ <dia:point val="-1.97933,17.3272"/>
602+ </dia:attribute>
603+ <dia:attribute name="elem_width">
604+ <dia:real val="7.3116166559453664"/>
605+ </dia:attribute>
606+ <dia:attribute name="elem_height">
607+ <dia:real val="2"/>
608+ </dia:attribute>
609+ <dia:attribute name="show_background">
610+ <dia:boolean val="true"/>
611+ </dia:attribute>
612+ <dia:attribute name="shear_angle">
613+ <dia:real val="70"/>
614+ </dia:attribute>
615+ <dia:attribute name="padding">
616+ <dia:real val="0.5"/>
617+ </dia:attribute>
618+ <dia:attribute name="text">
619+ <dia:composite type="text">
620+ <dia:attribute name="string">
621+ <dia:string>#all-cabal-hashes#</dia:string>
622+ </dia:attribute>
623+ <dia:attribute name="font">
624+ <dia:font family="sans" style="0" name="Helvetica"/>
625+ </dia:attribute>
626+ <dia:attribute name="height">
627+ <dia:real val="0.80000000000000004"/>
628+ </dia:attribute>
629+ <dia:attribute name="pos">
630+ <dia:point val="1.67648,18.5222"/>
631+ </dia:attribute>
632+ <dia:attribute name="color">
633+ <dia:color val="#000000"/>
634+ </dia:attribute>
635+ <dia:attribute name="alignment">
636+ <dia:enum val="1"/>
637+ </dia:attribute>
638+ </dia:composite>
639+ </dia:attribute>
640+ </dia:object>
641+ <dia:object type="Standard - Line" version="0" id="O12">
642+ <dia:attribute name="obj_pos">
643+ <dia:point val="1.687,14.8808"/>
644+ </dia:attribute>
645+ <dia:attribute name="obj_bb">
646+ <dia:rectangle val="1.31971,14.8306;2.04331,17.4024"/>
647+ </dia:attribute>
648+ <dia:attribute name="conn_endpoints">
649+ <dia:point val="1.687,14.8808"/>
650+ <dia:point val="1.67964,17.2906"/>
651+ </dia:attribute>
652+ <dia:attribute name="numcp">
653+ <dia:int val="1"/>
654+ </dia:attribute>
655+ <dia:attribute name="end_arrow">
656+ <dia:enum val="22"/>
657+ </dia:attribute>
658+ <dia:attribute name="end_arrow_length">
659+ <dia:real val="0.5"/>
660+ </dia:attribute>
661+ <dia:attribute name="end_arrow_width">
662+ <dia:real val="0.5"/>
663+ </dia:attribute>
664+ <dia:connections>
665+ <dia:connection handle="0" to="O27" connection="14"/>
666+ <dia:connection handle="1" to="O11" connection="16"/>
667+ </dia:connections>
668+ </dia:object>
669+ <dia:object type="Standard - Line" version="0" id="O13">
670+ <dia:attribute name="obj_pos">
671+ <dia:point val="1.67648,19.3769"/>
672+ </dia:attribute>
673+ <dia:attribute name="obj_bb">
674+ <dia:rectangle val="1.31467,19.3269;2.03828,21.8471"/>
675+ </dia:attribute>
676+ <dia:attribute name="conn_endpoints">
677+ <dia:point val="1.67648,19.3769"/>
678+ <dia:point val="1.67648,21.7353"/>
679+ </dia:attribute>
680+ <dia:attribute name="numcp">
681+ <dia:int val="1"/>
682+ </dia:attribute>
683+ <dia:attribute name="end_arrow">
684+ <dia:enum val="22"/>
685+ </dia:attribute>
686+ <dia:attribute name="end_arrow_length">
687+ <dia:real val="0.5"/>
688+ </dia:attribute>
689+ <dia:attribute name="end_arrow_width">
690+ <dia:real val="0.5"/>
691+ </dia:attribute>
692+ <dia:connections>
693+ <dia:connection handle="0" to="O11" connection="16"/>
694+ <dia:connection handle="1" to="O10" connection="16"/>
695+ </dia:connections>
696+ </dia:object>
697+ <dia:object type="Flowchart - Parallelogram" version="0" id="O14">
698+ <dia:attribute name="obj_pos">
699+ <dia:point val="17.1382,13.6837"/>
700+ </dia:attribute>
701+ <dia:attribute name="obj_bb">
702+ <dia:rectangle val="17.0882,13.6337;26.4473,15.6337"/>
703+ </dia:attribute>
704+ <dia:attribute name="elem_corner">
705+ <dia:point val="17.1382,13.6837"/>
706+ </dia:attribute>
707+ <dia:attribute name="elem_width">
708+ <dia:real val="9.2591166559453661"/>
709+ </dia:attribute>
710+ <dia:attribute name="elem_height">
711+ <dia:real val="1.9000000000000001"/>
712+ </dia:attribute>
713+ <dia:attribute name="show_background">
714+ <dia:boolean val="true"/>
715+ </dia:attribute>
716+ <dia:attribute name="shear_angle">
717+ <dia:real val="70"/>
718+ </dia:attribute>
719+ <dia:attribute name="padding">
720+ <dia:real val="0.5"/>
721+ </dia:attribute>
722+ <dia:attribute name="text">
723+ <dia:composite type="text">
724+ <dia:attribute name="string">
725+ <dia:string>#hackage-packages.nix#</dia:string>
726+ </dia:attribute>
727+ <dia:attribute name="font">
728+ <dia:font family="sans" style="0" name="Helvetica"/>
729+ </dia:attribute>
730+ <dia:attribute name="height">
731+ <dia:real val="0.80000000000000004"/>
732+ </dia:attribute>
733+ <dia:attribute name="pos">
734+ <dia:point val="21.7678,14.8287"/>
735+ </dia:attribute>
736+ <dia:attribute name="color">
737+ <dia:color val="#000000"/>
738+ </dia:attribute>
739+ <dia:attribute name="alignment">
740+ <dia:enum val="1"/>
741+ </dia:attribute>
742+ </dia:composite>
743+ </dia:attribute>
744+ </dia:object>
745+ <dia:object type="Standard - Line" version="0" id="O15">
746+ <dia:attribute name="obj_pos">
747+ <dia:point val="3.68637,17.3272"/>
748+ </dia:attribute>
749+ <dia:attribute name="obj_bb">
750+ <dia:rectangle val="3.61566,13.6496;7.30368,17.3979"/>
751+ </dia:attribute>
752+ <dia:attribute name="conn_endpoints">
753+ <dia:point val="3.68637,17.3272"/>
754+ <dia:point val="7.22528,13.7293"/>
755+ </dia:attribute>
756+ <dia:attribute name="numcp">
757+ <dia:int val="1"/>
758+ </dia:attribute>
759+ <dia:attribute name="end_arrow">
760+ <dia:enum val="22"/>
761+ </dia:attribute>
762+ <dia:attribute name="end_arrow_length">
763+ <dia:real val="0.5"/>
764+ </dia:attribute>
765+ <dia:attribute name="end_arrow_width">
766+ <dia:real val="0.5"/>
767+ </dia:attribute>
768+ <dia:connections>
769+ <dia:connection handle="0" to="O11" connection="3"/>
770+ <dia:connection handle="1" to="O16" connection="5"/>
771+ </dia:connections>
772+ </dia:object>
773+ <dia:object type="Flowchart - Box" version="0" id="O16">
774+ <dia:attribute name="obj_pos">
775+ <dia:point val="7.22528,13.2543"/>
776+ </dia:attribute>
777+ <dia:attribute name="obj_bb">
778+ <dia:rectangle val="7.17528,13.2043;13.55,15.2043"/>
779+ </dia:attribute>
780+ <dia:attribute name="elem_corner">
781+ <dia:point val="7.22528,13.2543"/>
782+ </dia:attribute>
783+ <dia:attribute name="elem_width">
784+ <dia:real val="6.2747199992549376"/>
785+ </dia:attribute>
786+ <dia:attribute name="elem_height">
787+ <dia:real val="1.9000000014901162"/>
788+ </dia:attribute>
789+ <dia:attribute name="border_width">
790+ <dia:real val="0.10000000149011612"/>
791+ </dia:attribute>
792+ <dia:attribute name="border_color">
793+ <dia:color val="#ff0000"/>
794+ </dia:attribute>
795+ <dia:attribute name="show_background">
796+ <dia:boolean val="true"/>
797+ </dia:attribute>
798+ <dia:attribute name="padding">
799+ <dia:real val="0.5"/>
800+ </dia:attribute>
801+ <dia:attribute name="text">
802+ <dia:composite type="text">
803+ <dia:attribute name="string">
804+ <dia:string>#hackage2nix#</dia:string>
805+ </dia:attribute>
806+ <dia:attribute name="font">
807+ <dia:font family="sans" style="0" name="Helvetica"/>
808+ </dia:attribute>
809+ <dia:attribute name="height">
810+ <dia:real val="0.80000000000000004"/>
811+ </dia:attribute>
812+ <dia:attribute name="pos">
813+ <dia:point val="10.3626,14.3993"/>
814+ </dia:attribute>
815+ <dia:attribute name="color">
816+ <dia:color val="#000000"/>
817+ </dia:attribute>
818+ <dia:attribute name="alignment">
819+ <dia:enum val="1"/>
820+ </dia:attribute>
821+ </dia:composite>
822+ </dia:attribute>
823+ </dia:object>
824+ <dia:object type="Standard - Line" version="0" id="O17">
825+ <dia:attribute name="obj_pos">
826+ <dia:point val="3.74762,21.785"/>
827+ </dia:attribute>
828+ <dia:attribute name="obj_bb">
829+ <dia:rectangle val="3.68011,15.0553;7.29507,21.8526"/>
830+ </dia:attribute>
831+ <dia:attribute name="conn_endpoints">
832+ <dia:point val="3.74762,21.785"/>
833+ <dia:point val="7.22528,15.1543"/>
834+ </dia:attribute>
835+ <dia:attribute name="numcp">
836+ <dia:int val="1"/>
837+ </dia:attribute>
838+ <dia:attribute name="end_arrow">
839+ <dia:enum val="22"/>
840+ </dia:attribute>
841+ <dia:attribute name="end_arrow_length">
842+ <dia:real val="0.5"/>
843+ </dia:attribute>
844+ <dia:attribute name="end_arrow_width">
845+ <dia:real val="0.5"/>
846+ </dia:attribute>
847+ <dia:connections>
848+ <dia:connection handle="0" to="O10" connection="3"/>
849+ <dia:connection handle="1" to="O16" connection="11"/>
850+ </dia:connections>
851+ </dia:object>
852+ <dia:object type="Flowchart - Manual Input" version="1" id="O18">
853+ <dia:attribute name="obj_pos">
854+ <dia:point val="17.0732,17.4036"/>
855+ </dia:attribute>
856+ <dia:attribute name="obj_bb">
857+ <dia:rectangle val="17.0232,17.3488;25.8507,19.4536"/>
858+ </dia:attribute>
859+ <dia:attribute name="meta">
860+ <dia:composite type="dict"/>
861+ </dia:attribute>
862+ <dia:attribute name="elem_corner">
863+ <dia:point val="17.0732,17.4036"/>
864+ </dia:attribute>
865+ <dia:attribute name="elem_width">
866+ <dia:real val="8.7275000000000009"/>
867+ </dia:attribute>
868+ <dia:attribute name="elem_height">
869+ <dia:real val="2"/>
870+ </dia:attribute>
871+ <dia:attribute name="line_width">
872+ <dia:real val="0.10000000000000001"/>
873+ </dia:attribute>
874+ <dia:attribute name="line_colour">
875+ <dia:color val="#000000"/>
876+ </dia:attribute>
877+ <dia:attribute name="fill_colour">
878+ <dia:color val="#ffffff"/>
879+ </dia:attribute>
880+ <dia:attribute name="show_background">
881+ <dia:boolean val="true"/>
882+ </dia:attribute>
883+ <dia:attribute name="line_style">
884+ <dia:enum val="0"/>
885+ <dia:real val="1"/>
886+ </dia:attribute>
887+ <dia:attribute name="padding">
888+ <dia:real val="0.10000000000000001"/>
889+ </dia:attribute>
890+ <dia:attribute name="text">
891+ <dia:composite type="text">
892+ <dia:attribute name="string">
893+ <dia:string>#configuration-common.nix#</dia:string>
894+ </dia:attribute>
895+ <dia:attribute name="font">
896+ <dia:font family="sans" style="0" name="Helvetica"/>
897+ </dia:attribute>
898+ <dia:attribute name="height">
899+ <dia:real val="0.80000000000000004"/>
900+ </dia:attribute>
901+ <dia:attribute name="pos">
902+ <dia:point val="21.437,19.0036"/>
903+ </dia:attribute>
904+ <dia:attribute name="color">
905+ <dia:color val="#000000"/>
906+ </dia:attribute>
907+ <dia:attribute name="alignment">
908+ <dia:enum val="1"/>
909+ </dia:attribute>
910+ </dia:composite>
911+ </dia:attribute>
912+ <dia:attribute name="flip_horizontal">
913+ <dia:boolean val="false"/>
914+ </dia:attribute>
915+ <dia:attribute name="flip_vertical">
916+ <dia:boolean val="false"/>
917+ </dia:attribute>
918+ <dia:attribute name="subscale">
919+ <dia:real val="1"/>
920+ </dia:attribute>
921+ </dia:object>
922+ <dia:object type="Standard - Line" version="0" id="O19">
923+ <dia:attribute name="obj_pos">
924+ <dia:point val="13.5,14.2043"/>
925+ </dia:attribute>
926+ <dia:attribute name="obj_bb">
927+ <dia:rectangle val="13.4449,14.1492;17.5951,14.9279"/>
928+ </dia:attribute>
929+ <dia:attribute name="conn_endpoints">
930+ <dia:point val="13.5,14.2043"/>
931+ <dia:point val="17.484,14.6337"/>
932+ </dia:attribute>
933+ <dia:attribute name="numcp">
934+ <dia:int val="1"/>
935+ </dia:attribute>
936+ <dia:attribute name="end_arrow">
937+ <dia:enum val="22"/>
938+ </dia:attribute>
939+ <dia:attribute name="end_arrow_length">
940+ <dia:real val="0.5"/>
941+ </dia:attribute>
942+ <dia:attribute name="end_arrow_width">
943+ <dia:real val="0.5"/>
944+ </dia:attribute>
945+ <dia:connections>
946+ <dia:connection handle="0" to="O16" connection="8"/>
947+ <dia:connection handle="1" to="O14" connection="7"/>
948+ </dia:connections>
949+ </dia:object>
950+ <dia:object type="Standard - Line" version="0" id="O20">
951+ <dia:attribute name="obj_pos">
952+ <dia:point val="13.5,15.1543"/>
953+ </dia:attribute>
954+ <dia:attribute name="obj_bb">
955+ <dia:rectangle val="13.437,15.0913;17.2977,26.5157"/>
956+ </dia:attribute>
957+ <dia:attribute name="conn_endpoints">
958+ <dia:point val="13.5,15.1543"/>
959+ <dia:point val="17.1418,26.4093"/>
960+ </dia:attribute>
961+ <dia:attribute name="numcp">
962+ <dia:int val="1"/>
963+ </dia:attribute>
964+ <dia:attribute name="end_arrow">
965+ <dia:enum val="22"/>
966+ </dia:attribute>
967+ <dia:attribute name="end_arrow_length">
968+ <dia:real val="0.5"/>
969+ </dia:attribute>
970+ <dia:attribute name="end_arrow_width">
971+ <dia:real val="0.5"/>
972+ </dia:attribute>
973+ <dia:connections>
974+ <dia:connection handle="0" to="O16" connection="15"/>
975+ <dia:connection handle="1" to="O3" connection="0"/>
976+ </dia:connections>
977+ </dia:object>
978+ <dia:object type="Standard - Line" version="0" id="O21">
979+ <dia:attribute name="obj_pos">
980+ <dia:point val="21.422,15.5837"/>
981+ </dia:attribute>
982+ <dia:attribute name="obj_bb">
983+ <dia:rectangle val="21.071,15.5334;21.7946,17.9154"/>
984+ </dia:attribute>
985+ <dia:attribute name="conn_endpoints">
986+ <dia:point val="21.422,15.5837"/>
987+ <dia:point val="21.437,17.8036"/>
988+ </dia:attribute>
989+ <dia:attribute name="numcp">
990+ <dia:int val="1"/>
991+ </dia:attribute>
992+ <dia:attribute name="end_arrow">
993+ <dia:enum val="22"/>
994+ </dia:attribute>
995+ <dia:attribute name="end_arrow_length">
996+ <dia:real val="0.5"/>
997+ </dia:attribute>
998+ <dia:attribute name="end_arrow_width">
999+ <dia:real val="0.5"/>
1000+ </dia:attribute>
1001+ <dia:connections>
1002+ <dia:connection handle="0" to="O14" connection="13"/>
1003+ <dia:connection handle="1" to="O18" connection="2"/>
1004+ </dia:connections>
1005+ </dia:object>
1006+ <dia:object type="Standard - Line" version="0" id="O22">
1007+ <dia:attribute name="obj_pos">
1008+ <dia:point val="21.461,19.4533"/>
1009+ </dia:attribute>
1010+ <dia:attribute name="obj_bb">
1011+ <dia:rectangle val="21.1458,19.4022;21.8692,22.2013"/>
1012+ </dia:attribute>
1013+ <dia:attribute name="conn_endpoints">
1014+ <dia:point val="21.461,19.4533"/>
1015+ <dia:point val="21.5216,22.0895"/>
1016+ </dia:attribute>
1017+ <dia:attribute name="numcp">
1018+ <dia:int val="1"/>
1019+ </dia:attribute>
1020+ <dia:attribute name="end_arrow">
1021+ <dia:enum val="22"/>
1022+ </dia:attribute>
1023+ <dia:attribute name="end_arrow_length">
1024+ <dia:real val="0.5"/>
1025+ </dia:attribute>
1026+ <dia:attribute name="end_arrow_width">
1027+ <dia:real val="0.5"/>
1028+ </dia:attribute>
1029+ <dia:connections>
1030+ <dia:connection handle="0" to="O18" connection="16"/>
1031+ <dia:connection handle="1" to="O7" connection="2"/>
1032+ </dia:connections>
1033+ </dia:object>
1034+ <dia:object type="Flowchart - Manual Input" version="1" id="O23">
1035+ <dia:attribute name="obj_pos">
1036+ <dia:point val="6.9465,22.8184"/>
1037+ </dia:attribute>
1038+ <dia:attribute name="obj_bb">
1039+ <dia:rectangle val="6.8965,22.7619;13.6137,24.8684"/>
1040+ </dia:attribute>
1041+ <dia:attribute name="meta">
1042+ <dia:composite type="dict"/>
1043+ </dia:attribute>
1044+ <dia:attribute name="elem_corner">
1045+ <dia:point val="6.9465,22.8184"/>
1046+ </dia:attribute>
1047+ <dia:attribute name="elem_width">
1048+ <dia:real val="6.6171688018521273"/>
1049+ </dia:attribute>
1050+ <dia:attribute name="elem_height">
1051+ <dia:real val="2"/>
1052+ </dia:attribute>
1053+ <dia:attribute name="line_width">
1054+ <dia:real val="0.10000000000000001"/>
1055+ </dia:attribute>
1056+ <dia:attribute name="line_colour">
1057+ <dia:color val="#000000"/>
1058+ </dia:attribute>
1059+ <dia:attribute name="fill_colour">
1060+ <dia:color val="#ffffff"/>
1061+ </dia:attribute>
1062+ <dia:attribute name="show_background">
1063+ <dia:boolean val="true"/>
1064+ </dia:attribute>
1065+ <dia:attribute name="line_style">
1066+ <dia:enum val="0"/>
1067+ <dia:real val="1"/>
1068+ </dia:attribute>
1069+ <dia:attribute name="padding">
1070+ <dia:real val="0.10000000000000001"/>
1071+ </dia:attribute>
1072+ <dia:attribute name="text">
1073+ <dia:composite type="text">
1074+ <dia:attribute name="string">
1075+ <dia:string>#packageOverrides#</dia:string>
1076+ </dia:attribute>
1077+ <dia:attribute name="font">
1078+ <dia:font family="sans" style="0" name="Helvetica"/>
1079+ </dia:attribute>
1080+ <dia:attribute name="height">
1081+ <dia:real val="0.80000000000000004"/>
1082+ </dia:attribute>
1083+ <dia:attribute name="pos">
1084+ <dia:point val="10.2551,24.4184"/>
1085+ </dia:attribute>
1086+ <dia:attribute name="color">
1087+ <dia:color val="#000000"/>
1088+ </dia:attribute>
1089+ <dia:attribute name="alignment">
1090+ <dia:enum val="1"/>
1091+ </dia:attribute>
1092+ </dia:composite>
1093+ </dia:attribute>
1094+ <dia:attribute name="flip_horizontal">
1095+ <dia:boolean val="false"/>
1096+ </dia:attribute>
1097+ <dia:attribute name="flip_vertical">
1098+ <dia:boolean val="false"/>
1099+ </dia:attribute>
1100+ <dia:attribute name="subscale">
1101+ <dia:real val="1"/>
1102+ </dia:attribute>
1103+ </dia:object>
1104+ <dia:object type="Standard - Line" version="0" id="O24">
1105+ <dia:attribute name="obj_pos">
1106+ <dia:point val="21.4301,17.3918"/>
1107+ </dia:attribute>
1108+ <dia:attribute name="obj_bb">
1109+ <dia:rectangle val="21.3798,17.3415;21.4829,17.8048"/>
1110+ </dia:attribute>
1111+ <dia:attribute name="conn_endpoints">
1112+ <dia:point val="21.4301,17.3918"/>
1113+ <dia:point val="21.4326,17.7544"/>
1114+ </dia:attribute>
1115+ <dia:attribute name="numcp">
1116+ <dia:int val="1"/>
1117+ </dia:attribute>
1118+ <dia:connections>
1119+ <dia:connection handle="1" to="O18" connection="16"/>
1120+ </dia:connections>
1121+ </dia:object>
1122+ <dia:object type="Standard - Line" version="0" id="O25">
1123+ <dia:attribute name="obj_pos">
1124+ <dia:point val="10.2551,24.8184"/>
1125+ </dia:attribute>
1126+ <dia:attribute name="obj_bb">
1127+ <dia:rectangle val="9.92777,24.7671;10.6512,26.9271"/>
1128+ </dia:attribute>
1129+ <dia:attribute name="conn_endpoints">
1130+ <dia:point val="10.2551,24.8184"/>
1131+ <dia:point val="10.3046,26.8153"/>
1132+ </dia:attribute>
1133+ <dia:attribute name="numcp">
1134+ <dia:int val="1"/>
1135+ </dia:attribute>
1136+ <dia:attribute name="end_arrow">
1137+ <dia:enum val="22"/>
1138+ </dia:attribute>
1139+ <dia:attribute name="end_arrow_length">
1140+ <dia:real val="0.5"/>
1141+ </dia:attribute>
1142+ <dia:attribute name="end_arrow_width">
1143+ <dia:real val="0.5"/>
1144+ </dia:attribute>
1145+ <dia:connections>
1146+ <dia:connection handle="0" to="O23" connection="14"/>
1147+ <dia:connection handle="1" to="O26" connection="2"/>
1148+ </dia:connections>
1149+ </dia:object>
1150+ <dia:object type="Flowchart - Terminal" version="1" id="O26">
1151+ <dia:attribute name="obj_pos">
1152+ <dia:point val="7.42276,26.8153"/>
1153+ </dia:attribute>
1154+ <dia:attribute name="obj_bb">
1155+ <dia:rectangle val="7.37276,26.7653;13.2365,28.8653"/>
1156+ </dia:attribute>
1157+ <dia:attribute name="meta">
1158+ <dia:composite type="dict"/>
1159+ </dia:attribute>
1160+ <dia:attribute name="elem_corner">
1161+ <dia:point val="7.42276,26.8153"/>
1162+ </dia:attribute>
1163+ <dia:attribute name="elem_width">
1164+ <dia:real val="5.7637499999999999"/>
1165+ </dia:attribute>
1166+ <dia:attribute name="elem_height">
1167+ <dia:real val="2"/>
1168+ </dia:attribute>
1169+ <dia:attribute name="line_width">
1170+ <dia:real val="0.10000000000000001"/>
1171+ </dia:attribute>
1172+ <dia:attribute name="line_colour">
1173+ <dia:color val="#000000"/>
1174+ </dia:attribute>
1175+ <dia:attribute name="fill_colour">
1176+ <dia:color val="#ffffff"/>
1177+ </dia:attribute>
1178+ <dia:attribute name="show_background">
1179+ <dia:boolean val="true"/>
1180+ </dia:attribute>
1181+ <dia:attribute name="line_style">
1182+ <dia:enum val="0"/>
1183+ <dia:real val="1"/>
1184+ </dia:attribute>
1185+ <dia:attribute name="padding">
1186+ <dia:real val="0.10000000000000001"/>
1187+ </dia:attribute>
1188+ <dia:attribute name="text">
1189+ <dia:composite type="text">
1190+ <dia:attribute name="string">
1191+ <dia:string>#Installation#</dia:string>
1192+ </dia:attribute>
1193+ <dia:attribute name="font">
1194+ <dia:font family="sans" style="0" name="Helvetica"/>
1195+ </dia:attribute>
1196+ <dia:attribute name="height">
1197+ <dia:real val="0.80000000000000004"/>
1198+ </dia:attribute>
1199+ <dia:attribute name="pos">
1200+ <dia:point val="10.3046,28.0153"/>
1201+ </dia:attribute>
1202+ <dia:attribute name="color">
1203+ <dia:color val="#000000"/>
1204+ </dia:attribute>
1205+ <dia:attribute name="alignment">
1206+ <dia:enum val="1"/>
1207+ </dia:attribute>
1208+ </dia:composite>
1209+ </dia:attribute>
1210+ <dia:attribute name="flip_horizontal">
1211+ <dia:boolean val="false"/>
1212+ </dia:attribute>
1213+ <dia:attribute name="flip_vertical">
1214+ <dia:boolean val="false"/>
1215+ </dia:attribute>
1216+ <dia:attribute name="subscale">
1217+ <dia:real val="1"/>
1218+ </dia:attribute>
1219+ </dia:object>
1220+ <dia:object type="Flowchart - Terminal" version="1" id="O27">
1221+ <dia:attribute name="obj_pos">
1222+ <dia:point val="-0.624878,12.8808"/>
1223+ </dia:attribute>
1224+ <dia:attribute name="obj_bb">
1225+ <dia:rectangle val="-0.674878,12.8308;4.04887,14.9308"/>
1226+ </dia:attribute>
1227+ <dia:attribute name="meta">
1228+ <dia:composite type="dict"/>
1229+ </dia:attribute>
1230+ <dia:attribute name="elem_corner">
1231+ <dia:point val="-0.624878,12.8808"/>
1232+ </dia:attribute>
1233+ <dia:attribute name="elem_width">
1234+ <dia:real val="4.6237500000000002"/>
1235+ </dia:attribute>
1236+ <dia:attribute name="elem_height">
1237+ <dia:real val="2"/>
1238+ </dia:attribute>
1239+ <dia:attribute name="line_width">
1240+ <dia:real val="0.10000000000000001"/>
1241+ </dia:attribute>
1242+ <dia:attribute name="line_colour">
1243+ <dia:color val="#000000"/>
1244+ </dia:attribute>
1245+ <dia:attribute name="fill_colour">
1246+ <dia:color val="#ffffff"/>
1247+ </dia:attribute>
1248+ <dia:attribute name="show_background">
1249+ <dia:boolean val="true"/>
1250+ </dia:attribute>
1251+ <dia:attribute name="line_style">
1252+ <dia:enum val="0"/>
1253+ <dia:real val="1"/>
1254+ </dia:attribute>
1255+ <dia:attribute name="padding">
1256+ <dia:real val="0.10000000000000001"/>
1257+ </dia:attribute>
1258+ <dia:attribute name="text">
1259+ <dia:composite type="text">
1260+ <dia:attribute name="string">
1261+ <dia:string>#Hackage#</dia:string>
1262+ </dia:attribute>
1263+ <dia:attribute name="font">
1264+ <dia:font family="sans" style="0" name="Helvetica"/>
1265+ </dia:attribute>
1266+ <dia:attribute name="height">
1267+ <dia:real val="0.80000000000000004"/>
1268+ </dia:attribute>
1269+ <dia:attribute name="pos">
1270+ <dia:point val="1.687,14.0808"/>
1271+ </dia:attribute>
1272+ <dia:attribute name="color">
1273+ <dia:color val="#000000"/>
1274+ </dia:attribute>
1275+ <dia:attribute name="alignment">
1276+ <dia:enum val="1"/>
1277+ </dia:attribute>
1278+ </dia:composite>
1279+ </dia:attribute>
1280+ <dia:attribute name="flip_horizontal">
1281+ <dia:boolean val="false"/>
1282+ </dia:attribute>
1283+ <dia:attribute name="flip_vertical">
1284+ <dia:boolean val="false"/>
1285+ </dia:attribute>
1286+ <dia:attribute name="subscale">
1287+ <dia:real val="1"/>
1288+ </dia:attribute>
1289+ </dia:object>
1290+ <dia:object type="Standard - Line" version="0" id="O28">
1291+ <dia:attribute name="obj_pos">
1292+ <dia:point val="16.0788,27.8153"/>
1293+ </dia:attribute>
1294+ <dia:attribute name="obj_bb">
1295+ <dia:rectangle val="11.8186,24.7486;16.1486,27.8851"/>
1296+ </dia:attribute>
1297+ <dia:attribute name="conn_endpoints">
1298+ <dia:point val="16.0788,27.8153"/>
1299+ <dia:point val="11.9094,24.8184"/>
1300+ </dia:attribute>
1301+ <dia:attribute name="numcp">
1302+ <dia:int val="1"/>
1303+ </dia:attribute>
1304+ <dia:attribute name="end_arrow">
1305+ <dia:enum val="22"/>
1306+ </dia:attribute>
1307+ <dia:attribute name="end_arrow_length">
1308+ <dia:real val="0.5"/>
1309+ </dia:attribute>
1310+ <dia:attribute name="end_arrow_width">
1311+ <dia:real val="0.5"/>
1312+ </dia:attribute>
1313+ <dia:connections>
1314+ <dia:connection handle="0" to="O4" connection="7"/>
1315+ <dia:connection handle="1" to="O23" connection="15"/>
1316+ </dia:connections>
1317+ </dia:object>
1318+ <dia:object type="Standard - Arc" version="0" id="O29">
1319+ <dia:attribute name="obj_pos">
1320+ <dia:point val="17.1578,22.4895"/>
1321+ </dia:attribute>
1322+ <dia:attribute name="obj_bb">
1323+ <dia:rectangle val="11.6677,20.6742;17.2126,23.0731"/>
1324+ </dia:attribute>
1325+ <dia:attribute name="conn_endpoints">
1326+ <dia:point val="17.1578,22.4895"/>
1327+ <dia:point val="11.9094,23.0184"/>
1328+ </dia:attribute>
1329+ <dia:attribute name="curve_distance">
1330+ <dia:real val="2.0262286951573065"/>
1331+ </dia:attribute>
1332+ <dia:attribute name="line_width">
1333+ <dia:real val="0.10000000149011612"/>
1334+ </dia:attribute>
1335+ <dia:attribute name="end_arrow">
1336+ <dia:enum val="22"/>
1337+ </dia:attribute>
1338+ <dia:attribute name="end_arrow_length">
1339+ <dia:real val="0.5"/>
1340+ </dia:attribute>
1341+ <dia:attribute name="end_arrow_width">
1342+ <dia:real val="0.5"/>
1343+ </dia:attribute>
1344+ <dia:connections>
1345+ <dia:connection handle="0" to="O7" connection="0"/>
1346+ <dia:connection handle="1" to="O23" connection="3"/>
1347+ </dia:connections>
1348+ </dia:object>
1349+ <dia:object type="Standard - Text" version="1" id="O30">
1350+ <dia:attribute name="obj_pos">
1351+ <dia:point val="-0.02875,30.75"/>
1352+ </dia:attribute>
1353+ <dia:attribute name="obj_bb">
1354+ <dia:rectangle val="-0.02875,30.155;2.92875,30.9"/>
1355+ </dia:attribute>
1356+ <dia:attribute name="text">
1357+ <dia:composite type="text">
1358+ <dia:attribute name="string">
1359+ <dia:string>#Stackage#</dia:string>
1360+ </dia:attribute>
1361+ <dia:attribute name="font">
1362+ <dia:font family="sans" style="0" name="Helvetica"/>
1363+ </dia:attribute>
1364+ <dia:attribute name="height">
1365+ <dia:real val="0.80000000000000004"/>
1366+ </dia:attribute>
1367+ <dia:attribute name="pos">
1368+ <dia:point val="-0.02875,30.75"/>
1369+ </dia:attribute>
1370+ <dia:attribute name="color">
1371+ <dia:color val="#000000"/>
1372+ </dia:attribute>
1373+ <dia:attribute name="alignment">
1374+ <dia:enum val="0"/>
1375+ </dia:attribute>
1376+ </dia:composite>
1377+ </dia:attribute>
1378+ <dia:attribute name="valign">
1379+ <dia:enum val="3"/>
1380+ </dia:attribute>
1381+ </dia:object>
1382+ <dia:object type="Standard - Text" version="1" id="O31">
1383+ <dia:attribute name="obj_pos">
1384+ <dia:point val="9.6625,30.75"/>
1385+ </dia:attribute>
1386+ <dia:attribute name="obj_bb">
1387+ <dia:rectangle val="9.6625,30.155;11.12,30.9"/>
1388+ </dia:attribute>
1389+ <dia:attribute name="text">
1390+ <dia:composite type="text">
1391+ <dia:attribute name="string">
1392+ <dia:string>#User#</dia:string>
1393+ </dia:attribute>
1394+ <dia:attribute name="font">
1395+ <dia:font family="sans" style="0" name="Helvetica"/>
1396+ </dia:attribute>
1397+ <dia:attribute name="height">
1398+ <dia:real val="0.80000000000000004"/>
1399+ </dia:attribute>
1400+ <dia:attribute name="pos">
1401+ <dia:point val="9.6625,30.75"/>
1402+ </dia:attribute>
1403+ <dia:attribute name="color">
1404+ <dia:color val="#000000"/>
1405+ </dia:attribute>
1406+ <dia:attribute name="alignment">
1407+ <dia:enum val="0"/>
1408+ </dia:attribute>
1409+ </dia:composite>
1410+ </dia:attribute>
1411+ <dia:attribute name="valign">
1412+ <dia:enum val="3"/>
1413+ </dia:attribute>
1414+ </dia:object>
1415+ <dia:object type="Standard - Text" version="1" id="O32">
1416+ <dia:attribute name="obj_pos">
1417+ <dia:point val="19.905,30.75"/>
1418+ </dia:attribute>
1419+ <dia:attribute name="obj_bb">
1420+ <dia:rectangle val="19.905,30.155;22.46,30.9"/>
1421+ </dia:attribute>
1422+ <dia:attribute name="text">
1423+ <dia:composite type="text">
1424+ <dia:attribute name="string">
1425+ <dia:string>#Nixpkgs#</dia:string>
1426+ </dia:attribute>
1427+ <dia:attribute name="font">
1428+ <dia:font family="sans" style="0" name="Helvetica"/>
1429+ </dia:attribute>
1430+ <dia:attribute name="height">
1431+ <dia:real val="0.80000000000000004"/>
1432+ </dia:attribute>
1433+ <dia:attribute name="pos">
1434+ <dia:point val="19.905,30.75"/>
1435+ </dia:attribute>
1436+ <dia:attribute name="color">
1437+ <dia:color val="#000000"/>
1438+ </dia:attribute>
1439+ <dia:attribute name="alignment">
1440+ <dia:enum val="0"/>
1441+ </dia:attribute>
1442+ </dia:composite>
1443+ </dia:attribute>
1444+ <dia:attribute name="valign">
1445+ <dia:enum val="3"/>
1446+ </dia:attribute>
1447+ </dia:object>
1448+ <dia:object type="Standard - Arc" version="0" id="O33">
1449+ <dia:attribute name="obj_pos">
1450+ <dia:point val="-0.333411,19.3272"/>
1451+ </dia:attribute>
1452+ <dia:attribute name="obj_bb">
1453+ <dia:rectangle val="-2.80954,19.2707;-0.276884,26.5994"/>
1454+ </dia:attribute>
1455+ <dia:attribute name="conn_endpoints">
1456+ <dia:point val="-0.333411,19.3272"/>
1457+ <dia:point val="-1.35706,26.5429"/>
1458+ </dia:attribute>
1459+ <dia:attribute name="curve_distance">
1460+ <dia:real val="1.8888235106861362"/>
1461+ </dia:attribute>
1462+ <dia:attribute name="line_width">
1463+ <dia:real val="0.10000000149011612"/>
1464+ </dia:attribute>
1465+ <dia:attribute name="end_arrow">
1466+ <dia:enum val="22"/>
1467+ </dia:attribute>
1468+ <dia:attribute name="end_arrow_length">
1469+ <dia:real val="0.5"/>
1470+ </dia:attribute>
1471+ <dia:attribute name="end_arrow_width">
1472+ <dia:real val="0.5"/>
1473+ </dia:attribute>
1474+ <dia:connections>
1475+ <dia:connection handle="0" to="O11" connection="12"/>
1476+ <dia:connection handle="1" to="O35" connection="0"/>
1477+ </dia:connections>
1478+ </dia:object>
1479+ <dia:group>
1480+ <dia:object type="Flowchart - Parallelogram" version="0" id="O34">
1481+ <dia:attribute name="obj_pos">
1482+ <dia:point val="-1.635,26.2429"/>
1483+ </dia:attribute>
1484+ <dia:attribute name="obj_bb">
1485+ <dia:rectangle val="-1.685,26.1929;5.27412,28.2929"/>
1486+ </dia:attribute>
1487+ <dia:attribute name="elem_corner">
1488+ <dia:point val="-1.635,26.2429"/>
1489+ </dia:attribute>
1490+ <dia:attribute name="elem_width">
1491+ <dia:real val="6.8591166559453667"/>
1492+ </dia:attribute>
1493+ <dia:attribute name="elem_height">
1494+ <dia:real val="2"/>
1495+ </dia:attribute>
1496+ <dia:attribute name="show_background">
1497+ <dia:boolean val="true"/>
1498+ </dia:attribute>
1499+ <dia:attribute name="shear_angle">
1500+ <dia:real val="70"/>
1501+ </dia:attribute>
1502+ <dia:attribute name="padding">
1503+ <dia:real val="0.5"/>
1504+ </dia:attribute>
1505+ <dia:attribute name="text">
1506+ <dia:composite type="text">
1507+ <dia:attribute name="string">
1508+ <dia:string>#LTS Haskell x.y#</dia:string>
1509+ </dia:attribute>
1510+ <dia:attribute name="font">
1511+ <dia:font family="sans" style="0" name="Helvetica"/>
1512+ </dia:attribute>
1513+ <dia:attribute name="height">
1514+ <dia:real val="0.80000000000000004"/>
1515+ </dia:attribute>
1516+ <dia:attribute name="pos">
1517+ <dia:point val="1.79456,27.4379"/>
1518+ </dia:attribute>
1519+ <dia:attribute name="color">
1520+ <dia:color val="#000000"/>
1521+ </dia:attribute>
1522+ <dia:attribute name="alignment">
1523+ <dia:enum val="1"/>
1524+ </dia:attribute>
1525+ </dia:composite>
1526+ </dia:attribute>
1527+ </dia:object>
1528+ <dia:object type="Flowchart - Parallelogram" version="0" id="O35">
1529+ <dia:attribute name="obj_pos">
1530+ <dia:point val="-2.085,26.5429"/>
1531+ </dia:attribute>
1532+ <dia:attribute name="obj_bb">
1533+ <dia:rectangle val="-2.135,26.4929;4.82412,28.5929"/>
1534+ </dia:attribute>
1535+ <dia:attribute name="elem_corner">
1536+ <dia:point val="-2.085,26.5429"/>
1537+ </dia:attribute>
1538+ <dia:attribute name="elem_width">
1539+ <dia:real val="6.8591166559453667"/>
1540+ </dia:attribute>
1541+ <dia:attribute name="elem_height">
1542+ <dia:real val="2"/>
1543+ </dia:attribute>
1544+ <dia:attribute name="show_background">
1545+ <dia:boolean val="true"/>
1546+ </dia:attribute>
1547+ <dia:attribute name="shear_angle">
1548+ <dia:real val="70"/>
1549+ </dia:attribute>
1550+ <dia:attribute name="padding">
1551+ <dia:real val="0.5"/>
1552+ </dia:attribute>
1553+ <dia:attribute name="text">
1554+ <dia:composite type="text">
1555+ <dia:attribute name="string">
1556+ <dia:string>#LTS Haskell x.y#</dia:string>
1557+ </dia:attribute>
1558+ <dia:attribute name="font">
1559+ <dia:font family="sans" style="0" name="Helvetica"/>
1560+ </dia:attribute>
1561+ <dia:attribute name="height">
1562+ <dia:real val="0.80000000000000004"/>
1563+ </dia:attribute>
1564+ <dia:attribute name="pos">
1565+ <dia:point val="1.34456,27.7379"/>
1566+ </dia:attribute>
1567+ <dia:attribute name="color">
1568+ <dia:color val="#000000"/>
1569+ </dia:attribute>
1570+ <dia:attribute name="alignment">
1571+ <dia:enum val="1"/>
1572+ </dia:attribute>
1573+ </dia:composite>
1574+ </dia:attribute>
1575+ </dia:object>
1576+ <dia:object type="Flowchart - Parallelogram" version="0" id="O36">
1577+ <dia:attribute name="obj_pos">
1578+ <dia:point val="-2.55308,26.8153"/>
1579+ </dia:attribute>
1580+ <dia:attribute name="obj_bb">
1581+ <dia:rectangle val="-2.60308,26.7653;4.35604,28.8653"/>
1582+ </dia:attribute>
1583+ <dia:attribute name="elem_corner">
1584+ <dia:point val="-2.55308,26.8153"/>
1585+ </dia:attribute>
1586+ <dia:attribute name="elem_width">
1587+ <dia:real val="6.8591166559453667"/>
1588+ </dia:attribute>
1589+ <dia:attribute name="elem_height">
1590+ <dia:real val="2"/>
1591+ </dia:attribute>
1592+ <dia:attribute name="show_background">
1593+ <dia:boolean val="true"/>
1594+ </dia:attribute>
1595+ <dia:attribute name="shear_angle">
1596+ <dia:real val="70"/>
1597+ </dia:attribute>
1598+ <dia:attribute name="padding">
1599+ <dia:real val="0.5"/>
1600+ </dia:attribute>
1601+ <dia:attribute name="text">
1602+ <dia:composite type="text">
1603+ <dia:attribute name="string">
1604+ <dia:string>#LTS Haskell x.y#</dia:string>
1605+ </dia:attribute>
1606+ <dia:attribute name="font">
1607+ <dia:font family="sans" style="0" name="Helvetica"/>
1608+ </dia:attribute>
1609+ <dia:attribute name="height">
1610+ <dia:real val="0.80000000000000004"/>
1611+ </dia:attribute>
1612+ <dia:attribute name="pos">
1613+ <dia:point val="0.876478,28.0103"/>
1614+ </dia:attribute>
1615+ <dia:attribute name="color">
1616+ <dia:color val="#000000"/>
1617+ </dia:attribute>
1618+ <dia:attribute name="alignment">
1619+ <dia:enum val="1"/>
1620+ </dia:attribute>
1621+ </dia:composite>
1622+ </dia:attribute>
1623+ </dia:object>
1624+ </dia:group>
1625+ <dia:object type="Flowchart - Box" version="0" id="O37">
1626+ <dia:attribute name="obj_pos">
1627+ <dia:point val="7.665,18.915"/>
1628+ </dia:attribute>
1629+ <dia:attribute name="obj_bb">
1630+ <dia:rectangle val="7.615,18.865;12.956,20.865"/>
1631+ </dia:attribute>
1632+ <dia:attribute name="elem_corner">
1633+ <dia:point val="7.665,18.915"/>
1634+ </dia:attribute>
1635+ <dia:attribute name="elem_width">
1636+ <dia:real val="5.2410062688035248"/>
1637+ </dia:attribute>
1638+ <dia:attribute name="elem_height">
1639+ <dia:real val="1.9000000014901162"/>
1640+ </dia:attribute>
1641+ <dia:attribute name="border_width">
1642+ <dia:real val="0.10000000149011612"/>
1643+ </dia:attribute>
1644+ <dia:attribute name="border_color">
1645+ <dia:color val="#ff0000"/>
1646+ </dia:attribute>
1647+ <dia:attribute name="show_background">
1648+ <dia:boolean val="true"/>
1649+ </dia:attribute>
1650+ <dia:attribute name="padding">
1651+ <dia:real val="0.5"/>
1652+ </dia:attribute>
1653+ <dia:attribute name="text">
1654+ <dia:composite type="text">
1655+ <dia:attribute name="string">
1656+ <dia:string>#cabal2nix#</dia:string>
1657+ </dia:attribute>
1658+ <dia:attribute name="font">
1659+ <dia:font family="sans" style="0" name="Helvetica"/>
1660+ </dia:attribute>
1661+ <dia:attribute name="height">
1662+ <dia:real val="0.80000000000000004"/>
1663+ </dia:attribute>
1664+ <dia:attribute name="pos">
1665+ <dia:point val="10.2855,20.06"/>
1666+ </dia:attribute>
1667+ <dia:attribute name="color">
1668+ <dia:color val="#000000"/>
1669+ </dia:attribute>
1670+ <dia:attribute name="alignment">
1671+ <dia:enum val="1"/>
1672+ </dia:attribute>
1673+ </dia:composite>
1674+ </dia:attribute>
1675+ </dia:object>
1676+ <dia:object type="Standard - Arc" version="0" id="O38">
1677+ <dia:attribute name="obj_pos">
1678+ <dia:point val="3.77316,14.5879"/>
1679+ </dia:attribute>
1680+ <dia:attribute name="obj_bb">
1681+ <dia:rectangle val="3.70274,14.5175;9.04567,18.9854"/>
1682+ </dia:attribute>
1683+ <dia:attribute name="conn_endpoints">
1684+ <dia:point val="3.77316,14.5879"/>
1685+ <dia:point val="8.97525,18.915"/>
1686+ </dia:attribute>
1687+ <dia:attribute name="curve_distance">
1688+ <dia:real val="-0.48495657994633201"/>
1689+ </dia:attribute>
1690+ <dia:attribute name="line_width">
1691+ <dia:real val="0.10000000149011612"/>
1692+ </dia:attribute>
1693+ <dia:attribute name="end_arrow">
1694+ <dia:enum val="22"/>
1695+ </dia:attribute>
1696+ <dia:attribute name="end_arrow_length">
1697+ <dia:real val="0.5"/>
1698+ </dia:attribute>
1699+ <dia:attribute name="end_arrow_width">
1700+ <dia:real val="0.5"/>
1701+ </dia:attribute>
1702+ <dia:connections>
1703+ <dia:connection handle="0" to="O27" connection="11"/>
1704+ <dia:connection handle="1" to="O37" connection="1"/>
1705+ </dia:connections>
1706+ </dia:object>
1707+ <dia:object type="Standard - Line" version="0" id="O39">
1708+ <dia:attribute name="obj_pos">
1709+ <dia:point val="10.2855,20.815"/>
1710+ </dia:attribute>
1711+ <dia:attribute name="obj_bb">
1712+ <dia:rectangle val="9.90105,20.7644;10.6246,23.3301"/>
1713+ </dia:attribute>
1714+ <dia:attribute name="conn_endpoints">
1715+ <dia:point val="10.2855,20.815"/>
1716+ <dia:point val="10.2551,23.2184"/>
1717+ </dia:attribute>
1718+ <dia:attribute name="numcp">
1719+ <dia:int val="1"/>
1720+ </dia:attribute>
1721+ <dia:attribute name="end_arrow">
1722+ <dia:enum val="22"/>
1723+ </dia:attribute>
1724+ <dia:attribute name="end_arrow_length">
1725+ <dia:real val="0.5"/>
1726+ </dia:attribute>
1727+ <dia:attribute name="end_arrow_width">
1728+ <dia:real val="0.5"/>
1729+ </dia:attribute>
1730+ <dia:connections>
1731+ <dia:connection handle="0" to="O37" connection="13"/>
1732+ <dia:connection handle="1" to="O23" connection="2"/>
1733+ </dia:connections>
1734+ </dia:object>
1735+ <dia:object type="Standard - Arc" version="0" id="O40">
1736+ <dia:attribute name="obj_pos">
1737+ <dia:point val="3.69132,26.2429"/>
1738+ </dia:attribute>
1739+ <dia:attribute name="obj_bb">
1740+ <dia:rectangle val="3.625,15.088;8.92045,26.3092"/>
1741+ </dia:attribute>
1742+ <dia:attribute name="conn_endpoints">
1743+ <dia:point val="3.69132,26.2429"/>
1744+ <dia:point val="8.79396,15.1543"/>
1745+ </dia:attribute>
1746+ <dia:attribute name="curve_distance">
1747+ <dia:real val="0.38078805475472505"/>
1748+ </dia:attribute>
1749+ <dia:attribute name="line_width">
1750+ <dia:real val="0.10000000149011612"/>
1751+ </dia:attribute>
1752+ <dia:attribute name="end_arrow">
1753+ <dia:enum val="22"/>
1754+ </dia:attribute>
1755+ <dia:attribute name="end_arrow_length">
1756+ <dia:real val="0.5"/>
1757+ </dia:attribute>
1758+ <dia:attribute name="end_arrow_width">
1759+ <dia:real val="0.5"/>
1760+ </dia:attribute>
1761+ <dia:connections>
1762+ <dia:connection handle="0" to="O34" connection="3"/>
1763+ <dia:connection handle="1" to="O16" connection="12"/>
1764+ </dia:connections>
1765+ </dia:object>
1766+ </dia:layer>
1767+</dia:diagram>
doc/pipeline-overview.dianew file+625
@@ -0,0 +1,625 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3+ <dia:diagramdata>
4+ <dia:attribute name="background">
5+ <dia:color val="#ffffff"/>
6+ </dia:attribute>
7+ <dia:attribute name="pagebreak">
8+ <dia:color val="#000099"/>
9+ </dia:attribute>
10+ <dia:attribute name="paper">
11+ <dia:composite type="paper">
12+ <dia:attribute name="name">
13+ <dia:string>#A4#</dia:string>
14+ </dia:attribute>
15+ <dia:attribute name="tmargin">
16+ <dia:real val="2.8199999332427979"/>
17+ </dia:attribute>
18+ <dia:attribute name="bmargin">
19+ <dia:real val="2.8222000598907471"/>
20+ </dia:attribute>
21+ <dia:attribute name="lmargin">
22+ <dia:real val="2.8222000598907471"/>
23+ </dia:attribute>
24+ <dia:attribute name="rmargin">
25+ <dia:real val="2.8222000598907471"/>
26+ </dia:attribute>
27+ <dia:attribute name="is_portrait">
28+ <dia:boolean val="true"/>
29+ </dia:attribute>
30+ <dia:attribute name="scaling">
31+ <dia:real val="0.90529471635818481"/>
32+ </dia:attribute>
33+ <dia:attribute name="fitto">
34+ <dia:boolean val="true"/>
35+ </dia:attribute>
36+ <dia:attribute name="fitwidth">
37+ <dia:int val="1"/>
38+ </dia:attribute>
39+ <dia:attribute name="fitheight">
40+ <dia:int val="1"/>
41+ </dia:attribute>
42+ </dia:composite>
43+ </dia:attribute>
44+ <dia:attribute name="grid">
45+ <dia:composite type="grid">
46+ <dia:attribute name="width_x">
47+ <dia:real val="1"/>
48+ </dia:attribute>
49+ <dia:attribute name="width_y">
50+ <dia:real val="1"/>
51+ </dia:attribute>
52+ <dia:attribute name="visible_x">
53+ <dia:int val="1"/>
54+ </dia:attribute>
55+ <dia:attribute name="visible_y">
56+ <dia:int val="1"/>
57+ </dia:attribute>
58+ <dia:composite type="color"/>
59+ </dia:composite>
60+ </dia:attribute>
61+ <dia:attribute name="color">
62+ <dia:color val="#d8e5e5"/>
63+ </dia:attribute>
64+ <dia:attribute name="guides">
65+ <dia:composite type="guides">
66+ <dia:attribute name="hguides"/>
67+ <dia:attribute name="vguides"/>
68+ </dia:composite>
69+ </dia:attribute>
70+ </dia:diagramdata>
71+ <dia:layer name="Background" visible="true" active="true">
72+ <dia:object type="Network - Storage" version="1" id="O0">
73+ <dia:attribute name="obj_pos">
74+ <dia:point val="1.88131,8.06715"/>
75+ </dia:attribute>
76+ <dia:attribute name="obj_bb">
77+ <dia:rectangle val="1.16131,8.01715;4.30131,10.9621"/>
78+ </dia:attribute>
79+ <dia:attribute name="meta">
80+ <dia:composite type="dict"/>
81+ </dia:attribute>
82+ <dia:attribute name="elem_corner">
83+ <dia:point val="1.88131,8.06715"/>
84+ </dia:attribute>
85+ <dia:attribute name="elem_width">
86+ <dia:real val="1.7"/>
87+ </dia:attribute>
88+ <dia:attribute name="elem_height">
89+ <dia:real val="2"/>
90+ </dia:attribute>
91+ <dia:attribute name="line_width">
92+ <dia:real val="0.10000000149011612"/>
93+ </dia:attribute>
94+ <dia:attribute name="line_colour">
95+ <dia:color val="#000000"/>
96+ </dia:attribute>
97+ <dia:attribute name="fill_colour">
98+ <dia:color val="#ffffff"/>
99+ </dia:attribute>
100+ <dia:attribute name="show_background">
101+ <dia:boolean val="true"/>
102+ </dia:attribute>
103+ <dia:attribute name="line_style">
104+ <dia:enum val="0"/>
105+ <dia:real val="1"/>
106+ </dia:attribute>
107+ <dia:attribute name="padding">
108+ <dia:real val="0.10000000000000001"/>
109+ </dia:attribute>
110+ <dia:attribute name="text">
111+ <dia:composite type="text">
112+ <dia:attribute name="string">
113+ <dia:string>#Hackage#</dia:string>
114+ </dia:attribute>
115+ <dia:attribute name="font">
116+ <dia:font family="sans" style="0" name="Helvetica"/>
117+ </dia:attribute>
118+ <dia:attribute name="height">
119+ <dia:real val="0.84666663408279419"/>
120+ </dia:attribute>
121+ <dia:attribute name="pos">
122+ <dia:point val="2.73131,10.7021"/>
123+ </dia:attribute>
124+ <dia:attribute name="color">
125+ <dia:color val="#000000"/>
126+ </dia:attribute>
127+ <dia:attribute name="alignment">
128+ <dia:enum val="1"/>
129+ </dia:attribute>
130+ </dia:composite>
131+ </dia:attribute>
132+ <dia:attribute name="flip_horizontal">
133+ <dia:boolean val="false"/>
134+ </dia:attribute>
135+ <dia:attribute name="flip_vertical">
136+ <dia:boolean val="false"/>
137+ </dia:attribute>
138+ <dia:attribute name="subscale">
139+ <dia:real val="1"/>
140+ </dia:attribute>
141+ </dia:object>
142+ <dia:object type="Network - Storage" version="1" id="O1">
143+ <dia:attribute name="obj_pos">
144+ <dia:point val="6.68779,8.06715"/>
145+ </dia:attribute>
146+ <dia:attribute name="obj_bb">
147+ <dia:rectangle val="5.87529,8.01715;9.20029,10.9621"/>
148+ </dia:attribute>
149+ <dia:attribute name="meta">
150+ <dia:composite type="dict"/>
151+ </dia:attribute>
152+ <dia:attribute name="elem_corner">
153+ <dia:point val="6.68779,8.06715"/>
154+ </dia:attribute>
155+ <dia:attribute name="elem_width">
156+ <dia:real val="1.7"/>
157+ </dia:attribute>
158+ <dia:attribute name="elem_height">
159+ <dia:real val="2"/>
160+ </dia:attribute>
161+ <dia:attribute name="line_width">
162+ <dia:real val="0.10000000149011612"/>
163+ </dia:attribute>
164+ <dia:attribute name="line_colour">
165+ <dia:color val="#000000"/>
166+ </dia:attribute>
167+ <dia:attribute name="fill_colour">
168+ <dia:color val="#ffffff"/>
169+ </dia:attribute>
170+ <dia:attribute name="show_background">
171+ <dia:boolean val="true"/>
172+ </dia:attribute>
173+ <dia:attribute name="line_style">
174+ <dia:enum val="0"/>
175+ <dia:real val="1"/>
176+ </dia:attribute>
177+ <dia:attribute name="padding">
178+ <dia:real val="0.10000000000000001"/>
179+ </dia:attribute>
180+ <dia:attribute name="text">
181+ <dia:composite type="text">
182+ <dia:attribute name="string">
183+ <dia:string>#Stackage#</dia:string>
184+ </dia:attribute>
185+ <dia:attribute name="font">
186+ <dia:font family="sans" style="0" name="Helvetica"/>
187+ </dia:attribute>
188+ <dia:attribute name="height">
189+ <dia:real val="0.84666663408279419"/>
190+ </dia:attribute>
191+ <dia:attribute name="pos">
192+ <dia:point val="7.53779,10.7021"/>
193+ </dia:attribute>
194+ <dia:attribute name="color">
195+ <dia:color val="#000000"/>
196+ </dia:attribute>
197+ <dia:attribute name="alignment">
198+ <dia:enum val="1"/>
199+ </dia:attribute>
200+ </dia:composite>
201+ </dia:attribute>
202+ <dia:attribute name="flip_horizontal">
203+ <dia:boolean val="false"/>
204+ </dia:attribute>
205+ <dia:attribute name="flip_vertical">
206+ <dia:boolean val="false"/>
207+ </dia:attribute>
208+ <dia:attribute name="subscale">
209+ <dia:real val="1"/>
210+ </dia:attribute>
211+ </dia:object>
212+ <dia:object type="Network - Storage" version="1" id="O2">
213+ <dia:attribute name="obj_pos">
214+ <dia:point val="11.3743,8.06715"/>
215+ </dia:attribute>
216+ <dia:attribute name="obj_bb">
217+ <dia:rectangle val="10.7743,8.01715;13.6743,10.9621"/>
218+ </dia:attribute>
219+ <dia:attribute name="meta">
220+ <dia:composite type="dict"/>
221+ </dia:attribute>
222+ <dia:attribute name="elem_corner">
223+ <dia:point val="11.3743,8.06715"/>
224+ </dia:attribute>
225+ <dia:attribute name="elem_width">
226+ <dia:real val="1.7"/>
227+ </dia:attribute>
228+ <dia:attribute name="elem_height">
229+ <dia:real val="2"/>
230+ </dia:attribute>
231+ <dia:attribute name="line_width">
232+ <dia:real val="0.10000000149011612"/>
233+ </dia:attribute>
234+ <dia:attribute name="line_colour">
235+ <dia:color val="#000000"/>
236+ </dia:attribute>
237+ <dia:attribute name="fill_colour">
238+ <dia:color val="#ffffff"/>
239+ </dia:attribute>
240+ <dia:attribute name="show_background">
241+ <dia:boolean val="true"/>
242+ </dia:attribute>
243+ <dia:attribute name="line_style">
244+ <dia:enum val="0"/>
245+ <dia:real val="1"/>
246+ </dia:attribute>
247+ <dia:attribute name="padding">
248+ <dia:real val="0.10000000000000001"/>
249+ </dia:attribute>
250+ <dia:attribute name="text">
251+ <dia:composite type="text">
252+ <dia:attribute name="string">
253+ <dia:string>#Nixpkgs#</dia:string>
254+ </dia:attribute>
255+ <dia:attribute name="font">
256+ <dia:font family="sans" style="0" name="Helvetica"/>
257+ </dia:attribute>
258+ <dia:attribute name="height">
259+ <dia:real val="0.84666663408279419"/>
260+ </dia:attribute>
261+ <dia:attribute name="pos">
262+ <dia:point val="12.2243,10.7021"/>
263+ </dia:attribute>
264+ <dia:attribute name="color">
265+ <dia:color val="#000000"/>
266+ </dia:attribute>
267+ <dia:attribute name="alignment">
268+ <dia:enum val="1"/>
269+ </dia:attribute>
270+ </dia:composite>
271+ </dia:attribute>
272+ <dia:attribute name="flip_horizontal">
273+ <dia:boolean val="false"/>
274+ </dia:attribute>
275+ <dia:attribute name="flip_vertical">
276+ <dia:boolean val="false"/>
277+ </dia:attribute>
278+ <dia:attribute name="subscale">
279+ <dia:real val="1"/>
280+ </dia:attribute>
281+ </dia:object>
282+ <dia:object type="Network - Cloud" version="1" id="O3">
283+ <dia:attribute name="obj_pos">
284+ <dia:point val="11.7702,3.33165"/>
285+ </dia:attribute>
286+ <dia:attribute name="obj_bb">
287+ <dia:rectangle val="11.7702,3.33165;17.2182,5.64688"/>
288+ </dia:attribute>
289+ <dia:attribute name="meta">
290+ <dia:composite type="dict"/>
291+ </dia:attribute>
292+ <dia:attribute name="elem_corner">
293+ <dia:point val="11.7702,3.33165"/>
294+ </dia:attribute>
295+ <dia:attribute name="elem_width">
296+ <dia:real val="5.4479782276937048"/>
297+ </dia:attribute>
298+ <dia:attribute name="elem_height">
299+ <dia:real val="2.3152317880599642"/>
300+ </dia:attribute>
301+ <dia:attribute name="line_width">
302+ <dia:real val="0.10000000149011612"/>
303+ </dia:attribute>
304+ <dia:attribute name="line_colour">
305+ <dia:color val="#000000"/>
306+ </dia:attribute>
307+ <dia:attribute name="fill_colour">
308+ <dia:color val="#ffffff"/>
309+ </dia:attribute>
310+ <dia:attribute name="show_background">
311+ <dia:boolean val="true"/>
312+ </dia:attribute>
313+ <dia:attribute name="line_style">
314+ <dia:enum val="0"/>
315+ <dia:real val="1"/>
316+ </dia:attribute>
317+ <dia:attribute name="padding">
318+ <dia:real val="0.10000000000000001"/>
319+ </dia:attribute>
320+ <dia:attribute name="text">
321+ <dia:composite type="text">
322+ <dia:attribute name="string">
323+ <dia:string>#Internet#</dia:string>
324+ </dia:attribute>
325+ <dia:attribute name="font">
326+ <dia:font family="sans" style="0" name="Helvetica"/>
327+ </dia:attribute>
328+ <dia:attribute name="height">
329+ <dia:real val="0.84666663408279419"/>
330+ </dia:attribute>
331+ <dia:attribute name="pos">
332+ <dia:point val="14.6402,4.74175"/>
333+ </dia:attribute>
334+ <dia:attribute name="color">
335+ <dia:color val="#000000"/>
336+ </dia:attribute>
337+ <dia:attribute name="alignment">
338+ <dia:enum val="1"/>
339+ </dia:attribute>
340+ </dia:composite>
341+ </dia:attribute>
342+ <dia:attribute name="flip_horizontal">
343+ <dia:boolean val="false"/>
344+ </dia:attribute>
345+ <dia:attribute name="flip_vertical">
346+ <dia:boolean val="false"/>
347+ </dia:attribute>
348+ <dia:attribute name="subscale">
349+ <dia:real val="1"/>
350+ </dia:attribute>
351+ </dia:object>
352+ <dia:object type="Standard - Line" version="0" id="O4">
353+ <dia:attribute name="obj_pos">
354+ <dia:point val="3.63144,9.06715"/>
355+ </dia:attribute>
356+ <dia:attribute name="obj_bb">
357+ <dia:rectangle val="3.58144,8.70535;6.74994,9.42895"/>
358+ </dia:attribute>
359+ <dia:attribute name="conn_endpoints">
360+ <dia:point val="3.63144,9.06715"/>
361+ <dia:point val="6.63813,9.06715"/>
362+ </dia:attribute>
363+ <dia:attribute name="numcp">
364+ <dia:int val="1"/>
365+ </dia:attribute>
366+ <dia:attribute name="end_arrow">
367+ <dia:enum val="22"/>
368+ </dia:attribute>
369+ <dia:attribute name="end_arrow_length">
370+ <dia:real val="0.5"/>
371+ </dia:attribute>
372+ <dia:attribute name="end_arrow_width">
373+ <dia:real val="0.5"/>
374+ </dia:attribute>
375+ <dia:connections>
376+ <dia:connection handle="0" to="O0" connection="2"/>
377+ <dia:connection handle="1" to="O1" connection="2"/>
378+ </dia:connections>
379+ </dia:object>
380+ <dia:object type="Standard - Line" version="0" id="O5">
381+ <dia:attribute name="obj_pos">
382+ <dia:point val="8.42921,9.06715"/>
383+ </dia:attribute>
384+ <dia:attribute name="obj_bb">
385+ <dia:rectangle val="8.37921,8.70535;11.4369,9.42895"/>
386+ </dia:attribute>
387+ <dia:attribute name="conn_endpoints">
388+ <dia:point val="8.42921,9.06715"/>
389+ <dia:point val="11.3251,9.06715"/>
390+ </dia:attribute>
391+ <dia:attribute name="numcp">
392+ <dia:int val="1"/>
393+ </dia:attribute>
394+ <dia:attribute name="end_arrow">
395+ <dia:enum val="22"/>
396+ </dia:attribute>
397+ <dia:attribute name="end_arrow_length">
398+ <dia:real val="0.5"/>
399+ </dia:attribute>
400+ <dia:attribute name="end_arrow_width">
401+ <dia:real val="0.5"/>
402+ </dia:attribute>
403+ <dia:connections>
404+ <dia:connection handle="0" to="O1" connection="2"/>
405+ <dia:connection handle="1" to="O2" connection="2"/>
406+ </dia:connections>
407+ </dia:object>
408+ <dia:object type="Standard - Line" version="0" id="O6">
409+ <dia:attribute name="obj_pos">
410+ <dia:point val="13.1243,9.06419"/>
411+ </dia:attribute>
412+ <dia:attribute name="obj_bb">
413+ <dia:rectangle val="13.0741,8.69217;16.4349,9.41577"/>
414+ </dia:attribute>
415+ <dia:attribute name="conn_endpoints">
416+ <dia:point val="13.1243,9.06419"/>
417+ <dia:point val="16.3231,9.05155"/>
418+ </dia:attribute>
419+ <dia:attribute name="numcp">
420+ <dia:int val="1"/>
421+ </dia:attribute>
422+ <dia:attribute name="end_arrow">
423+ <dia:enum val="22"/>
424+ </dia:attribute>
425+ <dia:attribute name="end_arrow_length">
426+ <dia:real val="0.5"/>
427+ </dia:attribute>
428+ <dia:attribute name="end_arrow_width">
429+ <dia:real val="0.5"/>
430+ </dia:attribute>
431+ <dia:connections>
432+ <dia:connection handle="0" to="O2" connection="2"/>
433+ <dia:connection handle="1" to="O7" connection="2"/>
434+ </dia:connections>
435+ </dia:object>
436+ <dia:object type="Network - Storage" version="1" id="O7">
437+ <dia:attribute name="obj_pos">
438+ <dia:point val="16.3733,8.0474"/>
439+ </dia:attribute>
440+ <dia:attribute name="obj_bb">
441+ <dia:rectangle val="16.3233,7.9974;18.1233,10.9424"/>
442+ </dia:attribute>
443+ <dia:attribute name="meta">
444+ <dia:composite type="dict"/>
445+ </dia:attribute>
446+ <dia:attribute name="elem_corner">
447+ <dia:point val="16.3733,8.0474"/>
448+ </dia:attribute>
449+ <dia:attribute name="elem_width">
450+ <dia:real val="1.7"/>
451+ </dia:attribute>
452+ <dia:attribute name="elem_height">
453+ <dia:real val="2"/>
454+ </dia:attribute>
455+ <dia:attribute name="line_width">
456+ <dia:real val="0.10000000149011612"/>
457+ </dia:attribute>
458+ <dia:attribute name="line_colour">
459+ <dia:color val="#000000"/>
460+ </dia:attribute>
461+ <dia:attribute name="fill_colour">
462+ <dia:color val="#ffffff"/>
463+ </dia:attribute>
464+ <dia:attribute name="show_background">
465+ <dia:boolean val="true"/>
466+ </dia:attribute>
467+ <dia:attribute name="line_style">
468+ <dia:enum val="0"/>
469+ <dia:real val="1"/>
470+ </dia:attribute>
471+ <dia:attribute name="padding">
472+ <dia:real val="0.10000000000000001"/>
473+ </dia:attribute>
474+ <dia:attribute name="text">
475+ <dia:composite type="text">
476+ <dia:attribute name="string">
477+ <dia:string>#User#</dia:string>
478+ </dia:attribute>
479+ <dia:attribute name="font">
480+ <dia:font family="sans" style="0" name="Helvetica"/>
481+ </dia:attribute>
482+ <dia:attribute name="height">
483+ <dia:real val="0.84666663408279419"/>
484+ </dia:attribute>
485+ <dia:attribute name="pos">
486+ <dia:point val="17.2233,10.6824"/>
487+ </dia:attribute>
488+ <dia:attribute name="color">
489+ <dia:color val="#000000"/>
490+ </dia:attribute>
491+ <dia:attribute name="alignment">
492+ <dia:enum val="1"/>
493+ </dia:attribute>
494+ </dia:composite>
495+ </dia:attribute>
496+ <dia:attribute name="flip_horizontal">
497+ <dia:boolean val="false"/>
498+ </dia:attribute>
499+ <dia:attribute name="flip_vertical">
500+ <dia:boolean val="false"/>
501+ </dia:attribute>
502+ <dia:attribute name="subscale">
503+ <dia:real val="1"/>
504+ </dia:attribute>
505+ </dia:object>
506+ <dia:object type="Standard - Arc" version="0" id="O8">
507+ <dia:attribute name="obj_pos">
508+ <dia:point val="2.88131,9.06715"/>
509+ </dia:attribute>
510+ <dia:attribute name="obj_bb">
511+ <dia:rectangle val="2.83131,6.80516;12.4243,9.11715"/>
512+ </dia:attribute>
513+ <dia:attribute name="conn_endpoints">
514+ <dia:point val="2.88131,9.06715"/>
515+ <dia:point val="12.3743,9.06715"/>
516+ </dia:attribute>
517+ <dia:attribute name="curve_distance">
518+ <dia:real val="-2.2119853006179615"/>
519+ </dia:attribute>
520+ <dia:attribute name="line_width">
521+ <dia:real val="0.10000000149011612"/>
522+ </dia:attribute>
523+ <dia:attribute name="end_arrow">
524+ <dia:enum val="22"/>
525+ </dia:attribute>
526+ <dia:attribute name="end_arrow_length">
527+ <dia:real val="0.5"/>
528+ </dia:attribute>
529+ <dia:attribute name="end_arrow_width">
530+ <dia:real val="0.5"/>
531+ </dia:attribute>
532+ <dia:connections>
533+ <dia:connection handle="0" to="O0" connection="2"/>
534+ <dia:connection handle="1" to="O2" connection="2"/>
535+ </dia:connections>
536+ </dia:object>
537+ <dia:object type="Standard - Line" version="0" id="O9">
538+ <dia:attribute name="obj_pos">
539+ <dia:point val="13.9888,5.58092"/>
540+ </dia:attribute>
541+ <dia:attribute name="obj_bb">
542+ <dia:rectangle val="12.7291,5.51454;14.0552,8.21461"/>
543+ </dia:attribute>
544+ <dia:attribute name="conn_endpoints">
545+ <dia:point val="13.9888,5.58092"/>
546+ <dia:point val="12.8161,8.11315"/>
547+ </dia:attribute>
548+ <dia:attribute name="numcp">
549+ <dia:int val="1"/>
550+ </dia:attribute>
551+ <dia:attribute name="end_arrow">
552+ <dia:enum val="22"/>
553+ </dia:attribute>
554+ <dia:attribute name="end_arrow_length">
555+ <dia:real val="0.5"/>
556+ </dia:attribute>
557+ <dia:attribute name="end_arrow_width">
558+ <dia:real val="0.5"/>
559+ </dia:attribute>
560+ <dia:connections>
561+ <dia:connection handle="0" to="O3" connection="4"/>
562+ <dia:connection handle="1" to="O2" connection="2"/>
563+ </dia:connections>
564+ </dia:object>
565+ <dia:object type="Standard - Line" version="0" id="O10">
566+ <dia:attribute name="obj_pos">
567+ <dia:point val="15.0831,5.40979"/>
568+ </dia:attribute>
569+ <dia:attribute name="obj_bb">
570+ <dia:rectangle val="15.0142,5.34083;16.82,8.15366"/>
571+ </dia:attribute>
572+ <dia:attribute name="conn_endpoints">
573+ <dia:point val="15.0831,5.40979"/>
574+ <dia:point val="16.7511,8.05905"/>
575+ </dia:attribute>
576+ <dia:attribute name="numcp">
577+ <dia:int val="1"/>
578+ </dia:attribute>
579+ <dia:attribute name="end_arrow">
580+ <dia:enum val="22"/>
581+ </dia:attribute>
582+ <dia:attribute name="end_arrow_length">
583+ <dia:real val="0.5"/>
584+ </dia:attribute>
585+ <dia:attribute name="end_arrow_width">
586+ <dia:real val="0.5"/>
587+ </dia:attribute>
588+ <dia:connections>
589+ <dia:connection handle="0" to="O3" connection="4"/>
590+ <dia:connection handle="1" to="O7" connection="2"/>
591+ </dia:connections>
592+ </dia:object>
593+ <dia:object type="Standard - Arc" version="0" id="O11">
594+ <dia:attribute name="obj_pos">
595+ <dia:point val="2.73131,8.06715"/>
596+ </dia:attribute>
597+ <dia:attribute name="obj_bb">
598+ <dia:rectangle val="2.67808,5.82924;17.4265,9.10063"/>
599+ </dia:attribute>
600+ <dia:attribute name="conn_endpoints">
601+ <dia:point val="2.73131,8.06715"/>
602+ <dia:point val="17.3733,9.0474"/>
603+ </dia:attribute>
604+ <dia:attribute name="curve_distance">
605+ <dia:real val="-2.6583884076175863"/>
606+ </dia:attribute>
607+ <dia:attribute name="line_width">
608+ <dia:real val="0.10000000149011612"/>
609+ </dia:attribute>
610+ <dia:attribute name="end_arrow">
611+ <dia:enum val="22"/>
612+ </dia:attribute>
613+ <dia:attribute name="end_arrow_length">
614+ <dia:real val="0.5"/>
615+ </dia:attribute>
616+ <dia:attribute name="end_arrow_width">
617+ <dia:real val="0.5"/>
618+ </dia:attribute>
619+ <dia:connections>
620+ <dia:connection handle="0" to="O0" connection="0"/>
621+ <dia:connection handle="1" to="O7" connection="2"/>
622+ </dia:connections>
623+ </dia:object>
624+ </dia:layer>
625+</dia:diagram>
hackage2nix/HackageGit.hsnew file+71
@@ -0,0 +1,71 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE TemplateHaskell #-}
3+
4+module HackageGit
5+ ( Hackage, readHackage, readPackage, readPackageMeta
6+ , SHA256Hash, hashes
7+ )
8+ where
9+
10+import Control.Lens hiding ( (<.>) )
11+import Control.Monad
12+import Data.Aeson
13+import qualified Data.ByteString.Char8 as BS
14+import Data.Map as Map
15+import Data.Set as Set
16+import Data.String
17+import Distribution.Nixpkgs.Hashes
18+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
19+import Distribution.Package
20+import Distribution.PackageDescription
21+import Distribution.PackageDescription.Parsec ( parseGenericPackageDescriptionMaybe )
22+import Distribution.Text
23+import Distribution.Version
24+import OpenSSL.Digest ( digest, digestByName )
25+import System.Directory
26+import System.FilePath
27+
28+type Hackage = Map PackageName (Set Version)
29+
30+readHackage :: FilePath -> IO Hackage
31+readHackage path = getSubDirs path >>= foldM discoverPackageVersions mempty
32+ where
33+ discoverPackageVersions :: Hackage -> String -> IO Hackage
34+ discoverPackageVersions db pkg = do
35+ vs <- getSubDirs (path </> pkg)
36+ return (Map.insert (mkPackageName pkg) (Set.fromList (Prelude.map fromString vs)) db)
37+
38+getSubDirs :: FilePath -> IO [FilePath]
39+getSubDirs path = do
40+ let isDirectory p = doesDirectoryExist (path </> p)
41+ getDirectoryContents path >>= filterM isDirectory . Prelude.filter (\x -> head x /= '.')
42+
43+type SHA256Hash = String
44+
45+readPackage :: FilePath -> PackageIdentifier -> IO (GenericPackageDescription, SHA256Hash)
46+readPackage dirPrefix (PackageIdentifier name version) = do
47+ let cabalFile = dirPrefix </> unPackageName name </> display version </> unPackageName name <.> "cabal"
48+ buf <- BS.readFile cabalFile
49+ cabal <- case parseGenericPackageDescriptionMaybe buf of
50+ Just a -> return a
51+ Nothing -> fail ("cannot parse cabal file " ++ cabalFile)
52+ return (cabal, printSHA256 (digest (digestByName "sha256") buf))
53+
54+declareLenses [d|
55+ data Meta = Meta { hashes :: Map String String
56+ }
57+ deriving (Show)
58+ |]
59+
60+instance FromJSON Meta where
61+ parseJSON (Object v) = Meta
62+ <$> v .: "package-hashes"
63+ parseJSON o = fail ("invalid Cabal metadata: " ++ show o)
64+
65+readPackageMeta :: FilePath -> PackageIdentifier -> IO Meta
66+readPackageMeta dirPrefix (PackageIdentifier name version) = do
67+ let metaFile = dirPrefix </> unPackageName name </> display version </> unPackageName name <.> "json"
68+ buf <- BS.readFile metaFile
69+ case eitherDecodeStrict buf of
70+ Left msg -> fail (metaFile ++ ": " ++ msg)
71+ Right x -> return $ over (hashes . ix "SHA256") (printSHA256 . packHex) x
hackage2nix/Main.hsnew file+215
@@ -0,0 +1,215 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE RecordWildCards #-}
3+
4+module Main ( main ) where
5+
6+import HackageGit
7+
8+import Control.Lens
9+import Control.Monad
10+import Control.Monad.Par.Combinator
11+import Control.Monad.Par.IO
12+import Control.Monad.Trans ( liftIO )
13+import Data.List ( intercalate )
14+import Data.Map.Strict ( Map )
15+import qualified Data.Map.Strict as Map
16+import Data.Maybe
17+import Data.Set ( Set )
18+import qualified Data.Set as Set
19+import Data.String
20+import Distribution.Nixpkgs.Fetch
21+import Distribution.Nixpkgs.Haskell as Derivation
22+import Distribution.Nixpkgs.Haskell.Constraint
23+import Distribution.Nixpkgs.Haskell.FromCabal
24+import Distribution.Nixpkgs.Haskell.FromCabal.Configuration as Config
25+import Distribution.Nixpkgs.Haskell.FromCabal.Flags
26+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
27+import Distribution.Nixpkgs.Meta
28+import Distribution.Nixpkgs.PackageMap
29+import Distribution.Package
30+import Distribution.PackageDescription hiding ( options, extraLibs, buildTools, homepage )
31+import Distribution.System
32+import Distribution.Text
33+import Distribution.Version
34+import Language.Nix
35+import Options.Applicative
36+import qualified Paths_cabal2nix as Main
37+import System.FilePath
38+import System.IO
39+import Text.PrettyPrint.HughesPJClass hiding ( (<>) )
40+
41+type PackageSet = Map PackageName Version
42+type PackageMultiSet = Map PackageName (Set Version)
43+
44+data CLI = CLI
45+ { hackageRepository :: FilePath
46+ , preferredVersionsFile :: Maybe FilePath
47+ , nixpkgsRepository :: FilePath
48+ , configFile :: FilePath
49+ , targetPlatform :: Platform
50+ }
51+ deriving (Show)
52+
53+main :: IO ()
54+main = do
55+ let cliOptions :: Parser CLI
56+ cliOptions = CLI
57+ <$> strOption (long "hackage" <> help "path to Hackage git repository" <> value "hackage" <> showDefaultWith id <> metavar "PATH")
58+ <*> optional (strOption (long "preferred-versions" <> help "path to Hackage preferred-versions file" <> value "hackage/preferred-versions" <> showDefault <> metavar "PATH"))
59+ <*> strOption (long "nixpkgs" <> help "path to Nixpkgs repository" <> value "nixpkgs" <> showDefaultWith id <> metavar "PATH")
60+ <*> strOption (long "config" <> help "path to configuration file inside of Nixpkgs" <> value "pkgs/development/haskell-modules/configuration-hackage2nix.yaml" <> showDefaultWith id <> metavar "PATH")
61+ <*> option (fmap fromString str) (long "platform" <> help "target platform to generate package set for" <> value "x86_64-linux" <> showDefaultWith display <> metavar "PLATFORM")
62+
63+ pinfo :: ParserInfo CLI
64+ pinfo = info
65+ ( helper
66+ <*> infoOption ("hackage2nix " ++ prettyShow Main.version) (long "version" <> help "Show version number")
67+ <*> cliOptions
68+ )
69+ ( fullDesc
70+ <> header "hackage2nix converts a Hackage database into a hackage-packages.nix file."
71+ )
72+ CLI {..} <- execParser pinfo
73+
74+ config <- readConfiguration (nixpkgsRepository </> configFile)
75+ nixpkgs <- readNixpkgPackageMap ["-f", nixpkgsRepository, "--arg", "config", "{ allowAliases = false; }"]
76+ preferredVersions <- readPreferredVersions (fromMaybe (hackageRepository </> "preferred-versions") preferredVersionsFile)
77+ let fixup = Map.delete "acme-everything" -- TODO: https://github.com/NixOS/cabal2nix/issues/164
78+ . Map.delete "som" -- TODO: https://github.com/NixOS/cabal2nix/issues/164
79+ . Map.delete "type" -- TODO: https://github.com/NixOS/cabal2nix/issues/163
80+ . Map.delete "control-invariants" -- TODO: depends on "assert"
81+ . Map.delete "with" -- TODO: https://github.com/NixOS/cabal2nix/issues/164
82+ . Map.delete "telega" -- TODO: depends on "with"
83+ . over (at "hermes") (fmap (set (contains "1.3.4.3") False)) -- TODO: https://github.com/haskell/hackage-server/issues/436
84+ hackage <- fixup <$> readHackage hackageRepository
85+ let
86+ hackagePackagesFile :: FilePath
87+ hackagePackagesFile = nixpkgsRepository </> "pkgs/development/haskell-modules/hackage-packages.nix"
88+
89+ corePackageSet :: PackageSet
90+ corePackageSet = Map.fromList [ (name, v) | PackageIdentifier name v <- Set.toList (Config.corePackages config) ]
91+
92+ latestVersionSet :: PackageSet
93+ latestVersionSet = Map.map Set.findMax (Map.filter (not . Set.null) (Map.mapWithKey (enforcePreferredVersions preferredVersions) hackage))
94+
95+ defaultPackageOverridesSet :: PackageSet
96+ defaultPackageOverridesSet = Map.fromList [ (name, resolveConstraint c hackage) | c@(Dependency name _ _) <- defaultPackageOverrides config ]
97+
98+ generatedDefaultPackageSet :: PackageSet
99+ generatedDefaultPackageSet = (defaultPackageOverridesSet `Map.union` latestVersionSet) `Map.difference` corePackageSet
100+
101+ latestCorePackageSet :: PackageSet
102+ latestCorePackageSet = latestVersionSet `Map.intersection` corePackageSet
103+
104+ latestOverridePackageSet :: PackageSet
105+ latestOverridePackageSet = latestVersionSet `Map.intersection` defaultPackageOverridesSet
106+
107+ extraPackageSet :: PackageMultiSet
108+ extraPackageSet = Map.unionsWith Set.union
109+ [ Map.singleton name (Set.singleton (resolveConstraint c hackage)) | c@(Dependency name _ _) <- extraPackages config ]
110+
111+ db :: PackageMultiSet
112+ db = Map.unionsWith Set.union [ Map.map Set.singleton generatedDefaultPackageSet
113+ , Map.map Set.singleton latestCorePackageSet
114+ , Map.map Set.singleton latestOverridePackageSet
115+ , extraPackageSet
116+ ]
117+
118+ haskellResolver :: Dependency -> Bool
119+ haskellResolver (Dependency name vrange _)
120+ | Just v <- Map.lookup name corePackageSet = v `withinRange` vrange
121+ | Just v <- Map.lookup name generatedDefaultPackageSet = v `withinRange` vrange
122+ | otherwise = False
123+
124+ nixpkgsResolver :: Identifier -> Maybe Binding
125+ nixpkgsResolver = resolve (Map.map (Set.map (over path ("pkgs":))) nixpkgs)
126+
127+ globalPackageMaintainers :: Map PackageName (Set Identifier)
128+ globalPackageMaintainers = Map.unionsWith Set.union [ Map.singleton p (Set.singleton m) | (m,ps) <- Map.toList (packageMaintainers config), p <- Set.toList ps ]
129+
130+ pkgs <- runParIO $ flip parMapM (Map.toAscList db) $ \(name, vs) -> do
131+ defs <- forM (Set.toAscList vs) $ \v -> liftIO $ do
132+ let pkgId :: PackageIdentifier
133+ pkgId = PackageIdentifier name v
134+
135+ (descr, cabalSHA256) <- readPackage hackageRepository pkgId
136+ meta <- readPackageMeta hackageRepository pkgId
137+
138+ let isInDefaultPackageSet, isHydraEnabled, isBroken :: Bool
139+ isInDefaultPackageSet = (== Just v) (Map.lookup name generatedDefaultPackageSet)
140+ isHydraEnabled = isInDefaultPackageSet && not (isBroken || name `Set.member` dontDistributePackages config)
141+ isBroken = any (withinRange v) [ vr | Dependency pn vr _ <- brokenPackages config, pn == name ]
142+
143+ droppedPlatforms :: Set Platform
144+ droppedPlatforms = Map.findWithDefault mempty name (unsupportedPlatforms config)
145+
146+ tarballSHA256 :: SHA256Hash
147+ tarballSHA256 = fromMaybe (error (display pkgId ++ ": meta data has no hash for the tarball"))
148+ (view (hashes . at "SHA256") meta)
149+
150+ flagAssignment :: FlagAssignment -- We don't use the flags from Stackage Nightly here, because
151+ flagAssignment = configureCabalFlags pkgId -- they are chosen specifically for GHC 7.10.2.
152+
153+ attr :: String
154+ attr = if isInDefaultPackageSet then unPackageName name else mangle pkgId
155+
156+ drv :: Derivation
157+ drv = fromGenericPackageDescription haskellResolver nixpkgsResolver targetPlatform (compilerInfo config) flagAssignment [] descr
158+ & src .~ urlDerivationSource ("mirror://hackage/" ++ display pkgId ++ ".tar.gz") tarballSHA256
159+ & editedCabalFile .~ cabalSHA256
160+ & metaSection.platforms %~ (`Set.difference` Map.findWithDefault Set.empty name (unsupportedPlatforms config))
161+ & metaSection.hydraPlatforms %~ (if Set.null droppedPlatforms then id else (`Set.difference` droppedPlatforms))
162+ & metaSection.hydraPlatforms %~ (if isHydraEnabled then id else const Set.empty)
163+ & metaSection.broken ||~ isBroken
164+ & metaSection.maintainers .~ Map.findWithDefault Set.empty name globalPackageMaintainers
165+ & metaSection.homepage .~ ""
166+
167+ overrides :: Doc
168+ overrides = fcat $ punctuate space [ pPrint b <> semi | b <- Set.toList (view (dependencies . each) drv `Set.union` view extraFunctionArgs drv), not (isFromHackage b) ]
169+ return $ render $ nest 2 $
170+ hang (doubleQuotes (text attr) <+> equals <+> text "callPackage") 2 (parens (pPrint drv)) <+> (braces overrides <> semi)
171+
172+ return (intercalate "\n\n" defs)
173+
174+ withFile hackagePackagesFile WriteMode $ \h -> do
175+ hPutStrLn h "/* hackage-packages.nix is an auto-generated file -- DO NOT EDIT! */"
176+ hPutStrLn h ""
177+ hPutStrLn h "{ pkgs, stdenv, callPackage }:"
178+ hPutStrLn h ""
179+ hPutStrLn h "self: {"
180+ hPutStrLn h ""
181+ mapM_ (\pkg -> hPutStrLn h pkg >> hPutStrLn h "") pkgs
182+ hPutStrLn h "}"
183+
184+isFromHackage :: Binding -> Bool
185+isFromHackage b = case view (reference . path) b of
186+ ["self",_] -> True
187+ _ -> False
188+
189+readPreferredVersions :: FilePath -> IO [Constraint]
190+readPreferredVersions p = mapMaybe parsePreferredVersionsLine . lines <$> readFile p
191+
192+parsePreferredVersionsLine :: String -> Maybe Constraint
193+parsePreferredVersionsLine [] = Nothing
194+parsePreferredVersionsLine ('-':'-':_) = Nothing
195+parsePreferredVersionsLine l = simpleParse l `mplus` error ("invalid preferred-versions line: " ++ show l)
196+
197+enforcePreferredVersions :: [Constraint] -> PackageName -> Set Version -> Set Version
198+enforcePreferredVersions cs pkg = Set.filter (\v -> PackageIdentifier pkg v `satisfiesConstraints` cs)
199+
200+resolveConstraint :: Constraint -> Hackage -> Version
201+resolveConstraint c = fromMaybe (error msg) . resolveConstraint' c
202+ where msg = unlines [ "constraint " ++ display c ++ " cannot be resolved in Hackage"
203+ , "This could be due the package being missing in the hackage directory"
204+ , "or the file system not being case sensitive."
205+ ]
206+
207+resolveConstraint' :: Constraint -> Hackage -> Maybe Version
208+resolveConstraint' (Dependency name vrange _) hackage
209+ | Just vset' <- Map.lookup name hackage
210+ , vset <- Set.filter (`withinRange` vrange) vset'
211+ , not (Set.null vset) = Just (Set.findMax vset)
212+ | otherwise = Nothing
213+
214+mangle :: PackageIdentifier -> String
215+mangle (PackageIdentifier name v) = unPackageName name ++ '_' : [ if c == '.' then '_' else c | c <- display v ]
hackage2nix/README.mdnew file+36
@@ -0,0 +1,36 @@
1+# Hackage2nix
2+
3+This tool is used to update the `hackage-packages.nix` file in the nixpkgs repo.
4+Most of the time we will not need run this manually (since it is run automatically
5+on the upstream nixpkgs). The cases when we would need to run this manually are:
6+
7+* We have changed hackage2nix in some way and we want to check that it
8+behaves correctly.
9+
10+* We have a fork of nixpkgs where we have added or changed
11+the name or location in nixpkgs of a native package used by a hackage package
12+and we want to check that hackage-packages.nix will be updated correctly.
13+
14+**Important:** this must be run on a **case sensitive file system**.
15+On macOS you can use [this](https://gist.github.com/dixson3/8360571) to create one
16+(you can replace 60g with 4g as that should be plenty).
17+
18+There is a [video on YouTube](https://www.youtube.com/watch?v=qX0mgtSm360)
19+that gives a thorough walk-through of these steps.
20+
21+#### Setup
22+Replace `git@github.com:NixOS/nixpkgs.git` with a fork you have access to.
23+```
24+git clone git@github.com:NixOS/cabal2nix.git
25+cd cabal2nix
26+git clone git@github.com:NixOS/nixpkgs.git
27+git clone git@github.com:commercialhaskell/all-cabal-hashes.git --branch hackage hackage
28+cabal install
29+```
30+
31+#### Running Hackage2nix
32+Runs hackage2nix and pushes a commit with the updated `hackage-packages.nix`
33+file to your fork of `nixpkgs`.
34+```
35+./update-nixpkgs.sh
36+```
src/Cabal2Nix.hsdeleted−93
@@ -1,93 +0,0 @@
1−module Main ( main ) where
2−
3−import Cabal2Nix.Hackage ( hashPackage, readCabalFile )
4−import Cabal2Nix.Generate ( cabal2nix )
5−import Cabal2Nix.Normalize ( normalize )
6−import Distribution.NixOS.Derivation.Cabal
7−
8−import Control.Exception ( bracket )
9−import Control.Monad ( when )
10−import Distribution.PackageDescription ( package, packageDescription )
11−import Distribution.PackageDescription.Parse ( parsePackageDescription, ParseResult(..) )
12−import Distribution.Text ( disp )
13−import System.Console.GetOpt ( OptDescr(..), ArgDescr(..), ArgOrder(..), usageInfo, getOpt )
14−import System.Environment ( getArgs )
15−import System.Exit ( exitFailure, exitSuccess )
16−import System.IO ( hPutStrLn, hFlush, stdout, stderr )
17−
18−data Configuration = Configuration
19− { optPrintHelp :: Bool
20− , optPrintVersion :: Bool
21− , optSha256 :: String
22− , optMaintainer :: [String]
23− , optPlatform :: [String]
24− , optHaddock :: Bool
25− , optDoCheck :: Bool
26− }
27− deriving (Show)
28−
29−defaultConfiguration :: Configuration
30−defaultConfiguration = Configuration
31− { optPrintHelp = False
32− , optPrintVersion = False
33− , optSha256 = ""
34− , optMaintainer = []
35− , optPlatform = []
36− , optHaddock = True
37− , optDoCheck = True
38− }
39−
40−options :: [OptDescr (Configuration -> Configuration)]
41−options =
42− [ Option ['h'] ["help"] (NoArg (\o -> o { optPrintHelp = True })) "show this help text"
43− , Option [] ["sha256"] (ReqArg (\x o -> o { optSha256 = x }) "HASH") "sha256 hash of source tarball"
44− , Option ['m'] ["maintainer"] (ReqArg (\x o -> o { optMaintainer = x : optMaintainer o }) "MAINTAINER") "maintainer of this package (may be specified multiple times)"
45− , Option ['p'] ["platform"] (ReqArg (\x o -> o { optPlatform = x : optPlatform o }) "PLATFORM") "supported build platforms (may be specified multiple times)"
46− , Option [] ["no-haddock"] (NoArg (\o -> o { optHaddock = False })) "don't run Haddock when building this package"
47− , Option [] ["no-check"] (NoArg (\o -> o { optDoCheck = False })) "don't run regression test suites of this package"
48− ]
49−
50−usage :: String
51−usage = usageInfo "Usage: cabal2nix [options] url-to-cabal-file" options ++ unlines
52− [ ""
53− , "Recognized URI schemes:"
54− , ""
55− , " cabal://pkgname-pkgversion download the specified package from Hackage"
56− , " cabal://pkgname download latest version of the specified package from Hackage"
57− , " http://host/path fetch the Cabal file via HTTP"
58− , " file:///local/path load the Cabal file from the local disk"
59− , " /local/path abbreviated version of file URI"
60− ]
61−
62−cmdlineError :: String -> IO a
63−cmdlineError "" = hPutStrLn stderr usage >> exitFailure
64−cmdlineError errMsg = hPutStrLn stderr errMsg >> cmdlineError ""
65−
66−main :: IO ()
67−main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
68− args' <- getArgs
69− (cfg,args) <- case getOpt Permute options args' of
70− (o,n,[] ) -> return (foldl (flip ($)) defaultConfiguration o,n)
71− (_,_,errs) -> cmdlineError (concatMap ("*** "++) errs)
72−
73− when (optPrintHelp cfg) (putStr usage >> exitSuccess)
74− when (length args /= 1) (cmdlineError "*** exactly one url-to-cabal-file must be specified\n")
75−
76− cabal' <- fmap parsePackageDescription (readCabalFile (head args))
77− cabal <- case cabal' of
78− ParseOk _ a -> return a
79− ParseFailed err -> do
80− hPutStrLn stderr ("*** cannot parse cabal file: " ++ show err)
81− exitFailure
82−
83− let packageId = package (packageDescription cabal)
84− sha <- if null (optSha256 cfg) then hashPackage packageId else return (optSha256 cfg)
85−
86− let deriv = (cabal2nix cabal) { sha256 = sha, runHaddock = optHaddock cfg }
87− deriv' = deriv { metaSection = (metaSection deriv)
88− { maintainers = optMaintainer cfg
89− , platforms = optPlatform cfg
90− }
91− }
92−
93− putStr (show (disp (normalize deriv')))
src/Cabal2Nix/CorePackages.hsdeleted−43
@@ -1,43 +0,0 @@
1−module Cabal2Nix.CorePackages ( corePackages, coreBuildTools ) where
2−
3−-- | List of packages shipped with ghc and therefore at the moment not in
4−-- nixpkgs. This should probably be configurable at first. Later, it might
5−-- be good to actually include them as dependencies, but set them to null
6−-- if GHC provides them (as different GHC versions vary).
7−--
8−-- The commented packages have previously been non-core, so we don't filter
9−-- them.
10−corePackages :: [String]
11−corePackages = [
12− "array",
13− "base",
14− "bin-package-db",
15− "bytestring",
16− -- "Cabal",
17− "containers",
18− "directory",
19− -- "extensible-exceptions",
20− "ffi",
21− -- "filepath",
22− "ghc",
23− "ghc-binary",
24− "ghc-prim",
25− "haskell2010", -- new as core, but doesn't work in older GHCs anyway
26− "haskell98",
27− "hpc",
28− "integer-gmp",
29− "old-locale",
30− "old-time",
31− "pretty",
32− "process",
33− -- "random",
34− "template-haskell",
35− -- "time",
36− "unix"
37− ]
38−
39−coreBuildTools :: [String]
40−coreBuildTools = [
41− "ghc",
42− "hsc2hs"
43− ]
src/Cabal2Nix/Flags.hsdeleted−21
@@ -1,21 +0,0 @@
1−module Cabal2Nix.Flags ( configureCabalFlags ) where
2−
3−import Distribution.Package
4−import Distribution.PackageDescription
5−
6−configureCabalFlags :: PackageIdentifier -> FlagAssignment
7−configureCabalFlags (PackageIdentifier (PackageName name) _)
8− | name == "accelerate-examples"= [disable "opencl"]
9− | name == "pandoc" = [enable "blaze_html_0_5"]
10− | name == "git-annex" = [enable "S3", enable "WebDAV", enable "Inotify", enable "Dbus", enable "Assistant", enable "Webapp", enable "Pairing", enable "XMPP", enable "DNS"]
11− | name == "haskeline" = [enable "terminfo"]
12− | name == "reactive-banana-wx" = [disable "buildExamples"]
13− | name == "xmobar" = [enable "with_xft", enable "with_iwlib"]
14− | name == "xmonad-extras" = [disable "with_hlist", enable "with_split", enable "with_parsec"]
15− | otherwise = []
16−
17−enable :: String -> (FlagName,Bool)
18−enable name = (FlagName name, True)
19−
20−disable :: String -> (FlagName,Bool)
21−disable name = (FlagName name, False)
src/Cabal2Nix/Generate.hsdeleted−60
@@ -1,60 +0,0 @@
1−module Cabal2Nix.Generate ( cabal2nix ) where
2−
3−import Cabal2Nix.License
4−import Cabal2Nix.PostProcess
5−import Cabal2Nix.Normalize
6−import Cabal2Nix.Flags
7−import Data.Maybe
8−import Distribution.Compiler
9−import qualified Distribution.Package as Cabal
10−import qualified Distribution.PackageDescription as Cabal
11−import Distribution.PackageDescription.Configuration
12−import Distribution.System
13−import Distribution.Version
14−import Distribution.NixOS.Derivation.Cabal
15−
16−cabal2nix :: Cabal.GenericPackageDescription -> Derivation
17−cabal2nix cabal = normalize $ postProcess MkDerivation
18− { pname = let Cabal.PackageName x = Cabal.pkgName pkg in x
19− , version = Cabal.pkgVersion pkg
20− , sha256 = "cabal2nix left the she256 field undefined"
21− , isLibrary = isJust (Cabal.library tpkg)
22− , isExecutable = not (null (Cabal.executables tpkg))
23− , buildDepends = map unDep deps
24− , testDepends = map unDep (concatMap Cabal.targetBuildDepends tstDeps)
25− , buildTools = map unDep tools
26− , extraLibs = libs
27− , pkgConfDeps = pcs
28− , configureFlags = []
29− , cabalFlags = configureCabalFlags pkg
30− , runHaddock = True
31− , jailbreak = False
32− , doCheck = True
33− , phaseOverrides = ""
34− , metaSection = Meta
35− { homepage = Cabal.homepage descr
36− , description = Cabal.synopsis descr
37− , license = fromCabalLicense (Cabal.license descr)
38− , platforms = []
39− , maintainers = []
40− }
41− }
42− where
43− descr = Cabal.packageDescription cabal
44− pkg = Cabal.package descr
45− deps = Cabal.buildDepends tpkg
46− libDeps = map Cabal.libBuildInfo (maybeToList (Cabal.library tpkg))
47− exeDeps = map Cabal.buildInfo (Cabal.executables tpkg)
48− tstDeps = map Cabal.testBuildInfo (Cabal.testSuites tpkg)
49− tools = concatMap Cabal.buildTools (libDeps ++ exeDeps ++ tstDeps)
50− libs = concatMap Cabal.extraLibs (libDeps ++ exeDeps ++ tstDeps)
51− pcs = map unDep (concatMap Cabal.pkgconfigDepends (libDeps ++ exeDeps ++ tstDeps))
52− Right (tpkg, _) = finalizePackageDescription
53− (configureCabalFlags pkg)
54− (const True)
55− (Platform I386 Linux) -- shouldn't be hardcoded
56− (CompilerId GHC (Version [7,4,1] [])) -- dito
57− [] cabal
58−
59−unDep :: Cabal.Dependency -> String
60−unDep (Cabal.Dependency (Cabal.PackageName x) _) = x
src/Cabal2Nix/Hackage.hsdeleted−76
@@ -1,76 +0,0 @@
1−module Cabal2Nix.Hackage ( hashPackage, readCabalFile ) where
2−
3−import Control.Monad ( unless )
4−import Data.List ( isPrefixOf )
5−import Data.Maybe ( fromJust )
6−import Data.Version ( showVersion, versionBranch )
7−import Distribution.Package ( PackageIdentifier(..), PackageName(..) )
8−import Distribution.Text
9−import Network.HTTP ( getRequest, rspBody )
10−import Network.Browser ( browse, request, setCheckForProxy, setDebugLog, setOutHandler )
11−import System.Directory ( doesFileExist, getHomeDirectory, createDirectoryIfMissing )
12−import System.FilePath ( dropFileName, (</>), (<.>) )
13−import System.Process ( readProcess )
14−
15−import qualified Distribution.Hackage.DB as DB
16−
17−data Ext = TarGz | Cabal deriving Eq
18−
19−showExt :: Ext -> String
20−showExt TarGz = ".tar.gz"
21−showExt Cabal = ".cabal"
22−
23−hackagePath :: PackageIdentifier -> Ext -> String
24−hackagePath (PackageIdentifier (PackageName name) version') ext =
25− "http://hackage.haskell.org/packages/archive/" ++
26− name ++ "/" ++ version ++ "/" ++ name ++
27− (if ext == TarGz then '-' : version else "") ++
28− showExt ext
29− where
30− version = showVersion version'
31−
32−hashPackage :: PackageIdentifier -> IO String
33−hashPackage pkg = do
34− cachePath <- hashCachePath pkg
35− exists <- doesFileExist cachePath
36− hash' <- if exists
37− then readFile cachePath
38− else readProcess "bash" ["-c", "exec nix-prefetch-url 2>/dev/tty " ++ hackagePath pkg TarGz] ""
39− let hash = reverse (dropWhile (=='\n') (reverse hash'))
40− unless exists $ do
41− createDirectoryIfMissing True (dropFileName cachePath)
42− writeFile cachePath hash
43− return hash
44−
45−hashCachePath :: PackageIdentifier -> IO FilePath
46−hashCachePath (PackageIdentifier (PackageName name) version') = do
47− home <- getHomeDirectory
48− return $ home ++ "/.cache/cabal2nix" </> name ++ "-" ++ version <.> "sha256"
49− where
50− version = showVersion version'
51−
52−readCabalFile :: FilePath -> IO String
53−readCabalFile path
54− | "cabal://" `isPrefixOf` path = do let pid p = fromJust $ simpleParse p
55− packageName = drop 8 path
56− case versionBranch $ pkgVersion $ pid packageName of
57− [] -> do
58− packageDescription <- DB.lookup packageName `fmap` DB.readHackage
59− case packageDescription of
60− Just d -> do
61− let version = showVersion $ last $ DB.keys d
62− readCabalFile $ hackagePath (pid $ packageName ++ "-" ++ version) Cabal
63− Nothing -> error "No such package"
64− _ -> readCabalFile $ hackagePath (pid packageName) Cabal
65− | "http://" `isPrefixOf` path = fetchUrl path
66− | "file://" `isPrefixOf` path = readCabalFile (drop 7 path)
67− | otherwise = readFile path
68−
69−fetchUrl :: String -> IO String
70−fetchUrl url = do
71− (_,rsp) <- Network.Browser.browse $ do
72− setCheckForProxy True
73− setDebugLog Nothing
74− setOutHandler (\_ -> return ())
75− request (getRequest url)
76− return (rspBody rsp)
src/Cabal2Nix/License.hsdeleted−20
@@ -1,20 +0,0 @@
1−module Cabal2Nix.License ( fromCabalLicense ) where
2−
3−import Distribution.NixOS.Derivation.License
4−import Distribution.License ( License(..) )
5−import Data.Version
6−
7−fromCabalLicense :: Distribution.License.License -> Distribution.NixOS.Derivation.License.License
8−fromCabalLicense (GPL Nothing) = Unknown (Just "GPL")
9−fromCabalLicense (GPL (Just (Version [2] []))) = Known "self.stdenv.lib.licenses.gpl2"
10−fromCabalLicense (GPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
11−fromCabalLicense (LGPL Nothing) = Unknown (Just "LGPL")
12−fromCabalLicense (LGPL (Just (Version [2,1] []))) = Known "self.stdenv.lib.licenses.lgpl21"
13−fromCabalLicense (LGPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
14−fromCabalLicense BSD3 = Known "self.stdenv.lib.licenses.bsd3"
15−fromCabalLicense BSD4 = Known "self.stdenv.lib.licenses.bsd4"
16−fromCabalLicense MIT = Known "self.stdenv.lib.licenses.mit"
17−fromCabalLicense PublicDomain = Known "self.stdenv.lib.licenses.publicDomain"
18−fromCabalLicense AllRightsReserved = Known "self.stdenv.lib.licenses.proprietary"
19−fromCabalLicense OtherLicense = Unknown Nothing
20−fromCabalLicense l = error $ "Cabal2Nix.License.fromCabalLicense: unknown license " ++ show l
src/Cabal2Nix/Name.hsdeleted−69
@@ -1,69 +0,0 @@
1−module Cabal2Nix.Name ( toNixName, libNixName, buildToolNixName ) where
2−
3−import Data.Char
4−
5−-- | Map Cabal names to Nix attribute names.
6−toNixName :: String -> String
7−toNixName [] = error "toNixName: empty string is not a valid argument"
8−toNixName name = f name
9− where
10− f [] = []
11− f ('-':c:cs) | c `notElem` "-" = toUpper c : f cs
12− f ('-':_) = error ("unexpected package name " ++ show name)
13− f (c:cs) = c : f cs
14−
15−-- | Map libraries to Nix packages.
16−-- TODO: This should probably be configurable. We also need to consider the
17−-- possibility of name clashes with Haskell libraries. I have included
18−-- identity mappings to incicate that I have verified their correctness.
19−libNixName :: String -> [String]
20−libNixName "adns" = return "adns"
21−libNixName "cairo-pdf" = return "cairo"
22−libNixName "cairo-ps" = return "cairo"
23−libNixName "cairo" = return "cairo"
24−libNixName "cairo-svg" = return "cairo"
25−libNixName "crypto" = return "openssl"
26−libNixName "gio-2.0" = return "glib"
27−libNixName "glib-2.0" = return "glib"
28−libNixName "GL" = return "mesa"
29−libNixName "GLU" = ["freeglut","mesa"]
30−libNixName "glut" = ["freeglut","mesa"]
31−libNixName "gnome-keyring-1" = return "gnome_keyring"
32−libNixName "gnome-keyring" = return "gnome_keyring"
33−libNixName "gobject-2.0" = return "glib"
34−libNixName "gthread-2.0" = return "glib"
35−libNixName "gtk+-2.0" = return "gtk"
36−libNixName "gtksourceview-2.0" = return "gtksourceview"
37−libNixName "idn" = return "libidn"
38−libNixName "iw" = return "wirelesstools"
39−libNixName "jpeg" = return "libjpeg"
40−libNixName "libglade-2.0" = return "libglade"
41−libNixName "libgsasl" = return "gsasl"
42−libNixName "librsvg-2.0" = return "librsvg"
43−libNixName "libxml-2.0" = return "libxml2"
44−libNixName "libzip" = return "libzip"
45−libNixName "m" = [] -- in stdenv
46−libNixName "pangocairo" = return "pango"
47−libNixName "pcre" = return "pcre"
48−libNixName "png" = return "libpng"
49−libNixName "pq" = return "postgresql"
50−libNixName "sndfile" = return "libsndfile"
51−libNixName "sqlite3" = return "sqlite"
52−libNixName "ssl" = return "openssl"
53−libNixName "stdc++" = [] -- in stdenv
54−libNixName "X11" = return "libX11"
55−libNixName "Xext" = return "libXext"
56−libNixName "xft" = return "libXft"
57−libNixName "xml2" = return "libxml2"
58−libNixName "Xrandr" = return "libXrandr"
59−libNixName "zmq" = return "zeromq"
60−libNixName "z" = return "zlib"
61−libNixName x = return x
62−
63−-- | Map build tool names to Nix attribute names.
64−buildToolNixName :: String -> [String]
65−buildToolNixName "cabal" = return "cabalInstall"
66−buildToolNixName "gtk2hsC2hs" = return "gtk2hsBuildtools"
67−buildToolNixName "gtk2hsHookGenerator" = return "gtk2hsBuildtools"
68−buildToolNixName "gtk2hsTypeGen" = return "gtk2hsBuildtools"
69−buildToolNixName x = return (toNixName x)
src/Cabal2Nix/Normalize.hsdeleted−60
@@ -1,60 +0,0 @@
1−{-# LANGUAGE RecordWildCards #-}
2−
3−module Cabal2Nix.Normalize ( normalize ) where
4−
5−import Distribution.NixOS.Derivation.Cabal
6−import Cabal2Nix.Name
7−import Cabal2Nix.CorePackages
8−import Data.List
9−import Data.Char
10−import Data.Function
11−
12−normalize :: Derivation -> Derivation
13−normalize deriv@(MkDerivation {..}) = deriv
14− { buildDepends = normalizeNixNames (filter (`notElem` (pname : corePackages)) buildDepends)
15− , testDepends = normalizeNixNames (filter (`notElem` (pname : corePackages)) testDepends)
16− , buildTools = normalizeNixBuildTools (filter (`notElem` coreBuildTools) buildTools)
17− , extraLibs = normalizeNixLibs extraLibs
18− , pkgConfDeps = normalizeNixLibs pkgConfDeps
19− , metaSection = normalizeMeta metaSection
20− }
21−
22−normalizeMeta :: Meta -> Meta
23−normalizeMeta meta@(Meta {..}) = meta
24− { description = normalizeDescription description
25− , maintainers = normalizeMaintainers maintainers
26− , platforms = normalizePlatforms platforms
27− }
28−
29−normalizeDescription :: String -> String
30−normalizeDescription desc
31− | null desc = []
32− | last desc == '.' && length (filter ('.'==) desc) == 1 = normalizeDescription (init desc)
33− | otherwise = quote (unwords (words desc))
34−
35−quote :: String -> String
36−quote ('\\':c:cs) = '\\' : c : quote cs
37−quote ('"':cs) = '\\' : '"' : quote cs
38−quote (c:cs) = c : quote cs
39−quote [] = []
40−
41−normalizeList :: [String] -> [String]
42−normalizeList = nub . sortBy (compare `on` map toLower)
43−
44−normalizeNixNames :: [String] -> [String]
45−normalizeNixNames = normalizeList . map toNixName
46−
47−normalizeNixLibs :: [String] -> [String]
48−normalizeNixLibs = normalizeList . concatMap libNixName
49−
50−normalizeNixBuildTools :: [String] -> [String]
51−normalizeNixBuildTools = normalizeList . concatMap buildToolNixName
52−
53−normalizeMaintainers :: [String] -> [String]
54−normalizeMaintainers maints = normalizeList
55− [ if '.' `elem` m then m else "self.stdenv.lib.maintainers." ++ m | m <- maints ]
56−
57−normalizePlatforms :: [String] -> [String]
58−normalizePlatforms [] = ["self.ghc.meta.platforms"]
59−normalizePlatforms plats = normalizeList
60− [ if '.' `elem` p then p else "self.stdenv.lib.platforms." ++ p | p <- plats ]
src/Cabal2Nix/PostProcess.hsdeleted−138
@@ -1,138 +0,0 @@
1−{-# LANGUAGE RecordWildCards #-}
2−
3−module Cabal2Nix.PostProcess ( postProcess ) where
4−
5−import Distribution.NixOS.Derivation.Cabal
6−import Data.List
7−
8−postProcess :: Derivation -> Derivation
9−postProcess deriv@(MkDerivation {..})
10− | pname == "alex" = deriv { buildTools = "perl":buildTools }
11− | pname == "cabal-install" && version >= (Version [0,14] [])
12− = deriv { phaseOverrides = cabalInstallPostInstall }
13− | pname == "cairo" = deriv { extraLibs = "pkgconfig":"libc":"cairo":"zlib":extraLibs }
14− | pname == "cuda" = deriv { phaseOverrides = cudaConfigurePhase, extraLibs = "cudatoolkit":"nvidia_x11":"self.stdenv.gcc":extraLibs }
15− | pname == "darcs" = deriv { phaseOverrides = darcsInstallPostInstall }
16− | pname == "editline" = deriv { extraLibs = "libedit":extraLibs }
17− | pname == "epic" = deriv { extraLibs = "gmp":"boehmgc":extraLibs, buildTools = "happy":buildTools }
18− | pname == "ghc-mod" = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":buildTools }
19− | pname == "git-annex" = deriv { buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"bup":buildTools }
20− | pname == "glade" = deriv { extraLibs = "pkgconfig":"libc":extraLibs, pkgConfDeps = "gtkC":delete "gtk" pkgConfDeps }
21− | pname == "glib" = deriv { extraLibs = "pkgconfig":"libc":extraLibs }
22− | pname == "GLUT" = deriv { extraLibs = "glut":"libSM":"libICE":"libXmu":"libXi":"mesa":extraLibs }
23− | pname == "gtk" = deriv { extraLibs = "pkgconfig":"libc":extraLibs, buildDepends = delete "gio" buildDepends }
24− | pname == "gtksourceview2" = deriv { extraLibs = "pkgconfig":"libc":extraLibs }
25− | pname == "haddock" = deriv { buildTools = "alex":"happy":buildTools }
26− | pname == "happy" = deriv { buildTools = "perl":buildTools }
27− | pname == "haskell-src" = deriv { buildTools = "happy":buildTools }
28− | pname == "haskell-src-meta" = deriv { buildDepends = "uniplate":buildDepends }
29− | pname == "highlighting-kate"= highlightingKatePostProcessing deriv
30− | pname == "hmatrix" = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs }
31− | pname == "idris" = deriv { buildTools = "happy":buildTools }
32− | pname == "language-c-quote" = deriv { buildTools = "alex":"happy":buildTools }
33− | pname == "leksah-server" = deriv { buildDepends = "process-leksah":buildDepends }
34− | pname == "llvm-base" = deriv { extraLibs = "llvm":extraLibs }
35− | pname == "multiarg" = deriv { buildDepends = "utf8String":buildDepends }
36− | pname == "OpenAL" = deriv { extraLibs = "openal":extraLibs }
37− | pname == "OpenGL" = deriv { extraLibs = "mesa":"libX11":extraLibs }
38− | pname == "pango" = deriv { extraLibs = "pkgconfig":"libc":extraLibs }
39− | pname == "persistent" = deriv { extraLibs = "sqlite3":extraLibs }
40− | pname == "repa-algorithms" = deriv { extraLibs = "llvm":extraLibs }
41− | pname == "repa-examples" = deriv { extraLibs = "llvm":extraLibs }
42− | pname == "SDL-image" = deriv { extraLibs = "SDL_image":extraLibs }
43− | pname == "SDL-mixer" = deriv { extraLibs = "SDL_mixer":extraLibs }
44− | pname == "SDL-ttf" = deriv { extraLibs = "SDL_ttf":extraLibs }
45− | pname == "svgcairo" = deriv { extraLibs = "libc":extraLibs }
46− | pname == "terminfo" = deriv { extraLibs = "ncurses":extraLibs }
47− | pname == "threadscope" = deriv { configureFlags = "--ghc-options=-rtsopts":configureFlags }
48− | pname == "vacuum" = deriv { extraLibs = "ghcPaths":extraLibs }
49− | pname == "wxcore" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }
50− | pname == "wxc" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs, phaseOverrides = wxcPostInstall }
51− | pname == "X11" && version >= (Version [1,6] [])
52− = deriv { extraLibs = "libXinerama":"libXext":"libXrender":extraLibs }
53− | pname == "X11" = deriv { extraLibs = "libXinerama":"libXext":extraLibs }
54− | pname == "X11-xft" = deriv { extraLibs = "pkgconfig":"freetype":"fontconfig":extraLibs
55− , configureFlags = "--extra-include-dirs=${freetype}/include/freetype2":configureFlags
56− }
57− | pname == "xmonad" = deriv { phaseOverrides = xmonadPostInstall }
58− | otherwise = deriv
59−
60−cudaConfigurePhase :: String
61−cudaConfigurePhase = unlines
62− [ "# Perhaps this should be the default in cabal.nix ..."
63− , "#"
64− , "# The cudatoolkit provides both 64 and 32-bit versions of the"
65− , "# library. GHC's linker fails if the wrong version is found first."
66− , "# We solve this by eliminating lib64 from the path on 32-bit"
67− , "# platforms and putting lib64 first on 64-bit platforms."
68− , ""
69− , "libPaths = if self.stdenv.is64bit then \"lib64 lib\" else \"lib\";"
70− , ""
71− , "configurePhase = ''"
72− , " for i in Setup.hs Setup.lhs; do"
73− , " test -f $i && ghc --make $i"
74− , " done"
75− , ""
76− , " for p in $extraBuildInputs $propagatedBuildNativeInputs; do"
77− , " if [ -d \"$p/include\" ]; then"
78− , " extraLibDirs=\"$extraLibDirs --extra-include-dir=$p/include\""
79− , " fi"
80− , " for d in $libPaths; do"
81− , " if [ -d \"$p/$d\" ]; then"
82− , " extraLibDirs=\"$extraLibDirs --extra-lib-dir=$p/$d\""
83− , " fi"
84− , " done"
85− , " done"
86− , ""
87− , " ./Setup configure --verbose --prefix=\"$out\" $libraryProfiling $extraLibDirs $configureFlags"
88− , "'';"
89− ]
90−
91−ghcModPostInstall :: String
92−ghcModPostInstall = unlines
93− [ "postInstall = ''"
94− , " cd $out/share/$pname-$version"
95− , " make"
96− , " rm Makefile"
97− , " cd .."
98− , " ensureDir \"$out/share/emacs\""
99− , " mv $pname-$version emacs/site-lisp"
100− , " '';"
101− ]
102−
103−wxcPostInstall :: String
104−wxcPostInstall = unlines
105− [ "postInstall = ''"
106− , " cp -v dist/build/libwxc.so.${self.version} $out/lib/libwxc.so"
107− , " '';"
108− ]
109−
110−cabalInstallPostInstall :: String
111−cabalInstallPostInstall = unlines
112− [ "postInstall = ''"
113− , " mkdir $out/etc"
114− , " mv bash-completion $out/etc/bash_completion.d"
115− , "'';"
116− ]
117−
118−darcsInstallPostInstall :: String
119−darcsInstallPostInstall = unlines
120− [ "postInstall = ''"
121− , " mkdir -p $out/etc/bash_completion.d"
122− , " mv contrib/darcs_completion $out/etc/bash_completion.d/darcs"
123− , "'';"
124− ]
125−
126−highlightingKatePostProcessing :: Derivation -> Derivation
127−highlightingKatePostProcessing deriv@(MkDerivation {..}) = deriv
128− { phaseOverrides = "prePatch = \"sed -i -e 's|regex-pcre-builtin|regex-pcre|' highlighting-kate.cabal\";"
129− , buildDepends = "regex-pcre" : filter (/="regex-pcre-builtin") buildDepends
130− }
131−
132−xmonadPostInstall :: String
133−xmonadPostInstall = unlines
134− [ "postInstall = ''"
135− , " mkdir -p $out/share/man/man1"
136− , " mv $out/share/xmonad-*/man/*.1 $out/share/man/man1/"
137− , "'';"
138− ]
src/Cabal2nix.hsnew file+276
@@ -0,0 +1,276 @@
1+{-# LANGUAGE LambdaCase #-}
2+{-# LANGUAGE OverloadedStrings #-}
3+{-# LANGUAGE RecordWildCards #-}
4+
5+module Cabal2nix
6+ ( main, cabal2nix, cabal2nix', cabal2nixWithDB, parseArgs
7+ , Options(..)
8+ )
9+ where
10+
11+import Control.Exception ( bracket )
12+import Control.Lens
13+import Control.Monad
14+import Data.List ( intercalate, isPrefixOf )
15+import Data.List.Split
16+import Data.Maybe ( fromMaybe, isJust, listToMaybe )
17+import qualified Data.Set as Set
18+import Data.String
19+import Data.Time
20+import Distribution.Compiler
21+import Distribution.Nixpkgs.Fetch
22+import Distribution.Nixpkgs.Haskell
23+import Distribution.Nixpkgs.Haskell.FromCabal
24+import Distribution.Nixpkgs.Haskell.FromCabal.Flags
25+import qualified Distribution.Nixpkgs.Haskell.FromCabal.PostProcess as PP (pkg)
26+import qualified Distribution.Nixpkgs.Haskell.Hackage as DB
27+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
28+import Distribution.Nixpkgs.Haskell.PackageSourceSpec
29+import Distribution.Nixpkgs.Meta
30+import Distribution.Package ( packageId )
31+import Distribution.PackageDescription ( mkFlagName, mkFlagAssignment, FlagAssignment )
32+import Distribution.Parsec as P
33+import Distribution.Simple.Utils ( lowercase )
34+import Distribution.System
35+import Language.Nix
36+import Options.Applicative
37+import Paths_cabal2nix ( version )
38+import System.Environment ( getArgs )
39+import System.IO ( hFlush, hPutStrLn, stdout, stderr )
40+import qualified Text.PrettyPrint.ANSI.Leijen as P2
41+import Text.PrettyPrint.HughesPJClass ( Doc, Pretty(..), text, vcat, hcat, semi, render, prettyShow )
42+
43+data Options = Options
44+ { optSha256 :: Maybe String
45+ , optMaintainer :: [String]
46+--, optPlatform :: [String] -- TODO: fix command line handling of platforms
47+ , optHaddock :: Bool
48+ , optHpack :: HpackUse
49+ , optDoCheck :: Bool
50+ , optJailbreak :: Bool
51+ , optDoBenchmark :: Bool
52+ , optRevision :: Maybe String
53+ , optHyperlinkSource :: Bool
54+ , optEnableLibraryProfiling :: Bool
55+ , optEnableExecutableProfiling :: Bool
56+ , optEnableProfiling :: Maybe Bool
57+ , optExtraArgs :: [String]
58+ , optHackageDb :: Maybe FilePath
59+ , optNixShellOutput :: Bool
60+ , optFlags :: [String]
61+ , optCompiler :: CompilerId
62+ , optSystem :: Platform
63+ , optSubpath :: Maybe FilePath
64+ , optHackageSnapshot :: Maybe UTCTime
65+ , optNixpkgsIdentifier :: NixpkgsResolver
66+ , optUrl :: String
67+ , optFetchSubmodules :: Bool
68+ }
69+
70+options :: Parser Options
71+options = Options
72+ <$> optional (strOption $ long "sha256" <> metavar "HASH" <> help "sha256 hash of source tarball")
73+ <*> many (strOption $ long "maintainer" <> metavar "MAINTAINER" <> help "maintainer of this package (may be specified multiple times)")
74+-- <*> many (strOption $ long "platform" <> metavar "PLATFORM" <> help "supported build platforms (may be specified multiple times)")
75+ <*> flag True False (long "no-haddock" <> help "don't run Haddock when building this package")
76+ <*>
77+ (
78+ flag' ForceHpack (long "hpack" <> help "run hpack before configuring this package (only non-hackage packages)")
79+ <|>
80+ flag' NoHpack (long "no-hpack" <> help "disable hpack run and use only cabal disregarding package.yaml existence")
81+ <|>
82+ pure PackageYamlHpack
83+ )
84+ <*> flag True False (long "no-check" <> help "don't run regression test suites of this package")
85+ <*> switch (long "jailbreak" <> help "disregard version restrictions on build inputs")
86+ <*> switch (long "benchmark" <> help "enable benchmarks for this package")
87+ <*> optional (strOption $ long "revision" <> help "revision to use when fetching from VCS")
88+ <*> flag True False (long "no-hyperlink-source" <> help "don't generate pretty-printed source code for the documentation")
89+ <*> switch (long "enable-library-profiling" <> help "enable library profiling in the generated build")
90+ <*> switch (long "enable-executable-profiling" <> help "enable executable profiling in the generated build")
91+ <*> optional (switch (long "enable-profiling" <> help "enable both library and executable profiling in the generated build"))
92+ <*> many (strOption $ long "extra-arguments" <> help "extra parameters required for the function body")
93+ <*> optional (strOption $ long "hackage-db" <> metavar "PATH" <> help "path to the local hackage db in tar format")
94+ <*> switch (long "shell" <> help "generate output suitable for nix-shell")
95+ <*> many (strOption $ short 'f' <> long "flag" <> help "Cabal flag (may be specified multiple times)")
96+ <*> option parseCabal (long "compiler" <> help "compiler to use when evaluating the Cabal file" <> value buildCompilerId <> showDefaultWith prettyShow)
97+ <*> option (maybeReader parsePlatform) (long "system" <> help "host system (in either short Nix format or full LLVM style) to use when evaluating the Cabal file" <> value buildPlatform <> showDefaultWith prettyShow)
98+ <*> optional (strOption $ long "subpath" <> metavar "PATH" <> help "Path to Cabal file's directory relative to the URI (default is root directory)")
99+ <*> optional (option utcTimeReader (long "hackage-snapshot" <> help "hackage snapshot time, ISO format"))
100+ <*> pure (\i -> Just (binding # (i, path # [ident # "pkgs", i])))
101+ <*> strArgument (metavar "URI")
102+ <*> flag True False (long "dont-fetch-submodules" <> help "do not fetch git submodules from git sources")
103+
104+-- | A parser for the date. Hackage updates happen maybe once or twice a month.
105+-- Example: parseTime defaultTimeLocale "%FT%T%QZ" "2017-11-20T12:18:35Z" :: Maybe UTCTime
106+utcTimeReader :: ReadM UTCTime
107+utcTimeReader = eitherReader $ \arg ->
108+ case parseTimeM True defaultTimeLocale "%FT%T%QZ" arg of
109+ Nothing -> Left $ "Cannot parse date, ISO format used ('2017-11-20T12:18:35Z'): " ++ arg
110+ Just utcTime -> Right utcTime
111+
112+parseCabal :: Parsec a => ReadM a
113+parseCabal = eitherReader eitherParsec
114+
115+-- | Replicate the normalization performed by GHC_CONVERT_CPU in GHC's aclocal.m4
116+-- since the output of that is what Cabal parses.
117+ghcConvertArch :: String -> String
118+ghcConvertArch arch = case arch of
119+ "i486" -> "i386"
120+ "i586" -> "i386"
121+ "i686" -> "i386"
122+ "amd64" -> "x86_64"
123+ _ -> fromMaybe arch $ listToMaybe
124+ [prefix | prefix <- archPrefixes, prefix `isPrefixOf` arch]
125+ where archPrefixes =
126+ [ "aarch64", "alpha", "arm", "hppa1_1", "hppa", "m68k", "mipseb"
127+ , "mipsel", "mips", "powerpc64le", "powerpc64", "powerpc", "s390x"
128+ , "sparc64", "sparc"
129+ ]
130+
131+-- | Replicate the normalization performed by GHC_CONVERT_OS in GHC's aclocal.m4
132+-- since the output of that is what Cabal parses.
133+ghcConvertOS :: String -> String
134+ghcConvertOS os = case os of
135+ "watchos" -> "ios"
136+ "tvos" -> "ios"
137+ "linux-android" -> "linux-android"
138+ "linux-androideabi" -> "linux-androideabi"
139+ _ | "linux-" `isPrefixOf` os -> "linux"
140+ _ -> fromMaybe os $ listToMaybe
141+ [prefix | prefix <- osPrefixes, prefix `isPrefixOf` os]
142+ where osPrefixes =
143+ [ "gnu", "openbsd", "aix", "darwin", "solaris2", "freebsd", "nto-qnx"]
144+
145+parseArch :: String -> Arch
146+parseArch = classifyArch Permissive . ghcConvertArch
147+
148+parseOS :: String -> OS
149+parseOS = classifyOS Permissive . ghcConvertOS
150+
151+parsePlatform :: String -> Maybe Platform
152+parsePlatform = parsePlatformParts . splitOn "-"
153+
154+parsePlatformParts :: [String] -> Maybe Platform
155+parsePlatformParts = \case
156+ [arch, os] ->
157+ Just $ Platform (parseArch arch) (parseOS os)
158+ (arch : _ : osParts) ->
159+ Just $ Platform (parseArch arch) $ parseOS $ intercalate "-" osParts
160+ _ -> Nothing
161+
162+pinfo :: ParserInfo Options
163+pinfo = info
164+ ( helper
165+ <*> infoOption ("cabal2nix " ++ prettyShow version) (long "version" <> help "Show version number")
166+ <*> options
167+ )
168+ ( fullDesc
169+ <> header "cabal2nix converts Cabal files into build instructions for Nix."
170+ <> progDescDoc (Just (P2.vcat
171+ [ P2.text ""
172+ , P2.text "Recognized URI schemes:"
173+ , P2.text ""
174+ , P2.text " cabal://pkgname-pkgversion download the specified package from Hackage"
175+ , P2.text " cabal://pkgname download latest version of this package from Hackage"
176+ , P2.text " file:///local/path load the Cabal file from the local disk"
177+ , P2.text " /local/path abbreviated version of file URI"
178+ , P2.text " <git/svn/bzr/hg URL> download the source from the specified repository"
179+ , P2.text ""
180+ , P2.fillSep (map P2.text (words ( "If the URI refers to a cabal file, information for building the package "
181+ ++ "will be retrieved from that file, but hackage will be used as a source "
182+ ++ "for the derivation. Otherwise, the supplied URI will be used to as the "
183+ ++ "source for the derivation and the information is taken from the cabal file "
184+ ++ "at the root of the downloaded source."
185+ )))
186+ ]))
187+ )
188+
189+main :: IO ()
190+main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() ->
191+ cabal2nix =<< getArgs
192+
193+hpackOverrides :: Derivation -> Derivation
194+hpackOverrides = over phaseOverrides (++ "prePatch = \"hpack\";")
195+ . set (libraryDepends . tool . contains (PP.pkg "hpack")) True
196+
197+cabal2nix' :: Options -> IO (Either Doc Derivation)
198+cabal2nix' opts@Options{..} = do
199+ pkg <- getPackage optHpack optFetchSubmodules optHackageDb optHackageSnapshot $
200+ Source optUrl (fromMaybe "" optRevision) (maybe UnknownHash Guess optSha256) (fromMaybe "" optSubpath)
201+ processPackage opts pkg
202+
203+cabal2nixWithDB :: DB.HackageDB -> Options -> IO (Either Doc Derivation)
204+cabal2nixWithDB db opts@Options{..} = do
205+ when (isJust optHackageDb) $ hPutStrLn stderr "WARN: HackageDB provided directly; ignoring --hackage-db"
206+ when (isJust optHackageSnapshot) $ hPutStrLn stderr "WARN: HackageDB provided directly; ignoring --hackage-snapshot"
207+ pkg <- getPackage' optHpack optFetchSubmodules (return db) $
208+ Source optUrl (fromMaybe "" optRevision) (maybe UnknownHash Guess optSha256) (fromMaybe "" optSubpath)
209+ processPackage opts pkg
210+
211+processPackage :: Options -> Package -> IO (Either Doc Derivation)
212+processPackage Options{..} pkg = do
213+ let
214+ withHpackOverrides :: Derivation -> Derivation
215+ withHpackOverrides = if pkgRanHpack pkg then hpackOverrides else id
216+
217+ flags :: FlagAssignment
218+ flags = configureCabalFlags (packageId (pkgCabal pkg)) `mappend` readFlagList optFlags
219+
220+ deriv :: Derivation
221+ deriv = withHpackOverrides $ fromGenericPackageDescription (const True)
222+ optNixpkgsIdentifier
223+ optSystem
224+ (unknownCompilerInfo optCompiler NoAbiTag)
225+ flags
226+ []
227+ (pkgCabal pkg)
228+ & src .~ pkgSource pkg
229+ & subpath .~ fromMaybe "." optSubpath
230+ & runHaddock %~ (optHaddock &&)
231+ & jailbreak .~ optJailbreak
232+ & hyperlinkSource .~ optHyperlinkSource
233+ & enableLibraryProfiling .~ (fromMaybe False optEnableProfiling || optEnableLibraryProfiling)
234+ & enableExecutableProfiling .~ (fromMaybe False optEnableProfiling || optEnableExecutableProfiling)
235+ & metaSection.maintainers .~ Set.fromList (map (review ident) optMaintainer)
236+-- & metaSection.platforms .~ Set.fromList optPlatform
237+ & doCheck &&~ optDoCheck
238+ & doBenchmark ||~ optDoBenchmark
239+ & extraFunctionArgs %~ Set.union (Set.fromList ("inherit stdenv":map (fromString . ("inherit " ++)) optExtraArgs))
240+
241+ shell :: Doc
242+ shell = vcat
243+ [ text "{ nixpkgs ? import <nixpkgs> {}, compiler ? \"default\", doBenchmark ? false }:"
244+ , text ""
245+ , text "let"
246+ , text ""
247+ , text " inherit (nixpkgs) pkgs;"
248+ , text ""
249+ , hcat [ text " f = ", pPrint deriv, semi ]
250+ , text ""
251+ , text " haskellPackages = if compiler == \"default\""
252+ , text " then pkgs.haskellPackages"
253+ , text " else pkgs.haskell.packages.${compiler};"
254+ , text ""
255+ , text " variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;"
256+ , text ""
257+ , text " drv = variant (haskellPackages.callPackage f {});"
258+ , text ""
259+ , text "in"
260+ , text ""
261+ , text " if pkgs.lib.inNixShell then drv.env else drv"
262+ ]
263+ pure $ if optNixShellOutput then Left shell else Right deriv
264+
265+cabal2nix :: [String] -> IO ()
266+cabal2nix = parseArgs >=> cabal2nix' >=> putStrLn . either render prettyShow
267+
268+parseArgs :: [String] -> IO Options
269+parseArgs = handleParseResult . execParserPure defaultPrefs pinfo
270+
271+-- Utils
272+
273+readFlagList :: [String] -> FlagAssignment
274+readFlagList = mkFlagAssignment . map tagWithValue
275+ where tagWithValue ('-':fname) = (mkFlagName (lowercase fname), False)
276+ tagWithValue fname = (mkFlagName (lowercase fname), True)
src/Distribution/NixOS/Derivation/Cabal.hsdeleted−148
@@ -1,148 +0,0 @@
1−{-# LANGUAGE PatternGuards, CPP #-}
2−{- |
3− Module : Distribution.NixOS.Derivation.Cabal
4− License : BSD3
5−
6− Maintainer : nix-dev@cs.uu.nl
7− Stability : provisional
8− Portability : PatternGuards
9−
10− A represtation of Nix expressions based on Cabal builder defined in
11− @pkgs\/development\/libraries\/haskell\/cabal\/cabal.nix@.
12−-}
13−
14−module Distribution.NixOS.Derivation.Cabal
15− ( Derivation(..)
16− , parseDerivation
17− , module Distribution.NixOS.Derivation.Meta
18− , module Data.Version
19− )
20− where
21−
22−import Distribution.NixOS.Derivation.Meta
23−import Distribution.NixOS.PrettyPrinting
24−import Distribution.Text
25−import Distribution.Package
26−#ifdef __HADDOCK__
27−import Distribution.PackageDescription ( PackageDescription )
28−#endif
29−import Distribution.PackageDescription ( FlagAssignment, FlagName(..) )
30−import Data.Version
31−import Data.List
32−import Data.Char
33−import Data.Function
34−import Text.Regex.Posix hiding ( empty )
35−
36−-- | A represtation of Nix expressions for building Haskell packages.
37−-- The data type correspond closely to the definition of
38−-- 'PackageDescription' from Cabal.
39−--
40−-- Note that the "Text" instance definition provides pretty-printing,
41−-- but no parsing as of now!
42−
43−data Derivation = MkDerivation
44− { pname :: String
45− , version :: Version
46− , sha256 :: String
47− , isLibrary :: Bool
48− , isExecutable :: Bool
49− , buildDepends :: [String]
50− , testDepends :: [String]
51− , buildTools :: [String]
52− , extraLibs :: [String]
53− , pkgConfDeps :: [String]
54− , configureFlags :: [String]
55− , cabalFlags :: FlagAssignment
56− , runHaddock :: Bool
57− , jailbreak :: Bool
58− , doCheck :: Bool
59− , phaseOverrides :: String
60− , metaSection :: Meta
61− }
62− deriving (Show, Eq, Ord)
63−
64−instance Text Derivation where
65− disp = renderDerivation
66− parse = error "parsing Distribution.NixOS.Derivation.Cabal.Derivation is not supported yet"
67−
68−instance Package Derivation where
69− packageId deriv = PackageIdentifier (PackageName (pname deriv)) (version deriv)
70−
71−renderDerivation :: Derivation -> Doc
72−renderDerivation deriv = funargs (map text ("cabal" : inputs)) $$ vcat
73− [ text ""
74− , text "cabal.mkDerivation" <+> lparen <> text "self" <> colon <+> lbrace
75− , nest 2 $ vcat
76− [ attr "pname" $ string (pname deriv)
77− , attr "version" $ doubleQuotes (disp (version deriv))
78− , attr "sha256" $ string (sha256 deriv)
79− , boolattr "isLibrary" (not (isLibrary deriv) || isExecutable deriv) (isLibrary deriv)
80− , boolattr "isExecutable" (not (isLibrary deriv) || isExecutable deriv) (isExecutable deriv)
81− , listattr "buildDepends" (buildDepends deriv)
82− , listattr "testDepends" (testDepends deriv)
83− , listattr "buildTools" (buildTools deriv)
84− , listattr "extraLibraries" (extraLibs deriv)
85− , listattr "pkgconfigDepends" (pkgConfDeps deriv)
86− , onlyIf renderedFlags $ attr "configureFlags" $ doubleQuotes (sep renderedFlags)
87− , boolattr "noHaddock" (not (runHaddock deriv)) (not (runHaddock deriv))
88− , boolattr "jailbreak" (jailbreak deriv) (jailbreak deriv)
89− , boolattr "doCheck" (not (doCheck deriv)) (doCheck deriv)
90− , onlyIf (phaseOverrides deriv) $ vcat ((map text . lines) (phaseOverrides deriv))
91− , disp (metaSection deriv)
92− ]
93− , rbrace <> rparen
94− , text ""
95− ]
96− where
97− inputs = nub $ sortBy (compare `on` map toLower) $ filter (/="cabal") $ filter (not . isPrefixOf "self.") $
98− buildDepends deriv ++ testDepends deriv ++ buildTools deriv ++ extraLibs deriv ++ pkgConfDeps deriv
99− renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text f | (FlagName f, enable) <- cabalFlags deriv ]
100− ++ map text (configureFlags deriv)
101−
102−-- | A very incomplete parser that extracts 'pname', 'version',
103−-- 'sha256', 'platforms', 'maintainers', and 'runHaddock' from the given
104−-- Nix expression.
105−
106−parseDerivation :: String -> Maybe Derivation
107−parseDerivation buf
108− | buf =~ "cabal.mkDerivation"
109− , [name] <- buf `regsubmatch` "pname *= *\"([^\"]+)\""
110− , [vers'] <- buf `regsubmatch` "version *= *\"([^\"]+)\""
111− , Just vers <- simpleParse vers'
112− , [sha] <- buf `regsubmatch` "sha256 *= *\"([^\"]+)\""
113− , plats <- buf `regsubmatch` "platforms *= *([^;]+);"
114− , maint <- buf `regsubmatch` "maintainers *= *\\[([^\"]+)]"
115− , noHaddock <- buf `regsubmatch` "noHaddock *= *(true|false) *;"
116− , jailBreak <- buf `regsubmatch` "jailbreak *= *(true|false) *;"
117− , docheck <- buf `regsubmatch` "doCheck *= *(true|false) *;"
118− = Just MkDerivation
119− { pname = name
120− , version = vers
121− , sha256 = sha
122− , isLibrary = False
123− , isExecutable = False
124− , buildDepends = []
125− , testDepends = []
126− , buildTools = []
127− , extraLibs = []
128− , pkgConfDeps = []
129− , configureFlags = []
130− , cabalFlags = []
131− , runHaddock = noHaddock /= ["true"]
132− , jailbreak = jailBreak == ["true"]
133− , doCheck = docheck == ["true"] || docheck == []
134− , phaseOverrides = ""
135− , metaSection = Meta
136− { homepage = ""
137− , description = ""
138− , license = Unknown Nothing
139− , maintainers = concatMap words maint
140− , platforms = concatMap words (map (map (\c -> if c == '+' then ' ' else c)) plats)
141− }
142− }
143− | otherwise = Nothing
144−
145−regsubmatch :: String -> String -> [String]
146−regsubmatch buf patt = let (_,_,_,x) = f in x
147− where f :: (String,String,String,[String])
148− f = match (makeRegexOpts compExtended execBlank patt) buf
src/Distribution/NixOS/Derivation/License.hsdeleted−51
@@ -1,51 +0,0 @@
1−{- |
2− Module : Distribution.NixOS.Derivation.License
3− License : BSD3
4−
5− Maintainer : nix-dev@cs.uu.nl
6− Stability : provisional
7− Portability : portable
8−
9− Known licenses in Nix expressions are represented using the
10− attributes defined in @pkgs\/lib\/licenses.nix@, and unknown licenses
11− are represented as a literal string.
12− -}
13−
14−module Distribution.NixOS.Derivation.License ( License(..) ) where
15−
16−import Distribution.NixOS.PrettyPrinting
17−import Distribution.Text
18−
19−-- | The representation for licenses used in Nix derivations. Known
20−-- licenses are Nix expressions -- such as @stdenv.lib.licenses.bsd3@
21−-- --, so their exact \"name\" is not generally known, because the path
22−-- to @stdenv@ depends on the context defined in the expression. In
23−-- Cabal expressions, for example, the BSD3 license would have to be
24−-- referred to as @self.stdenv.lib.licenses.bsd3@. Other expressions,
25−-- however, use different paths to the @licenses@ record.. Because of
26−-- this station, this library cannot provide an abstract data type that
27−-- encompasses all known licenses. Instead, the @License@ type just
28−-- distinguishes references to known and unknown licenses. The
29−-- difference between the two is in the way they are pretty-printed:
30−--
31−-- > > putStrLn (display (Known "stdenv.lib.license.gpl2"))
32−-- > stdenv.lib.license.gpl2
33−-- >
34−-- > > putStrLn (display (Unknown (Just "GPL")))
35−-- > "GPL"
36−-- >
37−-- > > putStrLn (display (Unknown Nothing))
38−-- > "unknown"
39−--
40−-- Note that the "Text" instance definition provides pretty-printing,
41−-- but no parsing as of now!
42−
43−data License = Known String
44− | Unknown (Maybe String)
45− deriving (Show, Eq, Ord)
46−
47−instance Text License where
48− disp (Known x) = text x
49− disp (Unknown x) = string (maybe "unknown" id x)
50− parse = error "parsing Distribution.NixOS.Derivation.License is not supported yet"
51−
src/Distribution/NixOS/Derivation/Meta.hsdeleted−68
@@ -1,68 +0,0 @@
1−{- |
2− Module : Distribution.NixOS.Derivation.Meta
3− License : BSD3
4−
5− Maintainer : nix-dev@cs.uu.nl
6− Stability : provisional
7− Portability : portable
8−
9− A representation of the @meta@ section used in Nix expressions. A
10− detailed description can be found in section 4, \"Meta-attributes\",
11− of the Nixpkgs manual at <http://nixos.org/nixpkgs/docs.html>.
12− -}
13−
14−module Distribution.NixOS.Derivation.Meta
15− ( Meta(..)
16− , module Distribution.NixOS.Derivation.License
17− )
18− where
19−
20−import Distribution.NixOS.PrettyPrinting
21−import Distribution.NixOS.Derivation.License
22−import Distribution.Text
23−
24−-- | A representation of the @meta@ section used in Nix expressions.
25−--
26−-- > > putStrLn (display (Meta "http://example.org" "an example package" (Unknown Nothing)
27−-- > > ["stdenv.lib.platforms."++x | x<-["unix","cygwin"]]
28−-- > > ["stdenv.lib.maintainers."++x | x<-["joe","jane"]]))
29−-- > meta = {
30−-- > homepage = "http://example.org";
31−-- > description = "an example package";
32−-- > license = "unknown";
33−-- > platforms =
34−-- > stdenv.lib.platforms.unix ++ stdenv.lib.platforms.cygwin;
35−-- > maintainers = [ stdenv.lib.maintainers.joe stdenv.lib.maintainers.jane ];
36−-- > };
37−--
38−-- Note that the "Text" instance definition provides pretty-printing,
39−-- but no parsing as of now!
40−
41−data Meta = Meta
42− { homepage :: String -- ^ URL of the package homepage
43− , description :: String -- ^ short description of the package
44− , license :: License -- ^ licensing terms
45− , platforms :: [String] -- ^ list of supported platforms from @pkgs\/lib\/platforms.nix@
46− , maintainers :: [String] -- ^ list of maintainers from @pkgs\/lib\/maintainers.nix@
47− }
48− deriving (Show, Eq, Ord)
49−
50−instance Text Meta where
51− disp = renderMeta
52− parse = error "parsing Distribution.NixOS.Derivation.Cabal.Meta is not supported yet"
53−
54−renderMeta :: Meta -> Doc
55−renderMeta meta = vcat
56− [ text "meta" <+> equals <+> lbrace
57− , nest 2 $ vcat
58− [ onlyIf (homepage meta) $ attr "homepage" $ string (homepage meta)
59− , onlyIf (description meta) $ attr "description" $ string (description meta)
60− , attr "license" $ disp (license meta)
61− , onlyIf (platforms meta) $ sep
62− [ text "platforms" <+> equals
63− , nest 2 (fsep $ punctuate (text " ++") $ map text (platforms meta)) <> semi
64− ]
65− , listattr "maintainers" (maintainers meta)
66− ]
67− , rbrace <> semi
68− ]
src/Distribution/NixOS/PrettyPrinting.hsdeleted−56
@@ -1,56 +0,0 @@
1−{- |
2− Module : Distribution.NixOS.PrettyPrinting
3− License : BSD3
4−
5− Maintainer : nix-dev@cs.uu.nl
6− Stability : provisional
7− Portability : portable
8−
9− Internal pretty-printing helpers for Nix expressions.
10−-}
11−
12−module Distribution.NixOS.PrettyPrinting
13− ( onlyIf
14− , listattr
15− , boolattr
16− , attr
17− , string
18− , funargs
19− , module Text.PrettyPrint
20− )
21− where
22−
23−import Text.PrettyPrint
24−
25−attr :: String -> Doc -> Doc
26−attr n v = text n <+> equals <+> v <> semi
27−
28−onlyIf :: [a] -> Doc -> Doc
29−onlyIf p d = if not (null p) then d else empty
30−
31−boolattr :: String -> Bool -> Bool -> Doc
32−boolattr n p v = if p then attr n (bool v) else empty
33−
34−listattr :: String -> [String] -> Doc
35−listattr n vs = onlyIf vs $
36− sep [ text n <+> equals <+> lbrack,
37− nest 2 $ fsep $ map text vs,
38− rbrack <> semi
39− ]
40−
41−bool :: Bool -> Doc
42−bool True = text "true"
43−bool False = text "false"
44−
45−string :: String -> Doc
46−string = doubleQuotes . text
47−
48−prepunctuate :: Doc -> [Doc] -> [Doc]
49−prepunctuate _ [] = []
50−prepunctuate p (d:ds) = d : map (p <>) ds
51−
52−funargs :: [Doc] -> Doc
53−funargs xs = sep [
54− lbrace <+> fcat (prepunctuate (comma <> text " ") $ map (nest 2) xs),
55− rbrace <> colon
56− ]
src/Distribution/Nixpkgs/Fetch.hsnew file+193
@@ -0,0 +1,193 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE RecordWildCards #-}
3+{-# LANGUAGE ScopedTypeVariables #-}
4+{-# LANGUAGE DeriveGeneric #-}
5+
6+module Distribution.Nixpkgs.Fetch
7+ ( Source(..)
8+ , Hash(..)
9+ , DerivationSource(..), fromDerivationSource, urlDerivationSource
10+ , fetch
11+ , fetchWith
12+ ) where
13+
14+import Control.Applicative
15+import Control.DeepSeq
16+import Control.Monad
17+import Control.Monad.IO.Class
18+import Control.Monad.Trans.Maybe
19+import Data.Aeson
20+import qualified Data.ByteString.Lazy.Char8 as BS
21+import qualified Data.List as L
22+import Data.Maybe
23+import GHC.Generics ( Generic )
24+import Language.Nix.PrettyPrinting as PP
25+import System.Directory
26+import System.Environment
27+import System.Exit
28+import System.IO
29+import System.Process
30+
31+-- | A source is a location from which we can fetch, such as a HTTP URL, a GIT URL, ....
32+data Source = Source
33+ { sourceUrl :: String -- ^ URL to fetch from.
34+ , sourceRevision :: String -- ^ Revision to use. For protocols where this doesn't make sense (such as HTTP), this
35+ -- should be the empty string.
36+ , sourceHash :: Hash -- ^ The expected hash of the source, if available.
37+ , sourceCabalDir :: String -- ^ Directory where Cabal file is found.
38+ } deriving (Show, Eq, Ord, Generic)
39+
40+instance NFData Source
41+
42+data Hash = Certain String | Guess String | UnknownHash
43+ deriving (Show, Eq, Ord, Generic)
44+
45+instance NFData Hash
46+
47+isUnknown :: Hash -> Bool
48+isUnknown UnknownHash = True
49+isUnknown _ = False
50+
51+hashToList :: Hash -> [String]
52+hashToList (Certain s) = [s]
53+hashToList _ = []
54+
55+-- | A source for a derivation. It always needs a hash and also has a protocol attached to it (url, git, svn, ...).
56+-- A @DerivationSource@ also always has it's revision fully resolved (not relative revisions like @master@, @HEAD@, etc).
57+data DerivationSource = DerivationSource
58+ { derivKind :: String -- ^ The kind of the source. The name of the build-support fetch derivation should be fetch<kind>.
59+ , derivUrl :: String -- ^ URL to fetch from.
60+ , derivRevision :: String -- ^ Revision to use. Leave empty if the fetcher doesn't support revisions.
61+ , derivHash :: String -- ^ The hash of the source.
62+ , derivSubmodule :: Maybe Bool -- ^ The fetchSubmodule setting (if any)
63+ }
64+ deriving (Show, Eq, Ord, Generic)
65+
66+instance NFData DerivationSource
67+
68+instance FromJSON DerivationSource where
69+ parseJSON (Object o) = DerivationSource (error "undefined DerivationSource.kind")
70+ <$> o .: "url"
71+ <*> o .: "rev"
72+ <*> o .: "sha256"
73+ <*> o .: "fetchSubmodules"
74+ parseJSON _ = error "invalid DerivationSource"
75+
76+instance PP.Pretty DerivationSource where
77+ pPrint DerivationSource {..} =
78+ let isHackagePackage = "mirror://hackage/" `L.isPrefixOf` derivUrl
79+ fetched = derivKind /= ""
80+ in if isHackagePackage then attr "sha256" $ string derivHash
81+ else if not fetched then attr "src" $ text derivUrl
82+ else vcat
83+ [ text "src" <+> equals <+> text ("fetch" ++ derivKind) <+> lbrace
84+ , nest 2 $ vcat
85+ [ attr "url" $ string derivUrl
86+ , attr "sha256" $ string derivHash
87+ , if derivRevision /= "" then attr "rev" (string derivRevision) else PP.empty
88+ , boolattr "fetchSubmodules" (isJust derivSubmodule) (fromJust derivSubmodule)
89+ ]
90+ , rbrace PP.<> semi
91+ ]
92+
93+
94+urlDerivationSource :: String -> String -> DerivationSource
95+urlDerivationSource url hash = DerivationSource "url" url "" hash Nothing
96+
97+fromDerivationSource :: DerivationSource -> Source
98+fromDerivationSource DerivationSource{..} = Source derivUrl derivRevision (Certain derivHash) "."
99+
100+-- | Fetch a source, trying any of the various nix-prefetch-* scripts.
101+fetch :: forall a.
102+ Bool -- ^ If True, fetch submodules when the source is a git repository
103+ -> (String -> MaybeT IO a) -- ^ This function is passed the output path name as an argument.
104+ -- It should return 'Nothing' if the file doesn't match the expected format.
105+ -- This is required, because we cannot always check if a download succeeded otherwise.
106+ -> Source -- ^ The source to fetch from.
107+ -> IO (Maybe (DerivationSource, a)) -- ^ The derivation source and the result of the processing function. Returns Nothing if the download failed.
108+fetch optSubModules f = runMaybeT . fetchers where
109+ fetchers :: Source -> MaybeT IO (DerivationSource, a)
110+ fetchers source = msum . (fetchLocal source :) $ map (\fetcher -> fetchWith fetcher source >>= process)
111+ [ (False, "url", [])
112+ , (True, "git", ["--fetch-submodules" | optSubModules ])
113+ , (True, "hg", [])
114+ , (True, "svn", [])
115+ , (True, "bzr", [])
116+ ]
117+
118+ -- | Remove '/' from the end of the path. Nix doesn't accept paths that
119+ -- end in a slash.
120+ stripSlashSuffix :: String -> String
121+ stripSlashSuffix = reverse . dropWhile (== '/') . reverse
122+
123+ fetchLocal :: Source -> MaybeT IO (DerivationSource, a)
124+ fetchLocal src = do
125+ let path = stripSlashSuffix $ stripPrefix "file://" $ sourceUrl src
126+ existsFile <- liftIO $ doesFileExist path
127+ existsDir <- liftIO $ doesDirectoryExist path
128+ guard $ existsDir || existsFile
129+ let path' | '/' `elem` path = path
130+ | otherwise = "./" ++ path
131+ process (localDerivationSource path', path') <|> localArchive path'
132+
133+ localArchive :: FilePath -> MaybeT IO (DerivationSource, a)
134+ localArchive path = do
135+ absolutePath <- liftIO $ canonicalizePath path
136+ unpacked <- snd <$> fetchWith (False, "url", ["--unpack"]) (Source ("file://" ++ absolutePath) "" UnknownHash ".")
137+ process (localDerivationSource absolutePath, unpacked)
138+
139+ process :: (DerivationSource, FilePath) -> MaybeT IO (DerivationSource, a)
140+ process (derivSource, file) = (,) derivSource <$> f file
141+
142+ localDerivationSource p = DerivationSource "" p "" "" Nothing
143+
144+-- | Like 'fetch', but allows to specify which script to use.
145+fetchWith :: (Bool, String, [String]) -> Source -> MaybeT IO (DerivationSource, FilePath)
146+fetchWith (supportsRev, kind, addArgs) source = do
147+ unless ((sourceRevision source /= "") || isUnknown (sourceHash source) || not supportsRev) $
148+ liftIO (hPutStrLn stderr "** need a revision for VCS when the hash is given. skipping.") >> mzero
149+
150+ MaybeT $ liftIO $ do
151+ envs <- getEnvironment
152+ (Nothing, Just stdoutH, _, processH) <- createProcess (proc script args)
153+ { env = Just $ ("PRINT_PATH", "1") : envs
154+ , std_in = Inherit
155+ , std_err = Inherit
156+ , std_out = CreatePipe
157+ }
158+
159+ exitCode <- waitForProcess processH
160+ case exitCode of
161+ ExitFailure _ -> return Nothing
162+ ExitSuccess -> do
163+ buf <- BS.hGetContents stdoutH
164+ let (l,ls) = case reverse (BS.lines buf) of
165+ [] -> error "This can't happen, but GHC doesn't know that."
166+ (x:xs) -> (x,xs)
167+ buf' = BS.unlines (reverse ls)
168+ case length ls of
169+ 0 -> return Nothing
170+ 1 -> return (Just (DerivationSource { derivKind = kind
171+ , derivUrl = sourceUrl source
172+ , derivRevision = ""
173+ , derivHash = BS.unpack (head ls)
174+ , derivSubmodule = Nothing
175+ }
176+ , sourceUrl source))
177+ _ -> case eitherDecode buf' of
178+ Left err -> error ("invalid JSON: " ++ err ++ " in " ++ show buf')
179+ Right ds -> return (Just (ds { derivKind = kind }, BS.unpack l))
180+ where
181+
182+ script :: String
183+ script = "nix-prefetch-" ++ kind
184+
185+ args :: [String]
186+ args = addArgs ++ sourceUrl source : [ sourceRevision source | supportsRev ] ++ hashToList (sourceHash source)
187+
188+stripPrefix :: Eq a => [a] -> [a] -> [a]
189+stripPrefix prefix as
190+ | prefix' == prefix = stripped
191+ | otherwise = as
192+ where
193+ (prefix', stripped) = splitAt (length prefix) as
src/Distribution/Nixpkgs/Haskell.hsnew file+8
@@ -0,0 +1,8 @@
1+module Distribution.Nixpkgs.Haskell
2+ ( module Distribution.Nixpkgs.Haskell.BuildInfo
3+ , module Distribution.Nixpkgs.Haskell.Derivation
4+ )
5+ where
6+
7+import Distribution.Nixpkgs.Haskell.BuildInfo
8+import Distribution.Nixpkgs.Haskell.Derivation
src/Distribution/Nixpkgs/Haskell/BuildInfo.hsnew file+50
@@ -0,0 +1,50 @@
1+{-# LANGUAGE DeriveGeneric #-}
2+{-# LANGUAGE FlexibleInstances #-}
3+{-# LANGUAGE MultiParamTypeClasses #-}
4+{-# LANGUAGE TemplateHaskell #-}
5+
6+module Distribution.Nixpkgs.Haskell.BuildInfo
7+ ( BuildInfo
8+ , haskell, pkgconfig, system, tool, pPrintBuildInfo
9+ )
10+ where
11+
12+import Control.DeepSeq
13+import Control.Lens
14+import Data.Semigroup as Sem
15+import Data.Set ( Set )
16+import Data.Set.Lens
17+import GHC.Generics ( Generic )
18+import Language.Nix
19+import Language.Nix.PrettyPrinting hiding ( (<>) )
20+
21+data BuildInfo = BuildInfo
22+ { _haskell :: Set Binding
23+ , _pkgconfig :: Set Binding
24+ , _system :: Set Binding
25+ , _tool :: Set Binding
26+ }
27+ deriving (Show, Eq, Generic)
28+
29+makeLenses ''BuildInfo
30+
31+instance Each BuildInfo BuildInfo (Set Binding) (Set Binding) where
32+ each f (BuildInfo a b c d) = BuildInfo <$> f a <*> f b <*> f c <*> f d
33+
34+instance Sem.Semigroup BuildInfo where
35+ BuildInfo w1 x1 y1 z1 <> BuildInfo w2 x2 y2 z2 =
36+ BuildInfo (w1 <> w2) (x1 <> x2) (y1 <> y2) (z1 <> z2)
37+
38+instance Monoid BuildInfo where
39+ mempty = BuildInfo mempty mempty mempty mempty
40+ mappend = (Sem.<>)
41+
42+instance NFData BuildInfo
43+
44+pPrintBuildInfo :: String -> BuildInfo -> Doc
45+pPrintBuildInfo prefix bi = vcat
46+ [ setattr (prefix++"HaskellDepends") empty (setOf (haskell.folded.localName.ident) bi)
47+ , setattr (prefix++"SystemDepends") empty (setOf (system.folded.localName.ident) bi)
48+ , setattr (prefix++"PkgconfigDepends") empty (setOf (pkgconfig.folded.localName.ident) bi)
49+ , setattr (prefix++"ToolDepends") empty (setOf (tool.folded.localName.ident) bi)
50+ ]
src/Distribution/Nixpkgs/Haskell/Constraint.hsnew file+15
@@ -0,0 +1,15 @@
1+module Distribution.Nixpkgs.Haskell.Constraint
2+ ( Constraint, satisfiesConstraint, satisfiesConstraints
3+ ) where
4+
5+import Distribution.Package
6+import Distribution.Version
7+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
8+
9+type Constraint = Dependency
10+
11+satisfiesConstraint :: PackageIdentifier -> Constraint -> Bool
12+satisfiesConstraint (PackageIdentifier pn v) (Dependency cn vr _) = (pn /= cn) || (v `withinRange` vr)
13+
14+satisfiesConstraints :: PackageIdentifier -> [Constraint] -> Bool
15+satisfiesConstraints p = all (satisfiesConstraint p)
src/Distribution/Nixpkgs/Haskell/Derivation.hsnew file+155
@@ -0,0 +1,155 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE RecordWildCards #-}
4+{-# LANGUAGE TemplateHaskell #-}
5+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
6+
7+module Distribution.Nixpkgs.Haskell.Derivation
8+ ( Derivation, nullDerivation, pkgid, revision, src, subpath, isLibrary, isExecutable
9+ , extraFunctionArgs, libraryDepends, executableDepends, testDepends, configureFlags
10+ , cabalFlags, runHaddock, jailbreak, doCheck, doBenchmark, testTarget, hyperlinkSource, enableSplitObjs
11+ , enableLibraryProfiling, enableExecutableProfiling, phaseOverrides, editedCabalFile, metaSection
12+ , dependencies, setupDepends, benchmarkDepends, enableSeparateDataOutput
13+ )
14+ where
15+
16+import Control.DeepSeq
17+import Control.Lens
18+import Data.List ( isPrefixOf )
19+import Data.Set ( Set )
20+import qualified Data.Set as Set
21+import Data.Set.Lens
22+import Distribution.Nixpkgs.Fetch
23+import Distribution.Nixpkgs.Haskell.BuildInfo
24+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
25+import Distribution.Nixpkgs.Meta
26+import Distribution.Package
27+import Distribution.PackageDescription ( FlagAssignment, unFlagName, unFlagAssignment )
28+import GHC.Generics ( Generic )
29+import Language.Nix
30+import Language.Nix.PrettyPrinting
31+
32+#if MIN_VERSION_base(4,11,0)
33+import Prelude hiding ((<>))
34+#endif
35+
36+-- | A represtation of Nix expressions for building Haskell packages.
37+-- The data type correspond closely to the definition of
38+-- 'PackageDescription' from Cabal.
39+
40+data Derivation = MkDerivation
41+ { _pkgid :: PackageIdentifier
42+ , _revision :: Int
43+ , _src :: DerivationSource
44+ , _subpath :: FilePath
45+ , _isLibrary :: Bool
46+ , _isExecutable :: Bool
47+ , _extraFunctionArgs :: Set Binding
48+ , _setupDepends :: BuildInfo
49+ , _libraryDepends :: BuildInfo
50+ , _executableDepends :: BuildInfo
51+ , _testDepends :: BuildInfo
52+ , _benchmarkDepends :: BuildInfo
53+ , _configureFlags :: Set String
54+ , _cabalFlags :: FlagAssignment
55+ , _runHaddock :: Bool
56+ , _jailbreak :: Bool
57+ , _doCheck :: Bool
58+ , _doBenchmark :: Bool
59+ , _testTarget :: String
60+ , _hyperlinkSource :: Bool
61+ , _enableLibraryProfiling :: Bool
62+ , _enableExecutableProfiling :: Bool
63+ , _enableSplitObjs :: Bool
64+ , _phaseOverrides :: String
65+ , _editedCabalFile :: String
66+ , _enableSeparateDataOutput :: Bool
67+ , _metaSection :: Meta
68+ }
69+ deriving (Show, Eq, Generic)
70+
71+nullDerivation :: Derivation
72+nullDerivation = MkDerivation
73+ { _pkgid = error "undefined Derivation.pkgid"
74+ , _revision = error "undefined Derivation.revision"
75+ , _src = error "undefined Derivation.src"
76+ , _subpath = error "undefined Derivation.subpath"
77+ , _isLibrary = error "undefined Derivation.isLibrary"
78+ , _isExecutable = error "undefined Derivation.isExecutable"
79+ , _extraFunctionArgs = error "undefined Derivation.extraFunctionArgs"
80+ , _setupDepends = error "undefined Derivation.setupDepends"
81+ , _libraryDepends = error "undefined Derivation.libraryDepends"
82+ , _executableDepends = error "undefined Derivation.executableDepends"
83+ , _testDepends = error "undefined Derivation.testDepends"
84+ , _benchmarkDepends = error "undefined Derivation.benchmarkDepends"
85+ , _configureFlags = error "undefined Derivation.configureFlags"
86+ , _cabalFlags = error "undefined Derivation.cabalFlags"
87+ , _runHaddock = error "undefined Derivation.runHaddock"
88+ , _jailbreak = error "undefined Derivation.jailbreak"
89+ , _doCheck = error "undefined Derivation.doCheck"
90+ , _doBenchmark = error "undefined Derivation.doBenchmark"
91+ , _testTarget = error "undefined Derivation.testTarget"
92+ , _hyperlinkSource = error "undefined Derivation.hyperlinkSource"
93+ , _enableLibraryProfiling = error "undefined Derivation.enableLibraryProfiling"
94+ , _enableExecutableProfiling = error "undefined Derivation.enableExecutableProfiling"
95+ , _enableSplitObjs = error "undefined Derivation.enableSplitObjs"
96+ , _phaseOverrides = error "undefined Derivation.phaseOverrides"
97+ , _editedCabalFile = error "undefined Derivation.editedCabalFile"
98+ , _enableSeparateDataOutput = error "undefined Derivation.enableSeparateDataOutput"
99+ , _metaSection = error "undefined Derivation.metaSection"
100+ }
101+
102+makeLenses ''Derivation
103+
104+makeLensesFor [("_setupDepends", "dependencies"), ("_libraryDepends", "dependencies"), ("_executableDepends", "dependencies"), ("_testDepends", "dependencies"), ("_benchmarkDepends", "dependencies")] ''Derivation
105+
106+instance Package Derivation where
107+ packageId = view pkgid
108+
109+instance NFData Derivation
110+
111+instance Pretty Derivation where
112+ pPrint drv@MkDerivation {..} = funargs (map text ("mkDerivation" : toAscList inputs)) $$ vcat
113+ [ text "mkDerivation" <+> lbrace
114+ , nest 2 $ vcat
115+ [ attr "pname" $ doubleQuotes $ pPrint (packageName _pkgid)
116+ , attr "version" $ doubleQuotes $ pPrint (packageVersion _pkgid)
117+ , pPrint _src
118+ , onlyIf (_subpath /= ".") $ attr "postUnpack" postUnpack
119+ , onlyIf (_revision > 0) $ attr "revision" $ doubleQuotes $ int _revision
120+ , onlyIf (not (null _editedCabalFile) && _revision > 0) $ attr "editedCabalFile" $ string _editedCabalFile
121+ , listattr "configureFlags" empty (map (show . show) renderedFlags)
122+ , boolattr "isLibrary" (not _isLibrary || _isExecutable) _isLibrary
123+ , boolattr "isExecutable" (not _isLibrary || _isExecutable) _isExecutable
124+ , boolattr "enableSeparateDataOutput" _enableSeparateDataOutput _enableSeparateDataOutput
125+ , onlyIf (_setupDepends /= mempty) $ pPrintBuildInfo "setup" _setupDepends
126+ , onlyIf (_libraryDepends /= mempty) $ pPrintBuildInfo "library" _libraryDepends
127+ , onlyIf (_executableDepends /= mempty) $ pPrintBuildInfo "executable" _executableDepends
128+ , onlyIf (_testDepends /= mempty) $ pPrintBuildInfo "test" _testDepends
129+ , onlyIf (_benchmarkDepends /= mempty) $ pPrintBuildInfo "benchmark" _benchmarkDepends
130+ , boolattr "enableLibraryProfiling" _enableLibraryProfiling _enableLibraryProfiling
131+ , boolattr "enableExecutableProfiling" _enableExecutableProfiling _enableExecutableProfiling
132+ , boolattr "enableSplitObjs" (not _enableSplitObjs) _enableSplitObjs
133+ , boolattr "doHaddock" (not _runHaddock) _runHaddock
134+ , boolattr "jailbreak" _jailbreak _jailbreak
135+ , boolattr "doCheck" (not _doCheck) _doCheck
136+ , boolattr "doBenchmark" _doBenchmark _doBenchmark
137+ , onlyIf (not (null _testTarget)) $ attr "testTarget" $ string _testTarget
138+ , boolattr "hyperlinkSource" (not _hyperlinkSource) _hyperlinkSource
139+ , onlyIf (not (null _phaseOverrides)) $ vcat ((map text . lines) _phaseOverrides)
140+ , pPrint _metaSection
141+ ]
142+ , rbrace
143+ ]
144+ where
145+ inputs :: Set String
146+ inputs = Set.unions [ Set.map (view (localName . ident)) _extraFunctionArgs
147+ , setOf (dependencies . each . folded . localName . ident) drv
148+ , Set.fromList ["fetch" ++ derivKind _src | derivKind _src /= "" && not isHackagePackage]
149+ ]
150+
151+ renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text (unFlagName f) | (f, enable) <- unFlagAssignment _cabalFlags ]
152+ ++ map text (toAscList _configureFlags)
153+ isHackagePackage = "mirror://hackage/" `isPrefixOf` derivUrl _src
154+
155+ postUnpack = string $ "sourceRoot+=/" ++ _subpath ++ "; echo source root reset to $sourceRoot"
src/Distribution/Nixpkgs/Haskell/FromCabal.hsnew file+172
@@ -0,0 +1,172 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE RecordWildCards #-}
3+
4+module Distribution.Nixpkgs.Haskell.FromCabal
5+ ( HaskellResolver, NixpkgsResolver
6+ , fromGenericPackageDescription , finalizeGenericPackageDescription , fromPackageDescription
7+ ) where
8+
9+import Control.Lens
10+import Data.Maybe
11+import Data.Set ( Set )
12+import qualified Data.Set as Set
13+import Distribution.Compiler
14+import Distribution.Nixpkgs.Haskell
15+import qualified Distribution.Nixpkgs.Haskell as Nix
16+import Distribution.Nixpkgs.Haskell.Constraint
17+import Distribution.Nixpkgs.Haskell.FromCabal.License
18+import Distribution.Nixpkgs.Haskell.FromCabal.Name
19+import Distribution.Nixpkgs.Haskell.FromCabal.Normalize
20+import Distribution.Nixpkgs.Haskell.FromCabal.PostProcess (postProcess)
21+import qualified Distribution.Nixpkgs.License as Nix
22+import qualified Distribution.Nixpkgs.Meta as Nix
23+import Distribution.Package
24+import Distribution.PackageDescription
25+import qualified Distribution.PackageDescription as Cabal
26+import Distribution.PackageDescription.Configuration as Cabal
27+import Distribution.System
28+import Distribution.Text ( display )
29+import Distribution.Types.ComponentRequestedSpec as Cabal
30+import Distribution.Types.ExeDependency as Cabal
31+import Distribution.Types.LegacyExeDependency as Cabal
32+import Distribution.Types.PkgconfigDependency as Cabal
33+import Distribution.Types.UnqualComponentName as Cabal
34+import Distribution.Version
35+import Language.Nix
36+
37+type HaskellResolver = Dependency -> Bool
38+type NixpkgsResolver = Identifier -> Maybe Binding
39+
40+fromGenericPackageDescription :: HaskellResolver -> NixpkgsResolver -> Platform -> CompilerInfo -> FlagAssignment -> [Constraint] -> GenericPackageDescription -> Derivation
41+fromGenericPackageDescription haskellResolver nixpkgsResolver arch compiler flags constraints genDesc =
42+ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags descr
43+ where
44+ (descr, missingDeps) = finalizeGenericPackageDescription haskellResolver arch compiler flags constraints genDesc
45+
46+finalizeGenericPackageDescription :: HaskellResolver -> Platform -> CompilerInfo -> FlagAssignment -> [Constraint] -> GenericPackageDescription -> (PackageDescription, [Dependency])
47+finalizeGenericPackageDescription haskellResolver arch compiler flags constraints genDesc =
48+ let
49+ -- We have to call the Cabal finalizer several times with different resolver
50+ -- functions, and this convenience function makes our code shorter.
51+ finalize :: HaskellResolver -> Either [Dependency] (PackageDescription,FlagAssignment)
52+ finalize resolver = finalizePD flags requestedComponents resolver arch compiler constraints genDesc
53+
54+ requestedComponents :: ComponentRequestedSpec
55+ requestedComponents = ComponentRequestedSpec
56+ { testsRequested = True
57+ , benchmarksRequested = True
58+ }
59+
60+ jailbroken :: HaskellResolver -> HaskellResolver
61+ jailbroken resolver (Dependency pkg _ _) = resolver (Dependency pkg anyVersion mempty)
62+
63+ withInternalLibs :: HaskellResolver -> HaskellResolver
64+ withInternalLibs resolver d = depPkgName d `elem` internalNames || resolver d
65+
66+ internalNames :: [PackageName]
67+ internalNames = [ unqualComponentNameToPackageName n | (n,_) <- condSubLibraries genDesc ]
68+ ++ [ unqualComponentNameToPackageName n | LSubLibName n <- libName <$> subLibraries (packageDescription genDesc) ]
69+
70+ in case finalize (jailbroken (withInternalLibs haskellResolver)) of
71+ Left m -> case finalize (const True) of
72+ Left _ -> error ("Cabal cannot finalize " ++ display (packageId genDesc))
73+ Right (d,_) -> (d,m)
74+ Right (d,_) -> (d,[])
75+
76+fromPackageDescription :: HaskellResolver -> NixpkgsResolver -> [Dependency] -> FlagAssignment -> PackageDescription -> Derivation
77+fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags PackageDescription {..} = normalize $ postProcess $ nullDerivation
78+ & isLibrary .~ isJust library
79+ & pkgid .~ package
80+ & revision .~ xrev
81+ & isLibrary .~ isJust library
82+ & isExecutable .~ not (null executables)
83+ & extraFunctionArgs .~ mempty
84+ & libraryDepends .~ foldMap (convertBuildInfo . libBuildInfo) (maybeToList library ++ subLibraries)
85+ & executableDepends .~ mconcat (map (convertBuildInfo . buildInfo) executables)
86+ & testDepends .~ mconcat (map (convertBuildInfo . testBuildInfo) testSuites)
87+ & benchmarkDepends .~ mconcat (map (convertBuildInfo . benchmarkBuildInfo) benchmarks)
88+ & Nix.setupDepends .~ maybe mempty convertSetupBuildInfo setupBuildInfo
89+ & configureFlags .~ mempty
90+ & cabalFlags .~ flags
91+ & runHaddock .~ doHaddockPhase
92+ & jailbreak .~ False
93+ & doCheck .~ True
94+ & doBenchmark .~ False
95+ & testTarget .~ mempty
96+ & hyperlinkSource .~ True
97+ & enableSplitObjs .~ True
98+ & enableLibraryProfiling .~ False
99+ & enableExecutableProfiling .~ False
100+ & enableSeparateDataOutput .~ not (null dataFiles)
101+ & subpath .~ "."
102+ & phaseOverrides .~ mempty
103+ & editedCabalFile .~ (if xrev > 0
104+ then fromMaybe (error (display package ++ ": X-Cabal-File-Hash field is missing")) (lookup "X-Cabal-File-Hash" customFieldsPD)
105+ else "")
106+ & metaSection .~ ( Nix.nullMeta
107+ & Nix.homepage .~ homepage
108+ & Nix.description .~ synopsis
109+ & Nix.license .~ nixLicense
110+ & Nix.platforms .~ Nix.allKnownPlatforms
111+ & Nix.hydraPlatforms .~ (if isFreeLicense nixLicense then Nix.allKnownPlatforms else Set.empty)
112+ & Nix.maintainers .~ mempty
113+ & Nix.broken .~ not (null missingDeps)
114+ )
115+ where
116+ xrev = maybe 0 read (lookup "x-revision" customFieldsPD)
117+
118+ nixLicense :: Nix.License
119+ nixLicense = either fromSPDXLicense fromCabalLicense licenseRaw
120+
121+ resolveInHackage :: Identifier -> Binding
122+ resolveInHackage i | (i^.ident) `elem` [ unPackageName n | (Dependency n _ _) <- missingDeps ] = bindNull i
123+ | otherwise = binding # (i, path # ["self",i]) -- TODO: "self" shouldn't be hardcoded.
124+
125+ -- TODO: This is all very confusing. Haskell packages refer to the Nixpkgs
126+ -- derivation 'foo' as 'pkgs.foo', because they live in the 'haskellPackages'
127+ -- name space -- not on the top level. Therefore, we built our Nixpkgs lookup
128+ -- function so that top level names are returned as 'pkgs.foo'. As a result, we
129+ -- end up pre-pending that path to all kinds of names all over the place. I
130+ -- suppose the correct approach would be to assume that the lookup function
131+ -- returns names that live in the top-level and to adapt the code in
132+ -- PostProcess.hs et all to that fact.
133+ goodScopes :: Set [Identifier]
134+ goodScopes = Set.fromList (map ("pkgs":) [[], ["xorg"], ["xlibs"], ["gnome2"], ["gnome"], ["gnome3"], ["kde4"]])
135+
136+ resolveInNixpkgs :: Identifier -> Binding
137+ resolveInNixpkgs i
138+ | i `elem` ["clang","lldb","llvm"] = binding # (i, path # ["self","llvmPackages",i]) -- TODO: evil!
139+ | i == "gtk2" = binding # (i, path # ["pkgs","gtk2"]) -- TODO: these cases should not be necessary
140+ | i == "gtk3" = binding # (i, path # ["pkgs","gtk3"])
141+ | i == "gtksourceview3" = binding # (i, path # ["pkgs","gtksourceview3"])
142+ | i == "vte_291" = binding # (i, path # ["pkgs","vte"])
143+ | Just p <- nixpkgsResolver i, init (view (reference . path) p) `Set.member` goodScopes = p
144+ | otherwise = bindNull i
145+
146+ resolveInHackageThenNixpkgs :: Identifier -> Binding
147+ resolveInHackageThenNixpkgs i | haskellResolver (Dependency (mkPackageName (i^.ident)) anyVersion mempty) = resolveInHackage i
148+ | otherwise = resolveInNixpkgs i
149+
150+ internalLibNames :: [PackageName]
151+ internalLibNames = [ unqualComponentNameToPackageName n | LSubLibName n <- libName <$> subLibraries ]
152+
153+ doHaddockPhase :: Bool
154+ doHaddockPhase | not (null internalLibNames) = False
155+ | Just l <- library = not (null (exposedModules l))
156+ | otherwise = True
157+
158+ convertBuildInfo :: Cabal.BuildInfo -> Nix.BuildInfo
159+ convertBuildInfo Cabal.BuildInfo {..} | not buildable = mempty
160+ convertBuildInfo Cabal.BuildInfo {..} = mempty
161+ & haskell .~ Set.fromList [ resolveInHackage (toNixName x) | (Dependency x _ _) <- targetBuildDepends, x `notElem` internalLibNames ]
162+ & system .~ Set.fromList [ resolveInNixpkgs y | x <- extraLibs, y <- libNixName x ]
163+ & pkgconfig .~ Set.fromList [ resolveInNixpkgs y | PkgconfigDependency x _ <- pkgconfigDepends, y <- libNixName (unPkgconfigName x) ]
164+ & tool .~ Set.fromList (map resolveInHackageThenNixpkgs . concatMap buildToolNixName
165+ $ [ unPackageName x | ExeDependency x _ _ <- buildToolDepends ] ++ [ x | LegacyExeDependency x _ <- buildTools ])
166+
167+ convertSetupBuildInfo :: Cabal.SetupBuildInfo -> Nix.BuildInfo
168+ convertSetupBuildInfo bi = mempty
169+ & haskell .~ Set.fromList [ resolveInHackage (toNixName x) | (Dependency x _ _) <- Cabal.setupDepends bi ]
170+
171+bindNull :: Identifier -> Binding
172+bindNull i = binding # (i, path # ["null"])
src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration.hsnew file+106
@@ -0,0 +1,106 @@
1+{-# LANGUAGE RecordWildCards #-}
2+{-# LANGUAGE FlexibleInstances #-}
3+{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE DeriveGeneric #-}
5+{-# OPTIONS_GHC -fno-warn-orphans #-}
6+
7+module Distribution.Nixpkgs.Haskell.FromCabal.Configuration
8+ ( Configuration(..), readConfiguration, assertConsistency
9+ )
10+ where
11+
12+import Prelude hiding ( fail )
13+
14+import Control.DeepSeq
15+import Control.Exception ( throwIO )
16+import Control.Lens
17+import Control.Monad hiding ( fail )
18+import Control.Monad.Fail
19+import Data.Aeson
20+import Data.Map as Map
21+import Data.Set as Set
22+import Data.Text as T
23+import Data.Yaml
24+import Distribution.Compiler
25+import Distribution.Nixpkgs.Haskell.Constraint
26+import Distribution.Package
27+import Distribution.System
28+import GHC.Generics ( Generic )
29+import Language.Nix.Identifier
30+
31+data Configuration = Configuration
32+ {
33+ -- |Target compiler. Used by 'finalizePackageDescription' to choose
34+ -- appropriate flags and dependencies.
35+ compilerInfo :: CompilerInfo
36+
37+ -- |Compiler core packages that are also found on Hackage.
38+ , corePackages :: Set PackageIdentifier
39+
40+ -- |These packages replace the latest respective version during
41+ -- dependency resolution.
42+ , defaultPackageOverrides :: [Constraint]
43+
44+ -- |These packages are added to the generated set, but the play no
45+ -- role during dependency resolution.
46+ , extraPackages :: [Constraint]
47+
48+ -- |This information is used by the @hackage2nix@ utility to determine the
49+ -- 'maintainers' for a given Haskell package.
50+ , packageMaintainers :: Map Identifier (Set PackageName)
51+
52+ -- |These packages (by design) don't support certain platforms.
53+ , unsupportedPlatforms :: Map PackageName (Set Platform)
54+
55+ -- |These packages cannot be distributed by Hydra, i.e. because they have an
56+ -- unfree license or depend on other tools that cannot be distributed for
57+ -- some reason.
58+ , dontDistributePackages :: Set PackageName
59+
60+ -- |We know that these packages won't compile, so we mark them as broken and
61+ -- also disable their meta.hydraPlatforms attribute to avoid cluttering our
62+ -- Hydra job with lots of failure messages.
63+ , brokenPackages :: [Constraint]
64+ }
65+ deriving (Show, Generic)
66+
67+instance NFData Configuration
68+
69+instance FromJSON Configuration where
70+ parseJSON (Object o) = Configuration
71+ <$> o .:? "compiler" .!= unknownCompilerInfo buildCompilerId NoAbiTag
72+ <*> o .:? "core-packages" .!= mempty
73+ <*> o .:? "default-package-overrides" .!= mempty
74+ <*> o .:? "extra-packages" .!= mempty
75+ <*> o .:? "package-maintainers" .!= mempty
76+ <*> o .:? "unsupported-platforms" .!= mempty
77+ <*> o .:? "dont-distribute-packages" .!= mempty
78+ <*> o .:? "broken-packages" .!= mempty
79+ parseJSON _ = error "invalid Configuration"
80+
81+instance FromJSON Identifier where
82+ parseJSON (String s) = pure (review ident (T.unpack s))
83+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Nix identifier")
84+
85+instance FromJSONKey Identifier where
86+ fromJSONKey = FromJSONKeyText parseKey
87+
88+instance FromJSONKey PackageName where
89+ fromJSONKey = FromJSONKeyText parseKey
90+
91+parseKey :: FromJSON k => Text -> k
92+parseKey s = either error id (parseEither parseJSON (String s))
93+
94+readConfiguration :: FilePath -> IO Configuration
95+readConfiguration path = decodeFileEither path >>= either throwIO assertConsistency
96+
97+assertConsistency :: MonadFail m => Configuration -> m Configuration
98+assertConsistency cfg@Configuration {..} = do
99+ let report msg = fail ("*** configuration error: " ++ msg)
100+ maintainedPackages = Set.unions (Map.elems packageMaintainers)
101+ disabledPackages = dontDistributePackages `Set.union` Set.fromList (depPkgName <$> brokenPackages)
102+ disabledMaintainedPackages = maintainedPackages `Set.intersection` disabledPackages
103+ unless (Set.null disabledMaintainedPackages) $
104+ report ("disabled packages that have a maintainer: " ++ show disabledMaintainedPackages)
105+
106+ return cfg
src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hsnew file+68
@@ -0,0 +1,68 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+
3+module Distribution.Nixpkgs.Haskell.FromCabal.Flags ( configureCabalFlags ) where
4+
5+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
6+
7+import Data.Char
8+import Distribution.Package
9+import Distribution.PackageDescription
10+import Distribution.Version
11+
12+configureCabalFlags :: PackageIdentifier -> FlagAssignment
13+configureCabalFlags = mkFlagAssignment . configureCabalFlags'
14+
15+configureCabalFlags' :: PackageIdentifier -> [(FlagName,Bool)]
16+configureCabalFlags' (PackageIdentifier name version)
17+ | name == "accelerate-examples"= [disable "opencl"]
18+ | name == "arithmoi" = [disable "llvm"]
19+ | name == "bustle" = [disable "hgettext"] -- https://gitlab.freedesktop.org/bustle/bustle/issues/13
20+ | name == "cabal-plan" = [enable "exe"]
21+ | name == "cassava" = [disable "bytestring--lt-0_10_4"]
22+ | name == "darcs" = [enable "library", enable "force-char8-encoding"]
23+ | name == "diagrams-builder" = [enable "cairo", enable "svg", enable "ps", enable "rasterific"]
24+ | name == "fltkhs" = [enable "opengl"]
25+ | name == "folds" = [disable "test-hlint"]
26+ | name == "git-annex" = [ enable "assistant"
27+ , disable "benchmark"
28+ , enable "dbus"
29+ , disable "debuglocks"
30+ , enable "magicmime"
31+ , enable "networkbsd"
32+ , enable "pairing"
33+ , enable "production"
34+ , enable "s3"
35+ , enable "torrentparser"
36+ , enable "webapp"
37+ , enable "webdav"
38+ ]
39+ | name == "haskeline" = [enable "terminfo"]
40+ | name == "haste-compiler" = [enable "portable"]
41+ | name == "highlighting-kate" = [enable "pcre-light"]
42+ | name == "hlibsass" && version >= mkVersion [0,1,5]
43+ = [enable "externalLibsass"]
44+ | name == "hmatrix" = [enable "openblas", enable "disable-default-paths"]
45+ | name == "hslua" = [enable "system-lua", disable "use-pkgconfig"]
46+ | name == "idris" = [enable "gmp", enable "ffi", enable "curses", ("execonly", version `withinRange` orLaterVersion (mkVersion [1,1,1])) ]
47+ | name == "io-streams" = [enable "NoInteractiveTests"]
48+ | name == "liquid-fixpoint" = [enable "build-external"]
49+ | name == "pandoc" = [enable "https", disable "trypandoc"]
50+ | name == "pandoc-placetable" = [enable "inlineMarkdown"]
51+ | name == "persistent-sqlite" = [enable "systemlib"]
52+ | name == "reactive-banana-wx" = [disable "buildExamples"]
53+ | name == "snap-server" = [enable "openssl"]
54+ | name == "stack" = [enable "disable-git-info", enable "hide-dependency-versions", enable "supported-build"]
55+ | name == "xmobar" = [enable "with_alsa", enable "with_conduit", enable "with_datezone", enable "with_dbus", enable "with_inotify", enable "with_iwlib", enable "with_mpd", enable "with_mpris", enable "with_rtsopts", enable "with_threaded", enable "with_utf8", enable "with_uvmeter", enable "with_weather", enable "with_xft", enable "with_xpm"]
56+ | name == "xmonad-extras" = [disable "with_hlist", enable "with_split", enable "with_parsec"]
57+ | name == "yaml" = [("system-libyaml", version >= "0.10.1.1")]
58+ | name == "yi" = [enable "pango", enable "vty"]
59+ | otherwise = []
60+
61+enable :: String -> (FlagName,Bool)
62+enable name = (mkFlagName' name, True)
63+
64+disable :: String -> (FlagName,Bool)
65+disable name = (mkFlagName' name, False)
66+
67+mkFlagName' :: String -> FlagName
68+mkFlagName' = mkFlagName . map toLower
src/Distribution/Nixpkgs/Haskell/FromCabal/License.hsnew file+170
@@ -0,0 +1,170 @@
1+{-# LANGUAGE ViewPatterns #-}
2+
3+module Distribution.Nixpkgs.Haskell.FromCabal.License
4+ ( fromCabalLicense
5+ , fromSPDXLicense
6+ , isFreeLicense
7+ ) where
8+
9+import Data.List (intercalate)
10+import Distribution.License ( License(..), knownLicenses )
11+import Distribution.Nixpkgs.License
12+import Distribution.Pretty (prettyShow)
13+import qualified Distribution.SPDX as SPDX
14+import Distribution.Text (display)
15+import Distribution.Version
16+
17+-- TODO: Programmatically strip trailing zeros from license version numbers.
18+
19+fromCabalLicense :: Distribution.License.License -> Distribution.Nixpkgs.License.License
20+fromCabalLicense (GPL Nothing) = Unknown (Just "GPL")
21+fromCabalLicense (GPL (Just (versionNumbers -> [2]))) = Known "stdenv.lib.licenses.gpl2"
22+fromCabalLicense (GPL (Just (versionNumbers -> [3]))) = Known "stdenv.lib.licenses.gpl3"
23+fromCabalLicense (GPL (Just (versionNumbers -> [3,0]))) = Known "stdenv.lib.licenses.gpl3"
24+fromCabalLicense (LGPL Nothing) = Unknown (Just "LGPL")
25+fromCabalLicense (LGPL (Just (versionNumbers -> [2,1]))) = Known "stdenv.lib.licenses.lgpl21"
26+fromCabalLicense (LGPL (Just (versionNumbers -> [2]))) = Known "stdenv.lib.licenses.lgpl2"
27+fromCabalLicense (LGPL (Just (versionNumbers -> [3]))) = Known "stdenv.lib.licenses.lgpl3"
28+fromCabalLicense (LGPL (Just (versionNumbers -> [3,0]))) = Known "stdenv.lib.licenses.lgpl3"
29+fromCabalLicense (AGPL Nothing) = Unknown (Just "AGPL")
30+fromCabalLicense (AGPL (Just (versionNumbers -> [3]))) = Known "stdenv.lib.licenses.agpl3"
31+fromCabalLicense (AGPL (Just (versionNumbers -> [3,0]))) = Known "stdenv.lib.licenses.agpl3"
32+fromCabalLicense (MPL (versionNumbers -> [2,0])) = Known "stdenv.lib.licenses.mpl20"
33+fromCabalLicense BSD2 = Known "stdenv.lib.licenses.bsd2"
34+fromCabalLicense BSD3 = Known "stdenv.lib.licenses.bsd3"
35+fromCabalLicense BSD4 = Known "stdenv.lib.licenses.bsdOriginal"
36+fromCabalLicense MIT = Known "stdenv.lib.licenses.mit"
37+fromCabalLicense PublicDomain = Known "stdenv.lib.licenses.publicDomain"
38+fromCabalLicense UnspecifiedLicense = Known "stdenv.lib.licenses.unfree"
39+fromCabalLicense AllRightsReserved = Known "stdenv.lib.licenses.unfree"
40+fromCabalLicense (Apache Nothing) = Known "stdenv.lib.licenses.asl20"
41+fromCabalLicense (Apache (Just (versionNumbers -> [2,0]))) = Known "stdenv.lib.licenses.asl20"
42+fromCabalLicense ISC = Known "stdenv.lib.licenses.isc"
43+fromCabalLicense OtherLicense = Unknown Nothing
44+fromCabalLicense (UnknownLicense "CC0-1.0") = Known "stdenv.lib.licenses.cc0"
45+fromCabalLicense (UnknownLicense "BSD3ClauseORApache20") = Known "stdenv.lib.licenses.bsd3"
46+fromCabalLicense l = error $ "Distribution.Nixpkgs.Haskell.FromCabal.License.fromCabalLicense: unknown license"
47+ ++ show l ++"\nChoose one of: " ++ intercalate ", " (map display knownLicenses)
48+
49+fromSPDXLicense :: SPDX.License -> Distribution.Nixpkgs.License.License
50+fromSPDXLicense SPDX.NONE = Unknown Nothing
51+fromSPDXLicense (SPDX.License expr) =
52+ case expr of
53+ SPDX.ELicense simpl Nothing ->
54+ -- Not handled: license exceptions
55+ case simpl of
56+ SPDX.ELicenseId lid ->
57+ case lid of
58+ SPDX.AFL_2_1 -> Known "stdenv.lib.licenses.afl21"
59+ SPDX.AFL_3_0 -> Known "stdenv.lib.licenses.afl3"
60+ SPDX.AGPL_3_0_only -> Known "stdenv.lib.licenses.agpl3"
61+ SPDX.AGPL_3_0_or_later -> Known "stdenv.lib.licenses.agpl3Plus"
62+ SPDX.APSL_2_0 -> Known "stdenv.lib.licenses.apsl20"
63+ SPDX.Artistic_1_0 -> Known "stdenv.lib.licenses.artistic1"
64+ SPDX.Artistic_2_0 -> Known "stdenv.lib.licenses.artistic2"
65+ SPDX.Apache_2_0 -> Known "stdenv.lib.licenses.asl20"
66+ SPDX.BSL_1_0 -> Known "stdenv.lib.licenses.boost"
67+ SPDX.Beerware -> Known "stdenv.lib.licenses.beerware"
68+ SPDX.NullBSD -> Known "stdenv.lib.licenses.bsd0"
69+ SPDX.BSD_2_Clause -> Known "stdenv.lib.licenses.bsd2"
70+ SPDX.BSD_3_Clause -> Known "stdenv.lib.licenses.bsd3"
71+ SPDX.BSD_4_Clause -> Known "stdenv.lib.licenses.bsdOriginal"
72+ SPDX.ClArtistic -> Known "stdenv.lib.licenses.clArtistic"
73+ SPDX.CC0_1_0 -> Known "stdenv.lib.licenses.cc0"
74+ SPDX.CC_BY_NC_SA_2_0 -> Known "stdenv.lib.licenses.cc-by-nc-sa-20"
75+ SPDX.CC_BY_NC_SA_2_5 -> Known "stdenv.lib.licenses.cc-by-nc-sa-25"
76+ SPDX.CC_BY_NC_SA_3_0 -> Known "stdenv.lib.licenses.cc-by-nc-sa-30"
77+ SPDX.CC_BY_NC_SA_4_0 -> Known "stdenv.lib.licenses.cc-by-nc-sa-40"
78+ SPDX.CC_BY_NC_4_0 -> Known "stdenv.lib.licenses.cc-by-nc-40"
79+ SPDX.CC_BY_ND_3_0 -> Known "stdenv.lib.licenses.cc-by-nd-30"
80+ SPDX.CC_BY_SA_2_5 -> Known "stdenv.lib.licenses.cc-by-sa-25"
81+ SPDX.CC_BY_3_0 -> Known "stdenv.lib.licenses.cc-by-30"
82+ SPDX.CC_BY_SA_3_0 -> Known "stdenv.lib.licenses.cc-by-sa-30"
83+ SPDX.CC_BY_4_0 -> Known "stdenv.lib.licenses.cc-by-40"
84+ SPDX.CC_BY_SA_4_0 -> Known "stdenv.lib.licenses.cc-by-sa-40"
85+ SPDX.CDDL_1_0 -> Known "stdenv.lib.licenses.cddl"
86+ SPDX.CECILL_2_0 -> Known "stdenv.lib.licenses.cecill20"
87+ SPDX.CECILL_B -> Known "stdenv.lib.licenses.cecill-b"
88+ SPDX.CECILL_C -> Known "stdenv.lib.licenses.cecill-c"
89+ SPDX.CPAL_1_0 -> Known "stdenv.lib.licenses.cpal10"
90+ SPDX.CPL_1_0 -> Known "stdenv.lib.licenses.cpl10"
91+ SPDX.Curl -> Known "stdenv.lib.licenses.curl"
92+ SPDX.DOC -> Known "stdenv.lib.licenses.doc"
93+ SPDX.EFL_1_0 -> Known "stdenv.lib.licenses.efl10"
94+ SPDX.EFL_2_0 -> Known "stdenv.lib.licenses.efl20"
95+ SPDX.EPL_1_0 -> Known "stdenv.lib.licenses.epl10"
96+ SPDX.EPL_2_0 -> Known "stdenv.lib.licenses.epl20"
97+ SPDX.EUPL_1_1 -> Known "stdenv.lib.licenses.eupl11"
98+ SPDX.GFDL_1_2_only -> Known "stdenv.lib.licenses.fdl12"
99+ SPDX.GFDL_1_3_only -> Known "stdenv.lib.licenses.fdl13"
100+ SPDX.GPL_1_0_only -> Known "stdenv.lib.licenses.gpl1"
101+ SPDX.GPL_1_0_or_later -> Known "stdenv.lib.licenses.gpl1Plus"
102+ SPDX.GPL_2_0_only -> Known "stdenv.lib.licenses.gpl2"
103+ SPDX.GPL_2_0_or_later -> Known "stdenv.lib.licenses.gpl2Plus"
104+ SPDX.GPL_3_0_only -> Known "stdenv.lib.licenses.gpl3"
105+ SPDX.GPL_3_0_or_later -> Known "stdenv.lib.licenses.gpl3Plus"
106+ SPDX.HPND -> Known "stdenv.lib.licenses.hpnd"
107+ SPDX.IJG -> Known "stdenv.lib.licenses.ijg"
108+ SPDX.ImageMagick -> Known "stdenv.lib.licenses.imagemagick"
109+ SPDX.IPA -> Known "stdenv.lib.licenses.ipa"
110+ SPDX.IPL_1_0 -> Known "stdenv.lib.licenses.ipl10"
111+ SPDX.ISC -> Known "stdenv.lib.licenses.isc"
112+ SPDX.JasPer_2_0 -> Known "stdenv.lib.licenses.jasper"
113+ SPDX.LGPL_2_0_only -> Known "stdenv.lib.licenses.lgpl2"
114+ SPDX.LGPL_2_0_or_later -> Known "stdenv.lib.licenses.lgpl2Plus"
115+ SPDX.LGPL_2_1_only -> Known "stdenv.lib.licenses.lgpl21"
116+ SPDX.LGPL_2_1_or_later -> Known "stdenv.lib.licenses.lgpl21Plus"
117+ SPDX.LGPL_3_0_only -> Known "stdenv.lib.licenses.lgpl3"
118+ SPDX.LGPL_3_0_or_later -> Known "stdenv.lib.licenses.lgpl3Plus"
119+ SPDX.Libpng -> Known "stdenv.lib.licenses.libpng"
120+ SPDX.Libtiff -> Known "stdenv.lib.licenses.libtiff"
121+ SPDX.LPPL_1_2 -> Known "stdenv.lib.licenses.lppl12"
122+ SPDX.LPPL_1_3c -> Known "stdenv.lib.licenses.lppl13c"
123+ SPDX.LPL_1_02 -> Known "stdenv.lib.licenses.lpl-102"
124+ SPDX.MIT -> Known "stdenv.lib.licenses.mit"
125+ SPDX.MPL_1_0 -> Known "stdenv.lib.licenses.mpl10"
126+ SPDX.MPL_1_1 -> Known "stdenv.lib.licenses.mpl11"
127+ SPDX.MPL_2_0 -> Known "stdenv.lib.licenses.mpl20"
128+ SPDX.MS_PL -> Known "stdenv.lib.licenses.mspl"
129+ SPDX.NCSA -> Known "stdenv.lib.licenses.ncsa"
130+ SPDX.NPOSL_3_0 -> Known "stdenv.lib.licenses.nposl3"
131+ SPDX.OFL_1_1 -> Known "stdenv.lib.licenses.ofl"
132+ SPDX.OLDAP_2_8 -> Known "stdenv.lib.licenses.openldap"
133+ SPDX.OpenSSL -> Known "stdenv.lib.licenses.openssl"
134+ SPDX.OSL_2_1 -> Known "stdenv.lib.licenses.osl21"
135+ SPDX.OSL_3_0 -> Known "stdenv.lib.licenses.osl3"
136+ SPDX.PHP_3_01 -> Known "stdenv.lib.licenses.php201"
137+ SPDX.PostgreSQL -> Known "stdenv.lib.licenses.postgresql"
138+ SPDX.Python_2_0 -> Known "stdenv.lib.licenses.psfl"
139+ SPDX.QPL_1_0 -> Known "stdenv.lib.licenses.qpl"
140+ SPDX.Ruby -> Known "stdenv.lib.licenses.ruby"
141+ SPDX.Sendmail -> Known "stdenv.lib.licenses.sendmail"
142+ SPDX.SGI_B_2_0 -> Known "stdenv.lib.licenses.sgi-b-0"
143+ SPDX.Sleepycat -> Known "stdenv.lib.licenses.sleepycat"
144+ SPDX.TCL -> Known "stdenv.lib.licenses.tcltx"
145+ SPDX.Unlicense -> Known "stdenv.lib.licenses.unlicense"
146+ SPDX.Vim -> Known "stdenv.lib.licenses.vim"
147+ SPDX.VSL_1_0 -> Known "stdenv.lib.licenses.vsl10"
148+ SPDX.Watcom_1_0 -> Known "stdenv.lib.licenses.watcom"
149+ SPDX.W3C -> Known "stdenv.lib.licenses.w3c"
150+ SPDX.WTFPL -> Known "stdenv.lib.licenses.wtfpl"
151+ SPDX.Zlib -> Known "stdenv.lib.licenses.zlib"
152+ SPDX.ZPL_2_0 -> Known "stdenv.lib.licenses.zpl20"
153+ SPDX.ZPL_2_1 -> Known "stdenv.lib.licenses.zpl21"
154+ _ ->
155+ -- Licence is not in Nixpkgs.
156+ -- Use the SPDX expression as a free-form license string.
157+ Unknown (Just $ prettyShow expr)
158+ _ ->
159+ -- Not handed: the '+' suffix and user-defined licences references.
160+ -- Use the SPDX expression as a free-form license string.
161+ Unknown (Just $ prettyShow expr)
162+ _ ->
163+ -- Not handled: compound expressions, not expressible in Nixpkgs.
164+ -- Use the SPDX expression as a free-form license string.
165+ Unknown (Just $ prettyShow expr)
166+
167+isFreeLicense :: Distribution.Nixpkgs.License.License -> Bool
168+isFreeLicense (Known "stdenv.lib.licenses.unfree") = False
169+isFreeLicense (Unknown Nothing) = False
170+isFreeLicense _ = True
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hsnew file+225
@@ -0,0 +1,225 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+
3+module Distribution.Nixpkgs.Haskell.FromCabal.Name ( toNixName, libNixName, buildToolNixName ) where
4+
5+import Data.Maybe
6+import Data.String
7+import Distribution.Package
8+import Distribution.Text
9+import Language.Nix
10+
11+-- | Map Cabal names to Nix attribute names.
12+toNixName :: PackageName -> Identifier
13+toNixName "" = error "toNixName: invalid empty package name"
14+toNixName n = fromString (unPackageName n)
15+
16+-- | Map library names specified in Cabal files to Nix package identifiers.
17+--
18+-- TODO: This list should not be hard-coded here; it belongs into the Nixpkgs
19+-- repository.
20+--
21+-- TODO: Re-use hook matching system from PostProcess.hs here.
22+
23+libNixName :: String -> [Identifier]
24+libNixName "" = []
25+libNixName "adns" = return "adns"
26+libNixName "alsa" = return "alsaLib"
27+libNixName "alut" = return "freealut"
28+libNixName "appindicator-0.1" = return "libappindicator-gtk2"
29+libNixName "appindicator3-0.1" = return "libappindicator-gtk3"
30+libNixName "asound" = return "alsaLib"
31+libNixName "b2" = return "libb2"
32+libNixName "boost_context" = return "boost"
33+libNixName "bz2" = return "bzip2"
34+libNixName "c++" = [] -- What is that?
35+libNixName "cairo-gobject" = return "cairo"
36+libNixName "cairo-pdf" = return "cairo"
37+libNixName "cairo-ps" = return "cairo"
38+libNixName "cairo-svg" = return "cairo"
39+libNixName "crypt" = [] -- provided by glibc
40+libNixName "crypto" = return "openssl"
41+libNixName "curses" = return "ncurses"
42+libNixName "dbusmenu-glib-0.4" = return "libdbusmenu"
43+libNixName "dbusmenu-gtk3-0.4" = ["libdbusmenu-gtk3", "gtk3"]
44+libNixName "dl" = [] -- provided by glibc
45+libNixName "fftw3" = return "fftw"
46+libNixName "fftw3f" = return "fftwFloat"
47+libNixName "gconf" = return "GConf"
48+libNixName "gconf-2.0" = return "GConf"
49+libNixName "gdk-2.0" = return "gtk2"
50+libNixName "gdk-3.0" = return "gtk3"
51+libNixName "gdk-pixbuf-2.0" = return "gdk-pixbuf"
52+libNixName "gdk-x11-2.0" = return "gdk_x11"
53+libNixName "gdk-x11-3.0" = return "gtk3"
54+libNixName "gio-2.0" = return "glib"
55+libNixName "GL" = return "libGL"
56+libNixName "GLU" = ["libGLU","libGL"]
57+libNixName "glut" = ["freeglut","libGLU","libGL"]
58+libNixName "gnome-keyring" = return "gnome-keyring"
59+libNixName "gnome-keyring-1" = return "libgnome-keyring"
60+libNixName "gnome-vfs-2.0" = return "gnome-vfs"
61+libNixName "gnome-vfs-module-2.0" = return "gnome-vfs_module"
62+libNixName "gobject-2.0" = return "glib"
63+libNixName "gobject-introspection-1.0" = return "gobject-introspection"
64+libNixName "gstreamer-audio-0.10" = return "gst-plugins-base"
65+libNixName "gstreamer-audio-1.0" = return "gst-plugins-base"
66+libNixName "gstreamer-base-0.10" = return "gst-plugins-base"
67+libNixName "gstreamer-base-1.0" = return "gst-plugins-base"
68+libNixName "gstreamer-controller-0.10" = return "gstreamer"
69+libNixName "gstreamer-dataprotocol-0.10" = return "gstreamer"
70+libNixName "gstreamer-net-0.10" = return "gst-plugins-base"
71+libNixName "gstreamer-plugins-base-0.10" = return "gst-plugins-base"
72+libNixName "gstreamer-video-1.0" = return "gst-plugins-base"
73+libNixName "gthread-2.0" = return "glib"
74+libNixName "gtk+-2.0" = return "gtk2"
75+libNixName "gtk+-3.0" = return "gtk3"
76+libNixName "gtk-x11-2.0" = return "gtk_x11"
77+libNixName "gtksourceview-3.0" = return "gtksourceview3"
78+libNixName "hidapi-libusb" = return "hidapi"
79+libNixName "icudata" = return "icu"
80+libNixName "icui18n" = return "icu"
81+libNixName "icuuc" = return "icu"
82+libNixName "idn" = return "libidn"
83+libNixName "IL" = return "libdevil"
84+libNixName "ImageMagick" = return "imagemagick"
85+libNixName "Imlib2" = return "imlib2"
86+libNixName "iw" = return "wirelesstools"
87+libNixName "jack" = return "libjack2"
88+libNixName "javascriptcoregtk-3.0" = return "webkitgtk24x-gtk3" -- These are the old APIs, of which 2.4 is the last provider, so map directly to that.
89+libNixName "javascriptcoregtk-4.0" = return "webkitgtk"
90+libNixName "jpeg" = return "libjpeg"
91+libNixName "jvm" = return "jdk"
92+libNixName "lapack" = return "liblapack"
93+libNixName "lber" = return "openldap"
94+libNixName "ldap" = return "openldap"
95+libNixName "libavutil" = return "ffmpeg"
96+libNixName "libgsasl" = return "gsasl"
97+libNixName "libpcre" = return "pcre"
98+libNixName "libpcre2" = return "pcre2"
99+libNixName "libpcre2-8" = libNixName "libpcre2"
100+libNixName "libqrencode" = return "qrencode"
101+libNixName "libR" = return "R"
102+libNixName "libsoup-gnome-2.4" = return "libsoup"
103+libNixName "libsystemd" = return "systemd"
104+libNixName "libudev" = return "systemd"
105+libNixName "libxml-2.0" = return "libxml2"
106+libNixName "libzip" = return "libzip"
107+libNixName "libzmq" = return "zeromq"
108+libNixName "m" = [] -- in stdenv
109+libNixName "magic" = return "file"
110+libNixName "MagickWand" = return "imagemagick"
111+libNixName "mnl" = return "libmnl"
112+libNixName "mpi" = return "openmpi"
113+libNixName "ncursesw" = return "ncurses"
114+libNixName "netsnmp" = return "net_snmp"
115+libNixName "nix-expr" = return "nix"
116+libNixName "nix-main" = return "nix"
117+libNixName "nix-store" = return "nix"
118+libNixName "notify" = return "libnotify"
119+libNixName "odbc" = return "unixODBC"
120+libNixName "openblas" = return "openblasCompat"
121+libNixName "panelw" = return "ncurses"
122+libNixName "pangocairo" = return "pango"
123+libNixName "pcap" = return "libpcap"
124+libNixName "pfs-1.2" = return "pfstools"
125+libNixName "png" = return "libpng"
126+libNixName "poppler-glib" = return "poppler"
127+libNixName "pq" = return "postgresql"
128+libNixName "pthread" = []
129+libNixName "pulse" = return "libpulseaudio"
130+libNixName "pulse-simple" = return "libpulseaudio"
131+libNixName "python-3.3" = return "python33"
132+libNixName "python-3.4" = return "python34"
133+libNixName "Qt5Core" = return "qt5"
134+libNixName "Qt5Gui" = return "qt5"
135+libNixName "Qt5Qml" = return "qt5"
136+libNixName "Qt5Quick" = return "qt5"
137+libNixName "Qt5Widgets" = return "qt5"
138+libNixName "quadprog" = return "QuadProgpp"
139+libNixName "rt" = [] -- in glibc
140+libNixName "rtlsdr" = return "rtl-sdr"
141+libNixName "ruby1.8" = return "ruby"
142+libNixName "sass" = return "libsass"
143+libNixName "sctp" = return "lksctp-tools" -- This is linux-specific, we should create a common attribute if we ever add sctp support for other systems.
144+libNixName "sdl2" = return "SDL2"
145+libNixName "sndfile" = return "libsndfile"
146+libNixName "sodium" = return "libsodium"
147+libNixName "sqlite3" = return "sqlite"
148+libNixName "ssh2" = return "libssh2"
149+libNixName "ssl" = return "openssl"
150+libNixName "statgrab" = return "libstatgrab"
151+libNixName "stdc++" = [] -- What is that?
152+libNixName "stdc++.dll" = [] -- What is that?
153+libNixName "systemd-journal" = return "systemd"
154+libNixName "tag_c" = return "taglib"
155+libNixName "taglib_c" = return "taglib"
156+libNixName "tensorflow" = return "libtensorflow"
157+libNixName "udev" = return "systemd";
158+libNixName "uuid" = return "libossp_uuid";
159+libNixName "vte-2.91" = return "vte_291"
160+libNixName "wayland-client" = return "wayland"
161+libNixName "wayland-cursor" = return "wayland"
162+libNixName "wayland-egl" = return "libGL"
163+libNixName "wayland-server" = return "wayland"
164+libNixName "webkit2gtk" = return "webkitgtk"
165+libNixName "webkit2gtk-4.0" = return "webkitgtk"
166+libNixName "webkit2gtk-web-extension-4.0" = return "webkitgtk"
167+libNixName "webkitgtk-3.0" = return "webkitgtk24x-gtk3" -- These are the old APIs, of which 2.4 is the last provider, so map directly to that
168+libNixName "X11" = return "libX11"
169+libNixName "x11" = return "xlibsWrapper"
170+libNixName "xau" = return "libXau"
171+libNixName "Xcursor" = return "libXcursor"
172+libNixName "xerces-c" = return "xercesc"
173+libNixName "Xext" = return "libXext"
174+libNixName "xft" = return "libXft"
175+libNixName "Xi" = return "libXi"
176+libNixName "Xinerama" = return "libXinerama"
177+libNixName "xkbcommon" = return "libxkbcommon"
178+libNixName "xml2" = return "libxml2"
179+libNixName "Xpm" = return "libXpm"
180+libNixName "Xrandr" = return "libXrandr"
181+libNixName "Xrender" = return "libXrender"
182+libNixName "Xss" = return "libXScrnSaver"
183+libNixName "Xtst" = return "libXtst"
184+libNixName "Xxf86vm" = return "libXxf86vm"
185+libNixName "yaml" = return "libyaml"
186+libNixName "yaml-0.1" = return "libyaml"
187+libNixName "z" = return "zlib"
188+libNixName "zmq" = return "zeromq"
189+libNixName x = return (guessNixIdentifier x)
190+
191+-- | Map build tool names to Nix attribute names.
192+buildToolNixName :: String -> [Identifier]
193+buildToolNixName "" = return (error "buildToolNixName: invalid empty dependency name")
194+buildToolNixName "cabal" = return "cabal-install"
195+buildToolNixName "fltk-config" = return "fltk"
196+buildToolNixName "ghc" = []
197+buildToolNixName "gtk2hsC2hs" = return "gtk2hs-buildtools"
198+buildToolNixName "gtk2hsHookGenerator" = return "gtk2hs-buildtools"
199+buildToolNixName "gtk2hsTypeGen" = return "gtk2hs-buildtools"
200+buildToolNixName "hsc2hs" = []
201+buildToolNixName "nix-build" = return "nix"
202+buildToolNixName "nix-env" = return "nix"
203+buildToolNixName "nix-hash" = return "nix"
204+buildToolNixName "nix-instantiate" = return "nix"
205+buildToolNixName "nix-store" = return "nix"
206+buildToolNixName x = return (fromString x)
207+
208+-- | Helper function to extract the package name from a String that may or may
209+-- not be formatted like a Cabal package identifier.
210+--
211+-- >>> guessNixIdentifier "foo-1.0"
212+-- Identifier "foo"
213+-- >>> guessNixIdentifier "foo"
214+-- Identifier "foo"
215+-- >>> guessNixIdentifier "foo - 0"
216+-- Identifier "foo - 0"
217+-- >>> guessNixIdentifier "1foo-1.0"
218+-- Identifier "1foo"
219+-- >>> guessNixIdentifier "-foo-1.0"
220+-- Identifier "-foo-1.0"
221+
222+guessNixIdentifier :: String -> Identifier
223+guessNixIdentifier x = fromString (fromMaybe x maybePackageId)
224+ where
225+ maybePackageId = unPackageName . pkgName <$> simpleParse x
src/Distribution/Nixpkgs/Haskell/FromCabal/Normalize.hsnew file+43
@@ -0,0 +1,43 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+
3+module Distribution.Nixpkgs.Haskell.FromCabal.Normalize ( normalize ) where
4+
5+import Control.Lens
6+import qualified Data.Set as Set
7+import Data.String
8+import Distribution.Nixpkgs.Haskell
9+import Distribution.Nixpkgs.Meta
10+import Distribution.Package
11+import Language.Nix hiding ( quote )
12+
13+normalize :: Derivation -> Derivation
14+normalize drv = drv
15+ & over libraryDepends (normalizeBuildInfo (packageName drv))
16+ & over executableDepends (normalizeBuildInfo (packageName drv))
17+ & over testDepends (normalizeBuildInfo (packageName drv))
18+ & over benchmarkDepends (normalizeBuildInfo (packageName drv))
19+ & over metaSection normalizeMeta
20+ & jailbreak %~ (&& (packageName drv /= "jailbreak-cabal"))
21+
22+normalizeBuildInfo :: PackageName -> BuildInfo -> BuildInfo
23+normalizeBuildInfo pname bi = bi
24+ & haskell %~ Set.filter (\b -> view localName b /= fromString (unPackageName pname))
25+ & tool %~ Set.filter (\b -> view localName b /= fromString (unPackageName pname))
26+
27+normalizeMeta :: Meta -> Meta
28+normalizeMeta meta = meta
29+ & description %~ normalizeSynopsis
30+ & platforms %~ Set.intersection allKnownPlatforms
31+ & hydraPlatforms %~ (if meta^.broken then const Set.empty else Set.intersection (meta^.platforms))
32+
33+normalizeSynopsis :: String -> String
34+normalizeSynopsis desc
35+ | null desc = []
36+ | last desc == '.' && length (filter ('.'==) desc) == 1 = normalizeSynopsis (init desc)
37+ | otherwise = quote (unwords (words desc))
38+
39+quote :: String -> String
40+quote ('\\':c:cs) = '\\' : c : quote cs
41+quote ('"':cs) = '\\' : '"' : quote cs
42+quote (c:cs) = c : quote cs
43+quote [] = []
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hsnew file+409
@@ -0,0 +1,409 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE ScopedTypeVariables #-}
3+
4+module Distribution.Nixpkgs.Haskell.FromCabal.PostProcess ( postProcess, pkg ) where
5+
6+import Control.Lens
7+import Control.Monad.Trans.State
8+import Data.List.Split
9+import Data.Map ( Map )
10+import qualified Data.Map as Map
11+import Data.Map.Lens
12+import Data.Set ( Set )
13+import qualified Data.Set as Set
14+import Distribution.Nixpkgs.Haskell
15+import Distribution.Nixpkgs.Meta
16+import Distribution.Nixpkgs.License
17+import Distribution.Package
18+import Distribution.System
19+import Distribution.Text
20+import Distribution.Version
21+import Language.Nix
22+
23+postProcess :: Derivation -> Derivation
24+postProcess deriv =
25+ foldr (.) id [ f | (Dependency n vr _, f) <- hooks, packageName deriv == n, packageVersion deriv `withinRange` vr ]
26+ . fixGtkBuilds
27+ . fixBuildDependsForTools
28+ $ deriv
29+
30+fixGtkBuilds :: Derivation -> Derivation
31+fixGtkBuilds drv = drv & dependencies . pkgconfig %~ Set.filter (not . collidesWithHaskellName)
32+ & dependencies . system %~ Set.filter (not . collidesWithHaskellName)
33+ & dependencies . tool %~ Set.filter (not . collidesWithHaskellName)
34+ where
35+ collidesWithHaskellName :: Binding -> Bool
36+ collidesWithHaskellName b = case buildDeps Map.!? view localName b of
37+ Nothing -> False -- totally uncollided
38+ Just p -> p /= view reference b -- identical is not collision, and important to preserve for cross
39+
40+ myName :: Identifier
41+ myName = ident # unPackageName (packageName drv)
42+
43+ buildDeps :: Map Identifier Path
44+ buildDeps = Map.delete myName (toMapOf (dependencies . haskell . to Set.toList . traverse . binding . ifolded) drv)
45+
46+-- Per https://github.com/haskell/cabal/issues/5412 hvr considers
47+-- `build-depends` providing executables an accident, and fragile one at that,
48+-- unworthy of any compatibility hacks. But while he and the other Hackage
49+-- maintainers is dedicated to fixing executables and libraries on Hackage, test
50+-- suites and benchmarks are not a priority, as it is trivial to skip building
51+-- test-suites with cabal-install. Nix however wishes to build test suites much
52+-- more widely, so skipping those components is not an option.
53+--
54+-- Between that, and Stack not changing behavior as of
55+-- https://github.com/commercialhaskell/stack/pull/4132, it seems likely that
56+-- for a while packages scraped from Hackage will continue to improperly use
57+-- `build-depends: package-for-tool` instead of `build-tool-depends` (which does
58+-- also work for Stack). Until that changes, we provide do this to work around
59+-- those package's brokenness.
60+fixBuildDependsForTools :: Derivation -> Derivation
61+fixBuildDependsForTools = foldr (.) id
62+ [ fmap snd $ runState $ do
63+ needs <- use $ cloneLens c . haskell . contains p
64+ cloneLens c . tool . contains p ||= needs
65+ | (c :: ALens' Derivation BuildInfo) <- [ testDepends, benchmarkDepends ]
66+ , p <- self <$> [ "hspec-discover"
67+ , "tasty-discover"
68+ , "hsx2hs"
69+ , "markdown-unlit"
70+ ]
71+ ]
72+
73+hooks :: [(Dependency, Derivation -> Derivation)]
74+hooks =
75+ [ ("Agda < 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agdaPostInstall)
76+ , ("Agda >= 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agda25PostInstall)
77+ , ("alex < 3.1.5", set (testDepends . tool . contains (pkg "perl")) True)
78+ , ("alex", set (executableDepends . tool . contains (self "happy")) True)
79+ , ("alsa-core", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
80+ , ("bindings-GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"])))
81+ , ("bindings-lxc", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
82+ , ("bustle", bustleOverrides)
83+ , ("Cabal", set doCheck False) -- test suite doesn't work in Nix
84+ , ("Cabal >2.2", over (setupDepends . haskell) (Set.union (Set.fromList [self "mtl", self "parsec"]))) -- https://github.com/haskell/cabal/issues/5391
85+ , ("cabal-helper", set doCheck False) -- https://github.com/DanielG/cabal-helper/issues/17
86+ , ("cabal-install", set doCheck False . set phaseOverrides cabalInstallPostInstall)
87+ , ("cabal2nix > 2", cabal2nixOverrides)
88+ , ("darcs", set phaseOverrides darcsInstallPostInstall . set doCheck False)
89+ , ("dbus", set doCheck False) -- don't execute tests that try to access the network
90+ , ("dns", set testTarget "spec") -- don't execute tests that try to access the network
91+ , ("eventstore", over (metaSection . platforms) (Set.filter (\(Platform arch _) -> arch == X86_64)))
92+ , ("freenect < 1.2.1", over configureFlags (Set.union (Set.fromList ["--extra-include-dirs=${pkgs.freenect}/include/libfreenect", "--extra-lib-dirs=${pkgs.freenect}/lib"])))
93+ , ("fltkhs", set (libraryDepends . system . contains (pkg "fltk14")) True . over (libraryDepends . pkgconfig) (Set.union (pkgs ["libGLU", "libGL"]))) -- TODO: fltk14 belongs into the *setup* dependencies.
94+ , ("gf", set phaseOverrides gfPhaseOverrides . set doCheck False)
95+ , ("gi-cairo", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
96+ , ("gi-gdk", set runHaddock True )
97+ , ("gi-gio", set runHaddock True )
98+ , ("gi-glib", set runHaddock True )
99+ , ("gi-gst", giGstLibOverrides "gstreamer") -- https://github.com/haskell-gi/haskell-gi/issues/36
100+ , ("gi-gstaudio", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
101+ , ("gi-gstbase", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
102+ , ("gi-gstvideo", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
103+ , ("gi-gtk", set runHaddock True )
104+ , ("gi-javascriptcore < 4.0.0.0", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
105+ , ("gi-pango", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
106+ , ("gi-pango", set runHaddock True )
107+ , ("gi-pangocairo", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
108+ , ("gi-vte", set runHaddock True )
109+ , ("gi-webkit", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
110+ , ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
111+ , ("git", set doCheck False) -- https://github.com/vincenthz/hit/issues/33
112+ , ("git-annex >= 6.20170925 && < 6.20171214", set doCheck False) -- some versions of git-annex require their test suite to be run inside of a git checkout
113+ , ("git-annex", gitAnnexHook)
114+ , ("github-backup", set (executableDepends . tool . contains (pkg "git")) True)
115+ , ("GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"])))
116+ , ("GlomeVec", set (libraryDepends . pkgconfig . contains (bind "self.llvmPackages.llvm")) True)
117+ , ("graphviz", set (testDepends . system . contains (pkg "graphviz")) True)
118+ , ("gtk3", gtk3Hook)
119+ , ("gtkglext", gtkglextHook)
120+ , ("haddock", haddockHook) -- https://github.com/haskell/haddock/issues/511
121+ , ("hakyll", set (testDepends . tool . contains (pkg "utillinux")) True) -- test suite depends on "rev"
122+ , ("haskell-src-exts", set doCheck False)
123+ , ("hfsevents", hfseventsOverrides)
124+ , ("HFuse", set phaseOverrides hfusePreConfigure)
125+ , ("hlibgit2 >= 0.18.0.14", set (testDepends . tool . contains (pkg "git")) True)
126+ , ("hmatrix < 0.18.1.1", set phaseOverrides "preConfigure = \"sed -i hmatrix.cabal -e '/\\\\/usr\\\\//D'\";")
127+ , ("holy-project", set doCheck False) -- attempts to access the network
128+ , ("hoogle", set testTarget "--test-option=--no-net")
129+ , ("hsignal < 0.2.7.4", set phaseOverrides "prePatch = \"rm -v Setup.lhs\";") -- https://github.com/amcphail/hsignal/issues/1
130+ , ("hslua < 0.9.3", over (libraryDepends . system) (replace (pkg "lua") (pkg "lua5_1")))
131+ , ("hslua >= 0.9.3", over (libraryDepends . system) (replace (pkg "lua") (pkg "lua5_3")))
132+ , ("hspec-core >= 2.4.4", hspecCoreOverrides)
133+ , ("http-client", set doCheck False) -- attempts to access the network
134+ , ("http-client-openssl >= 0.2.0.1", set doCheck False) -- attempts to access the network
135+ , ("http-client-tls >= 0.2.2", set doCheck False) -- attempts to access the network
136+ , ("http-conduit", set doCheck False) -- attempts to access the network
137+ , ("imagemagick", set (libraryDepends . pkgconfig . contains (pkg "imagemagick")) True) -- https://github.com/NixOS/cabal2nix/issues/136
138+ , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (self "random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
139+ , ("js-jquery", set doCheck False) -- attempts to access the network
140+ , ("libconfig", over (libraryDepends . system) (replace "config = null" (pkg "libconfig")))
141+ , ("libxml", set (configureFlags . contains "--extra-include-dir=${libxml2.dev}/include/libxml2") True)
142+ , ("liquid-fixpoint", set (executableDepends . system . contains (pkg "ocaml")) True . set (testDepends . system . contains (pkg "z3")) True . set (testDepends . system . contains (pkg "nettools")) True . set (testDepends . system . contains (pkg "git")) True . set doCheck False)
143+ , ("liquidhaskell", set (testDepends . system . contains (pkg "z3")) True)
144+ , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)) . set (libraryDepends . haskell . contains (self "only-buildable-on-windows")) False)
145+ , ("MFlow < 4.6", set (libraryDepends . tool . contains (self "cpphs")) True)
146+ , ("mwc-random", set doCheck False)
147+ , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
148+ , ("network-attoparsec", set doCheck False) -- test suite requires network access
149+ , ("numeric-qq", set doCheck False) -- test suite doesn't finish even after 1+ days
150+ , ("opencv", opencvOverrides)
151+ , ("pandoc >= 1.16.0.2 && < 2.5", set doCheck False) -- https://github.com/jgm/pandoc/issues/2709 and https://github.com/fpco/stackage/issues/1332
152+ , ("pandoc < 2.6", pandocPre26Overrides)
153+ , ("pandoc >= 2.6", pandocOverrides)
154+ , ("pandoc-citeproc", set doCheck False) -- https://github.com/jgm/pandoc-citeproc/issues/369
155+ , ("purescript", set doCheck False) -- test suite doesn't cope with Nix build env
156+ , ("proto-lens-protobuf-types", set (libraryDepends . tool . contains (pkg "protobuf")) True)
157+ , ("proto-lens-protoc", set (libraryDepends . tool . contains (pkg "protobuf")) True)
158+ , ("qtah-cpp-qt5", set (libraryDepends . system . contains (bind "pkgs.qt5.qtbase")) True)
159+ , ("qtah-qt5", set (libraryDepends . tool . contains (bind "pkgs.qt5.qtbase")) True)
160+ , ("readline", over (libraryDepends . system) (Set.union (pkgs ["readline", "ncurses"])))
161+ , ("req", set doCheck False) -- test suite requires network access
162+ , ("sbv > 7", set (testDepends . system . contains (pkg "z3")) True)
163+ , ("sdr", over (metaSection . platforms) (Set.filter (\(Platform arch _) -> arch == X86_64))) -- https://github.com/adamwalker/sdr/issues/2
164+ , ("shake-language-c", set doCheck False) -- https://github.com/samplecount/shake-language-c/issues/26
165+ , ("ssh", set doCheck False) -- test suite runs forever, probably can't deal with our lack of network access
166+ , ("stack", set phaseOverrides stackOverrides . set doCheck False)
167+ , ("stripe-http-streams", set doCheck False . set (metaSection . broken) False)
168+ , ("target", set (testDepends . system . contains (pkg "z3")) True)
169+ , ("terminfo", set (libraryDepends . system . contains (pkg "ncurses")) True)
170+ , ("text", set doCheck False) -- break infinite recursion
171+ , ("tensorflow-proto", set (libraryDepends . tool . contains (pkg "protobuf")) True)
172+ , ("thyme", set (libraryDepends . tool . contains (self "cpphs")) True) -- required on Darwin
173+ , ("twilio", set doCheck False) -- attempts to access the network
174+ , ("tz", set phaseOverrides "preConfigure = \"export TZDIR=${pkgs.tzdata}/share/zoneinfo\";")
175+ , ("udev", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
176+ , ("webkitgtk3", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
177+ , ("webkitgtk3-javascriptcore", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
178+ , ("websockets", set doCheck False) -- https://github.com/jaspervdj/websockets/issues/104
179+ , ("Win32", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)))
180+ , ("Win32-shortcut", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)))
181+ , ("wxc", wxcHook)
182+ , ("wxcore", set (libraryDepends . pkgconfig . contains (pkg "wxGTK")) True)
183+ , ("X11", over (libraryDepends . system) (Set.union (Set.fromList $ map bind ["pkgs.xorg.libXinerama","pkgs.xorg.libXext","pkgs.xorg.libXrender","pkgs.xorg.libXScrnSaver"])))
184+ , ("xmonad >= 0.14.2", set phaseOverrides xmonadPostInstall)
185+ , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (self "zip") (pkg "zip")))
186+ , ("zip-archive >= 0.3.1 && < 0.3.2.3", over (testDepends . tool) (Set.union (Set.fromList [pkg "zip", pkg "unzip"]))) -- https://github.com/jgm/zip-archive/issues/35
187+ , ("zip-archive >= 0.4", set (testDepends . tool . contains (pkg "which")) True)
188+ ]
189+
190+pkg :: Identifier -> Binding
191+pkg i = binding # (i, path # ["pkgs",i])
192+
193+self :: Identifier -> Binding
194+self i = binding # (i, path # ["self",i])
195+
196+pkgs :: [Identifier] -> Set Binding
197+pkgs = Set.fromList . map pkg
198+
199+bind :: String -> Binding
200+bind s = binding # (i, path # is)
201+ where
202+ is = map (review ident) (splitOn "." s)
203+ i = last is
204+
205+-- | @replace old new bset@ replaces the Nix binding @old@ with @new@ in the
206+-- set of bindings @bset@. If @old@ is not found in @bset@, then the function
207+-- fails with an 'error'.
208+replace :: Binding -> Binding -> Set Binding -> Set Binding
209+replace old new bs
210+ | old `Set.member` bs = Set.insert new (Set.delete old bs)
211+ | otherwise = error (unwords [ "post-process: cannot replace name binding"
212+ , show old, "by", show new
213+ , "because it's not found in set"
214+ , show bs
215+ ])
216+
217+gtk3Hook :: Derivation -> Derivation -- https://github.com/NixOS/cabal2nix/issues/145
218+gtk3Hook = set (libraryDepends . pkgconfig . contains (pkg "gtk3")) True
219+ . over (libraryDepends . pkgconfig) (Set.filter (\b -> view localName b /= "gtk3"))
220+
221+haddockHook :: Derivation -> Derivation
222+haddockHook = set doCheck False
223+ . set phaseOverrides "preCheck = \"unset GHC_PACKAGE_PATH\";"
224+ . over (dependencies . haskell) (Set.filter (\b -> view localName b /= "haddock-test"))
225+ . set (metaSection . broken) False
226+
227+gitAnnexHook :: Derivation -> Derivation
228+gitAnnexHook = set phaseOverrides gitAnnexOverrides
229+ . over (executableDepends . system) (Set.union buildInputs)
230+ where
231+ gitAnnexOverrides = unlines
232+ [ "preConfigure = \"export HOME=$TEMPDIR; patchShebangs .\";"
233+ , "postBuild = ''"
234+ , " ln -sf dist/build/git-annex/git-annex git-annex"
235+ , " ln -sf git-annex git-annex-shell"
236+ , "'';"
237+ , "installPhase = \"make PREFIX=$out BUILDER=: install install-completions\";"
238+ , "checkPhase = ''PATH+=\":$PWD\" git-annex test'';"
239+ , "enableSharedExecutables = false;"
240+ ]
241+ buildInputs = pkgs ["git","rsync","gnupg","curl","wget","lsof","openssh","which","bup","perl"]
242+
243+hfusePreConfigure :: String
244+hfusePreConfigure = unlines
245+ [ "preConfigure = ''"
246+ , " sed -i -e \"s@ Extra-Lib-Dirs: /usr/local/lib@ Extra-Lib-Dirs: ${fuse}/lib@\" HFuse.cabal"
247+ , "'';"
248+ ]
249+
250+gfPhaseOverrides :: String
251+gfPhaseOverrides = unlines
252+ [ "postPatch = ''"
253+ , " sed -i \"s|\\\"-s\\\"|\\\"\\\"|\" ./Setup.hs"
254+ -- Disable silent compilation. Compiling takes long, it is best to see some
255+ -- output, otherwise it looks like the build step has stalled.
256+ , " sed -i \"s|numJobs (bf bi)++||\" ./Setup.hs"
257+ -- Parallel compilation fails. Disable it.
258+ , "'';"
259+ , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH'';"
260+ -- The build step itself, after having built the library, needs to be able
261+ -- to find the library it just built in order to compile grammar files.
262+ ]
263+
264+wxcHook :: Derivation -> Derivation
265+wxcHook drv = drv & libraryDepends . system %~ Set.union (Set.fromList [pkg "libGL", bind "pkgs.xorg.libX11"])
266+ & libraryDepends . pkgconfig . contains (pkg "wxGTK") .~ True
267+ & phaseOverrides .~ wxcPostInstall (packageVersion drv)
268+ & runHaddock .~ False
269+ where
270+ wxcPostInstall :: Version -> String
271+ wxcPostInstall version = unlines
272+ [ "postInstall = \"cp -v dist/build/libwxc.so." ++ display version ++ " $out/lib/libwxc.so\";"
273+ , "postPatch = \"sed -i -e '/ldconfig inst_lib_dir/d' Setup.hs\";"
274+ ]
275+
276+cabalInstallPostInstall :: String
277+cabalInstallPostInstall = unlines
278+ [ "postInstall = ''"
279+ , " mkdir $out/etc"
280+ , " mv bash-completion $out/etc/bash_completion.d"
281+ , "'';"
282+ ]
283+
284+darcsInstallPostInstall :: String
285+darcsInstallPostInstall = unlines
286+ [ "postInstall = ''"
287+ , " mkdir -p $out/etc/bash_completion.d"
288+ , " mv contrib/darcs_completion $out/etc/bash_completion.d/darcs"
289+ , "'';"
290+ ]
291+
292+xmonadPostInstall :: String
293+xmonadPostInstall = unlines
294+ [ "postInstall = ''"
295+ , " install -D man/xmonad.1 ''${!outputDoc}/share/man/man1/xmonad.1"
296+ , " install -D man/xmonad.hs ''${!outputDoc}/share/doc/$name/sample-xmonad.hs"
297+ , "'';"
298+ ]
299+
300+agdaPostInstall :: String
301+agdaPostInstall = unlines
302+ [ "postInstall = ''"
303+ , " $out/bin/agda -c --no-main $(find $data/share -name Primitive.agda)"
304+ , " $out/bin/agda-mode compile"
305+ , "'';"
306+ ]
307+
308+agda25PostInstall :: String
309+agda25PostInstall = unlines
310+ [ "postInstall = ''"
311+ , " files=(\"$data/share/ghc-\"*\"/\"*\"-ghc-\"*\"/Agda-\"*\"/lib/prim/Agda/\"{Primitive.agda,Builtin\"/\"*.agda})"
312+ -- Separate loops to avoid internal error
313+ , " for f in \"''${files[@]}\" ; do"
314+ , " $out/bin/agda $f"
315+ , " done"
316+ , " for f in \"''${files[@]}\" ; do"
317+ , " $out/bin/agda -c --no-main $f"
318+ , " done"
319+ , " $out/bin/agda-mode compile"
320+ , "'';"
321+ ]
322+
323+stackOverrides :: String
324+stackOverrides = unlines
325+ [ "preCheck = \"export HOME=$TMPDIR\";"
326+ , "postInstall = ''"
327+ , " exe=$out/bin/stack"
328+ , " mkdir -p $out/share/bash-completion/completions"
329+ , " $exe --bash-completion-script $exe >$out/share/bash-completion/completions/stack"
330+ , "'';"
331+ ]
332+
333+-- Replace a binding for <package> to one to pkgs.gst_all_1.<package>
334+giGstLibOverrides :: String -> Derivation -> Derivation
335+giGstLibOverrides package
336+ = over (libraryDepends . pkgconfig) (replace (pkg (ident # package)) (binding # (ident # package, path # ["pkgs","gst_all_1", ident # package])))
337+
338+giCairoPhaseOverrides :: Derivation -> Derivation
339+giCairoPhaseOverrides = over phaseOverrides (++txt)
340+ . set (libraryDepends . pkgconfig . contains (pkg "cairo")) True
341+ where
342+ txt = unlines [ "preCompileBuildDriver = ''"
343+ , " PKG_CONFIG_PATH+=\":${cairo}/lib/pkgconfig\""
344+ , " setupCompileFlags+=\" $(pkg-config --libs cairo-gobject)\""
345+ , "'';"
346+ ]
347+
348+hfseventsOverrides :: Derivation -> Derivation
349+hfseventsOverrides
350+ = set isLibrary True
351+ . over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == OSX))
352+ . set (libraryDepends . tool . contains (bind "pkgs.darwin.apple_sdk.frameworks.CoreServices")) True
353+ . set (libraryDepends . system . contains (bind "pkgs.darwin.apple_sdk.frameworks.Cocoa")) True
354+ . over (libraryDepends . haskell) (Set.union (Set.fromList (map bind ["self.base", "self.cereal", "self.mtl", "self.text", "self.bytestring"])))
355+
356+webkitgtk24xHook :: Derivation -> Derivation -- https://github.com/NixOS/cabal2nix/issues/145
357+webkitgtk24xHook = set (libraryDepends . pkgconfig . contains (pkg "webkitgtk24x-gtk3")) True
358+ . over (libraryDepends . pkgconfig) (Set.filter (\b -> view localName b /= "webkitgtk24x-gtk3"))
359+
360+opencvOverrides :: Derivation -> Derivation
361+opencvOverrides = set phaseOverrides "hardeningDisable = [ \"bindnow\" ];"
362+ . over (libraryDepends . pkgconfig) (replace (pkg "opencv") (pkg "opencv3"))
363+
364+hspecCoreOverrides :: Derivation -> Derivation -- https://github.com/hspec/hspec/issues/330
365+hspecCoreOverrides = set phaseOverrides "testTarget = \"--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'\";"
366+
367+cabal2nixOverrides :: Derivation -> Derivation
368+cabal2nixOverrides = set phaseOverrides $ unlines
369+ [ "preCheck = ''"
370+ , " export PATH=\"$PWD/dist/build/cabal2nix:$PATH\""
371+ , " export HOME=\"$TMPDIR/home\""
372+ , "'';"
373+ ]
374+
375+gtkglextHook :: Derivation -> Derivation
376+gtkglextHook = over (libraryDepends . system) (Set.union (Set.fromList deps))
377+ where
378+ deps :: [Binding]
379+ deps = bind <$> [ "pkgs.gtk2"
380+ , "pkgs.libGLU"
381+ , "pkgs.xorg.libSM"
382+ , "pkgs.xorg.libICE"
383+ , "pkgs.xorg.libXt"
384+ , "pkgs.xorg.libXmu"
385+ ]
386+
387+pandocPre26Overrides :: Derivation -> Derivation
388+pandocPre26Overrides = set phaseOverrides postInstall
389+ where
390+ postInstall = unlines [ "postInstall = ''"
391+ , " mkdir -p $out/share"
392+ , " mv $data/*/*/man $out/share/"
393+ , "'';"
394+ ]
395+
396+pandocOverrides :: Derivation -> Derivation
397+pandocOverrides = set phaseOverrides postInstall
398+ where
399+ postInstall = unlines [ "postInstall = ''"
400+ , " mkdir -p $out/share/man/man1"
401+ , " mv \"man/\"*.1 $out/share/man/man1/"
402+ , "'';"
403+ ]
404+
405+bustleOverrides :: Derivation -> Derivation
406+bustleOverrides = set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True
407+ . set (executableDepends . pkgconfig . contains "gio-unix = null") False
408+ . set (metaSection . license) (Known "stdenv.lib.licenses.lgpl21Plus")
409+ . set (metaSection . hydraPlatforms) allKnownPlatforms
src/Distribution/Nixpkgs/Haskell/Hackage.hsnew file+45
@@ -0,0 +1,45 @@
1+module Distribution.Nixpkgs.Haskell.Hackage
2+ ( HackageDB, PackageData, VersionData(..)
3+ , hackageTarball, readTarball, parsePackageData
4+ )
5+ where
6+
7+import Data.Map as Map
8+import qualified Distribution.Hackage.DB.Parsed as P
9+import Distribution.Hackage.DB.Path
10+import qualified Distribution.Hackage.DB.Unparsed as U
11+import Distribution.Nixpkgs.Hashes
12+import Distribution.Package
13+import Distribution.PackageDescription
14+import Distribution.Version
15+import OpenSSL.Digest
16+import Data.Time
17+
18+type HackageDB = Map PackageName PackageData
19+
20+type PackageData = Map Version VersionData
21+
22+data VersionData = VersionData
23+ { cabalFile :: !GenericPackageDescription
24+ , cabalFileSha256 :: !String
25+ , tarballSha256 :: !(Maybe String)
26+ }
27+ deriving (Show)
28+
29+readTarball :: Maybe UTCTime -> FilePath -> IO HackageDB
30+readTarball ts p = do
31+ dbu <- U.readTarball ts p
32+ let dbp = P.parseDB dbu
33+ return (mapWithKey (parsePackageData dbu) dbp)
34+
35+parsePackageData :: U.HackageDB -> PackageName -> P.PackageData -> PackageData
36+parsePackageData dbu pn = mapWithKey (parseVersionData (dbu ! pn))
37+
38+parseVersionData :: U.PackageData -> Version -> P.VersionData -> VersionData
39+parseVersionData pdu v vd = VersionData
40+ { cabalFile = P.cabalFile vd
41+ , cabalFileSha256 = printSHA256 (digest (digestByName "sha256") file)
42+ , tarballSha256 = Map.lookup "sha256" (P.tarballHashes vd)
43+ }
44+ where
45+ file = U.cabalFile (U.versions pdu ! v)
src/Distribution/Nixpkgs/Haskell/OrphanInstances.hsnew file+88
@@ -0,0 +1,88 @@
1+{-# OPTIONS_GHC -fno-warn-orphans #-}
2+
3+module Distribution.Nixpkgs.Haskell.OrphanInstances ( ) where
4+
5+import Control.DeepSeq
6+import Data.Maybe
7+import Data.String
8+import qualified Data.Text as T
9+import Data.Yaml
10+import Distribution.Compiler
11+import Distribution.Package
12+import Distribution.Parsec
13+import Distribution.System
14+import Distribution.Pretty as Cabal
15+import qualified Data.Version as Base
16+import Distribution.Version
17+import Language.Nix.PrettyPrinting as Nix
18+
19+instance NFData CompilerInfo
20+instance NFData AbiTag
21+
22+instance IsString Version where
23+ fromString = text2isString "Version"
24+
25+instance IsString VersionRange where
26+ fromString = text2isString "VersionRange"
27+
28+instance IsString PackageIdentifier where
29+ fromString = text2isString "PackageIdentifier"
30+
31+instance IsString Dependency where
32+ fromString = text2isString "Dependency"
33+
34+instance IsString CompilerId where
35+ fromString = text2isString "CompilerId"
36+
37+instance IsString Platform where
38+ fromString "i686-linux" = Platform I386 Linux
39+ fromString "x86_64-linux" = Platform X86_64 Linux
40+ fromString "x86_64-darwin" = Platform X86_64 OSX
41+ fromString s = error ("fromString: " ++ show s ++ " is not a valid platform")
42+
43+instance FromJSON Platform where
44+ parseJSON (String s) = pure (fromString (T.unpack s))
45+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid platform")
46+
47+instance FromJSON PackageName where
48+ parseJSON (String s) = return (fromString (T.unpack s))
49+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell package name")
50+
51+instance FromJSON PackageIdentifier where
52+ parseJSON (String s) = return (fromString (T.unpack s))
53+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell package identifier")
54+
55+instance FromJSON VersionRange where
56+ parseJSON (String s) = return (fromString (T.unpack s))
57+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Cabal VersionRange")
58+
59+instance FromJSON Dependency where
60+ parseJSON (String s) = return (fromString (T.unpack s))
61+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell Dependency")
62+
63+instance FromJSON CompilerInfo where
64+ parseJSON (String s) = return (unknownCompilerInfo (fromString (T.unpack s)) NoAbiTag)
65+ parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell compiler")
66+
67+instance Nix.Pretty Version where
68+ pPrint = pretty
69+
70+instance Nix.Pretty PackageName where
71+ pPrint = pretty
72+
73+instance Nix.Pretty PackageIdentifier where
74+ pPrint = pretty
75+
76+instance Nix.Pretty CompilerId where
77+ pPrint = pretty
78+
79+instance Nix.Pretty Platform where
80+ pPrint = pretty
81+
82+instance Nix.Pretty Base.Version where
83+ pPrint = text . Base.showVersion
84+
85+-- parsing tools
86+
87+text2isString :: Parsec a => String -> String -> a
88+text2isString t s = fromMaybe (error ("fromString: " ++ show s ++ " is not a valid " ++ t)) (simpleParsec s)
src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hsnew file+272
@@ -0,0 +1,272 @@
1+module Distribution.Nixpkgs.Haskell.PackageSourceSpec
2+ ( HpackUse(..), Package(..), getPackage, getPackage', loadHackageDB, sourceFromHackage
3+ ) where
4+
5+import qualified Control.Exception as Exception
6+import Control.Monad
7+import Control.Monad.IO.Class
8+import Control.Monad.Trans.Maybe
9+import Data.Bifunctor
10+import qualified Data.ByteString.Char8 as BS
11+import Data.List ( isSuffixOf, isPrefixOf )
12+import qualified Data.Map as DB
13+import Data.Maybe
14+import qualified Data.Text as T
15+import qualified Data.Text.Encoding as T
16+import Data.Time
17+import Distribution.Nixpkgs.Fetch
18+import Distribution.Nixpkgs.Hashes
19+import qualified Distribution.Nixpkgs.Haskell.Hackage as DB
20+import Distribution.Nixpkgs.Haskell.OrphanInstances ( )
21+import qualified Distribution.Package as Cabal
22+import Distribution.PackageDescription
23+import qualified Distribution.PackageDescription as Cabal
24+import Distribution.PackageDescription.Parsec as Cabal
25+import Distribution.Parsec
26+import Distribution.Version
27+import qualified Hpack.Config as Hpack
28+import qualified Hpack.Render as Hpack
29+import OpenSSL.Digest ( digest, digestByName )
30+import System.Directory ( doesDirectoryExist, doesFileExist, createDirectoryIfMissing, getHomeDirectory, getDirectoryContents )
31+import System.Exit ( exitFailure )
32+import System.FilePath ( (</>), (<.>) )
33+import System.IO
34+import Text.PrettyPrint.HughesPJClass hiding ( first )
35+
36+data HpackUse
37+ = ForceHpack
38+ | PackageYamlHpack
39+ | NoHpack
40+
41+data Package = Package
42+ { pkgSource :: DerivationSource
43+ , pkgRanHpack :: Bool -- ^ If hpack generated a new cabal file
44+ , pkgCabal :: Cabal.GenericPackageDescription
45+ }
46+ deriving (Show)
47+
48+getPackage :: HpackUse
49+ -- ^ the way hpack should be used.
50+ -> Bool
51+ -- ^ Whether to fetch submodules if fetching from git
52+ -> Maybe FilePath
53+ -- ^ The path to the Hackage database.
54+ -> Maybe UTCTime
55+ -- ^ If we have hackage-snapshot time.
56+ -> Source
57+ -> IO Package
58+getPackage optHpack optSubmodules optHackageDB optHackageSnapshot =
59+ getPackage' optHpack optSubmodules (loadHackageDB optHackageDB optHackageSnapshot)
60+
61+getPackage' :: HpackUse
62+ -- ^ the way hpack should be used.
63+ -> Bool
64+ -- ^ Whether to fetch submodules if fetching from git
65+ -> IO DB.HackageDB
66+ -> Source
67+ -> IO Package
68+getPackage' optHpack optSubmodules hackageDB source = do
69+ (derivSource, ranHpack, pkgDesc) <- fetchOrFromDB optHpack optSubmodules hackageDB source
70+ (\s -> Package s ranHpack pkgDesc) <$> maybe (sourceFromHackage (sourceHash source) (showPackageIdentifier pkgDesc) $ sourceCabalDir source) return derivSource
71+
72+fetchOrFromDB :: HpackUse
73+ -- ^ the way hpack should be used
74+ -> Bool
75+ -- ^ Whether to fetch submodules if fetching from git
76+ -> IO DB.HackageDB
77+ -> Source
78+ -> IO (Maybe DerivationSource, Bool, Cabal.GenericPackageDescription)
79+fetchOrFromDB optHpack optSubmodules hackageDB src
80+ | "cabal://" `isPrefixOf` sourceUrl src = do
81+ (msrc, pkgDesc) <- fromDB hackageDB . drop (length "cabal://") $ sourceUrl src
82+ return (msrc, False, pkgDesc)
83+ | otherwise = do
84+ r <- fetch optSubmodules (\dir -> cabalFromPath optHpack (dir </> sourceCabalDir src)) src
85+ case r of
86+ Nothing -> fail $ "Failed to fetch source. Does this source exist? " ++ show src
87+ Just (derivSource, (externalSource, ranHpack, pkgDesc)) ->
88+ return (derivSource <$ guard externalSource, ranHpack, pkgDesc)
89+
90+loadHackageDB :: Maybe FilePath
91+ -- ^ The path to the Hackage database.
92+ -> Maybe UTCTime
93+ -- ^ If we have hackage-snapshot time.
94+ -> IO DB.HackageDB
95+loadHackageDB optHackageDB optHackageSnapshot = do
96+ dbPath <- maybe DB.hackageTarball return optHackageDB
97+ DB.readTarball optHackageSnapshot dbPath
98+
99+fromDB :: IO DB.HackageDB
100+ -> String
101+ -> IO (Maybe DerivationSource, Cabal.GenericPackageDescription)
102+fromDB hackageDBIO pkg = do
103+ hackageDB <- hackageDBIO
104+ vd <- maybe unknownPackageError return (DB.lookup name hackageDB >>= lookupVersion)
105+ let ds = case DB.tarballSha256 vd of
106+ Nothing -> Nothing
107+ Just hash -> Just (urlDerivationSource url hash)
108+ return (ds, setCabalFileHash (DB.cabalFileSha256 vd) (DB.cabalFile vd))
109+ where
110+ pkgId :: Cabal.PackageIdentifier
111+ pkgId = fromMaybe (error ("invalid Haskell package id " ++ show pkg)) (simpleParsec pkg)
112+ name = Cabal.packageName pkgId
113+
114+ unknownPackageError = fail $ "No such package " ++ prettyShow pkgId ++ " in the cabal database. Did you run cabal update?"
115+
116+ url = "mirror://hackage/" ++ prettyShow pkgId ++ ".tar.gz"
117+
118+ version :: Version
119+ version = Cabal.packageVersion pkgId
120+
121+ lookupVersion :: DB.Map Version DB.VersionData -> Maybe DB.VersionData
122+ -- No version is specified, pick latest one
123+ lookupVersion m | version == nullVersion = fmap snd (listToMaybe (DB.toDescList m))
124+ lookupVersion m = DB.lookup version m
125+
126+readFileMay :: FilePath -> IO (Maybe String)
127+readFileMay file = do
128+ e <- doesFileExist file
129+ if e
130+ then Just <$> readFile file
131+ else return Nothing
132+
133+hashCachePath :: String -> IO String
134+hashCachePath pid = do
135+ home <- getHomeDirectory
136+ let cacheDir = home </> ".cache/cabal2nix"
137+ createDirectoryIfMissing True cacheDir
138+ return $ cacheDir </> pid <.> "sha256"
139+
140+sourceFromHackage :: Hash -> String -> FilePath -> IO DerivationSource
141+sourceFromHackage optHash pkgId cabalDir = do
142+ cacheFile <- hashCachePath pkgId
143+ cachedHash <-
144+ case optHash of
145+ Certain h -> return . Certain $ h
146+ Guess h -> return . Guess $ h
147+ _ -> fmap (maybe UnknownHash Certain) . readFileMay $ cacheFile
148+ let url = "mirror://hackage/" ++ pkgId ++ ".tar.gz"
149+
150+ -- Use the cached hash (either from cache file or given on cmdline via sha256 opt)
151+ -- if available, otherwise download from hackage to compute hash.
152+ case cachedHash of
153+ Guess hash -> return $ urlDerivationSource url hash
154+ Certain hash ->
155+ -- We need to force the hash here. If we didn't do this, then when reading the
156+ -- hash from the cache file, the cache file will still be open for reading
157+ -- (because lazy io) when writeFile opens the file again for writing. By forcing
158+ -- the hash here, we ensure that the file is closed before opening it again.
159+ seq (length hash) $
160+ urlDerivationSource url hash <$ writeFile cacheFile hash
161+ UnknownHash -> do
162+ maybeHash <- runMaybeT (derivHash . fst <$> fetchWith (False, "url", []) (Source url "" UnknownHash cabalDir))
163+ case maybeHash of
164+ Just hash ->
165+ seq (length hash) $
166+ urlDerivationSource url hash <$ writeFile cacheFile hash
167+ Nothing -> do
168+ hPutStr stderr $ unlines
169+ [ "*** cannot compute hash. (Not a hackage project?)"
170+ , " If your project is not on hackage, please supply the path to the root directory of"
171+ , " the project, not to the cabal file."
172+ , ""
173+ , " If your project is on hackage but you still want to specify the hash manually, you"
174+ , " can use the --sha256 option."
175+ ]
176+ exitFailure
177+
178+showPackageIdentifier :: Cabal.GenericPackageDescription -> String
179+showPackageIdentifier pkgDesc = name ++ "-" ++ prettyShow version where
180+ pkgId = Cabal.package . Cabal.packageDescription $ pkgDesc
181+ name = Cabal.unPackageName (Cabal.packageName pkgId)
182+ version = Cabal.packageVersion pkgId
183+
184+cabalFromPath :: HpackUse -- ^ the way hpack should be used
185+ -> FilePath -> MaybeT IO (Bool, Bool, Cabal.GenericPackageDescription)
186+cabalFromPath optHpack path = do
187+ d <- liftIO $ doesDirectoryExist path
188+ if d
189+ then do
190+ (ranHpack, pkg) <- cabalFromDirectory optHpack path
191+ return (d, ranHpack, pkg)
192+ else (,,) d False <$> cabalFromFile False path
193+
194+cabalFromDirectory :: HpackUse -- ^ the way hpack should be used
195+ -> FilePath -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
196+cabalFromDirectory ForceHpack dir = hpackDirectory dir
197+cabalFromDirectory NoHpack dir = onlyCabalFromDirectory dir "*** No .cabal file was found. Exiting."
198+cabalFromDirectory PackageYamlHpack dir = do
199+ useHpack <- liftIO $ doesFileExist (dir </> "package.yaml")
200+ if useHpack
201+ then do
202+ liftIO $ hPutStrLn stderr "*** found package.yaml. Using hpack..."
203+ hpackDirectory dir
204+ else onlyCabalFromDirectory dir "*** Found neither a .cabal file nor package.yaml. Exiting."
205+
206+onlyCabalFromDirectory :: FilePath -> String -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
207+onlyCabalFromDirectory dir errMsg = do
208+ cabals <- liftIO $ getDirectoryContents dir >>= filterM doesFileExist . map (dir </>) . filter (".cabal" `isSuffixOf`)
209+ case cabals of
210+ [] -> fail errMsg
211+ [cabalFile] -> (,) False <$> cabalFromFile True cabalFile
212+ _ -> liftIO $ fail ("*** found more than one cabal file (" ++ show cabals ++ "). Exiting.")
213+
214+handleIO :: (Exception.IOException -> IO a) -> IO a -> IO a
215+handleIO = Exception.handle
216+
217+encodeUtf8 :: String -> BS.ByteString
218+encodeUtf8 = T.encodeUtf8 . T.pack
219+
220+hpackDirectory :: FilePath -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
221+hpackDirectory dir = do
222+ mPackage <- liftIO $ Hpack.readPackageConfig Hpack.defaultDecodeOptions {
223+ Hpack.decodeOptionsProgramName = Hpack.ProgramName "cabal2nix"
224+ , Hpack.decodeOptionsTarget = dir </> Hpack.packageConfig
225+ }
226+ case mPackage of
227+ Left err -> liftIO $ hPutStrLn stderr ("*** hpack error: " ++ show err ++ ". Exiting.") >> exitFailure
228+ Right r -> do
229+ let hpackOutput =
230+ let body = Hpack.renderPackage [] (Hpack.decodeResultPackage r)
231+ cabalVersion = Hpack.decodeResultCabalVersion r
232+ in encodeUtf8 $ cabalVersion ++ body
233+ hash = printSHA256 $ digest (digestByName "sha256") hpackOutput
234+ case runParseGenericPackageDescription "<hpack output>" hpackOutput of
235+ Left msg -> liftIO $ do
236+ hPutStrLn stderr "*** hpack output:"
237+ BS.hPutStrLn stderr hpackOutput
238+ hPutStrLn stderr "*** cannot parse hpack output:"
239+ hPutStrLn stderr msg
240+ fail "*** Exiting."
241+ Right pkg -> MaybeT $ return $ Just $ (,) True $ setCabalFileHash hash pkg
242+
243+cabalFromFile :: Bool -> FilePath -> MaybeT IO Cabal.GenericPackageDescription
244+cabalFromFile failHard file =
245+ -- hGetContents throws an error if it's used on files which contain sequences
246+ -- that do not represent valid characters. To catch that exception, we need to
247+ -- wrap the whole block in `catchIO`.
248+ MaybeT $ handleIO (\err -> Nothing <$ hPutStrLn stderr ("*** parsing cabal file: " ++ show err)) $ do
249+ buf <- BS.readFile file
250+ let hash = printSHA256 (digest (digestByName "sha256") buf)
251+ case runParseGenericPackageDescription file buf of
252+ Left msg | failHard -> liftIO $ do
253+ hPutStrLn stderr $ "*** cannot parse " ++ show file ++ ":"
254+ hPutStrLn stderr msg
255+ fail "*** Exiting."
256+ Left _ -> return Nothing
257+ Right pkg -> return $ Just $ setCabalFileHash hash pkg
258+
259+runParseGenericPackageDescription
260+ :: FilePath
261+ -> BS.ByteString
262+ -> Either String Cabal.GenericPackageDescription
263+runParseGenericPackageDescription fpath
264+ = first (unlines . fmap (showPError fpath) . snd)
265+ . snd . runParseResult
266+ . parseGenericPackageDescription
267+
268+setCabalFileHash :: String -> GenericPackageDescription -> GenericPackageDescription
269+setCabalFileHash sha256 gpd = gpd { packageDescription = (packageDescription gpd) {
270+ customFieldsPD = ("X-Cabal-File-Hash", sha256) : customFieldsPD (packageDescription gpd)
271+ }
272+ }
src/Hackage4Nix.hsdeleted−214
@@ -1,214 +0,0 @@
1−module Main ( main ) where
2−
3−import Cabal2Nix.Normalize
4−import Cabal2Nix.Generate
5−import Control.Exception ( bracket )
6−import Control.Monad.RWS
7−import Data.List
8−import Data.Maybe
9−import qualified Data.Set as Set
10−import Data.Version
11−import qualified Distribution.Hackage.DB as DB
12−import Distribution.NixOS.Derivation.Cabal
13−import Distribution.Package
14−import Distribution.PackageDescription ( GenericPackageDescription() )
15−import Distribution.Text
16−import System.Console.GetOpt ( OptDescr(..), ArgDescr(..), ArgOrder(..), usageInfo, getOpt )
17−import System.Directory
18−import System.Environment
19−import System.Exit
20−import System.FilePath
21−import System.IO
22−import Text.Regex.Posix
23−
24−data Pkg = Pkg Derivation FilePath Bool
25− deriving (Show, Eq, Ord)
26−
27−type PkgSet = Set.Set Pkg
28−
29−data Configuration = Configuration
30− { _msgDebug :: String -> IO ()
31− , _msgInfo :: String -> IO ()
32− , _hackageDb :: DB.Hackage
33− }
34−
35−defaultConfiguration :: Configuration
36−defaultConfiguration = Configuration
37− { _msgDebug = hPutStrLn stderr
38− , _msgInfo = hPutStrLn stderr
39− , _hackageDb = DB.empty
40− }
41−
42−type Hackage4Nix a = RWST Configuration () PkgSet IO a
43−
44−io :: (MonadIO m) => IO a -> m a
45−io = liftIO
46−
47−readDirectory :: FilePath -> IO [FilePath]
48−readDirectory dirpath = do
49− entries <- getDirectoryContents dirpath
50− return [ x | x <- entries, x /= ".", x /= ".." ]
51−
52−msgDebug, msgInfo :: String -> Hackage4Nix ()
53−msgDebug msg = ask >>= \s -> io (_msgDebug s msg)
54−msgInfo msg = ask >>= \s -> io (_msgInfo s msg)
55−
56−getCabalPackage :: String -> Version -> Hackage4Nix GenericPackageDescription
57−getCabalPackage name vers = do
58− db <- asks _hackageDb
59− case DB.lookup name db of
60− Just db' -> case DB.lookup vers db' of
61− Just pkg -> return pkg
62− Nothing -> fail ("hackage doesn't know about " ++ name ++ " version " ++ display vers)
63− Nothing -> fail ("hackage doesn't know about " ++ show name)
64−
65−discoverNixFiles :: (FilePath -> Hackage4Nix ()) -> FilePath -> Hackage4Nix ()
66−discoverNixFiles yield dirOrFile = do
67− isFile <- io (doesFileExist dirOrFile)
68− case (isFile, takeExtension dirOrFile) of
69− (True,".nix") -> yield dirOrFile
70− (True,_) -> return ()
71− (False,_) -> io (readDirectory dirOrFile) >>= mapM_ (discoverNixFiles yield . (dirOrFile </>))
72−
73−regenerateDerivation :: Derivation -> String -> Bool
74−regenerateDerivation deriv buf = (pname deriv `notElem` patchedPackages) &&
75− not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
76−
77−parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
78−parseNixFile path buf
79− | not (buf =~ "cabal.mkDerivation")
80− = msgDebug ("ignore non-cabal package " ++ path) >> return Nothing
81− | any (`isSuffixOf`path) badPackagePaths
82− = msgDebug ("ignore known bad package " ++ path) >> return Nothing
83− | buf =~ "src = (fetchurl|fetchgit|sourceFromHead)"
84− = msgDebug ("ignore non-hackage package " ++ path) >> return Nothing
85− | Just deriv <- parseDerivation buf
86− = return (Just (Pkg deriv path (regenerateDerivation deriv buf)))
87− | otherwise = msgInfo ("failed to parse file " ++ path) >> return Nothing
88−
89−selectLatestVersions :: PkgSet -> PkgSet
90−selectLatestVersions = Set.fromList . nubBy f2 . sortBy f1 . Set.toList
91− where
92− f1 (Pkg deriv1 _ _) (Pkg deriv2 _ _)
93− | pname deriv1 == pname deriv2 = compare (version deriv2) (version deriv1)
94− | otherwise = compare (pname deriv1) (pname deriv2)
95− f2 (Pkg deriv1 _ _) (Pkg deriv2 _ _) = pname deriv1 == pname deriv2
96−
97−discoverUpdates :: String -> Version -> Hackage4Nix [Version]
98−discoverUpdates name vers = do
99− db <- asks _hackageDb
100− let versions = DB.keys (fromJust (DB.lookup name db))
101− return (filter (>vers) versions)
102−
103−updateNixPkgs :: [FilePath] -> Hackage4Nix ()
104−updateNixPkgs paths = do
105− msgDebug $ "updating = " ++ show paths
106− forM_ paths $ \fileOrDir ->
107− flip discoverNixFiles fileOrDir $ \file -> do
108− nix' <- io (readFile file) >>= parseNixFile file
109− flip (maybe (return ())) nix' $ \nix -> do
110− let Pkg deriv path regenerate = nix
111− maints = maintainers (metaSection deriv)
112− plats = platforms (metaSection deriv)
113− modify (Set.insert nix)
114− when regenerate $ do
115− msgDebug ("re-generate " ++ path)
116− pkg <- getCabalPackage (pname deriv) (version deriv)
117− let deriv' = (cabal2nix pkg) { sha256 = sha256 deriv, runHaddock = runHaddock deriv, jailbreak = jailbreak deriv, doCheck = doCheck deriv }
118− meta = metaSection deriv'
119− plats' = if null plats then platforms meta else plats
120− deriv'' = deriv' { metaSection = meta
121− { maintainers = maints -- ++ ["andres"]
122− , platforms = plats'
123− }
124− }
125− io $ writeFile path (show (disp (normalize deriv'')))
126− pkgset <- gets selectLatestVersions
127− updates' <- forM (Set.elems pkgset) $ \pkg -> do
128− let Pkg deriv _ _ = pkg
129− updates <- discoverUpdates (pname deriv) (version deriv)
130− return (pkg,updates)
131− let updates = [ u | u@(_,_:_) <- updates' ]
132− unless (null updates) $ do
133− msgInfo "The following updates are available:"
134− forM_ updates $ \(pkg,versions) -> do
135− let Pkg deriv path regenerate = pkg
136− msgInfo ""
137− msgInfo $ display (packageId deriv) ++ ":"
138− forM_ versions $ \newVersion -> do
139− let deriv' = deriv { version = newVersion }
140− msgInfo $ " " ++ genCabal2NixCmdline (Pkg deriv' path regenerate)
141− return ()
142−
143−genCabal2NixCmdline :: Pkg -> String
144−genCabal2NixCmdline (Pkg deriv path _) = unwords $ ["cabal2nix"] ++ opts ++ ['>':path']
145− where
146− meta = metaSection deriv
147− opts = [cabal] ++ maints' ++ plats' ++ if runHaddock deriv then [] else ["--no-haddock"]
148− cabal = "cabal://" ++ display (packageId deriv)
149− maints' = [ "--maintainer=" ++ normalizeMaintainer m | m <- maintainers meta ]
150− plats'
151− | ["self.ghc.meta.platforms"] == platforms meta = []
152− | otherwise = [ "--platform=" ++ p | p <- platforms meta ]
153− path'
154− | path =~ "/[0-9\\.]+\\.nix$" = replaceFileName path (display (version deriv) <.> "nix")
155− | otherwise = path
156−
157−normalizeMaintainer :: String -> String
158−normalizeMaintainer x
159− | "self.stdenv.lib.maintainers." `isPrefixOf` x = drop 28 x
160− | otherwise = x
161−
162−data CliOption = PrintHelp | Verbose
163− deriving (Eq)
164−
165−main :: IO ()
166−main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
167− let options :: [OptDescr CliOption]
168− options =
169− [ Option ['h'] ["help"] (NoArg PrintHelp) "show this help text"
170− , Option ['v'] ["verbose"] (NoArg Verbose) "enable noisy debug output"
171− ]
172−
173− usage :: String
174− usage = usageInfo "Usage: hackage4nix [options] [dir-or-file ...]" options ++ unlines
175− [ ""
176− , "The purpose of 'hackage4nix' is to keep all Haskell packages in our"
177− , "repository packages up-to-date. It scans a checked-out copy of"
178− , "Nixpkgs for expressions that use 'cabal.mkDerivation', and"
179− , "re-generates them in-place with cabal2nix."
180− ]
181−
182− cmdlineError :: String -> IO a
183− cmdlineError "" = hPutStrLn stderr usage >> exitFailure
184− cmdlineError errMsg = hPutStrLn stderr errMsg >> cmdlineError ""
185−
186− args' <- getArgs
187− (opts,args) <- case getOpt Permute options args' of
188− (o,n,[] ) -> return (o,n)
189− (_,_,errs) -> cmdlineError (concatMap (\e -> '*':'*':'*':' ':e) errs)
190−
191− when (PrintHelp `elem` opts) (cmdlineError "")
192−
193− hackage <- DB.readHackage
194− let cfg = defaultConfiguration
195− { _msgDebug = if Verbose `elem` opts then _msgDebug defaultConfiguration else const (return ())
196− , _hackageDb = hackage
197− }
198− ((),_,()) <- runRWST (updateNixPkgs args) cfg Set.empty
199− return ()
200−
201−
202−-- Packages that we cannot parse.
203−
204−badPackagePaths :: [FilePath]
205−badPackagePaths = [ "haskell-platform/2011.2.0.1.nix", "haskell-platform/2011.4.0.0.nix"
206− , "haskell-platform/2012.2.0.0.nix", "haskell-platform/2012.4.0.0.nix"
207− , "top-level/all-packages.nix"
208− ]
209−
210−-- Packages that we cannot regenerate automatically yet. This list
211−-- should be empty.
212−
213−patchedPackages :: [String]
214−patchedPackages = []
test/Main.hsnew file+122
@@ -0,0 +1,122 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+
3+module Main ( main ) where
4+
5+import Distribution.Nixpkgs.Fetch
6+import Distribution.Nixpkgs.Haskell.Derivation
7+import Distribution.Nixpkgs.Haskell.FromCabal
8+import Distribution.Nixpkgs.Haskell.FromCabal.Flags
9+
10+import Control.Lens
11+import Control.Monad
12+import qualified Data.Set as Set
13+import Distribution.Compiler
14+import Distribution.Package
15+import Distribution.PackageDescription
16+import Distribution.PackageDescription.Parsec
17+import Distribution.System
18+import Distribution.Verbosity
19+import Distribution.Version
20+import Language.Nix
21+import System.Directory
22+import System.FilePath
23+import System.Process
24+import Test.Tasty
25+import Test.Tasty.Golden
26+import Text.PrettyPrint.HughesPJClass
27+
28+main :: IO ()
29+main = do
30+ -- TODO: Run this test with all kinds of setLocaleEncoding values to ensure we don't
31+ -- depend on the system environment: https://github.com/NixOS/cabal2nix/issues/333.
32+ --
33+ -- TODO: Run this test without $HOME defined to ensure that we don't need that variable.
34+ cabal2nix <- findExecutable "cabal2nix" >>= maybe (fail "cannot find 'cabal2nix' in $PATH") return
35+ testCases <- listDirectoryFilesBySuffix ".cabal" "test/golden-test-cases"
36+ defaultMain $ testGroup "regression-tests"
37+ [ testGroup "cabal2nix library" (map testLibrary testCases)
38+ , testGroup "cabal2nix executable" (map (testExecutable cabal2nix) testCases)
39+ ]
40+
41+testLibrary :: String -> TestTree
42+testLibrary cabalFile = do
43+ let nixFile = cabalFile `replaceExtension` "nix"
44+ goldenFile = nixFile `addExtension` "golden"
45+
46+ cabal2nix :: GenericPackageDescription -> Derivation
47+ cabal2nix gpd = fromGenericPackageDescription
48+ (const True)
49+ (\i -> Just (binding # (i, path # [ident # "pkgs", i])))
50+ (Platform X86_64 Linux)
51+ (unknownCompilerInfo (CompilerId GHC (mkVersion [8,2])) NoAbiTag)
52+ (configureCabalFlags (packageId gpd))
53+ []
54+ gpd
55+ & src .~ DerivationSource
56+ { derivKind = "url"
57+ , derivUrl = "mirror://hackage/foo.tar.gz"
58+ , derivRevision = ""
59+ , derivHash = "deadbeef"
60+ , derivSubmodule = Nothing
61+ }
62+ & extraFunctionArgs %~ Set.union (Set.singleton "inherit stdenv")
63+ goldenVsFileDiff
64+ nixFile
65+ (\ref new -> ["diff", "-u", ref, new])
66+ goldenFile
67+ nixFile
68+ (readGenericPackageDescription silent cabalFile >>= writeFileLn nixFile . prettyShow . cabal2nix)
69+
70+-- | TODO:
71+--
72+-- * Run cabal2nix in an empty environment. Currently, this fails because the
73+-- tool uses $HOME to write cache files for SHA256 hashes. To fix this, use
74+-- of the cache directory ought to be optional. Arguably, the whole notion
75+-- of caching those hashes is a bit silly in the presence of format 01
76+-- cabal-install tarballs which contain them already.
77+--
78+-- * If we cannot get along without $HOME, then we should at least set it to
79+-- some temporary location that is empty.
80+--
81+-- * Run this test with different kinds of encodings.
82+--
83+-- * Run tests with a different target OS, like Darwin. The packages "iconv",
84+-- "crypt-sha512", "gl" might be worthwhile for testing since their output
85+-- differs on Darwin.
86+
87+testExecutable :: FilePath -> FilePath -> TestTree
88+testExecutable exe cabalFile = do
89+ let nixFile = cabalFile `replaceExtension` "nix"
90+ goldenFile = nixFile `addExtension` "golden"
91+ goldenVsFileDiff
92+ nixFile
93+ (\ref new -> ["diff", "-u", ref, new])
94+ goldenFile
95+ nixFile
96+ (callCommand (unwords ["env LANG=en_US.UTF-8", exe, "--sha256=deadbeef", "--system=x86_64-linux", "--compiler=ghc-8.2", "--", cabalFile, ">"++nixFile]))
97+
98+-------------------------------------------------------------------------------
99+-- * Helper functions
100+-------------------------------------------------------------------------------
101+
102+-- | Find all *files* in the given directory that end with the given suffix.
103+-- This function does not recurse, nor does it include the special entries
104+-- @'.'@ or @'..'@ in the result.
105+--
106+-- "Test.Tasty.Golden" offers 'findByExtension', which does something similar
107+-- (and arguably more general) as those two functions, but unfortunately that
108+-- function recurses through the directory hierarchy and in the process needs
109+-- plenty of stack space. There might be a space leak in that code, I am not
110+-- sure. Anyhow, since our test suite is supposed to run with 1K stack space,
111+-- we prefer our own simpler code.
112+
113+listDirectoryFilesBySuffix :: String -> FilePath -> IO [FilePath]
114+listDirectoryFilesBySuffix suff dirPath = do
115+ entries <- listDirectory dirPath
116+ filterM doesFileExist [ dirPath </> e | e <- entries, takeExtension e == suff ]
117+
118+-- | A variant of 'writeFile' that appends a newline to the end of the buffer
119+-- before writing.
120+
121+writeFileLn :: FilePath -> String -> IO ()
122+writeFileLn p buf = writeFile p (buf ++ "\n")
test/doc-test.hsdeleted−33
@@ -1,33 +0,0 @@
1−{-
2− Module : Main
3− Copyright : (c) 2013 Peter Simons
4− License : BSD3
5−
6− Maintainer : simons@cryp.to
7− Stability : provisional
8− Portability : portable
9−
10− Cabal2nix doctest suite.
11−-}
12−
13−module Main ( main ) where
14−
15−import Test.DocTest
16−
17−main :: IO ()
18−main = do
19− let libs = [ "src/Cabal2Nix/License.hs"
20− , "src/Cabal2Nix/CorePackages.hs"
21− , "src/Cabal2Nix/Flags.hs"
22− , "src/Cabal2Nix/Generate.hs"
23− , "src/Cabal2Nix/Hackage.hs"
24− , "src/Cabal2Nix/Normalize.hs"
25− , "src/Cabal2Nix/Name.hs"
26− , "src/Cabal2Nix/PostProcess.hs"
27− , "src/Distribution/NixOS/Derivation/License.hs"
28− , "src/Distribution/NixOS/Derivation/Cabal.hs"
29− , "src/Distribution/NixOS/Derivation/Meta.hs"
30− , "src/Distribution/NixOS/PrettyPrinting.hs"
31− ]
32− doctest $ "src/Cabal2Nix.hs" : libs
33− doctest $ "src/Hackage4Nix.hs" : libs
test/golden-test-cases/.gitignorenew file+1
@@ -0,0 +1 @@
1+/*.nix
test/golden-test-cases/ChasingBottoms.cabalnew file+185
@@ -0,0 +1,185 @@
1+name: ChasingBottoms
2+version: 1.3.1.3
3+license: MIT
4+license-file: LICENCE
5+copyright: Copyright (c) Nils Anders Danielsson 2004-2017.
6+author: Nils Anders Danielsson
7+maintainer: http://www.cse.chalmers.se/~nad/
8+synopsis: For testing partial and infinite values.
9+description:
10+ Do you ever feel the need to test code involving bottoms (e.g. calls to
11+ the @error@ function), or code involving infinite values? Then this
12+ library could be useful for you.
13+ .
14+ It is usually easy to get a grip on bottoms by showing a value and
15+ waiting to see how much gets printed before the first exception is
16+ encountered. However, that quickly gets tiresome and is hard to automate
17+ using e.g. QuickCheck
18+ (<http://www.cse.chalmers.se/~rjmh/QuickCheck/>). With this library you
19+ can do the tests as simply as the following examples show.
20+ .
21+ Testing explicitly for bottoms:
22+ .
23+ > > isBottom (head [])
24+ > True
25+ .
26+ > > isBottom bottom
27+ > True
28+ .
29+ > > isBottom (\_ -> bottom)
30+ > False
31+ .
32+ > > isBottom (bottom, bottom)
33+ > False
34+ .
35+ Comparing finite, partial values:
36+ .
37+ > > ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4)
38+ > True
39+ .
40+ > > ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8)
41+ > True
42+ .
43+ Showing partial and infinite values (@\\\/!@ is join and @\/\\!@ is meet):
44+ .
45+ > > approxShow 4 $ (True, bottom) \/! (bottom, 'b')
46+ > "Just (True, 'b')"
47+ .
48+ > > approxShow 4 $ (True, bottom) /\! (bottom, 'b')
49+ > "(_|_, _|_)"
50+ .
51+ > > approxShow 4 $ ([1..] :: [Int])
52+ > "[1, 2, 3, _"
53+ .
54+ > > approxShow 4 $ (cycle [bottom] :: [Bool])
55+ > "[_|_, _|_, _|_, _"
56+ .
57+ Approximately comparing infinite, partial values:
58+ .
59+ > > approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int])
60+ > True
61+ .
62+ > > approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int])
63+ > True
64+ .
65+ The code above relies on the fact that @bottom@, just as @error
66+ \"...\"@, @undefined@ and pattern match failures, yield
67+ exceptions. Sometimes we are dealing with properly non-terminating
68+ computations, such as the following example, and then it can be nice to
69+ be able to apply a time-out:
70+ .
71+ > > timeOut' 1 (reverse [1..5])
72+ > Value [5,4,3,2,1]
73+ .
74+ > > timeOut' 1 (reverse [1..])
75+ > NonTermination
76+ .
77+ The time-out functionality can be used to treat \"slow\" computations as
78+ bottoms:
79+ .
80+ @
81+ \> let tweak = Tweak &#x7b; approxDepth = Just 5, timeOutLimit = Just 2 &#x7d;
82+ \> semanticEq tweak (reverse [1..], [1..]) (bottom :: [Int], [1..] :: [Int])
83+ True
84+ @
85+ .
86+ @
87+ \> let tweak = noTweak &#x7b; timeOutLimit = Just 2 &#x7d;
88+ \> semanticJoin tweak (reverse [1..], True) ([] :: [Int], bottom)
89+ Just ([],True)
90+ @
91+ .
92+ This can of course be dangerous:
93+ .
94+ @
95+ \> let tweak = noTweak &#x7b; timeOutLimit = Just 0 &#x7d;
96+ \> semanticEq tweak (reverse [1..100000000]) (bottom :: [Integer])
97+ True
98+ @
99+ .
100+ Timeouts can also be applied to @IO@ computations:
101+ .
102+ > > let primes () = unfoldr (\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..]
103+ > > timeOutMicro 100 (print $ primes ())
104+ > [2,NonTermination
105+ > > timeOutMicro 10000 (print $ take 10 $ primes ())
106+ > [2,3,5,7,11,13,17,19,23,29]
107+ > Value ()
108+ .
109+ For the underlying theory and a larger example involving use of
110+ QuickCheck, see the article \"Chasing Bottoms, A Case Study in Program
111+ Verification in the Presence of Partial and Infinite Values\"
112+ (<http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html>).
113+ .
114+ The code has been tested using GHC. Most parts can probably be
115+ ported to other Haskell compilers, but this would require some work.
116+ The @TimeOut@ functions require preemptive scheduling, and most of
117+ the rest requires @Data.Generics@; @isBottom@ only requires
118+ exceptions, though.
119+category: Testing
120+tested-with: GHC == 6.12.3,
121+ GHC == 7.0.4,
122+ GHC == 7.4.2,
123+ GHC == 7.6.3,
124+ GHC == 7.8.4,
125+ GHC == 7.10.3,
126+ GHC == 8.0.2,
127+ GHC == 8.2.1
128+cabal-version: >= 1.9.2
129+build-type: Simple
130+
131+source-repository head
132+ type: darcs
133+ location: http://www.cse.chalmers.se/~nad/repos/ChasingBottoms/
134+
135+library
136+ exposed-modules:
137+ Test.ChasingBottoms,
138+ Test.ChasingBottoms.Approx,
139+ Test.ChasingBottoms.ApproxShow,
140+ Test.ChasingBottoms.ContinuousFunctions,
141+ Test.ChasingBottoms.IsBottom,
142+ Test.ChasingBottoms.Nat,
143+ Test.ChasingBottoms.SemanticOrd,
144+ Test.ChasingBottoms.TimeOut
145+
146+ other-modules: Test.ChasingBottoms.IsType
147+
148+ build-depends: QuickCheck >= 2.3 && < 2.11,
149+ mtl >= 2 && < 2.3,
150+ base >= 4.2 && < 4.11,
151+ containers >= 0.3 && < 0.6,
152+ random >= 1.0 && < 1.2,
153+ syb >= 0.1.0.2 && < 0.8
154+
155+test-suite ChasingBottomsTestSuite
156+ type: exitcode-stdio-1.0
157+
158+ main-is: Test/ChasingBottoms/Tests.hs
159+
160+ other-modules: Test.ChasingBottoms.Approx,
161+ Test.ChasingBottoms.Approx.Tests,
162+ Test.ChasingBottoms.ApproxShow,
163+ Test.ChasingBottoms.ApproxShow.Tests,
164+ Test.ChasingBottoms.ContinuousFunctions,
165+ Test.ChasingBottoms.ContinuousFunctions.Tests,
166+ Test.ChasingBottoms.IsBottom,
167+ Test.ChasingBottoms.IsBottom.Tests,
168+ Test.ChasingBottoms.IsType,
169+ Test.ChasingBottoms.IsType.Tests,
170+ Test.ChasingBottoms.Nat,
171+ Test.ChasingBottoms.Nat.Tests,
172+ Test.ChasingBottoms.SemanticOrd,
173+ Test.ChasingBottoms.SemanticOrd.Tests,
174+ Test.ChasingBottoms.TestUtilities,
175+ Test.ChasingBottoms.TestUtilities.Generators,
176+ Test.ChasingBottoms.TimeOut
177+ Test.ChasingBottoms.TimeOut.Tests
178+
179+ build-depends: QuickCheck >= 2.3 && < 2.11,
180+ mtl >= 2 && < 2.3,
181+ base >= 4.2 && < 4.11,
182+ containers >= 0.3 && < 0.6,
183+ random >= 1.0 && < 1.2,
184+ syb >= 0.1.0.2 && < 0.8,
185+ array >= 0.3 && < 0.6
test/golden-test-cases/ChasingBottoms.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, array, base, containers, mtl, QuickCheck, random
2+, stdenv, syb
3+}:
4+mkDerivation {
5+ pname = "ChasingBottoms";
6+ version = "1.3.1.3";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base containers mtl QuickCheck random syb
10+ ];
11+ testHaskellDepends = [
12+ array base containers mtl QuickCheck random syb
13+ ];
14+ description = "For testing partial and infinite values";
15+ license = stdenv.lib.licenses.mit;
16+}
test/golden-test-cases/Clipboard.cabalnew file+55
@@ -0,0 +1,55 @@
1+Name: Clipboard
2+Version: 2.3.2.0
3+Author: Sævar Berg (Windows), Matthew Bekkema (X11), Daniel Díaz (Maintainer)
4+Homepage: http://haskell.org/haskellwiki/Clipboard
5+License: BSD3
6+License-file: license
7+Maintainer: dhelta.diaz `at` gmail.com
8+Category: System
9+Stability: Stable
10+Synopsis: System clipboard interface.
11+Bug-reports: https://github.com/Daniel-Diaz/Clipboard/issues
12+Description:
13+ /Clipboard/ is a library for easily interfacing with the system clipboard with additional unicode support.
14+ Currently, only in a Windows or GNU/Linux (X11) system.
15+ .
16+ For example, if you type:
17+ .
18+ > $ setClipboardString "Hello, World!"
19+ .
20+ Then you have @\"Hello, World!\"@ available to be pasted wherever you want.
21+ .
22+ Now, if you type:
23+ .
24+ > $ modifyClipboardString reverse
25+ .
26+ You will have @\"!dlroW ,olleH\"@ in your clipboard. So:
27+ .
28+ > $ getClipboardString
29+ > "!dlroW ,olleH"
30+ .
31+ The X11 version depends on the @X11@ package, so you will need the X11 development library
32+ available on your system at compile time. You can install it by @sudo apt-get install libxrandr-dev@
33+ (or the equivalent on your system).
34+Build-type: Simple
35+Cabal-version: >= 1.6
36+Extra-source-files: README.md
37+
38+Source-repository head
39+ type: git
40+ location: git://github.com/Daniel-Diaz/Clipboard.git
41+
42+Library
43+ Exposed-modules: System.Clipboard
44+ Extensions: CPP
45+ if os(windows)
46+ Build-depends: base == 4.*
47+ , Win32 >= 2.2.0.0 && < 2.4
48+ Other-modules: System.Clipboard.Windows
49+ else
50+ Build-depends: base == 4.*
51+ , X11 >= 1.6
52+ , utf8-string
53+ , unix
54+ , directory
55+ Other-modules: System.Clipboard.X11
test/golden-test-cases/Clipboard.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, directory, stdenv, unix, utf8-string, X11 }:
2+mkDerivation {
3+ pname = "Clipboard";
4+ version = "2.3.2.0";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base directory unix utf8-string X11 ];
7+ homepage = "http://haskell.org/haskellwiki/Clipboard";
8+ description = "System clipboard interface";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/FenwickTree.cabalnew file+41
@@ -0,0 +1,41 @@
1+name: FenwickTree
2+version: 0.1.2.1
3+stability: alpha
4+homepage: https://github.com/mgajda/FenwickTree
5+package-url: http://hackage.haskell.org/package/FenwickTree
6+synopsis: Data structure for fast query and update of cumulative sums
7+description: Fenwick trees are a O(log N) data structure for updating cumulative sums.
8+ This implementation comes with an operation to find a least element for
9+ which real-valued cumulative sum reaches certain value, and allows for
10+ storage of arbitrary information in the nodes.
11+category: Data Structures
12+license: BSD3
13+license-file: LICENSE
14+
15+author: Michal J. Gajda
16+copyright: Copyright by Michal J. Gajda '2013
17+maintainer: mjgajda@googlemail.com
18+bug-reports: mailto:mjgajda@googlemail.com
19+
20+build-type: Simple
21+cabal-version: >=1.8
22+tested-with: GHC==7.8.4
23+data-files: README.md changelog
24+
25+source-repository head
26+ type: git
27+ location: git://github.com:mgajda/FenwickTree.git
28+
29+Library
30+ ghc-options: -fspec-constr-count=4 -O3
31+ build-depends: base>=4.0, base <5, template-haskell, QuickCheck >= 2.5.0.0
32+ other-extensions: ScopedTypeVariables
33+ exposed-modules: Data.Tree.Fenwick
34+ exposed: True
35+
36+Test-suite test_FenwickTree
37+ Type: exitcode-stdio-1.0
38+ main-is: tests/test_Fenwick.hs
39+ ghc-options: -fspec-constr-count=4 -O3
40+ Build-depends: base>=4.0, base <5, template-haskell, QuickCheck >= 2.5.0.0
41+
test/golden-test-cases/FenwickTree.nix.goldennew file+12
@@ -0,0 +1,12 @@
1+{ mkDerivation, base, QuickCheck, stdenv, template-haskell }:
2+mkDerivation {
3+ pname = "FenwickTree";
4+ version = "0.1.2.1";
5+ sha256 = "deadbeef";
6+ enableSeparateDataOutput = true;
7+ libraryHaskellDepends = [ base QuickCheck template-haskell ];
8+ testHaskellDepends = [ base QuickCheck template-haskell ];
9+ homepage = "https://github.com/mgajda/FenwickTree";
10+ description = "Data structure for fast query and update of cumulative sums";
11+ license = stdenv.lib.licenses.bsd3;
12+}
test/golden-test-cases/GPipe-GLFW.cabalnew file+51
@@ -0,0 +1,51 @@
1+name: GPipe-GLFW
2+version: 1.4.1.1
3+cabal-version: >=1.10
4+build-type: Simple
5+author: Patrick Redmond
6+license: MIT
7+license-file: LICENSE
8+copyright: Patrick Redmond
9+category: Graphics
10+stability: Experimental
11+homepage: https://github.com/plredmond/GPipe-GLFW
12+synopsis: GLFW OpenGL context creation for GPipe
13+description:
14+ GPipe-GLFW is a utility library to enable the use of GLFW as
15+ the OpenGL window and context handler for GPipe. GPipe is a
16+ typesafe functional API based on the conceptual model of
17+ OpenGL.
18+maintainer: Patrick Redmond
19+data-files: CHANGELOG.md
20+
21+library
22+ hs-source-dirs: src
23+ build-depends: base >= 4.7 && <4.11
24+ , stm >= 2.4 && <2.5
25+ , containers >= 0.5 && <0.6
26+ , async >= 2.1 && <2.3
27+ , GLFW-b >= 1.4 && <1.5
28+ , GPipe >= 2.2 && <2.3
29+ ghc-options: -Wall -Wno-orphans
30+ default-language: Haskell2010
31+ exposed-modules: Graphics.GPipe.Context.GLFW
32+ Graphics.GPipe.Context.GLFW.Input
33+ Graphics.GPipe.Context.GLFW.Window
34+ Graphics.GPipe.Context.GLFW.Misc
35+ other-modules: Graphics.GPipe.Context.GLFW.Calls
36+ Graphics.GPipe.Context.GLFW.Resource
37+ Graphics.GPipe.Context.GLFW.Wrappers
38+ Graphics.GPipe.Context.GLFW.Format
39+ Graphics.GPipe.Context.GLFW.Handler
40+ Graphics.GPipe.Context.GLFW.RPC
41+
42+source-repository head
43+ type: git
44+ location: https://github.com/plredmond/GPipe-GLFW.git
45+ subdir: GPipe-GLFW
46+
47+source-repository this
48+ type: git
49+ location: https://github.com/plredmond/GPipe-GLFW.git
50+ subdir: GPipe-GLFW
51+ tag: v1.4.1.1
test/golden-test-cases/GPipe-GLFW.nix.goldennew file+12
@@ -0,0 +1,12 @@
1+{ mkDerivation, async, base, containers, GLFW-b, GPipe, stdenv, stm
2+}:
3+mkDerivation {
4+ pname = "GPipe-GLFW";
5+ version = "1.4.1.1";
6+ sha256 = "deadbeef";
7+ enableSeparateDataOutput = true;
8+ libraryHaskellDepends = [ async base containers GLFW-b GPipe stm ];
9+ homepage = "https://github.com/plredmond/GPipe-GLFW";
10+ description = "GLFW OpenGL context creation for GPipe";
11+ license = stdenv.lib.licenses.mit;
12+}
test/golden-test-cases/GenericPretty.cabalnew file+99
@@ -0,0 +1,99 @@
1+-- GenericPretty.cabal auto-generated by cabal init. For additional
2+-- options, see
3+-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
4+-- The name of the package.
5+Name: GenericPretty
6+
7+-- The package version. See the Haskell package versioning policy
8+-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
9+-- standards guiding when and how versions should be incremented.
10+Version: 1.2.1
11+
12+-- A short (one-line) description of the package.
13+Synopsis: A generic, derivable, haskell pretty printer.
14+
15+-- A longer description of the package.
16+Description:
17+ GenericPretty is a Haskell library that supports automatic
18+ derivation of pretty printing functions on user defined data
19+ types.
20+ .
21+ The form of generics used is based on that introduced in the paper:
22+ Magalhaes, Dijkstra, Jeuring, and Loh,
23+ A Generic Deriving Mechanism for Haskell,
24+ 3'rd ACM Symposium on Haskell, pp. 37-48, September 2010,
25+ <http://dx.doi.org/10.1145/1863523.1863529>.
26+ Changes from the original paper in the GHC implementation
27+ are described here:
28+ <http://www.haskell.org/haskellwiki/GHC.Generics#Changes_from_the_paper>.
29+ .
30+ This package requires the use of the new GHC.Generics features
31+ <http://www.haskell.org/haskellwiki/GHC.Generics>, present from GHC 7.2.
32+ Use of these features is indicated by the DeriveGeneric pragma
33+ or the flag -XDeriveGeneric.
34+ .
35+ Pretty printing produces values of type Text.PrettyPrint.Doc, using
36+ the Text.PrettyPrint library
37+ <http://www.haskell.org/ghc/docs/latest/html/libraries/pretty-1.1.1.0/Text-PrettyPrint.html>.
38+ .
39+ The output provided is a pretty printed version of that provided by
40+ Prelude.show. That is, rendering the document provided by this pretty
41+ printer yields an output identical to that of Prelude.show, except
42+ for extra whitespace.
43+ .
44+ For information about the functions exported by the package please see
45+ the API linked further down this page.
46+
47+ For examples of usage, both basic and more complex see the README file and
48+ the haskell source code files in the TestSuite folder, both included in the package.
49+
50+ Finally for installation instructions also see the README file or this page:
51+ <http://www.haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package>
52+
53+-- URL for the project homepage or repository.
54+Homepage: https://github.com/RazvanRanca/GenericPretty
55+
56+-- The license under which the package is released.
57+License: BSD3
58+
59+-- The file containing the license text.
60+License-file: LICENSE
61+
62+-- The package author(s).
63+Author: Razvan Ranca
64+
65+-- An email address to which users can send suggestions, bug reports,
66+-- and patches.
67+Maintainer: ranca.razvan@gmail.com
68+
69+-- A copyright notice.
70+-- Copyright:
71+
72+Category: Text, Generics, Pretty Printer
73+
74+Build-type: Simple
75+
76+-- Extra files to be distributed with the package, such as examples or
77+-- a README.
78+Extra-source-files: README TestSuite/SimpleTest.hs TestSuite/Tests.hs TestSuite/CustomTest.hs TestSuite/ZigZagTest.hs
79+
80+-- Constraint on the version of Cabal needed to build this package.
81+Cabal-version: >=1.6
82+
83+
84+Library
85+ -- Modules exported by the library.
86+ Exposed-modules: Text.PrettyPrint.GenericPretty
87+
88+ -- Packages needed in order to build this package.
89+ Build-depends: base >= 3 && < 5, ghc-prim, pretty
90+
91+ -- Modules not exported by this package.
92+ -- Other-modules:
93+
94+ -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
95+ -- Build-tools:
96+
97+source-repository head
98+ type: git
99+ location: git@github.com:RazvanRanca/GenericPretty.git
test/golden-test-cases/GenericPretty.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, ghc-prim, pretty, stdenv }:
2+mkDerivation {
3+ pname = "GenericPretty";
4+ version = "1.2.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ghc-prim pretty ];
7+ homepage = "https://github.com/RazvanRanca/GenericPretty";
8+ description = "A generic, derivable, haskell pretty printer";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/HPDF.cabalnew file+97
@@ -0,0 +1,97 @@
1+Name: HPDF
2+Version: 1.4.10
3+cabal-version: >=1.10
4+License: BSD3
5+License-file:LICENSE
6+Copyright: Copyright (c) 2007-2016, alpheccar.org
7+category: Graphics
8+synopsis: Generation of PDF documents
9+maintainer: misc@NOSPAMalpheccar.org
10+build-type: Simple
11+tested-with: GHC==7.8.4,GHC==7.10.2
12+homepage: http://www.alpheccar.org
13+description: A PDF library with support for several pages, page transitions, outlines, annotations, compression, colors, shapes, patterns, jpegs, fonts, typesetting ... Have a look at the "Graphics.PDF.Documentation" module to see how to use it. Or, download the package and look at the test.hs file in the Test folder. That file is giving an example of each feature.
14+extra-source-files:
15+ c/ctext.h
16+ c/metrics.h
17+ c/conversion.h
18+ Test/AFMParser.hs
19+ Test/logo.jpg
20+ Test/Makefile
21+ Test/Penrose.hs
22+ Test/test.hs
23+ README.txt
24+ NEWS.txt
25+ TODO.txt
26+ changelog.md
27+
28+source-repository head
29+ type: git
30+ location: https://github.com/alpheccar/HPDF.git
31+
32+Test-Suite HPDF-Tests
33+ Type: exitcode-stdio-1.0
34+ Main-is: HPDF-tests.hs
35+ hs-source-dirs: Test
36+ Build-depends: base >= 4,
37+ HTF >= 0.10,
38+ HPDF
39+ Default-language: Haskell2010
40+
41+library
42+ build-depends:
43+ base >= 4 && < 5,
44+ containers,
45+ random >= 1.0,
46+ bytestring >= 0.9,
47+ array >= 0.1,
48+ zlib >= 0.5,
49+ binary >= 0.4,
50+ mtl,
51+ vector >=0.10,
52+ errors,
53+ base64-bytestring >= 0.1
54+ Default-language: Haskell2010
55+
56+ ghc-options: -Wall -fno-warn-tabs -funbox-strict-fields -O2
57+
58+ C-Sources:
59+ c/metrics.c
60+ c/conversion.c
61+ Include-Dirs: c
62+ Install-Includes:
63+ ctext.h
64+ conversion.h
65+ exposed-Modules:
66+ Graphics.PDF
67+ Graphics.PDF.Colors
68+ Graphics.PDF.Coordinates
69+ Graphics.PDF.Document
70+ Graphics.PDF.Shapes
71+ Graphics.PDF.Text
72+ Graphics.PDF.Navigation
73+ Graphics.PDF.Image
74+ Graphics.PDF.Action
75+ Graphics.PDF.Annotation
76+ Graphics.PDF.Pattern
77+ Graphics.PDF.Shading
78+ Graphics.PDF.Typesetting
79+ Graphics.PDF.Hyphenate
80+ Graphics.PDF.Documentation
81+ Other-Modules:
82+ Graphics.PDF.LowLevel.Types
83+ Graphics.PDF.Data.PDFTree
84+ Graphics.PDF.Data.Trie
85+ Graphics.PDF.Pages
86+ Graphics.PDF.Resources
87+ Graphics.PDF.Draw
88+ Graphics.PDF.Hyphenate.English
89+ Graphics.PDF.Hyphenate.LowLevel
90+ Graphics.PDF.LowLevel.Kern
91+ Graphics.PDF.Typesetting.Breaking
92+ Graphics.PDF.Typesetting.Horizontal
93+ Graphics.PDF.Typesetting.Vertical
94+ Graphics.PDF.Typesetting.Box
95+ Graphics.PDF.Typesetting.Layout
96+ Graphics.PDF.LowLevel.Serializer
97+ Graphics.PDF.Typesetting.StandardStyle
test/golden-test-cases/HPDF.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, array, base, base64-bytestring, binary, bytestring
2+, containers, errors, HTF, mtl, random, stdenv, vector, zlib
3+}:
4+mkDerivation {
5+ pname = "HPDF";
6+ version = "1.4.10";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ array base base64-bytestring binary bytestring containers errors
10+ mtl random vector zlib
11+ ];
12+ testHaskellDepends = [ base HTF ];
13+ homepage = "http://www.alpheccar.org";
14+ description = "Generation of PDF documents";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/HTF.cabalnew file+197
@@ -0,0 +1,197 @@
1+Name: HTF
2+Version: 0.13.2.2
3+License: LGPL
4+License-File: LICENSE
5+Copyright: (c) 2005-2015 Stefan Wehr
6+Author: Stefan Wehr <wehr@factisresearch.com>
7+Maintainer: Stefan Wehr <wehr@factisresearch.com>
8+Stability: Beta
9+Category: Testing
10+Synopsis: The Haskell Test Framework
11+Homepage: https://github.com/skogsbaer/HTF/
12+Bug-Reports: https://github.com/skogsbaer/HTF/issues
13+Description:
14+
15+ The Haskell Test Framework (/HTF/ for short) lets you define unit
16+ tests (<http://hunit.sourceforge.net>), QuickCheck properties
17+ (<http://www.cs.chalmers.se/~rjmh/QuickCheck/>), and black box
18+ tests in an easy and convenient way. HTF uses a custom
19+ preprocessor that collects test definitions automatically.
20+ Furthermore, the preprocessor allows HTF to report failing
21+ test cases with exact file name and line number information.
22+ Additionally, HTF tries to produce highly readable output
23+ for failing tests: for example, it colors and pretty prints expected and
24+ actual results and provides a diff between the two values.
25+
26+ .
27+
28+ The documentation of the "Test.Framework.Tutorial" module
29+ provides a tutorial for HTF. There is also a slightly out-dated
30+ blog article (<http://factisresearch.blogspot.de/2011/10/new-version-of-htf-with-diffs-colors.html>)
31+ demonstrating HTF's coloring, pretty-printing and diff functionality.
32+
33+Build-Type: Simple
34+Cabal-Version: >= 1.10
35+Extra-Source-Files:
36+ README.md
37+ TODO.org
38+ ChangeLog
39+ tests/bbt/should_fail/BBTArgs
40+ tests/bbt/should_fail/*.err
41+ tests/bbt/should_fail/*.out
42+ tests/bbt/should_fail/*.x
43+ tests/bbt/should_pass/*.in
44+ tests/bbt/should_pass/*.err
45+ tests/bbt/should_pass/*.out
46+ tests/bbt/should_pass/*.x
47+ tests/bbt/Skip/BBTArgs
48+ tests/bbt/Skip/some_unknown_but_skipped_file.x
49+ tests/bbt/Verbose/BBTArgs
50+ tests/bbt/Verbose/not_ok_because_stdout1.out
51+ tests/bbt/Verbose/not_ok_because_stdout1.x
52+ tests/Foo/test.h
53+ tests/Tutorial.hs
54+ tests/run-bbt.sh
55+ tests/compile-errors/Foo.h
56+ tests/compile-errors/run-tests.sh
57+ tests/compile-errors/Test1.hs
58+ tests/compile-errors/Test2.hs
59+ tests/compile-errors/Test3.hs
60+ tests/compile-errors/Test4.hs
61+ sample/LICENSE
62+ sample/Main.hs
63+ sample/MyPkg/A.hs
64+ sample/MyPkg/B.hs
65+ sample/README
66+ sample/sample-HTF.cabal
67+ sample/Setup.hs
68+ sample/TestMain.hs
69+ sample/bbt-dir/should-fail/BBTArgs
70+ sample/bbt-dir/should-fail/z.err
71+ sample/bbt-dir/should-fail/z.num
72+ sample/bbt-dir/should-pass/x.num
73+ sample/bbt-dir/should-pass/x.out
74+ scripts/local-htfpp
75+ scripts/run-sample
76+
77+Source-Repository head
78+ Type: git
79+ Location: http://github.com/skogsbaer/HTF.git
80+
81+Executable htfpp
82+ Main-Is: HTFPP.hs
83+ Build-Depends: HUnit,
84+ array,
85+ base == 4.*,
86+ cpphs >= 1.19,
87+ directory >= 1.0,
88+ mtl >= 1.1,
89+ old-time >= 1.0,
90+ random >= 1.0,
91+ text,
92+ HTF
93+ Other-Modules:
94+ Paths_HTF
95+ Test.Framework.Location
96+ Test.Framework.Preprocessor
97+ Default-language: Haskell2010
98+
99+Library
100+ Build-Depends: Diff >= 0.3,
101+ HUnit >= 1.2.5,
102+ QuickCheck >= 2.3,
103+ aeson < 0.10 || >= 0.11,
104+ array,
105+ base == 4.*,
106+ base64-bytestring,
107+ bytestring >= 0.9,
108+ containers >= 0.5,
109+ cpphs >= 1.19,
110+ haskell-src,
111+ directory >= 1.0,
112+ lifted-base >= 0.1,
113+ monad-control >= 0.3,
114+ mtl >= 1.1,
115+ old-time >= 1.0,
116+ pretty >= 1.0,
117+ process >= 1.0,
118+ random >= 1.0,
119+ regex-compat >= 0.92,
120+ text >= 0.11,
121+ time,
122+ vector,
123+ xmlgen >= 0.6
124+ if !os(windows)
125+ Build-Depends: unix >= 2.4
126+ Exposed-Modules:
127+ Test.Framework
128+ Test.Framework.HUnitWrapper
129+ Test.Framework.TestManager
130+ Test.Framework.TestInterface
131+ Test.Framework.TestTypes
132+ Test.Framework.TestReporter
133+ Test.Framework.History
134+ Test.Framework.CmdlineOptions
135+ Test.Framework.QuickCheckWrapper
136+ Test.Framework.BlackBoxTest
137+ Test.Framework.Location
138+ Test.Framework.Tutorial
139+ Test.Framework.Pretty
140+ Test.Framework.JsonOutput
141+ Test.Framework.XmlOutput
142+ Test.Framework.ThreadPool
143+ Test.Framework.AssertM
144+ Test.Framework.Colors
145+ Test.Framework.PrettyHaskell
146+ Test.Framework.Preprocessor
147+ Other-Modules:
148+ Test.Framework.Utils
149+ Test.Framework.Diff
150+ Test.Framework.Process
151+ Default-language: Haskell2010
152+ Ghc-Options: -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind
153+
154+Test-Suite MiscTests
155+ Main-is: MiscTest.hs
156+ Type: exitcode-stdio-1.0
157+ Hs-Source-Dirs: tests
158+ Build-depends: HTF,
159+ HUnit,
160+ base == 4.*,
161+ mtl,
162+ random
163+ Default-language: Haskell2010
164+
165+Test-Suite TestHTF
166+ Main-is: TestHTF.hs
167+ Hs-Source-Dirs: tests, tests/real-bbt
168+ Type: exitcode-stdio-1.0
169+ Build-depends: HTF,
170+ aeson >= 0.6,
171+ aeson-pretty,
172+ base == 4.*,
173+ bytestring >= 0.9,
174+ directory >= 1.0,
175+ filepath >= 1.1,
176+ process >= 1.0,
177+ random,
178+ regex-compat >= 0.92,
179+ template-haskell,
180+ temporary >= 1.1,
181+ text >= 0.11,
182+ unordered-containers >= 0.2
183+ Default-language: Haskell2010
184+ Other-Modules:
185+ Foo.A, Foo.B, TestHTFHunitBackwardsCompatible, FailFast, MaxCurTime,
186+ MaxPrevTime, PrevFactor, SortByPrevTime, UniqTests1, UniqTests2, Quasi,
187+ Tutorial, Repeat
188+
189+Test-Suite TestThreadPools
190+ Main-is: ThreadPoolTest.hs
191+ Type: exitcode-stdio-1.0
192+ Hs-Source-Dirs: tests
193+ Build-depends: HTF,
194+ base == 4.*,
195+ mtl,
196+ random
197+ Default-language: Haskell2010
test/golden-test-cases/HTF.nix.goldennew file+31
@@ -0,0 +1,31 @@
1+{ mkDerivation, aeson, aeson-pretty, array, base, base64-bytestring
2+, bytestring, containers, cpphs, Diff, directory, filepath
3+, haskell-src, HUnit, lifted-base, monad-control, mtl, old-time
4+, pretty, process, QuickCheck, random, regex-compat, stdenv
5+, template-haskell, temporary, text, time, unix
6+, unordered-containers, vector, xmlgen
7+}:
8+mkDerivation {
9+ pname = "HTF";
10+ version = "0.13.2.2";
11+ sha256 = "deadbeef";
12+ isLibrary = true;
13+ isExecutable = true;
14+ libraryHaskellDepends = [
15+ aeson array base base64-bytestring bytestring containers cpphs Diff
16+ directory haskell-src HUnit lifted-base monad-control mtl old-time
17+ pretty process QuickCheck random regex-compat text time unix vector
18+ xmlgen
19+ ];
20+ executableHaskellDepends = [
21+ array base cpphs directory HUnit mtl old-time random text
22+ ];
23+ testHaskellDepends = [
24+ aeson aeson-pretty base bytestring directory filepath HUnit mtl
25+ process random regex-compat template-haskell temporary text
26+ unordered-containers
27+ ];
28+ homepage = "https://github.com/skogsbaer/HTF/";
29+ description = "The Haskell Test Framework";
30+ license = "LGPL";
31+}
test/golden-test-cases/HTTP.cabalnew file+182
@@ -0,0 +1,182 @@
1+Name: HTTP
2+Version: 4000.3.9
3+Cabal-Version: >= 1.8
4+Build-type: Simple
5+License: BSD3
6+License-file: LICENSE
7+Author: Warrick Gray <warrick.gray@hotmail.com>
8+Maintainer: Ganesh Sittampalam <ganesh@earth.li>
9+Homepage: https://github.com/haskell/HTTP
10+Category: Network
11+Synopsis: A library for client-side HTTP
12+Description:
13+
14+ The HTTP package supports client-side web programming in Haskell. It lets you set up
15+ HTTP connections, transmitting requests and processing the responses coming back, all
16+ from within the comforts of Haskell. It's dependent on the network package to operate,
17+ but other than that, the implementation is all written in Haskell.
18+ .
19+ A basic API for issuing single HTTP requests + receiving responses is provided. On top
20+ of that, a session-level abstraction is also on offer (the @BrowserAction@ monad);
21+ it taking care of handling the management of persistent connections, proxies,
22+ state (cookies) and authentication credentials required to handle multi-step
23+ interactions with a web server.
24+ .
25+ The representation of the bytes flowing across is extensible via the use of a type class,
26+ letting you pick the representation of requests and responses that best fits your use.
27+ Some pre-packaged, common instances are provided for you (@ByteString@, @String@).
28+ .
29+ Here's an example use:
30+ .
31+ >
32+ > do
33+ > rsp <- Network.HTTP.simpleHTTP (getRequest "http://www.haskell.org/")
34+ > -- fetch document and return it (as a 'String'.)
35+ > fmap (take 100) (getResponseBody rsp)
36+ >
37+ > do
38+ > (_, rsp)
39+ > <- Network.Browser.browse $ do
40+ > setAllowRedirects True -- handle HTTP redirects
41+ > request $ getRequest "http://www.haskell.org/"
42+ > return (take 100 (rspBody rsp))
43+ .
44+ __Note:__ This package does not support HTTPS connections.
45+ If you need HTTPS, take a look at the following packages:
46+ .
47+ * <http://hackage.haskell.org/package/http-streams http-streams>
48+ .
49+ * <http://hackage.haskell.org/package/http-client http-client> (in combination with
50+ <http://hackage.haskell.org/package/http-client-tls http-client-tls>)
51+ .
52+ * <http://hackage.haskell.org/package/req req>
53+ .
54+ * <http://hackage.haskell.org/package/wreq wreq>
55+ .
56+
57+Extra-Source-Files: CHANGES
58+
59+Source-Repository head
60+ type: git
61+ location: https://github.com/haskell/HTTP.git
62+
63+Flag mtl1
64+ description: Use the old mtl version 1.
65+ default: False
66+
67+Flag warn-as-error
68+ default: False
69+ description: Build with warnings-as-errors
70+ manual: True
71+
72+Flag network23
73+ description: Use version 2.3.x or below of the network package
74+ default: False
75+
76+Flag conduit10
77+ description: Use version 1.0.x or below of the conduit package (for the test suite)
78+ default: False
79+
80+Flag warp-tests
81+ description: Test against warp
82+ default: True
83+ manual: True
84+
85+flag network-uri
86+ description: Get Network.URI from the network-uri package
87+ default: True
88+
89+Library
90+ Exposed-modules:
91+ Network.BufferType,
92+ Network.Stream,
93+ Network.StreamDebugger,
94+ Network.StreamSocket,
95+ Network.TCP,
96+ Network.HTTP,
97+ Network.HTTP.Headers,
98+ Network.HTTP.Base,
99+ Network.HTTP.Stream,
100+ Network.HTTP.Auth,
101+ Network.HTTP.Cookie,
102+ Network.HTTP.Proxy,
103+ Network.HTTP.HandleStream,
104+ Network.Browser
105+ Other-modules:
106+ Network.HTTP.Base64,
107+ Network.HTTP.MD5Aux,
108+ Network.HTTP.Utils
109+ Paths_HTTP
110+ GHC-options: -fwarn-missing-signatures -Wall
111+
112+ -- note the test harness constraints should be kept in sync with these
113+ -- where dependencies are shared
114+ Build-depends: base >= 4.3.0.0 && < 4.11, parsec >= 2.0 && < 3.2
115+ Build-depends: array >= 0.3.0.2 && < 0.6, bytestring >= 0.9.1.5 && < 0.11
116+ Build-depends: time >= 1.1.2.3 && < 1.9
117+
118+ Extensions: FlexibleInstances
119+
120+ if flag(mtl1)
121+ Build-depends: mtl >= 1.1.1.0 && < 1.2
122+ CPP-Options: -DMTL1
123+ else
124+ Build-depends: mtl >= 2.0 && < 2.3
125+
126+ if flag(network-uri)
127+ Build-depends: network-uri == 2.6.*, network == 2.6.*
128+ else
129+ Build-depends: network >= 2.2.1.8 && < 2.6
130+
131+ if flag(warn-as-error)
132+ ghc-options: -Werror
133+
134+ if os(windows)
135+ Build-depends: Win32 >= 2.2.0.0 && < 2.6
136+
137+Test-Suite test
138+ type: exitcode-stdio-1.0
139+
140+ hs-source-dirs: test
141+ main-is: httpTests.hs
142+
143+ other-modules:
144+ Httpd
145+ UnitTests
146+
147+ -- note: version constraints for dependencies shared with the library
148+ -- should be the same
149+ build-depends: HTTP,
150+ HUnit >= 1.2.0.1 && < 1.7,
151+ httpd-shed >= 0.4 && < 0.5,
152+ mtl >= 1.1.1.0 && < 2.3,
153+ bytestring >= 0.9.1.5 && < 0.11,
154+ deepseq >= 1.3.0.0 && < 1.5,
155+ pureMD5 >= 0.2.4 && < 2.2,
156+ base >= 4.3.0.0 && < 4.11,
157+ split >= 0.1.3 && < 0.3,
158+ test-framework >= 0.2.0 && < 0.9,
159+ test-framework-hunit >= 0.3.0 && <0.4
160+
161+ if flag(network-uri)
162+ Build-depends: network-uri == 2.6.*, network == 2.6.*
163+ else
164+ Build-depends: network >= 2.2.1.5 && < 2.6
165+
166+ if flag(warp-tests)
167+ CPP-Options: -DWARP_TESTS
168+ build-depends:
169+ case-insensitive >= 0.4.0.1 && < 1.3,
170+ http-types >= 0.8.0 && < 1.0,
171+ wai >= 2.1.0 && < 3.3,
172+ warp >= 2.1.0 && < 3.3
173+
174+ if flag(conduit10)
175+ build-depends:
176+ conduit >= 1.0.8 && < 1.1
177+ else
178+ build-depends:
179+ conduit >= 1.1 && < 1.3,
180+ conduit-extra >= 1.1 && < 1.3
181+
182+
test/golden-test-cases/HTTP.nix.goldennew file+21
@@ -0,0 +1,21 @@
1+{ mkDerivation, array, base, bytestring, case-insensitive, conduit
2+, conduit-extra, deepseq, http-types, httpd-shed, HUnit, mtl
3+, network, network-uri, parsec, pureMD5, split, stdenv
4+, test-framework, test-framework-hunit, time, wai, warp
5+}:
6+mkDerivation {
7+ pname = "HTTP";
8+ version = "4000.3.9";
9+ sha256 = "deadbeef";
10+ libraryHaskellDepends = [
11+ array base bytestring mtl network network-uri parsec time
12+ ];
13+ testHaskellDepends = [
14+ base bytestring case-insensitive conduit conduit-extra deepseq
15+ http-types httpd-shed HUnit mtl network network-uri pureMD5 split
16+ test-framework test-framework-hunit wai warp
17+ ];
18+ homepage = "https://github.com/haskell/HTTP";
19+ description = "A library for client-side HTTP";
20+ license = stdenv.lib.licenses.bsd3;
21+}
test/golden-test-cases/Hclip.cabalnew file+55
@@ -0,0 +1,55 @@
1+
2+name: Hclip
3+
4+-- The package version. See the Haskell package versioning policy (PVP)
5+-- for standards guiding when and how versions should be incremented.
6+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
7+-- PVP summary: +-+------- breaking API changes
8+-- | | +----- non-breaking API additions
9+-- | | | +--- code changes with no API change
10+version: 3.0.0.4
11+
12+synopsis: A small cross-platform library for reading and modifying the system clipboard.
13+
14+homepage: https://github.com/jetho/Hclip
15+
16+license: BSD3
17+
18+license-file: LICENSE
19+
20+author: Jens Thomas
21+
22+maintainer: jetho@gmx.de
23+
24+category: System
25+
26+description:
27+ A small cross-platform library for reading and modifying the system clipboard.
28+ .
29+ Hclip works on Windows, Mac OS X and Linux (but see the requirements below!).
30+ .
31+ Requirements:
32+ .
33+ * Windows: No additional requirements.
34+ .
35+ * Mac OS X: Requires the pbcopy and pbpaste commands, which ship with Mac OS X.
36+ .
37+ * Linux: Requires xclip or xsel installed.
38+
39+build-type: Simple
40+
41+cabal-version: >=1.10
42+
43+
44+library
45+ exposed-modules: System.Hclip
46+ other-extensions: CPP, DeriveDataTypeable, GADTs
47+ default-language: Haskell2010
48+ build-depends: base >= 3 && < 5, process, mtl, strict
49+ if os(windows)
50+ build-depends: Win32
51+
52+source-repository head
53+ type: git
54+ location: git://github.com/jetho/Hclip.git
55+
test/golden-test-cases/Hclip.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, mtl, process, stdenv, strict }:
2+mkDerivation {
3+ pname = "Hclip";
4+ version = "3.0.0.4";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base mtl process strict ];
7+ homepage = "https://github.com/jetho/Hclip";
8+ description = "A small cross-platform library for reading and modifying the system clipboard";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/MissingH.cabalnew file+131
@@ -0,0 +1,131 @@
1+Name: MissingH
2+Version: 1.4.0.1
3+License: BSD3
4+Maintainer: John Goerzen <jgoerzen@complete.org>
5+Author: John Goerzen
6+Copyright: Copyright (c) 2004-2016 John Goerzen
7+license-file: LICENSE
8+extra-source-files: LICENSE,
9+ announcements/0.10.0.txt,
10+ announcements/0.8.0.txt,
11+ announcements/0.9.0.txt,
12+ testsrc/gzfiles/empty.gz,
13+ testsrc/gzfiles/t1.gz,
14+ testsrc/gzfiles/t1bad.gz,
15+ testsrc/gzfiles/t2.gz,
16+ testsrc/gzfiles/zeros.gz,
17+ testsrc/mime.types.test,
18+ 3rd-party-licenses/BSD,
19+ 3rd-party-licenses/LGPL-2.1,
20+ Makefile,
21+ TODO,
22+ examples/simplegrep.hs,
23+ examples/test2.hs,
24+ examples/test3.hs,
25+ pending/Gopher.hs,
26+ pending/Maildir.disabled,
27+ pending/Tar.newhs,
28+ pending/Tar/HeaderParser.newhs,
29+ tolgpl,
30+ winbuild.bat,
31+ wintest.bat
32+homepage: http://software.complete.org/missingh
33+Category: Unclassified
34+synopsis: Large utility library
35+Description: MissingH is a library of all sorts of utility functions for
36+ Haskell programmers. It is written in pure Haskell and thus should
37+ be extremely portable and easy to use.
38+Stability: Beta
39+Build-Type: Simple
40+Cabal-Version: >=1.8
41+
42+Library
43+ Hs-Source-Dirs: src
44+ Exposed-Modules:
45+ Data.String.Utils, System.IO.Utils, System.IO.Binary, Data.List.Utils,
46+ System.Daemon,
47+ Text.ParserCombinators.Parsec.Utils,
48+ Network.Email.Mailbox,
49+ Control.Concurrent.Thread.Utils,
50+ Network.Email.Sendmail,
51+ Data.CSV,
52+ System.Cmd.Utils,
53+ Data.BinPacking,
54+ Data.Progress.Tracker,
55+ Data.Progress.Meter,
56+ Data.Quantity,
57+ Data.Map.Utils, System.Path, System.Path.NameManip,
58+ System.Path.WildMatch, System.Path.Glob,
59+ System.Time.Utils,
60+ Network.Utils,
61+ Network.SocketServer,
62+ Data.Either.Utils,
63+ Data.Maybe.Utils,
64+ Data.Tuple.Utils,
65+ Data.Bits.Utils,
66+ Data.Hash.CRC32.GZip,
67+ Data.Hash.MD5, Data.Hash.MD5.Zord64_HARD,
68+ Data.Compression.Inflate,
69+ System.FileArchive.GZip,
70+ System.IO.HVFS,
71+ System.IO.HVFS.Combinators,
72+ System.IO.HVFS.InstanceHelpers,
73+ System.IO.HVFS.Utils,
74+ System.IO.HVIO, System.IO.StatCompat, System.IO.WindowsCompat,
75+ System.IO.PlafCompat, System.Posix.Consts,
76+ System.Debian, System.Debian.ControlParser,
77+ Data.MIME.Types,
78+ System.Console.GetOpt.Utils
79+
80+ Extensions: ExistentialQuantification, OverlappingInstances,
81+ UndecidableInstances, CPP, Rank2Types,
82+ MultiParamTypeClasses, FlexibleInstances, FlexibleContexts,
83+ ScopedTypeVariables
84+
85+ Build-Depends: network, parsec, base,
86+ mtl, HUnit, regex-compat,
87+ filepath,
88+ hslogger,
89+ base >= 4.5, base < 5, directory, random, process, old-time,
90+ containers, old-locale, array, time
91+ If ! os(windows)
92+ Build-Depends: unix
93+
94+test-suite runtests
95+ type: exitcode-stdio-1.0
96+
97+ Build-Depends: network, parsec, base,
98+ mtl, HUnit, regex-compat,
99+ errorcall-eq-instance,
100+ filepath,
101+ hslogger,
102+ base >= 4.5, base < 5, directory, random, process, old-time,
103+ containers, old-locale, array, time
104+ If ! os(windows)
105+ Build-Depends: unix
106+ Build-Depends: testpack, QuickCheck, HUnit
107+
108+ Main-Is: runtests.hs
109+ HS-Source-Dirs: testsrc, ., src
110+ Other-Modules: Bitstest,
111+ CRC32GZIPtest,
112+ Eithertest,
113+ GZiptest,
114+ Globtest,
115+ HVFStest,
116+ HVIOtest,
117+ IOtest,
118+ Listtest,
119+ MIMETypestest,
120+ Maptest,
121+ Pathtest,
122+ ProgressTrackertest,
123+ Str.CSVtest,
124+ Strtest,
125+ Tests,
126+ Timetest,
127+ WildMatchtest
128+ Extensions: ExistentialQuantification, OverlappingInstances,
129+ UndecidableInstances, CPP, Rank2Types,
130+ MultiParamTypeClasses, FlexibleInstances, FlexibleContexts,
131+ ScopedTypeVariables
test/golden-test-cases/MissingH.nix.goldennew file+22
@@ -0,0 +1,22 @@
1+{ mkDerivation, array, base, containers, directory
2+, errorcall-eq-instance, filepath, hslogger, HUnit, mtl, network
3+, old-locale, old-time, parsec, process, QuickCheck, random
4+, regex-compat, stdenv, testpack, time, unix
5+}:
6+mkDerivation {
7+ pname = "MissingH";
8+ version = "1.4.0.1";
9+ sha256 = "deadbeef";
10+ libraryHaskellDepends = [
11+ array base containers directory filepath hslogger HUnit mtl network
12+ old-locale old-time parsec process random regex-compat time unix
13+ ];
14+ testHaskellDepends = [
15+ array base containers directory errorcall-eq-instance filepath
16+ hslogger HUnit mtl network old-locale old-time parsec process
17+ QuickCheck random regex-compat testpack time unix
18+ ];
19+ homepage = "http://software.complete.org/missingh";
20+ description = "Large utility library";
21+ license = stdenv.lib.licenses.bsd3;
22+}
test/golden-test-cases/ObjectName.cabalnew file+34
@@ -0,0 +1,34 @@
1+name: ObjectName
2+version: 1.1.0.1
3+synopsis: Explicitly handled object names
4+description:
5+ This tiny package contains the class ObjectName, which corresponds to the
6+ general notion of explicitly handled identifiers for API objects, e.g. a
7+ texture object name in OpenGL or a buffer object name in OpenAL.
8+homepage: https://github.com/svenpanne/ObjectName
9+bug-reports: https://github.com/svenpanne/ObjectName/issues
10+copyright: Copyright (C) 2014-2015 Sven Panne
11+license: BSD3
12+license-file: LICENSE
13+author: Sven Panne
14+maintainer: Sven Panne <svenpanne@gmail.com>
15+category: Data
16+build-type: Simple
17+cabal-version: >=1.10
18+extra-source-files:
19+ README.md
20+
21+library
22+ exposed-modules:
23+ Data.ObjectName
24+ build-depends:
25+ base >= 4 && < 5,
26+ transformers >= 0.2 && < 0.6
27+ default-language: Haskell2010
28+ other-extensions: CPP
29+ hs-Source-Dirs: src
30+ ghc-options: -Wall
31+
32+source-repository head
33+ type: git
34+ location: https://github.com/haskell-opengl/ObjectName.git
test/golden-test-cases/ObjectName.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, stdenv, transformers }:
2+mkDerivation {
3+ pname = "ObjectName";
4+ version = "1.1.0.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base transformers ];
7+ homepage = "https://github.com/svenpanne/ObjectName";
8+ description = "Explicitly handled object names";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/Only.cabalnew file+32
@@ -0,0 +1,32 @@
1+name: Only
2+version: 0.1
3+synopsis: The 1-tuple type or single-value "collection"
4+license: BSD3
5+license-file: LICENSE
6+author: Herbert Valerio Riedel
7+maintainer: hvr@gnu.org
8+bug-reports: https://github.com/hvr/Only/issues
9+category: Data
10+build-type: Simple
11+cabal-version: >=1.10
12+description: This package provides the canonical anonymous 1-tuple type missing from Haskell for attaching typeclass instances.
13+
14+Source-Repository head
15+ Type: git
16+ Location: https://github.com/hvr/Only.git
17+
18+library
19+ hs-source-dirs: src
20+ exposed-modules: Data.Tuple.Only
21+
22+ default-language: Haskell2010
23+ other-extensions: DeriveGeneric
24+ , DeriveDataTypeable
25+ , DeriveFunctor
26+ , Safe
27+
28+ build-depends: base >= 4.5 && <5
29+ , deepseq >= 1.1 && <1.5
30+
31+ if impl(ghc == 7.4.*)
32+ build-depends: ghc-prim
test/golden-test-cases/Only.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, deepseq, stdenv }:
2+mkDerivation {
3+ pname = "Only";
4+ version = "0.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base deepseq ];
7+ description = "The 1-tuple type or single-value \"collection\"";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/QuasiText.cabalnew file+20
@@ -0,0 +1,20 @@
1+-- Initial QuasiText.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+name: QuasiText
5+version: 0.1.2.6
6+synopsis: A QuasiQuoter for Text.
7+description: A QuasiQuoter for interpolating values into Text strings.
8+homepage: https://github.com/mikeplus64/QuasiText
9+license: BSD3
10+license-file: LICENSE
11+author: Mike Ledger
12+maintainer: eleventynine@gmail.com
13+category: Text
14+build-type: Simple
15+cabal-version: >=1.8
16+
17+library
18+ exposed-modules: Text.QuasiText
19+ build-depends: base >= 4.5.0.0 && < 5.0.0.0, template-haskell, haskell-src-meta, attoparsec, text, th-lift-instances
20+ hs-source-dirs: src
test/golden-test-cases/QuasiText.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, attoparsec, base, haskell-src-meta, stdenv
2+, template-haskell, text, th-lift-instances
3+}:
4+mkDerivation {
5+ pname = "QuasiText";
6+ version = "0.1.2.6";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ attoparsec base haskell-src-meta template-haskell text
10+ th-lift-instances
11+ ];
12+ homepage = "https://github.com/mikeplus64/QuasiText";
13+ description = "A QuasiQuoter for Text";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/QuickCheck.cabalnew file+171
@@ -0,0 +1,171 @@
1+Name: QuickCheck
2+Version: 2.10.1
3+Cabal-Version: >= 1.8
4+Build-type: Simple
5+License: BSD3
6+License-file: LICENSE
7+Copyright: 2000-2017 Koen Claessen, 2006-2008 Björn Bringert, 2009-2017 Nick Smallbone
8+Author: Koen Claessen <koen@chalmers.se>
9+Maintainer: Nick Smallbone <nick@smallbone.se>; see also QuickCheck mailing list (https://groups.google.com/forum/#!forum/haskell-quickcheck)
10+Bug-reports: https://github.com/nick8325/quickcheck/issues
11+Tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC >= 7.4
12+Homepage: https://github.com/nick8325/quickcheck
13+Category: Testing
14+Synopsis: Automatic testing of Haskell programs
15+Description:
16+ QuickCheck is a library for random testing of program properties.
17+ .
18+ The programmer provides a specification of the program, in the form of
19+ properties which functions should satisfy, and QuickCheck then tests that the
20+ properties hold in a large number of randomly generated cases.
21+ .
22+ Specifications are expressed in Haskell, using combinators defined in the
23+ QuickCheck library. QuickCheck provides combinators to define properties,
24+ observe the distribution of test data, and define test data generators.
25+ .
26+ The <http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html official QuickCheck manual>
27+ explains how to write generators and properties;
28+ it is out-of-date in some details but still full of useful advice.
29+ .
30+ A user of QuickCheck has written an unofficial, but detailed, tutorial which
31+ you can find at
32+ <https://begriffs.com/posts/2017-01-14-design-use-quickcheck.html>.
33+
34+extra-source-files:
35+ README
36+ changelog
37+ examples/Heap.hs
38+ examples/Heap_Program.hs
39+ examples/Heap_ProgramAlgebraic.hs
40+ examples/Lambda.hs
41+ examples/Merge.hs
42+ examples/Set.hs
43+ examples/Simple.hs
44+
45+source-repository head
46+ type: git
47+ location: https://github.com/nick8325/quickcheck
48+
49+source-repository this
50+ type: git
51+ location: https://github.com/nick8325/quickcheck
52+ tag: 2.10.1
53+
54+flag templateHaskell
55+ Description: Build Test.QuickCheck.All, which uses Template Haskell.
56+ Default: True
57+
58+library
59+ Build-depends: base >=4.3 && <5, random, containers
60+
61+ -- Modules that are always built.
62+ Exposed-Modules:
63+ Test.QuickCheck,
64+ Test.QuickCheck.Arbitrary,
65+ Test.QuickCheck.Gen,
66+ Test.QuickCheck.Gen.Unsafe,
67+ Test.QuickCheck.Monadic,
68+ Test.QuickCheck.Modifiers,
69+ Test.QuickCheck.Property,
70+ Test.QuickCheck.Test,
71+ Test.QuickCheck.Text,
72+ Test.QuickCheck.Poly,
73+ Test.QuickCheck.State,
74+ Test.QuickCheck.Random,
75+ Test.QuickCheck.Exception
76+
77+ -- GHC-specific modules.
78+ if impl(ghc)
79+ Exposed-Modules: Test.QuickCheck.Function
80+ Build-depends: transformers >= 0.3, deepseq
81+ else
82+ cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ
83+
84+ if impl(ghc) && flag(templateHaskell)
85+ Build-depends: template-haskell >= 2.4
86+ Other-Extensions: TemplateHaskell
87+ Exposed-Modules: Test.QuickCheck.All
88+ else
89+ cpp-options: -DNO_TEMPLATE_HASKELL
90+
91+ if !impl(ghc >= 7.2)
92+ cpp-options: -DNO_FOREIGN_C_USECONDS
93+
94+ -- The new generics appeared in GHC 7.2...
95+ if impl(ghc < 7.2)
96+ cpp-options: -DNO_GENERICS
97+ -- ...but in 7.2-7.4 it lives in the ghc-prim package.
98+ if impl(ghc >= 7.2) && impl(ghc < 7.6)
99+ Build-depends: ghc-prim
100+
101+ -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.
102+ if impl (ghc < 7.4)
103+ cpp-options: -DNO_SAFE_HASKELL
104+
105+ -- Use tf-random on newer GHCs.
106+ if impl(ghc)
107+ Build-depends: tf-random >= 0.4
108+ else
109+ cpp-options: -DNO_TF_RANDOM
110+
111+ if !impl(ghc >= 7.6)
112+ cpp-options: -DNO_POLYKINDS
113+
114+ if !impl(ghc >= 8.0)
115+ cpp-options: -DNO_MONADFAIL
116+
117+ -- Switch off most optional features on non-GHC systems.
118+ if !impl(ghc)
119+ -- If your Haskell compiler can cope without some of these, please
120+ -- send a message to the QuickCheck mailing list!
121+ cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL
122+ if !impl(hugs) && !impl(uhc)
123+ cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES
124+
125+ -- LANGUAGE pragmas don't have any effect in Hugs.
126+ if impl(hugs)
127+ Extensions: CPP
128+
129+ if impl(uhc)
130+ -- Cabal under UHC needs pointing out all the dependencies of the
131+ -- random package.
132+ Build-depends: old-time, old-locale
133+ -- Plus some bits of the standard library are missing.
134+ cpp-options: -DNO_FIXED -DNO_EXCEPTIONS
135+
136+Test-Suite test-quickcheck
137+ type: exitcode-stdio-1.0
138+ hs-source-dirs:
139+ examples
140+ main-is: Heap.hs
141+ build-depends: base, QuickCheck
142+ if !flag(templateHaskell)
143+ Buildable: False
144+
145+Test-Suite test-quickcheck-gcoarbitrary
146+ type: exitcode-stdio-1.0
147+ hs-source-dirs: tests
148+ main-is: GCoArbitraryExample.hs
149+ build-depends: base, QuickCheck
150+ if !impl(ghc >= 7.2)
151+ buildable: False
152+ if impl(ghc >= 7.2) && impl(ghc < 7.6)
153+ build-depends: ghc-prim
154+
155+Test-Suite test-quickcheck-generators
156+ type: exitcode-stdio-1.0
157+ hs-source-dirs: tests
158+ main-is: Generators.hs
159+ build-depends: base, QuickCheck
160+ if !flag(templateHaskell)
161+ Buildable: False
162+
163+Test-Suite test-quickcheck-gshrink
164+ type: exitcode-stdio-1.0
165+ hs-source-dirs: tests
166+ main-is: GShrinkExample.hs
167+ build-depends: base, QuickCheck
168+ if !impl(ghc >= 7.2)
169+ buildable: False
170+ if impl(ghc >= 7.2) && impl(ghc < 7.6)
171+ build-depends: ghc-prim
test/golden-test-cases/QuickCheck.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, base, containers, deepseq, random, stdenv
2+, template-haskell, tf-random, transformers
3+}:
4+mkDerivation {
5+ pname = "QuickCheck";
6+ version = "2.10.1";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base containers deepseq random template-haskell tf-random
10+ transformers
11+ ];
12+ testHaskellDepends = [ base ];
13+ homepage = "https://github.com/nick8325/quickcheck";
14+ description = "Automatic testing of Haskell programs";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/ReadArgs.cabalnew file+110
@@ -0,0 +1,110 @@
1+Name: ReadArgs
2+Version: 1.2.3
3+Synopsis: Simple command line argument parsing
4+
5+Description:
6+
7+ ReadArgs provides the @readArgs@ IO action, which lets you tell the compiler
8+ to parse the command line arguments to fit the type signature you give.
9+ .
10+ For example @(a :: Int, b :: String, c :: Float) <- readArgs@ would
11+ parse the first runtime argument as an @Int@, the second as a @String@ (no
12+ quotes required) and the third as a @Float@.
13+ .
14+ If the runtime arguments are incompatible with the type signature,
15+ then a simple usage statement is given of the types needed.
16+ .
17+ Continuing the previous example, if it was used in a
18+ program named @Example@, the error message for the above
19+ action would be:
20+ .
21+ @
22+ usage: Example Int String Float
23+ @
24+ .
25+ Any type that has both @Typeable@ and @Read@ instances
26+ can be used. @Char@, @String@, and @Text@ are handled specially so that
27+ command line arguments for both do not require quotes (as their
28+ @Read@ instances do). A special instance is provided for @FilePath@ so
29+ that no constructor or quotes are required.
30+ .
31+ @readArgs@ also supports optional arguments and variadic arguments.
32+ Optional arguments are specified using @Maybe@, and variadic arguments
33+ using a list. @(a :: Int, b :: Maybe String, c :: [Float]) <- readArgs@
34+ would successfully parse any of the following sets of command line arguments:
35+ .
36+ @
37+ Example 1
38+ Example 1 2 3 4
39+ Example 1 foo
40+ Example 1 foo 2 3 4
41+ @
42+ .
43+ But not
44+ .
45+ @
46+ Example
47+ Example foo
48+ Example 1.0
49+ @
50+ .
51+ Usage statements for optional and variadic arguments use command-line
52+ parlance:
53+ .
54+ @
55+ usage: Example Int [String] [Float..]
56+ @
57+ .
58+ Note that both optional and variadic parsers are greedy by default
59+ (so @Example 1 2 3 4@ was parsed as @(1, "2", [3.0,4.0])@. They
60+ may both be made non-greedy through use of the @NonGreedy@ constructor:
61+ .
62+ @
63+ ( a :: Int
64+ , NonGreedy b :: NonGreedy Maybe String
65+ , NonGreedy c :: NonGreedy [] Float
66+ ) <- readArgs
67+ @
68+
69+Homepage: http://github.com/rampion/ReadArgs
70+License: BSD3
71+License-file: LICENSE
72+Author: Noah Luck Easterly
73+Maintainer: noah.easterly@gmail.com
74+Category: Command Line
75+Build-type: Simple
76+Cabal-version: >=1.8
77+
78+Source-repository head
79+ type: git
80+ location: git://github.com/rampion/ReadArgs.git
81+
82+Library
83+ Exposed-modules: ReadArgs
84+
85+ Build-depends:
86+ base >= 4.3.1.0 && < 5,
87+ system-filepath >= 0.4.7 && < 0.5,
88+ text >= 0.11.1.13 && < 12
89+
90+Test-Suite ReadArgsSpec
91+ type:
92+ exitcode-stdio-1.0
93+
94+ Main-Is:
95+ ReadArgsSpec.hs
96+
97+ Build-depends:
98+ hspec >= 1.3 && < 3,
99+ base >= 4.3.1.0 && < 5,
100+ system-filepath >= 0.4.7 && < 0.5,
101+ text >= 0.11.1.13 && < 12
102+
103+Executable ReadArgsEx
104+ Main-Is:
105+ ReadArgsEx.hs
106+
107+ Build-depends:
108+ base >= 4.3.1.0 && < 5,
109+ system-filepath >= 0.4.7 && < 0.5,
110+ text >= 0.11.1.13 && < 12
test/golden-test-cases/ReadArgs.nix.goldennew file+14
@@ -0,0 +1,14 @@
1+{ mkDerivation, base, hspec, stdenv, system-filepath, text }:
2+mkDerivation {
3+ pname = "ReadArgs";
4+ version = "1.2.3";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ libraryHaskellDepends = [ base system-filepath text ];
9+ executableHaskellDepends = [ base system-filepath text ];
10+ testHaskellDepends = [ base hspec system-filepath text ];
11+ homepage = "http://github.com/rampion/ReadArgs";
12+ description = "Simple command line argument parsing";
13+ license = stdenv.lib.licenses.bsd3;
14+}
test/golden-test-cases/SHA.cabalnew file+130
@@ -0,0 +1,130 @@
1+name: SHA
2+category: Cryptography, Codec
3+version: 1.6.4.2
4+license: BSD3
5+license-file: LICENSE
6+author: Adam Wick <awick@galois.com>, Brian Lewis <brian@lorf.org>
7+maintainer: Adam Wick <awick@galois.com>,
8+ Raphael Javaux <raphaeljavaux@gmail.com>
9+stability: stable
10+build-type: Simple
11+cabal-version: >= 1.8
12+tested-with: GHC == 7.6.1
13+synopsis: Implementations of the SHA suite of message digest functions
14+description: This library implements the SHA suite of message digest functions,
15+ according to NIST FIPS 180-2 (with the SHA-224 addendum), as well
16+ as the SHA-based HMAC routines. The functions have been tested
17+ against most of the NIST and RFC test vectors for the various
18+ functions. While some attention has been paid to performance,
19+ these do not presently reach the speed of well-tuned libraries,
20+ like OpenSSL.
21+
22+Flag exe
23+ Description: Build a sha executables similar to 'md5sum'.
24+ Default: False
25+
26+Library
27+ hs-source-dirs: src
28+ build-depends: array > 0 && < 10000,
29+ base >= 4 && < 6,
30+ binary >= 0.7 && < 10000,
31+ bytestring > 0.8 && < 10000
32+ exposed-modules: Data.Digest.Pure.SHA
33+ GHC-Options: -Wall -fno-ignore-asserts -fno-warn-orphans
34+ -funbox-strict-fields -fwarn-tabs
35+ extensions: BangPatterns
36+ if impl(ghc >= 6.12) && impl(ghc < 7.7)
37+ Ghc-Options: -fregs-graph
38+
39+test-suite test-sha
40+ type: exitcode-stdio-1.0
41+ hs-source-dirs: src
42+ main-is: Test.hs
43+ ghc-options: -Wall -fhpc
44+ build-depends: array > 0 && < 10000,
45+ base > 4.3 && < 7,
46+ binary >= 0.7 && < 10000,
47+ bytestring > 0.8 && < 10000,
48+ QuickCheck >= 2.5 && < 3,
49+ test-framework >= 0.8.0.3 && < 10000,
50+ test-framework-quickcheck2 >= 0.3.0.2 && < 10000
51+ extensions: BangPatterns, MultiParamTypeClasses, DeriveDataTypeable
52+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
53+ -funbox-strict-fields -fwarn-tabs
54+ cpp-options: -DSHA_TEST
55+ if impl(ghc >= 6.12)
56+ Ghc-Options: -fregs-graph
57+
58+Executable sha1
59+ if !flag(exe)
60+ buildable: False
61+ hs-source-dirs: src-bin
62+ build-depends: base >= 4 && < 6,
63+ bytestring > 0.8 && < 10000,
64+ directory > 0.0 && < 10000,
65+ SHA > 1.6 && < 10000
66+ Main-Is: Main.hs
67+ extensions: CPP
68+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
69+ -funbox-strict-fields -fwarn-tabs
70+ cpp-options: -DALGORITHM=sha1
71+
72+Executable sha224
73+ if !flag(exe)
74+ buildable: False
75+ hs-source-dirs: src-bin
76+ build-depends: base >= 4 && < 6,
77+ bytestring > 0.8 && < 10000,
78+ directory > 0.0 && < 10000,
79+ SHA > 1.6 && < 10000
80+ Main-Is: Main.hs
81+ extensions: CPP
82+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
83+ -funbox-strict-fields -fwarn-tabs
84+ cpp-options: -DALGORITHM=sha224
85+
86+Executable sha256
87+ if !flag(exe)
88+ buildable: False
89+ hs-source-dirs: src-bin
90+ build-depends: base >= 4 && < 6,
91+ bytestring > 0.8 && < 10000,
92+ directory > 0.0 && < 10000,
93+ SHA > 1.6 && < 10000
94+ Main-Is: Main.hs
95+ extensions: CPP
96+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
97+ -funbox-strict-fields -fwarn-tabs
98+ cpp-options: -DALGORITHM=sha256
99+
100+Executable sha384
101+ if !flag(exe)
102+ buildable: False
103+ hs-source-dirs: src-bin
104+ build-depends: base >= 4 && < 6,
105+ bytestring > 0.8 && < 10000,
106+ directory > 0.0 && < 10000,
107+ SHA > 1.6 && < 10000
108+ Main-Is: Main.hs
109+ extensions: CPP
110+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
111+ -funbox-strict-fields -fwarn-tabs
112+ cpp-options: -DALGORITHM=sha384
113+
114+Executable sha512
115+ if !flag(exe)
116+ buildable: False
117+ hs-source-dirs: src-bin
118+ build-depends: base >= 4 && < 6,
119+ bytestring > 0.8 && < 10000,
120+ directory > 0.0 && < 10000,
121+ SHA > 1.6 && < 10000
122+ Main-Is: Main.hs
123+ extensions: CPP
124+ GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
125+ -funbox-strict-fields -fwarn-tabs
126+ cpp-options: -DALGORITHM=sha512
127+
128+source-repository head
129+ type: git
130+ location: git://github.com/GaloisInc/SHA.git
test/golden-test-cases/SHA.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, array, base, binary, bytestring, QuickCheck, stdenv
2+, test-framework, test-framework-quickcheck2
3+}:
4+mkDerivation {
5+ pname = "SHA";
6+ version = "1.6.4.2";
7+ sha256 = "deadbeef";
8+ isLibrary = true;
9+ isExecutable = true;
10+ libraryHaskellDepends = [ array base binary bytestring ];
11+ testHaskellDepends = [
12+ array base binary bytestring QuickCheck test-framework
13+ test-framework-quickcheck2
14+ ];
15+ description = "Implementations of the SHA suite of message digest functions";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/Strafunski-StrategyLib.cabalnew file+59
@@ -0,0 +1,59 @@
1+name: Strafunski-StrategyLib
2+version: 5.0.0.10
3+synopsis: Library for strategic programming
4+description: This is a version of the StrategyLib library originally shipped with Strafunski, Cabalized and updated to newer versions of GHC. A description of much of StrategyLib can be found in the paper "Design Patterns for Functional Strategic Programming."
5+license: BSD3
6+license-file: LICENSE
7+author: Ralf Laemmel, Joost Visser
8+maintainer: darmanithird@gmail.com,alan.zimm@gmail.com
9+category: Generics
10+build-type: Simple
11+cabal-version: >=1.8
12+
13+source-repository head
14+ type: git
15+ location: https://github.com/jkoppel/Strafunski-StrategyLib
16+
17+
18+library
19+
20+ Extensions:
21+ OverlappingInstances,
22+ FlexibleInstances,
23+ FlexibleContexts,
24+ UndecidableInstances,
25+ MultiParamTypeClasses,
26+ FunctionalDependencies,
27+ Rank2Types
28+
29+ exposed-modules:
30+ Control.Monad.Run,
31+ Data.Generics.Strafunski.StrategyLib.ChaseImports,
32+ Data.Generics.Strafunski.StrategyLib.ContainerTheme,
33+ Data.Generics.Strafunski.StrategyLib.EffectTheme,
34+ Data.Generics.Strafunski.StrategyLib.FixpointTheme,
35+ Data.Generics.Strafunski.StrategyLib.FlowTheme,
36+ Data.Generics.Strafunski.StrategyLib.KeyholeTheme,
37+ Data.Generics.Strafunski.StrategyLib.MetricsTheme,
38+ Data.Generics.Strafunski.StrategyLib.MonadicFunctions,
39+ Data.Generics.Strafunski.StrategyLib.MoreMonoids,
40+ Data.Generics.Strafunski.StrategyLib.NameTheme,
41+ Data.Generics.Strafunski.StrategyLib.OverloadingTheme,
42+ Data.Generics.Strafunski.StrategyLib.PathTheme,
43+ Data.Generics.Strafunski.StrategyLib.RefactoringTheme,
44+ Data.Generics.Strafunski.StrategyLib.StrategyInfix,
45+ Data.Generics.Strafunski.StrategyLib.StrategyLib,
46+ Data.Generics.Strafunski.StrategyLib.StrategyPrelude,
47+ Data.Generics.Strafunski.StrategyLib.TraversalTheme,
48+ Data.Generics.Strafunski.StrategyLib.Models.Deriving.StrategyPrimitives,
49+ Data.Generics.Strafunski.StrategyLib.Models.Deriving.TermRep
50+
51+-- other-modules:
52+
53+ build-depends:
54+ base > 4.4 && < 4.10,
55+ mtl > 2.2,
56+ syb > 0.3 && < 4.1,
57+ directory > 1.1 && < 1.4,
58+ transformers >= 0.2
59+
test/golden-test-cases/Strafunski-StrategyLib.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, directory, mtl, stdenv, syb, transformers }:
2+mkDerivation {
3+ pname = "Strafunski-StrategyLib";
4+ version = "5.0.0.10";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base directory mtl syb transformers ];
7+ description = "Library for strategic programming";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/accelerate-fftw.cabalnew file+41
@@ -0,0 +1,41 @@
1+Name: accelerate-fftw
2+Version: 1.0
3+License: BSD3
4+License-File: LICENSE
5+Author: Henning Thielemann <haskell@henning-thielemann.de>
6+Maintainer: Henning Thielemann <haskell@henning-thielemann.de>
7+Homepage: http://hub.darcs.net/thielema/accelerate-fftw/
8+Category: Math
9+Synopsis: Accelerate frontend to the FFTW library (Fourier transform)
10+Description:
11+ An interface to the Fastest Fourier Transform in the West (FFTW)
12+ for the @accelerate@ framework.
13+Tested-With: GHC==7.8.3
14+Cabal-Version: >=1.14
15+Build-Type: Simple
16+
17+Source-Repository this
18+ Tag: 1.0
19+ Type: darcs
20+ Location: http://hub.darcs.net/thielema/accelerate-fftw/
21+
22+Source-Repository head
23+ Type: darcs
24+ Location: http://hub.darcs.net/thielema/accelerate-fftw/
25+
26+Library
27+ Build-Depends:
28+ fft >=0.1.7 && <0.2,
29+ carray >=0.1.5 && <0.2,
30+ storable-complex >=0.2.1 && <0.3,
31+ accelerate-io >=1.0 && <1.1,
32+ accelerate >=1.0 && <1.2,
33+ base >=4.5 && <4.11
34+
35+ GHC-Options: -Wall -fwarn-missing-import-lists
36+ Hs-Source-Dirs: src
37+ Default-Language: Haskell98
38+ Exposed-Modules:
39+ Data.Array.Accelerate.FFTW.Manifest
40+ Other-Modules:
41+ Data.Array.Accelerate.CArray.Conversion
test/golden-test-cases/accelerate-fftw.nix.goldennew file+14
@@ -0,0 +1,14 @@
1+{ mkDerivation, accelerate, accelerate-io, base, carray, fft
2+, stdenv, storable-complex
3+}:
4+mkDerivation {
5+ pname = "accelerate-fftw";
6+ version = "1.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ accelerate accelerate-io base carray fft storable-complex
10+ ];
11+ homepage = "http://hub.darcs.net/thielema/accelerate-fftw/";
12+ description = "Accelerate frontend to the FFTW library (Fourier transform)";
13+ license = stdenv.lib.licenses.bsd3;
14+}
test/golden-test-cases/accelerate.cabalnew file+412
@@ -0,0 +1,412 @@
1+Name: accelerate
2+Version: 1.1.1.0
3+Cabal-version: >= 1.8
4+Tested-with: GHC >= 7.8
5+Build-type: Simple
6+
7+Synopsis: An embedded language for accelerated array processing
8+
9+Description:
10+ @Data.Array.Accelerate@ defines an embedded array language for computations
11+ for high-performance computing in Haskell. Computations on multi-dimensional,
12+ regular arrays are expressed in the form of parameterised collective
13+ operations, such as maps, reductions, and permutations. These computations may
14+ then be online compiled and executed on a range of architectures.
15+ .
16+ [/A simple example/]
17+ .
18+ As a simple example, consider the computation of a dot product of two vectors
19+ of floating point numbers:
20+ .
21+ > dotp :: Acc (Vector Float) -> Acc (Vector Float) -> Acc (Scalar Float)
22+ > dotp xs ys = fold (+) 0 (zipWith (*) xs ys)
23+ .
24+ Except for the type, this code is almost the same as the corresponding Haskell
25+ code on lists of floats. The types indicate that the computation may be
26+ online-compiled for performance - for example, using
27+ @Data.Array.Accelerate.LLVM.PTX@ it may be on-the-fly off-loaded to the GPU.
28+ .
29+ [/Additional components/]
30+ .
31+ The following supported add-ons are available as separate packages. Install
32+ them from Hackage with @cabal install \<package\>@
33+ .
34+ * @accelerate-llvm-native@: Backend supporting parallel execution on
35+ multicore CPUs.
36+ .
37+ * @accelerate-llvm-ptx@: Backend supporting parallel execution on
38+ CUDA-capable NVIDIA GPUs. Requires a GPU with compute capability 2.0 or
39+ greater. See the following table for supported GPUs:
40+ <http://en.wikipedia.org/wiki/CUDA#Supported_GPUs>
41+ .
42+ * @accelerate-examples@: Computational kernels and applications showcasing
43+ the use of Accelerate as well as a regression test suite, supporting
44+ function and performance testing.
45+ .
46+ * @accelerate-io@: Fast conversions between Accelerate arrays and other
47+ array formats (including vector and repa).
48+ .
49+ * @accelerate-fft@: Discrete Fourier transforms, with FFI bindings to
50+ optimised implementations.
51+ .
52+ * @accelerate-bignum@: Fixed-width large integer arithmetic.
53+ .
54+ * @colour-accelerate@: Colour representations in Accelerate (RGB, sRGB, HSV,
55+ and HSL).
56+ .
57+ * @gloss-accelerate@: Generate gloss pictures from Accelerate.
58+ .
59+ * @gloss-raster-accelerate@: Parallel rendering of raster images and
60+ animations.
61+ .
62+ * @lens-accelerate@: Lens operators for Accelerate types.
63+ .
64+ * @linear-accelerate@: Linear vector spaces in Accelerate.
65+ .
66+ * @mwc-random-accelerate@: Generate Accelerate arrays filled with high
67+ quality pseudorandom numbers.
68+ .
69+ [/Examples and documentation/]
70+ .
71+ Haddock documentation is included in the package
72+ .
73+ The @accelerate-examples@ package demonstrates a range of computational
74+ kernels and several complete applications, including:
75+ .
76+ * An implementation of the Canny edge detection algorithm
77+ .
78+ * An interactive Mandelbrot set generator
79+ .
80+ * A particle-based simulation of stable fluid flows
81+ .
82+ * An /n/-body simulation of gravitational attraction between solid particles
83+ .
84+ * An implementation of the PageRank algorithm
85+ .
86+ * A simple interactive ray tracer
87+ .
88+ * A particle based simulation of stable fluid flows
89+ .
90+ * A cellular automata simulation
91+ .
92+ * A \"password recovery\" tool, for dictionary lookup of MD5 hashes
93+ .
94+ @lulesh-accelerate@ is an implementation of the Livermore Unstructured
95+ Lagrangian Explicit Shock Hydrodynamics (LULESH) mini-app. LULESH represents a
96+ typical hydrodynamics code such as ALE3D, but is highly simplified and
97+ hard-coded to solve the Sedov blast problem on an unstructured hexahedron
98+ mesh.
99+ .
100+ [/Mailing list and contacts/]
101+ .
102+ * Mailing list: <accelerate-haskell@googlegroups.com> (discussion of both
103+ use and development welcome).
104+ .
105+ * Sign up for the mailing list here:
106+ <http://groups.google.com/group/accelerate-haskell>
107+ .
108+ * Bug reports and issue tracking:
109+ <https://github.com/AccelerateHS/accelerate/issues>
110+ .
111+
112+License: BSD3
113+License-file: LICENSE
114+Author: Manuel M T Chakravarty,
115+ Robert Clifton-Everest,
116+ Gabriele Keller,
117+ Ben Lever,
118+ Trevor L. McDonell,
119+ Ryan Newtown,
120+ Sean Seefried
121+Maintainer: Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
122+Homepage: https://github.com/AccelerateHS/accelerate/
123+Bug-reports: https://github.com/AccelerateHS/accelerate/issues
124+
125+Category: Compilers/Interpreters, Concurrency, Data, Parallelism
126+Stability: Experimental
127+
128+Extra-source-files:
129+ README.md
130+ CHANGELOG.md
131+
132+Flag debug
133+ Default: False
134+ Description:
135+ Enable debug tracing messages. The following options are read from the
136+ environment variable @ACCELERATE_FLAGS@, and via the command-line as:
137+ .
138+ > ./program +ACC ... -ACC
139+ .
140+ Note that a backend may not implement (or be applicable to) all options.
141+ .
142+ The following flags control phases of the compiler. The are enabled with
143+ @-f\<flag\>@ and can be reveresed with @-fno-\<flag\>@:
144+ .
145+ * @acc-sharing@: Enable sharing recovery of array expressions (True).
146+ .
147+ * @exp-sharing@: Enable sharing recovery of scalar expressions (True).
148+ .
149+ * @fusion@: Enable array fusion (True).
150+ .
151+ * @simplify@: Enable program simplification phase (True).
152+ .
153+ * @flush-cache@: Clear any persistent caches on program startup (False).
154+ .
155+ * @force-recomp@: Force recompilation of array programs (False).
156+ .
157+ * @fast-math@: Allow algebraically equivalent transformations which may
158+ change floating point results (e.g., reassociate) (True).
159+ .
160+ The following options control debug message output, and are enabled with
161+ @-d\<flag\>@.
162+ .
163+ * @verbose@: Be extra chatty.
164+ .
165+ * @dump-phases@: Print timing information about each phase of the compiler.
166+ Enable GC stats (@+RTS -t@ or otherwise) for memory usage information.
167+ .
168+ * @dump-sharing@: Print information related to sharing recovery.
169+ .
170+ * @dump-simpl-stats@: Print statistics related to fusion & simplification.
171+ .
172+ * @dump-simpl-iterations@: Print a summary after each simplifier iteration.
173+ .
174+ * @dump-vectorisation@: Print information related to the vectoriser.
175+ .
176+ * @dump-dot@: Generate a representation of the program graph in Graphviz
177+ DOT format.
178+ .
179+ * @dump-simpl-dot@: Generate a more compact representation of the program
180+ graph in Graphviz DOT format. In particular, scalar expressions are
181+ elided.
182+ .
183+ * @dump-gc@: Print information related to the Accelerate garbage
184+ collector.
185+ .
186+ * @dump-gc-stats@: Print aggregate garbage collection information at the
187+ end of program execution.
188+ .
189+ * @dubug-cc@: Include debug symbols in the generated and compiled kernels.
190+ .
191+ * @dump-cc@: Print information related to kernel code
192+ generation/compilation. Print the generated code if @verbose@.
193+ .
194+ * @dump-ld@: Print information related to runtime linking.
195+ .
196+ * @dump-asm@: Print information related to kernel assembly. Print the
197+ assembled code if @verbose@.
198+ .
199+ * @dump-exec@: Print information related to program execution.
200+ .
201+ * @dump-sched@: Print information related to execution scheduling.
202+ .
203+
204+Flag ekg
205+ Default: False
206+ Description:
207+ Enable hooks for monitoring the running application using EKG. Implies
208+ @debug@ mode. In order to view the metrics, your application will need to
209+ call @Data.Array.Accelerate.Debug.beginMonitoring@ before running any
210+ Accelerate computations. This will launch the server on the local machine at
211+ port 8000.
212+ .
213+ Alternatively, if you wish to configure the EKG monitoring server you can
214+ initialise it like so:
215+ .
216+ > import Data.Array.Accelerate.Debug
217+ >
218+ > import System.Metrics
219+ > import System.Remote.Monitoring
220+ >
221+ > main :: IO ()
222+ > main = do
223+ > store <- initAccMetrics
224+ > registerGcMetrics store -- optional
225+ >
226+ > server <- forkServerWith store "localhost" 8000
227+ >
228+ > ...
229+ .
230+ Note that, as with any program utilising EKG, in order to collect Haskell GC
231+ statistics, you must either run the program with:
232+ .
233+ > +RTS -T -RTS
234+ .
235+ or compile it with:
236+ .
237+ > -with-rtsopts=-T
238+ .
239+
240+Flag bounds-checks
241+ Description: Enable bounds checking
242+ Default: True
243+
244+Flag unsafe-checks
245+ Description: Enable bounds checking in unsafe operations
246+ Default: False
247+
248+Flag internal-checks
249+ Description: Enable internal consistency checks
250+ Default: False
251+
252+Library
253+ Build-depends:
254+ base >= 4.7 && < 4.11
255+ , base-orphans >= 0.3
256+ , containers >= 0.3
257+ , deepseq >= 1.3
258+ , directory >= 1.0
259+ , exceptions >= 0.6
260+ , fclabels >= 2.0
261+ , filepath >= 1.0
262+ , ghc-prim
263+ , hashable >= 1.1
264+ , hashtables >= 1.0
265+ , mtl >= 2.0
266+ , ansi-wl-pprint >= 0.6
267+ , template-haskell
268+ , time >= 1.4
269+ , transformers >= 0.3
270+ , unique
271+ , unordered-containers >= 0.2
272+
273+ Exposed-modules:
274+ -- The core language and reference implementation
275+ Data.Array.Accelerate
276+ Data.Array.Accelerate.Interpreter
277+
278+ -- Prelude-like
279+ Data.Array.Accelerate.Data.Bits
280+ Data.Array.Accelerate.Data.Complex
281+ Data.Array.Accelerate.Data.Fold
282+ Data.Array.Accelerate.Data.Monoid
283+
284+ -- For backend development
285+ Data.Array.Accelerate.AST
286+ Data.Array.Accelerate.Analysis.Hash
287+ Data.Array.Accelerate.Analysis.Match
288+ Data.Array.Accelerate.Analysis.Shape
289+ Data.Array.Accelerate.Analysis.Stencil
290+ Data.Array.Accelerate.Analysis.Type
291+ Data.Array.Accelerate.Array.Data
292+ Data.Array.Accelerate.Array.Remote
293+ Data.Array.Accelerate.Array.Remote.Class
294+ Data.Array.Accelerate.Array.Remote.LRU
295+ Data.Array.Accelerate.Array.Remote.Table
296+ Data.Array.Accelerate.Array.Representation
297+ Data.Array.Accelerate.Array.Sugar
298+ Data.Array.Accelerate.Array.Unique
299+ Data.Array.Accelerate.Async
300+ Data.Array.Accelerate.Debug
301+ Data.Array.Accelerate.Error
302+ Data.Array.Accelerate.FullList
303+ Data.Array.Accelerate.Lifetime
304+ Data.Array.Accelerate.Pretty
305+ Data.Array.Accelerate.Product
306+ Data.Array.Accelerate.Smart
307+ Data.Array.Accelerate.Trafo
308+ Data.Array.Accelerate.Type
309+
310+ Other-modules:
311+ Data.Atomic
312+ Data.Array.Accelerate.Analysis.Hash.TH
313+ Data.Array.Accelerate.Array.Lifted
314+ Data.Array.Accelerate.Array.Remote.Nursery
315+ Data.Array.Accelerate.Classes
316+ Data.Array.Accelerate.Classes.Bounded
317+ Data.Array.Accelerate.Classes.Enum
318+ Data.Array.Accelerate.Classes.Eq
319+ Data.Array.Accelerate.Classes.Floating
320+ Data.Array.Accelerate.Classes.Fractional
321+ Data.Array.Accelerate.Classes.FromIntegral
322+ Data.Array.Accelerate.Classes.Integral
323+ Data.Array.Accelerate.Classes.Num
324+ Data.Array.Accelerate.Classes.Ord
325+ Data.Array.Accelerate.Classes.Real
326+ Data.Array.Accelerate.Classes.RealFloat
327+ Data.Array.Accelerate.Classes.RealFrac
328+ Data.Array.Accelerate.Classes.ToFloating
329+ Data.Array.Accelerate.Debug.Flags
330+ Data.Array.Accelerate.Debug.Monitoring
331+ Data.Array.Accelerate.Debug.Stats
332+ Data.Array.Accelerate.Debug.Timed
333+ Data.Array.Accelerate.Debug.Trace
334+ Data.Array.Accelerate.Language
335+ Data.Array.Accelerate.Lift
336+ Data.Array.Accelerate.Prelude
337+ Data.Array.Accelerate.Pretty.Graphviz
338+ Data.Array.Accelerate.Pretty.Graphviz.Monad
339+ Data.Array.Accelerate.Pretty.Graphviz.Type
340+ Data.Array.Accelerate.Pretty.Print
341+ Data.Array.Accelerate.Trafo.Algebra
342+ Data.Array.Accelerate.Trafo.Base
343+ Data.Array.Accelerate.Trafo.Fusion
344+ Data.Array.Accelerate.Trafo.Rewrite
345+ Data.Array.Accelerate.Trafo.Sharing
346+ Data.Array.Accelerate.Trafo.Shrink
347+ Data.Array.Accelerate.Trafo.Simplify
348+ Data.Array.Accelerate.Trafo.Substitution
349+ -- Data.Array.Accelerate.Trafo.Vectorise
350+
351+ c-sources: cbits/atomic.c
352+
353+ if flag(debug) || flag(ekg)
354+ cpp-options: -DACCELERATE_DEBUG
355+
356+ if flag(ekg)
357+ cpp-options: -DACCELERATE_MONITORING
358+ build-depends:
359+ async >= 2.0
360+ , ekg >= 0.1
361+ , ekg-core >= 0.1
362+ , text >= 1.0
363+ , time >= 1.4
364+
365+ if flag(bounds-checks)
366+ cpp-options: -DACCELERATE_BOUNDS_CHECKS
367+
368+ if flag(unsafe-checks)
369+ cpp-options: -DACCELERATE_UNSAFE_CHECKS
370+
371+ if flag(internal-checks)
372+ cpp-options: -DACCELERATE_INTERNAL_CHECKS
373+
374+ if os(windows)
375+ cpp-options: -DWIN32
376+ build-depends: Win32
377+ else
378+ cpp-options: -DUNIX
379+ build-depends: unix
380+
381+ ghc-options: -O2 -Wall -funbox-strict-fields -fno-warn-name-shadowing
382+ ghc-prof-options: -caf-all -auto-all
383+
384+ if impl(ghc >= 7.0)
385+ ghc-options: -fspec-constr-count=25
386+
387+ if impl(ghc == 7.*)
388+ ghc-options: -fcontext-stack=35
389+
390+ if impl(ghc >= 8.0)
391+ ghc-options: -freduction-depth=35
392+
393+ if impl(ghc < 7.10)
394+ build-depends:
395+ th-lift-instances >= 0.1
396+
397+ -- Don't add the extensions list here. Instead, place individual LANGUAGE
398+ -- pragmas in the files that require a specific extension. This means the
399+ -- project loads in GHCi, and avoids extension clashes.
400+ --
401+ -- Extensions:
402+
403+source-repository head
404+ Type: git
405+ Location: git://github.com/AccelerateHS/accelerate.git
406+
407+source-repository this
408+ Type: git
409+ Tag: 1.1.1.0
410+ Location: git://github.com/AccelerateHS/accelerate.git
411+
412+-- vim: nospell
test/golden-test-cases/accelerate.nix.goldennew file+18
@@ -0,0 +1,18 @@
1+{ mkDerivation, ansi-wl-pprint, base, base-orphans, containers
2+, deepseq, directory, exceptions, fclabels, filepath, ghc-prim
3+, hashable, hashtables, mtl, stdenv, template-haskell, time
4+, transformers, unique, unix, unordered-containers
5+}:
6+mkDerivation {
7+ pname = "accelerate";
8+ version = "1.1.1.0";
9+ sha256 = "deadbeef";
10+ libraryHaskellDepends = [
11+ ansi-wl-pprint base base-orphans containers deepseq directory
12+ exceptions fclabels filepath ghc-prim hashable hashtables mtl
13+ template-haskell time transformers unique unix unordered-containers
14+ ];
15+ homepage = "https://github.com/AccelerateHS/accelerate/";
16+ description = "An embedded language for accelerated array processing";
17+ license = stdenv.lib.licenses.bsd3;
18+}
test/golden-test-cases/active.cabalnew file+44
@@ -0,0 +1,44 @@
1+name: active
2+version: 0.2.0.13
3+synopsis: Abstractions for animation
4+description: "Active" abstraction for animated things with finite start and end times.
5+license: BSD3
6+license-file: LICENSE
7+author: Brent Yorgey
8+maintainer: byorgey@gmail.com
9+copyright: (c) 2011-2015 Brent Yorgey
10+category: Data
11+build-type: Simple
12+cabal-version: >=1.10
13+extra-source-files: CHANGES, README.markdown, diagrams/*.svg
14+extra-doc-files: diagrams/*.svg
15+tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
16+bug-reports: https://github.com/diagrams/active/issues
17+source-repository head
18+ type: git
19+ location: https://github.com/diagrams/active.git
20+
21+library
22+ exposed-modules: Data.Active
23+ build-depends: base >= 4.0 && < 4.11,
24+ vector >= 0.10,
25+ semigroups >= 0.1 && < 0.19,
26+ semigroupoids >= 1.2 && < 5.3,
27+ lens >= 4.0 && < 4.16,
28+ linear >= 1.14 && < 1.21
29+ hs-source-dirs: src
30+ default-language: Haskell2010
31+
32+test-suite active-tests
33+ type: exitcode-stdio-1.0
34+ main-is: active-tests.hs
35+ build-depends: base >= 4.0 && < 4.10,
36+ vector >= 0.10,
37+ semigroups >= 0.1 && < 0.19,
38+ semigroupoids >= 1.2 && < 5.3,
39+ lens >= 4.0 && < 4.16,
40+ linear >= 1.14 && < 1.21,
41+ QuickCheck >= 2.9 && < 2.10
42+ other-modules: Data.Active
43+ hs-source-dirs: src, test
44+ default-language: Haskell2010
test/golden-test-cases/active.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, base, lens, linear, QuickCheck, semigroupoids
2+, semigroups, stdenv, vector
3+}:
4+mkDerivation {
5+ pname = "active";
6+ version = "0.2.0.13";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base lens linear semigroupoids semigroups vector
10+ ];
11+ testHaskellDepends = [
12+ base lens linear QuickCheck semigroupoids semigroups vector
13+ ];
14+ description = "Abstractions for animation";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/adjunctions.cabalnew file+72
@@ -0,0 +1,72 @@
1+name: adjunctions
2+category: Data Structures, Adjunctions
3+version: 4.3
4+license: BSD3
5+cabal-version: >= 1.6
6+license-file: LICENSE
7+author: Edward A. Kmett
8+maintainer: Edward A. Kmett <ekmett@gmail.com>
9+stability: provisional
10+homepage: http://github.com/ekmett/adjunctions/
11+bug-reports: http://github.com/ekmett/adjunctions/issues
12+copyright: Copyright (C) 2011-2014 Edward A. Kmett
13+synopsis: Adjunctions and representable functors
14+description: Adjunctions and representable functors
15+build-type: Simple
16+extra-source-files:
17+ .ghci
18+ .gitignore
19+ .travis.yml
20+ .vim.custom
21+ travis/cabal-apt-install
22+ travis/config
23+ HLint.hs
24+ CHANGELOG.markdown
25+ README.markdown
26+
27+source-repository head
28+ type: git
29+ location: git://github.com/ekmett/adjunctions.git
30+
31+library
32+ hs-source-dirs: src
33+
34+ other-extensions:
35+ CPP
36+ FunctionalDependencies
37+ FlexibleContexts
38+ MultiParamTypeClasses
39+ Rank2Types
40+ UndecidableInstances
41+
42+ build-depends:
43+ array >= 0.3.0.2 && < 0.7,
44+ base >= 4 && < 5,
45+ comonad >= 4 && < 6,
46+ containers >= 0.3 && < 0.6,
47+ contravariant >= 1 && < 2,
48+ distributive >= 0.4 && < 1,
49+ free >= 4 && < 5,
50+ mtl >= 2.0.1 && < 2.3,
51+ profunctors >= 4 && < 6,
52+ tagged >= 0.7 && < 1,
53+ semigroupoids >= 4 && < 6,
54+ semigroups >= 0.11 && < 1,
55+ transformers >= 0.2 && < 0.6,
56+ transformers-compat >= 0.3 && < 1,
57+ void >= 0.5.5.1 && < 1
58+
59+ exposed-modules:
60+ Control.Comonad.Representable.Store
61+ Control.Comonad.Trans.Adjoint
62+ Control.Monad.Representable.Reader
63+ Control.Monad.Representable.State
64+ Control.Monad.Trans.Adjoint
65+ Control.Monad.Trans.Contravariant.Adjoint
66+ Control.Monad.Trans.Conts
67+ Data.Functor.Adjunction
68+ Data.Functor.Contravariant.Adjunction
69+ Data.Functor.Contravariant.Rep
70+ Data.Functor.Rep
71+
72+ ghc-options: -Wall
test/golden-test-cases/adjunctions.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, array, base, comonad, containers, contravariant
2+, distributive, free, mtl, profunctors, semigroupoids, semigroups
3+, stdenv, tagged, transformers, transformers-compat, void
4+}:
5+mkDerivation {
6+ pname = "adjunctions";
7+ version = "4.3";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ array base comonad containers contravariant distributive free mtl
11+ profunctors semigroupoids semigroups tagged transformers
12+ transformers-compat void
13+ ];
14+ homepage = "http://github.com/ekmett/adjunctions/";
15+ description = "Adjunctions and representable functors";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/aeson-diff.cabalnew file+118
@@ -0,0 +1,118 @@
1+name: aeson-diff
2+version: 1.1.0.4
3+synopsis: Extract and apply patches to JSON documents.
4+description:
5+ .
6+ This is a small library for working with changes to JSON documents. It
7+ includes a library and two command-line executables in the style of the
8+ diff(1) and patch(1) commands available on many systems.
9+ .
10+homepage: https://github.com/thsutton/aeson-diff
11+license: BSD3
12+license-file: LICENSE
13+author: Thomas Sutton
14+maintainer: me@thomas-sutton.id.au
15+copyright: (c) 2015 Thomas Sutton and others.
16+category: JSON, Web, Algorithms
17+build-type: Simple
18+cabal-version: >=1.10
19+extra-source-files: README.md
20+ , CHANGELOG.md
21+ , stack.yaml
22+ , test/data/rfc6902/*.json
23+ , test/data/rfc6902/*.txt
24+ , test/data/cases/*.json
25+ , test/data/cases/*.txt
26+
27+source-repository HEAD
28+ type: git
29+ location: https://github.com/thsutton/aeson-diff
30+
31+library
32+ default-language: Haskell2010
33+ hs-source-dirs: lib
34+ exposed-modules: Data.Aeson.Diff
35+ , Data.Aeson.Patch
36+ , Data.Aeson.Pointer
37+ build-depends: base >=4.5 && <4.11
38+ , aeson
39+ , bytestring >= 0.10
40+ , edit-distance-vector
41+ , hashable
42+ , mtl
43+ , scientific
44+ , text
45+ , unordered-containers
46+ , vector
47+
48+executable json-diff
49+ default-language: Haskell2010
50+ hs-source-dirs: src
51+ main-is: diff.hs
52+ build-depends: base
53+ , aeson
54+ , aeson-diff
55+ , bytestring
56+ , optparse-applicative
57+ , text
58+
59+executable json-patch
60+ default-language: Haskell2010
61+ hs-source-dirs: src
62+ main-is: patch.hs
63+ build-depends: base
64+ , aeson
65+ , aeson-diff
66+ , bytestring
67+ , optparse-applicative
68+
69+test-suite properties
70+ default-language: Haskell2010
71+ type: exitcode-stdio-1.0
72+ hs-source-dirs: test
73+ main-is: properties.hs
74+ build-depends: base
75+ , QuickCheck
76+ , aeson
77+ , aeson-diff
78+ , bytestring
79+ , quickcheck-instances
80+ , text
81+ , unordered-containers
82+ , vector
83+
84+test-suite examples
85+ default-language: Haskell2010
86+ type: exitcode-stdio-1.0
87+ hs-source-dirs: test
88+ main-is: examples.hs
89+ build-depends: base
90+ , Glob
91+ , QuickCheck
92+ , aeson
93+ , aeson-diff
94+ , bytestring
95+ , directory
96+ , filepath
97+ , quickcheck-instances
98+ , text
99+ , unordered-containers
100+ , vector
101+
102+test-suite doctests
103+ default-language: Haskell2010
104+ hs-source-dirs: test
105+ type: exitcode-stdio-1.0
106+ ghc-options: -threaded
107+ main-is: doctests.hs
108+ build-depends: base
109+ , QuickCheck
110+ , doctest >= 0.9
111+
112+test-suite hlint-check
113+ default-language: Haskell2010
114+ type: exitcode-stdio-1.0
115+ hs-source-dirs: test
116+ main-is: hlint-check.hs
117+ build-depends: base
118+ , hlint
test/golden-test-cases/aeson-diff.nix.goldennew file+26
@@ -0,0 +1,26 @@
1+{ mkDerivation, aeson, base, bytestring, directory, doctest
2+, edit-distance-vector, filepath, Glob, hashable, hlint, mtl
3+, optparse-applicative, QuickCheck, quickcheck-instances
4+, scientific, stdenv, text, unordered-containers, vector
5+}:
6+mkDerivation {
7+ pname = "aeson-diff";
8+ version = "1.1.0.4";
9+ sha256 = "deadbeef";
10+ isLibrary = true;
11+ isExecutable = true;
12+ libraryHaskellDepends = [
13+ aeson base bytestring edit-distance-vector hashable mtl scientific
14+ text unordered-containers vector
15+ ];
16+ executableHaskellDepends = [
17+ aeson base bytestring optparse-applicative text
18+ ];
19+ testHaskellDepends = [
20+ aeson base bytestring directory doctest filepath Glob hlint
21+ QuickCheck quickcheck-instances text unordered-containers vector
22+ ];
23+ homepage = "https://github.com/thsutton/aeson-diff";
24+ description = "Extract and apply patches to JSON documents";
25+ license = stdenv.lib.licenses.bsd3;
26+}
test/golden-test-cases/aeson-pretty.cabalnew file+74
@@ -0,0 +1,74 @@
1+name: aeson-pretty
2+version: 0.8.5
3+license: BSD3
4+license-file: LICENSE
5+category: Text, Web, JSON, Pretty Printer
6+copyright: Copyright 2011 Falko Peters
7+author: Falko Peters <falko.peters@gmail.com>
8+maintainer: Falko Peters <falko.peters@gmail.com>
9+stability: experimental
10+cabal-version: >= 1.8
11+homepage: http://github.com/informatikr/aeson-pretty
12+bug-reports: http://github.com/informatikr/aeson-pretty/issues
13+build-type: Simple
14+synopsis: JSON pretty-printing library and command-line tool.
15+description:
16+ A JSON pretty-printing library compatible with aeson as well as
17+ a command-line tool to improve readabilty of streams of JSON data.
18+ .
19+ The /library/ provides the function "encodePretty". It is a drop-in
20+ replacement for aeson's "encode" function, producing JSON-ByteStrings for
21+ human readers.
22+ .
23+ The /command-line tool/ reads JSON from stdin and writes prettified JSON
24+ to stdout. It also offers a complementary "compact"-mode, essentially the
25+ opposite of pretty-printing. If you specify @-flib-only@ like this
26+ .
27+ > cabal install -flib-only aeson-pretty
28+ .
29+ the command-line tool will NOT be installed.
30+
31+extra-source-files:
32+ README.markdown
33+
34+flag lib-only
35+ description: Only build/install the library, NOT the command-line tool.
36+ default: False
37+
38+library
39+ exposed-modules:
40+ Data.Aeson.Encode.Pretty
41+
42+ build-depends:
43+ aeson >= 0.7,
44+ base >= 4.5,
45+ base-compat >= 0.9 && < 0.10,
46+ bytestring >= 0.9,
47+ scientific >= 0.3,
48+ vector >= 0.9,
49+ text >= 0.11,
50+ unordered-containers >= 0.1.3.0
51+
52+ ghc-options: -Wall
53+
54+executable aeson-pretty
55+ hs-source-dirs: cli-tool
56+ main-is: Main.hs
57+
58+ if flag(lib-only)
59+ buildable: False
60+ else
61+ build-depends:
62+ aeson >= 0.6,
63+ aeson-pretty,
64+ attoparsec >= 0.10,
65+ base == 4.*,
66+ bytestring >= 0.9,
67+ cmdargs >= 0.7
68+
69+ ghc-options: -Wall
70+ ghc-prof-options: -auto-all
71+
72+source-repository head
73+ type: git
74+ location: http://github.com/informatikr/aeson-pretty
test/golden-test-cases/aeson-pretty.nix.goldennew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, aeson, attoparsec, base, base-compat, bytestring
2+, cmdargs, scientific, stdenv, text, unordered-containers, vector
3+}:
4+mkDerivation {
5+ pname = "aeson-pretty";
6+ version = "0.8.5";
7+ sha256 = "deadbeef";
8+ isLibrary = true;
9+ isExecutable = true;
10+ libraryHaskellDepends = [
11+ aeson base base-compat bytestring scientific text
12+ unordered-containers vector
13+ ];
14+ executableHaskellDepends = [
15+ aeson attoparsec base bytestring cmdargs
16+ ];
17+ homepage = "http://github.com/informatikr/aeson-pretty";
18+ description = "JSON pretty-printing library and command-line tool";
19+ license = stdenv.lib.licenses.bsd3;
20+}
test/golden-test-cases/algebraic-graphs.cabalnew file+142
@@ -0,0 +1,142 @@
1+name: algebraic-graphs
2+version: 0.0.5
3+synopsis: A library for algebraic graph construction and transformation
4+license: MIT
5+license-file: LICENSE
6+author: Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
7+maintainer: Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
8+copyright: Andrey Mokhov, 2016-2017
9+homepage: https://github.com/snowleopard/alga
10+category: Algebra, Algorithms, Data Structures, Graphs
11+build-type: Simple
12+cabal-version: >=1.18
13+tested-with: GHC==8.0.2
14+stability: experimental
15+description:
16+ <https://github.com/snowleopard/alga Alga> is a library for algebraic construction and
17+ manipulation of graphs in Haskell. See <https://github.com/snowleopard/alga-paper this paper>
18+ for the motivation behind the library, the underlying theory and implementation details.
19+ .
20+ The top-level module
21+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph.html Algebra.Graph>
22+ defines the core data type
23+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph.html#t:Graph Graph>,
24+ which is a deep embedding of four graph construction primitives /empty/,
25+ /vertex/, /overlay/ and /connect/. More conventional graph representations can be found in
26+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-AdjacencyMap.html Algebra.Graph.AdjacencyMap>
27+ and
28+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Relation.html Algebra.Graph.Relation>.
29+ .
30+ The type classes defined in
31+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Class.html Algebra.Graph.Class>
32+ and
33+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html Algebra.Graph.HigherKinded.Class>
34+ can be used for polymorphic graph construction and manipulation. Also see
35+ <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Fold.html Algebra.Graph.Fold>
36+ that defines the Boehm-Berarducci encoding of algebraic graphs and provides additional
37+ flexibility for polymorphic graph manipulation.
38+ .
39+ This is an experimental library and the API will be unstable until version 1.0.0. Please
40+ consider contributing to the on-going
41+ <https://github.com/snowleopard/alga/issues discussions on the library API>.
42+
43+extra-doc-files:
44+ CHANGES.md
45+ README.md
46+
47+source-repository head
48+ type: git
49+ location: https://github.com/snowleopard/alga.git
50+
51+library
52+ hs-source-dirs: src
53+ exposed-modules: Algebra.Graph,
54+ Algebra.Graph.AdjacencyMap,
55+ Algebra.Graph.AdjacencyMap.Internal,
56+ Algebra.Graph.Class,
57+ Algebra.Graph.Export,
58+ Algebra.Graph.Export.Dot,
59+ Algebra.Graph.Fold,
60+ Algebra.Graph.HigherKinded.Class,
61+ Algebra.Graph.IntAdjacencyMap,
62+ Algebra.Graph.IntAdjacencyMap.Internal,
63+ Algebra.Graph.Relation,
64+ Algebra.Graph.Relation.Internal,
65+ Algebra.Graph.Relation.InternalDerived,
66+ Algebra.Graph.Relation.Preorder,
67+ Algebra.Graph.Relation.Reflexive,
68+ Algebra.Graph.Relation.Symmetric,
69+ Algebra.Graph.Relation.Transitive
70+ build-depends: array >= 0.5 && < 0.8,
71+ base >= 4.9 && < 5,
72+ containers >= 0.5 && < 0.8
73+ default-language: Haskell2010
74+ default-extensions: FlexibleContexts
75+ GeneralizedNewtypeDeriving
76+ ScopedTypeVariables
77+ TupleSections
78+ TypeFamilies
79+ other-extensions: DeriveFoldable
80+ DeriveFunctor
81+ DeriveTraversable
82+ OverloadedStrings
83+ RecordWildCards
84+ GHC-options: -Wall
85+ -Wcompat
86+ -Wincomplete-record-updates
87+ -Wincomplete-uni-patterns
88+ -Wredundant-constraints
89+
90+test-suite test-alga
91+ hs-source-dirs: test
92+ type: exitcode-stdio-1.0
93+ main-is: Main.hs
94+ other-modules: Algebra.Graph.Test,
95+ Algebra.Graph.Test.API,
96+ Algebra.Graph.Test.AdjacencyMap,
97+ Algebra.Graph.Test.Arbitrary,
98+ Algebra.Graph.Test.Export,
99+ Algebra.Graph.Test.Fold,
100+ Algebra.Graph.Test.Generic,
101+ Algebra.Graph.Test.Graph,
102+ Algebra.Graph.Test.IntAdjacencyMap,
103+ Algebra.Graph.Test.Relation
104+ build-depends: algebraic-graphs,
105+ base >= 4.9,
106+ containers >= 0.5,
107+ extra >= 1.5,
108+ QuickCheck >= 2.9
109+ default-language: Haskell2010
110+ GHC-options: -O2
111+ -Wall
112+ -Wcompat
113+ -Wincomplete-record-updates
114+ -Wincomplete-uni-patterns
115+ -Wredundant-constraints
116+ default-extensions: FlexibleContexts
117+ GeneralizedNewtypeDeriving
118+ TypeFamilies
119+ ScopedTypeVariables
120+ other-extensions: ConstrainedClassMethods
121+ ConstraintKinds
122+ RankNTypes
123+ ViewPatterns
124+
125+benchmark benchmark-alga
126+ hs-source-dirs: bench
127+ type: exitcode-stdio-1.0
128+ main-is: Bench.hs
129+ build-depends: algebraic-graphs,
130+ base >= 4.9,
131+ containers >= 0.5,
132+ criterion >= 1.1
133+ default-language: Haskell2010
134+ GHC-options: -O2
135+ -Wall
136+ -Wcompat
137+ -Wincomplete-record-updates
138+ -Wincomplete-uni-patterns
139+ -Wredundant-constraints
140+ default-extensions: FlexibleContexts
141+ TypeFamilies
142+ ScopedTypeVariables
test/golden-test-cases/algebraic-graphs.nix.goldennew file+14
@@ -0,0 +1,14 @@
1+{ mkDerivation, array, base, containers, criterion, extra
2+, QuickCheck, stdenv
3+}:
4+mkDerivation {
5+ pname = "algebraic-graphs";
6+ version = "0.0.5";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ array base containers ];
9+ testHaskellDepends = [ base containers extra QuickCheck ];
10+ benchmarkHaskellDepends = [ base containers criterion ];
11+ homepage = "https://github.com/snowleopard/alga";
12+ description = "A library for algebraic graph construction and transformation";
13+ license = stdenv.lib.licenses.mit;
14+}
test/golden-test-cases/amazonka-cloudtrail.cabalnew file+99
@@ -0,0 +1,99 @@
1+name: amazonka-cloudtrail
2+version: 1.5.0
3+synopsis: Amazon CloudTrail SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.CloudTrail" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-cloudtrail
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.CloudTrail
48+ , Network.AWS.CloudTrail.AddTags
49+ , Network.AWS.CloudTrail.CreateTrail
50+ , Network.AWS.CloudTrail.DeleteTrail
51+ , Network.AWS.CloudTrail.DescribeTrails
52+ , Network.AWS.CloudTrail.GetEventSelectors
53+ , Network.AWS.CloudTrail.GetTrailStatus
54+ , Network.AWS.CloudTrail.ListPublicKeys
55+ , Network.AWS.CloudTrail.ListTags
56+ , Network.AWS.CloudTrail.LookupEvents
57+ , Network.AWS.CloudTrail.PutEventSelectors
58+ , Network.AWS.CloudTrail.RemoveTags
59+ , Network.AWS.CloudTrail.StartLogging
60+ , Network.AWS.CloudTrail.StopLogging
61+ , Network.AWS.CloudTrail.Types
62+ , Network.AWS.CloudTrail.UpdateTrail
63+ , Network.AWS.CloudTrail.Waiters
64+
65+ other-modules:
66+ Network.AWS.CloudTrail.Types.Product
67+ , Network.AWS.CloudTrail.Types.Sum
68+
69+ build-depends:
70+ amazonka-core == 1.5.0.*
71+ , base >= 4.7 && < 5
72+
73+test-suite amazonka-cloudtrail-test
74+ type: exitcode-stdio-1.0
75+ default-language: Haskell2010
76+ hs-source-dirs: test
77+ main-is: Main.hs
78+
79+ ghc-options: -Wall -threaded
80+
81+ -- This section is encoded by the template and any modules added by
82+ -- hand outside these namespaces will not correctly be added to the
83+ -- distribution package.
84+ other-modules:
85+ Test.AWS.CloudTrail
86+ , Test.AWS.Gen.CloudTrail
87+ , Test.AWS.CloudTrail.Internal
88+
89+ build-depends:
90+ amazonka-core == 1.5.0.*
91+ , amazonka-test == 1.5.0.*
92+ , amazonka-cloudtrail
93+ , base
94+ , bytestring
95+ , tasty
96+ , tasty-hunit
97+ , text
98+ , time
99+ , unordered-containers
test/golden-test-cases/amazonka-cloudtrail.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-cloudtrail";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon CloudTrail SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-cloudwatch-logs.cabalnew file+118
@@ -0,0 +1,118 @@
1+name: amazonka-cloudwatch-logs
2+version: 1.5.0
3+synopsis: Amazon CloudWatch Logs SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.CloudWatchLogs" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-cloudwatch-logs
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.CloudWatchLogs
48+ , Network.AWS.CloudWatchLogs.AssociateKMSKey
49+ , Network.AWS.CloudWatchLogs.CancelExportTask
50+ , Network.AWS.CloudWatchLogs.CreateExportTask
51+ , Network.AWS.CloudWatchLogs.CreateLogGroup
52+ , Network.AWS.CloudWatchLogs.CreateLogStream
53+ , Network.AWS.CloudWatchLogs.DeleteDestination
54+ , Network.AWS.CloudWatchLogs.DeleteLogGroup
55+ , Network.AWS.CloudWatchLogs.DeleteLogStream
56+ , Network.AWS.CloudWatchLogs.DeleteMetricFilter
57+ , Network.AWS.CloudWatchLogs.DeleteResourcePolicy
58+ , Network.AWS.CloudWatchLogs.DeleteRetentionPolicy
59+ , Network.AWS.CloudWatchLogs.DeleteSubscriptionFilter
60+ , Network.AWS.CloudWatchLogs.DescribeDestinations
61+ , Network.AWS.CloudWatchLogs.DescribeExportTasks
62+ , Network.AWS.CloudWatchLogs.DescribeLogGroups
63+ , Network.AWS.CloudWatchLogs.DescribeLogStreams
64+ , Network.AWS.CloudWatchLogs.DescribeMetricFilters
65+ , Network.AWS.CloudWatchLogs.DescribeResourcePolicies
66+ , Network.AWS.CloudWatchLogs.DescribeSubscriptionFilters
67+ , Network.AWS.CloudWatchLogs.DisassociateKMSKey
68+ , Network.AWS.CloudWatchLogs.FilterLogEvents
69+ , Network.AWS.CloudWatchLogs.GetLogEvents
70+ , Network.AWS.CloudWatchLogs.ListTagsLogGroup
71+ , Network.AWS.CloudWatchLogs.PutDestination
72+ , Network.AWS.CloudWatchLogs.PutDestinationPolicy
73+ , Network.AWS.CloudWatchLogs.PutLogEvents
74+ , Network.AWS.CloudWatchLogs.PutMetricFilter
75+ , Network.AWS.CloudWatchLogs.PutResourcePolicy
76+ , Network.AWS.CloudWatchLogs.PutRetentionPolicy
77+ , Network.AWS.CloudWatchLogs.PutSubscriptionFilter
78+ , Network.AWS.CloudWatchLogs.TagLogGroup
79+ , Network.AWS.CloudWatchLogs.TestMetricFilter
80+ , Network.AWS.CloudWatchLogs.Types
81+ , Network.AWS.CloudWatchLogs.UntagLogGroup
82+ , Network.AWS.CloudWatchLogs.Waiters
83+
84+ other-modules:
85+ Network.AWS.CloudWatchLogs.Types.Product
86+ , Network.AWS.CloudWatchLogs.Types.Sum
87+
88+ build-depends:
89+ amazonka-core == 1.5.0.*
90+ , base >= 4.7 && < 5
91+
92+test-suite amazonka-cloudwatch-logs-test
93+ type: exitcode-stdio-1.0
94+ default-language: Haskell2010
95+ hs-source-dirs: test
96+ main-is: Main.hs
97+
98+ ghc-options: -Wall -threaded
99+
100+ -- This section is encoded by the template and any modules added by
101+ -- hand outside these namespaces will not correctly be added to the
102+ -- distribution package.
103+ other-modules:
104+ Test.AWS.CloudWatchLogs
105+ , Test.AWS.Gen.CloudWatchLogs
106+ , Test.AWS.CloudWatchLogs.Internal
107+
108+ build-depends:
109+ amazonka-core == 1.5.0.*
110+ , amazonka-test == 1.5.0.*
111+ , amazonka-cloudwatch-logs
112+ , base
113+ , bytestring
114+ , tasty
115+ , tasty-hunit
116+ , text
117+ , time
118+ , unordered-containers
test/golden-test-cases/amazonka-cloudwatch-logs.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-cloudwatch-logs";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon CloudWatch Logs SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-codedeploy.cabalnew file+123
@@ -0,0 +1,123 @@
1+name: amazonka-codedeploy
2+version: 1.5.0
3+synopsis: Amazon CodeDeploy SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.CodeDeploy" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-codedeploy
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.CodeDeploy
48+ , Network.AWS.CodeDeploy.AddTagsToOnPremisesInstances
49+ , Network.AWS.CodeDeploy.BatchGetApplicationRevisions
50+ , Network.AWS.CodeDeploy.BatchGetApplications
51+ , Network.AWS.CodeDeploy.BatchGetDeploymentGroups
52+ , Network.AWS.CodeDeploy.BatchGetDeploymentInstances
53+ , Network.AWS.CodeDeploy.BatchGetDeployments
54+ , Network.AWS.CodeDeploy.BatchGetOnPremisesInstances
55+ , Network.AWS.CodeDeploy.ContinueDeployment
56+ , Network.AWS.CodeDeploy.CreateApplication
57+ , Network.AWS.CodeDeploy.CreateDeployment
58+ , Network.AWS.CodeDeploy.CreateDeploymentConfig
59+ , Network.AWS.CodeDeploy.CreateDeploymentGroup
60+ , Network.AWS.CodeDeploy.DeleteApplication
61+ , Network.AWS.CodeDeploy.DeleteDeploymentConfig
62+ , Network.AWS.CodeDeploy.DeleteDeploymentGroup
63+ , Network.AWS.CodeDeploy.DeregisterOnPremisesInstance
64+ , Network.AWS.CodeDeploy.GetApplication
65+ , Network.AWS.CodeDeploy.GetApplicationRevision
66+ , Network.AWS.CodeDeploy.GetDeployment
67+ , Network.AWS.CodeDeploy.GetDeploymentConfig
68+ , Network.AWS.CodeDeploy.GetDeploymentGroup
69+ , Network.AWS.CodeDeploy.GetDeploymentInstance
70+ , Network.AWS.CodeDeploy.GetOnPremisesInstance
71+ , Network.AWS.CodeDeploy.ListApplicationRevisions
72+ , Network.AWS.CodeDeploy.ListApplications
73+ , Network.AWS.CodeDeploy.ListDeploymentConfigs
74+ , Network.AWS.CodeDeploy.ListDeploymentGroups
75+ , Network.AWS.CodeDeploy.ListDeploymentInstances
76+ , Network.AWS.CodeDeploy.ListDeployments
77+ , Network.AWS.CodeDeploy.ListGitHubAccountTokenNames
78+ , Network.AWS.CodeDeploy.ListOnPremisesInstances
79+ , Network.AWS.CodeDeploy.RegisterApplicationRevision
80+ , Network.AWS.CodeDeploy.RegisterOnPremisesInstance
81+ , Network.AWS.CodeDeploy.RemoveTagsFromOnPremisesInstances
82+ , Network.AWS.CodeDeploy.SkipWaitTimeForInstanceTermination
83+ , Network.AWS.CodeDeploy.StopDeployment
84+ , Network.AWS.CodeDeploy.Types
85+ , Network.AWS.CodeDeploy.UpdateApplication
86+ , Network.AWS.CodeDeploy.UpdateDeploymentGroup
87+ , Network.AWS.CodeDeploy.Waiters
88+
89+ other-modules:
90+ Network.AWS.CodeDeploy.Types.Product
91+ , Network.AWS.CodeDeploy.Types.Sum
92+
93+ build-depends:
94+ amazonka-core == 1.5.0.*
95+ , base >= 4.7 && < 5
96+
97+test-suite amazonka-codedeploy-test
98+ type: exitcode-stdio-1.0
99+ default-language: Haskell2010
100+ hs-source-dirs: test
101+ main-is: Main.hs
102+
103+ ghc-options: -Wall -threaded
104+
105+ -- This section is encoded by the template and any modules added by
106+ -- hand outside these namespaces will not correctly be added to the
107+ -- distribution package.
108+ other-modules:
109+ Test.AWS.CodeDeploy
110+ , Test.AWS.Gen.CodeDeploy
111+ , Test.AWS.CodeDeploy.Internal
112+
113+ build-depends:
114+ amazonka-core == 1.5.0.*
115+ , amazonka-test == 1.5.0.*
116+ , amazonka-codedeploy
117+ , base
118+ , bytestring
119+ , tasty
120+ , tasty-hunit
121+ , text
122+ , time
123+ , unordered-containers
test/golden-test-cases/amazonka-codedeploy.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-codedeploy";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon CodeDeploy SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-cognito-idp.cabalnew file+168
@@ -0,0 +1,168 @@
1+name: amazonka-cognito-idp
2+version: 1.5.0
3+synopsis: Amazon Cognito Identity Provider SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.CognitoIdentityProvider" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-cognito-idp
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.CognitoIdentityProvider
48+ , Network.AWS.CognitoIdentityProvider.AddCustomAttributes
49+ , Network.AWS.CognitoIdentityProvider.AdminAddUserToGroup
50+ , Network.AWS.CognitoIdentityProvider.AdminConfirmSignUp
51+ , Network.AWS.CognitoIdentityProvider.AdminCreateUser
52+ , Network.AWS.CognitoIdentityProvider.AdminDeleteUser
53+ , Network.AWS.CognitoIdentityProvider.AdminDeleteUserAttributes
54+ , Network.AWS.CognitoIdentityProvider.AdminDisableProviderForUser
55+ , Network.AWS.CognitoIdentityProvider.AdminDisableUser
56+ , Network.AWS.CognitoIdentityProvider.AdminEnableUser
57+ , Network.AWS.CognitoIdentityProvider.AdminForgetDevice
58+ , Network.AWS.CognitoIdentityProvider.AdminGetDevice
59+ , Network.AWS.CognitoIdentityProvider.AdminGetUser
60+ , Network.AWS.CognitoIdentityProvider.AdminInitiateAuth
61+ , Network.AWS.CognitoIdentityProvider.AdminLinkProviderForUser
62+ , Network.AWS.CognitoIdentityProvider.AdminListDevices
63+ , Network.AWS.CognitoIdentityProvider.AdminListGroupsForUser
64+ , Network.AWS.CognitoIdentityProvider.AdminRemoveUserFromGroup
65+ , Network.AWS.CognitoIdentityProvider.AdminResetUserPassword
66+ , Network.AWS.CognitoIdentityProvider.AdminRespondToAuthChallenge
67+ , Network.AWS.CognitoIdentityProvider.AdminSetUserSettings
68+ , Network.AWS.CognitoIdentityProvider.AdminUpdateDeviceStatus
69+ , Network.AWS.CognitoIdentityProvider.AdminUpdateUserAttributes
70+ , Network.AWS.CognitoIdentityProvider.AdminUserGlobalSignOut
71+ , Network.AWS.CognitoIdentityProvider.ChangePassword
72+ , Network.AWS.CognitoIdentityProvider.ConfirmDevice
73+ , Network.AWS.CognitoIdentityProvider.ConfirmForgotPassword
74+ , Network.AWS.CognitoIdentityProvider.ConfirmSignUp
75+ , Network.AWS.CognitoIdentityProvider.CreateGroup
76+ , Network.AWS.CognitoIdentityProvider.CreateIdentityProvider
77+ , Network.AWS.CognitoIdentityProvider.CreateResourceServer
78+ , Network.AWS.CognitoIdentityProvider.CreateUserImportJob
79+ , Network.AWS.CognitoIdentityProvider.CreateUserPool
80+ , Network.AWS.CognitoIdentityProvider.CreateUserPoolClient
81+ , Network.AWS.CognitoIdentityProvider.CreateUserPoolDomain
82+ , Network.AWS.CognitoIdentityProvider.DeleteGroup
83+ , Network.AWS.CognitoIdentityProvider.DeleteIdentityProvider
84+ , Network.AWS.CognitoIdentityProvider.DeleteResourceServer
85+ , Network.AWS.CognitoIdentityProvider.DeleteUser
86+ , Network.AWS.CognitoIdentityProvider.DeleteUserAttributes
87+ , Network.AWS.CognitoIdentityProvider.DeleteUserPool
88+ , Network.AWS.CognitoIdentityProvider.DeleteUserPoolClient
89+ , Network.AWS.CognitoIdentityProvider.DeleteUserPoolDomain
90+ , Network.AWS.CognitoIdentityProvider.DescribeIdentityProvider
91+ , Network.AWS.CognitoIdentityProvider.DescribeResourceServer
92+ , Network.AWS.CognitoIdentityProvider.DescribeUserImportJob
93+ , Network.AWS.CognitoIdentityProvider.DescribeUserPool
94+ , Network.AWS.CognitoIdentityProvider.DescribeUserPoolClient
95+ , Network.AWS.CognitoIdentityProvider.DescribeUserPoolDomain
96+ , Network.AWS.CognitoIdentityProvider.ForgetDevice
97+ , Network.AWS.CognitoIdentityProvider.ForgotPassword
98+ , Network.AWS.CognitoIdentityProvider.GetCSVHeader
99+ , Network.AWS.CognitoIdentityProvider.GetDevice
100+ , Network.AWS.CognitoIdentityProvider.GetGroup
101+ , Network.AWS.CognitoIdentityProvider.GetIdentityProviderByIdentifier
102+ , Network.AWS.CognitoIdentityProvider.GetUICustomization
103+ , Network.AWS.CognitoIdentityProvider.GetUser
104+ , Network.AWS.CognitoIdentityProvider.GetUserAttributeVerificationCode
105+ , Network.AWS.CognitoIdentityProvider.GlobalSignOut
106+ , Network.AWS.CognitoIdentityProvider.InitiateAuth
107+ , Network.AWS.CognitoIdentityProvider.ListDevices
108+ , Network.AWS.CognitoIdentityProvider.ListGroups
109+ , Network.AWS.CognitoIdentityProvider.ListIdentityProviders
110+ , Network.AWS.CognitoIdentityProvider.ListResourceServers
111+ , Network.AWS.CognitoIdentityProvider.ListUserImportJobs
112+ , Network.AWS.CognitoIdentityProvider.ListUserPoolClients
113+ , Network.AWS.CognitoIdentityProvider.ListUserPools
114+ , Network.AWS.CognitoIdentityProvider.ListUsers
115+ , Network.AWS.CognitoIdentityProvider.ListUsersInGroup
116+ , Network.AWS.CognitoIdentityProvider.ResendConfirmationCode
117+ , Network.AWS.CognitoIdentityProvider.RespondToAuthChallenge
118+ , Network.AWS.CognitoIdentityProvider.SetUICustomization
119+ , Network.AWS.CognitoIdentityProvider.SetUserSettings
120+ , Network.AWS.CognitoIdentityProvider.SignUp
121+ , Network.AWS.CognitoIdentityProvider.StartUserImportJob
122+ , Network.AWS.CognitoIdentityProvider.StopUserImportJob
123+ , Network.AWS.CognitoIdentityProvider.Types
124+ , Network.AWS.CognitoIdentityProvider.UpdateDeviceStatus
125+ , Network.AWS.CognitoIdentityProvider.UpdateGroup
126+ , Network.AWS.CognitoIdentityProvider.UpdateIdentityProvider
127+ , Network.AWS.CognitoIdentityProvider.UpdateResourceServer
128+ , Network.AWS.CognitoIdentityProvider.UpdateUserAttributes
129+ , Network.AWS.CognitoIdentityProvider.UpdateUserPool
130+ , Network.AWS.CognitoIdentityProvider.UpdateUserPoolClient
131+ , Network.AWS.CognitoIdentityProvider.VerifyUserAttribute
132+ , Network.AWS.CognitoIdentityProvider.Waiters
133+
134+ other-modules:
135+ Network.AWS.CognitoIdentityProvider.Types.Product
136+ , Network.AWS.CognitoIdentityProvider.Types.Sum
137+
138+ build-depends:
139+ amazonka-core == 1.5.0.*
140+ , base >= 4.7 && < 5
141+
142+test-suite amazonka-cognito-idp-test
143+ type: exitcode-stdio-1.0
144+ default-language: Haskell2010
145+ hs-source-dirs: test
146+ main-is: Main.hs
147+
148+ ghc-options: -Wall -threaded
149+
150+ -- This section is encoded by the template and any modules added by
151+ -- hand outside these namespaces will not correctly be added to the
152+ -- distribution package.
153+ other-modules:
154+ Test.AWS.CognitoIdentityProvider
155+ , Test.AWS.Gen.CognitoIdentityProvider
156+ , Test.AWS.CognitoIdentityProvider.Internal
157+
158+ build-depends:
159+ amazonka-core == 1.5.0.*
160+ , amazonka-test == 1.5.0.*
161+ , amazonka-cognito-idp
162+ , base
163+ , bytestring
164+ , tasty
165+ , tasty-hunit
166+ , text
167+ , time
168+ , unordered-containers
test/golden-test-cases/amazonka-cognito-idp.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-cognito-idp";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon Cognito Identity Provider SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-ecs.cabalnew file+116
@@ -0,0 +1,116 @@
1+name: amazonka-ecs
2+version: 1.5.0
3+synopsis: Amazon EC2 Container Service SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.ECS" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-ecs
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.ECS
48+ , Network.AWS.ECS.CreateCluster
49+ , Network.AWS.ECS.CreateService
50+ , Network.AWS.ECS.DeleteAttributes
51+ , Network.AWS.ECS.DeleteCluster
52+ , Network.AWS.ECS.DeleteService
53+ , Network.AWS.ECS.DeregisterContainerInstance
54+ , Network.AWS.ECS.DeregisterTaskDefinition
55+ , Network.AWS.ECS.DescribeClusters
56+ , Network.AWS.ECS.DescribeContainerInstances
57+ , Network.AWS.ECS.DescribeServices
58+ , Network.AWS.ECS.DescribeTaskDefinition
59+ , Network.AWS.ECS.DescribeTasks
60+ , Network.AWS.ECS.DiscoverPollEndpoint
61+ , Network.AWS.ECS.ListAttributes
62+ , Network.AWS.ECS.ListClusters
63+ , Network.AWS.ECS.ListContainerInstances
64+ , Network.AWS.ECS.ListServices
65+ , Network.AWS.ECS.ListTaskDefinitionFamilies
66+ , Network.AWS.ECS.ListTaskDefinitions
67+ , Network.AWS.ECS.ListTasks
68+ , Network.AWS.ECS.PutAttributes
69+ , Network.AWS.ECS.RegisterContainerInstance
70+ , Network.AWS.ECS.RegisterTaskDefinition
71+ , Network.AWS.ECS.RunTask
72+ , Network.AWS.ECS.StartTask
73+ , Network.AWS.ECS.StopTask
74+ , Network.AWS.ECS.SubmitContainerStateChange
75+ , Network.AWS.ECS.SubmitTaskStateChange
76+ , Network.AWS.ECS.Types
77+ , Network.AWS.ECS.UpdateContainerAgent
78+ , Network.AWS.ECS.UpdateContainerInstancesState
79+ , Network.AWS.ECS.UpdateService
80+ , Network.AWS.ECS.Waiters
81+
82+ other-modules:
83+ Network.AWS.ECS.Types.Product
84+ , Network.AWS.ECS.Types.Sum
85+
86+ build-depends:
87+ amazonka-core == 1.5.0.*
88+ , base >= 4.7 && < 5
89+
90+test-suite amazonka-ecs-test
91+ type: exitcode-stdio-1.0
92+ default-language: Haskell2010
93+ hs-source-dirs: test
94+ main-is: Main.hs
95+
96+ ghc-options: -Wall -threaded
97+
98+ -- This section is encoded by the template and any modules added by
99+ -- hand outside these namespaces will not correctly be added to the
100+ -- distribution package.
101+ other-modules:
102+ Test.AWS.ECS
103+ , Test.AWS.Gen.ECS
104+ , Test.AWS.ECS.Internal
105+
106+ build-depends:
107+ amazonka-core == 1.5.0.*
108+ , amazonka-test == 1.5.0.*
109+ , amazonka-ecs
110+ , base
111+ , bytestring
112+ , tasty
113+ , tasty-hunit
114+ , text
115+ , time
116+ , unordered-containers
test/golden-test-cases/amazonka-ecs.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-ecs";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon EC2 Container Service SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-kms.cabalnew file+120
@@ -0,0 +1,120 @@
1+name: amazonka-kms
2+version: 1.5.0
3+synopsis: Amazon Key Management Service SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.KMS" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-kms
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.KMS
48+ , Network.AWS.KMS.CancelKeyDeletion
49+ , Network.AWS.KMS.CreateAlias
50+ , Network.AWS.KMS.CreateGrant
51+ , Network.AWS.KMS.CreateKey
52+ , Network.AWS.KMS.Decrypt
53+ , Network.AWS.KMS.DeleteAlias
54+ , Network.AWS.KMS.DeleteImportedKeyMaterial
55+ , Network.AWS.KMS.DescribeKey
56+ , Network.AWS.KMS.DisableKey
57+ , Network.AWS.KMS.DisableKeyRotation
58+ , Network.AWS.KMS.EnableKey
59+ , Network.AWS.KMS.EnableKeyRotation
60+ , Network.AWS.KMS.Encrypt
61+ , Network.AWS.KMS.GenerateDataKey
62+ , Network.AWS.KMS.GenerateDataKeyWithoutPlaintext
63+ , Network.AWS.KMS.GenerateRandom
64+ , Network.AWS.KMS.GetKeyPolicy
65+ , Network.AWS.KMS.GetKeyRotationStatus
66+ , Network.AWS.KMS.GetParametersForImport
67+ , Network.AWS.KMS.ImportKeyMaterial
68+ , Network.AWS.KMS.ListAliases
69+ , Network.AWS.KMS.ListGrants
70+ , Network.AWS.KMS.ListKeyPolicies
71+ , Network.AWS.KMS.ListKeys
72+ , Network.AWS.KMS.ListResourceTags
73+ , Network.AWS.KMS.ListRetirableGrants
74+ , Network.AWS.KMS.PutKeyPolicy
75+ , Network.AWS.KMS.ReEncrypt
76+ , Network.AWS.KMS.RetireGrant
77+ , Network.AWS.KMS.RevokeGrant
78+ , Network.AWS.KMS.ScheduleKeyDeletion
79+ , Network.AWS.KMS.TagResource
80+ , Network.AWS.KMS.Types
81+ , Network.AWS.KMS.UntagResource
82+ , Network.AWS.KMS.UpdateAlias
83+ , Network.AWS.KMS.UpdateKeyDescription
84+ , Network.AWS.KMS.Waiters
85+
86+ other-modules:
87+ Network.AWS.KMS.Types.Product
88+ , Network.AWS.KMS.Types.Sum
89+
90+ build-depends:
91+ amazonka-core == 1.5.0.*
92+ , base >= 4.7 && < 5
93+
94+test-suite amazonka-kms-test
95+ type: exitcode-stdio-1.0
96+ default-language: Haskell2010
97+ hs-source-dirs: test
98+ main-is: Main.hs
99+
100+ ghc-options: -Wall -threaded
101+
102+ -- This section is encoded by the template and any modules added by
103+ -- hand outside these namespaces will not correctly be added to the
104+ -- distribution package.
105+ other-modules:
106+ Test.AWS.KMS
107+ , Test.AWS.Gen.KMS
108+ , Test.AWS.KMS.Internal
109+
110+ build-depends:
111+ amazonka-core == 1.5.0.*
112+ , amazonka-test == 1.5.0.*
113+ , amazonka-kms
114+ , base
115+ , bytestring
116+ , tasty
117+ , tasty-hunit
118+ , text
119+ , time
120+ , unordered-containers
test/golden-test-cases/amazonka-kms.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-kms";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon Key Management Service SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-lightsail.cabalnew file+133
@@ -0,0 +1,133 @@
1+name: amazonka-lightsail
2+version: 1.5.0
3+synopsis: Amazon Lightsail SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.Lightsail" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-lightsail
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.Lightsail
48+ , Network.AWS.Lightsail.AllocateStaticIP
49+ , Network.AWS.Lightsail.AttachStaticIP
50+ , Network.AWS.Lightsail.CloseInstancePublicPorts
51+ , Network.AWS.Lightsail.CreateDomain
52+ , Network.AWS.Lightsail.CreateDomainEntry
53+ , Network.AWS.Lightsail.CreateInstanceSnapshot
54+ , Network.AWS.Lightsail.CreateInstances
55+ , Network.AWS.Lightsail.CreateInstancesFromSnapshot
56+ , Network.AWS.Lightsail.CreateKeyPair
57+ , Network.AWS.Lightsail.DeleteDomain
58+ , Network.AWS.Lightsail.DeleteDomainEntry
59+ , Network.AWS.Lightsail.DeleteInstance
60+ , Network.AWS.Lightsail.DeleteInstanceSnapshot
61+ , Network.AWS.Lightsail.DeleteKeyPair
62+ , Network.AWS.Lightsail.DetachStaticIP
63+ , Network.AWS.Lightsail.DownloadDefaultKeyPair
64+ , Network.AWS.Lightsail.GetActiveNames
65+ , Network.AWS.Lightsail.GetBlueprints
66+ , Network.AWS.Lightsail.GetBundles
67+ , Network.AWS.Lightsail.GetDomain
68+ , Network.AWS.Lightsail.GetDomains
69+ , Network.AWS.Lightsail.GetInstance
70+ , Network.AWS.Lightsail.GetInstanceAccessDetails
71+ , Network.AWS.Lightsail.GetInstanceMetricData
72+ , Network.AWS.Lightsail.GetInstancePortStates
73+ , Network.AWS.Lightsail.GetInstanceSnapshot
74+ , Network.AWS.Lightsail.GetInstanceSnapshots
75+ , Network.AWS.Lightsail.GetInstanceState
76+ , Network.AWS.Lightsail.GetInstances
77+ , Network.AWS.Lightsail.GetKeyPair
78+ , Network.AWS.Lightsail.GetKeyPairs
79+ , Network.AWS.Lightsail.GetOperation
80+ , Network.AWS.Lightsail.GetOperations
81+ , Network.AWS.Lightsail.GetOperationsForResource
82+ , Network.AWS.Lightsail.GetRegions
83+ , Network.AWS.Lightsail.GetStaticIP
84+ , Network.AWS.Lightsail.GetStaticIPs
85+ , Network.AWS.Lightsail.ImportKeyPair
86+ , Network.AWS.Lightsail.IsVPCPeered
87+ , Network.AWS.Lightsail.OpenInstancePublicPorts
88+ , Network.AWS.Lightsail.PeerVPC
89+ , Network.AWS.Lightsail.PutInstancePublicPorts
90+ , Network.AWS.Lightsail.RebootInstance
91+ , Network.AWS.Lightsail.ReleaseStaticIP
92+ , Network.AWS.Lightsail.StartInstance
93+ , Network.AWS.Lightsail.StopInstance
94+ , Network.AWS.Lightsail.Types
95+ , Network.AWS.Lightsail.UnpeerVPC
96+ , Network.AWS.Lightsail.UpdateDomainEntry
97+ , Network.AWS.Lightsail.Waiters
98+
99+ other-modules:
100+ Network.AWS.Lightsail.Types.Product
101+ , Network.AWS.Lightsail.Types.Sum
102+
103+ build-depends:
104+ amazonka-core == 1.5.0.*
105+ , base >= 4.7 && < 5
106+
107+test-suite amazonka-lightsail-test
108+ type: exitcode-stdio-1.0
109+ default-language: Haskell2010
110+ hs-source-dirs: test
111+ main-is: Main.hs
112+
113+ ghc-options: -Wall -threaded
114+
115+ -- This section is encoded by the template and any modules added by
116+ -- hand outside these namespaces will not correctly be added to the
117+ -- distribution package.
118+ other-modules:
119+ Test.AWS.Lightsail
120+ , Test.AWS.Gen.Lightsail
121+ , Test.AWS.Lightsail.Internal
122+
123+ build-depends:
124+ amazonka-core == 1.5.0.*
125+ , amazonka-test == 1.5.0.*
126+ , amazonka-lightsail
127+ , base
128+ , bytestring
129+ , tasty
130+ , tasty-hunit
131+ , text
132+ , time
133+ , unordered-containers
test/golden-test-cases/amazonka-lightsail.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-lightsail";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon Lightsail SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-route53-domains.cabalnew file+109
@@ -0,0 +1,109 @@
1+name: amazonka-route53-domains
2+version: 1.5.0
3+synopsis: Amazon Route 53 Domains SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.Route53Domains" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-route53-domains
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.Route53Domains
48+ , Network.AWS.Route53Domains.CheckDomainAvailability
49+ , Network.AWS.Route53Domains.CheckDomainTransferability
50+ , Network.AWS.Route53Domains.DeleteTagsForDomain
51+ , Network.AWS.Route53Domains.DisableDomainAutoRenew
52+ , Network.AWS.Route53Domains.DisableDomainTransferLock
53+ , Network.AWS.Route53Domains.EnableDomainAutoRenew
54+ , Network.AWS.Route53Domains.EnableDomainTransferLock
55+ , Network.AWS.Route53Domains.GetContactReachabilityStatus
56+ , Network.AWS.Route53Domains.GetDomainDetail
57+ , Network.AWS.Route53Domains.GetDomainSuggestions
58+ , Network.AWS.Route53Domains.GetOperationDetail
59+ , Network.AWS.Route53Domains.ListDomains
60+ , Network.AWS.Route53Domains.ListOperations
61+ , Network.AWS.Route53Domains.ListTagsForDomain
62+ , Network.AWS.Route53Domains.RegisterDomain
63+ , Network.AWS.Route53Domains.RenewDomain
64+ , Network.AWS.Route53Domains.ResendContactReachabilityEmail
65+ , Network.AWS.Route53Domains.RetrieveDomainAuthCode
66+ , Network.AWS.Route53Domains.TransferDomain
67+ , Network.AWS.Route53Domains.Types
68+ , Network.AWS.Route53Domains.UpdateDomainContact
69+ , Network.AWS.Route53Domains.UpdateDomainContactPrivacy
70+ , Network.AWS.Route53Domains.UpdateDomainNameservers
71+ , Network.AWS.Route53Domains.UpdateTagsForDomain
72+ , Network.AWS.Route53Domains.ViewBilling
73+ , Network.AWS.Route53Domains.Waiters
74+
75+ other-modules:
76+ Network.AWS.Route53Domains.Types.Product
77+ , Network.AWS.Route53Domains.Types.Sum
78+
79+ build-depends:
80+ amazonka-core == 1.5.0.*
81+ , base >= 4.7 && < 5
82+
83+test-suite amazonka-route53-domains-test
84+ type: exitcode-stdio-1.0
85+ default-language: Haskell2010
86+ hs-source-dirs: test
87+ main-is: Main.hs
88+
89+ ghc-options: -Wall -threaded
90+
91+ -- This section is encoded by the template and any modules added by
92+ -- hand outside these namespaces will not correctly be added to the
93+ -- distribution package.
94+ other-modules:
95+ Test.AWS.Route53Domains
96+ , Test.AWS.Gen.Route53Domains
97+ , Test.AWS.Route53Domains.Internal
98+
99+ build-depends:
100+ amazonka-core == 1.5.0.*
101+ , amazonka-test == 1.5.0.*
102+ , amazonka-route53-domains
103+ , base
104+ , bytestring
105+ , tasty
106+ , tasty-hunit
107+ , text
108+ , time
109+ , unordered-containers
test/golden-test-cases/amazonka-route53-domains.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-route53-domains";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon Route 53 Domains SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/amazonka-waf.cabalnew file+144
@@ -0,0 +1,144 @@
1+name: amazonka-waf
2+version: 1.5.0
3+synopsis: Amazon WAF SDK.
4+homepage: https://github.com/brendanhay/amazonka
5+bug-reports: https://github.com/brendanhay/amazonka/issues
6+license: MPL-2.0
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
10+copyright: Copyright (c) 2013-2017 Brendan Hay
11+category: Network, AWS, Cloud, Distributed Computing
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep
15+description:
16+ The types from this library are intended to be used with
17+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides
18+ mechanisms for specifying AuthN/AuthZ information, sending requests,
19+ and receiving responses.
20+ .
21+ Lenses are used for constructing and manipulating types,
22+ due to the depth of nesting of AWS types and transparency regarding
23+ de/serialisation into more palatable Haskell values.
24+ The provided lenses should be compatible with any of the major lens libraries
25+ such as <http://hackage.haskell.org/package/lens lens> or
26+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
27+ .
28+ See "Network.AWS.WAF" or <https://aws.amazon.com/documentation/ the AWS documentation>
29+ to get started.
30+
31+source-repository head
32+ type: git
33+ location: git://github.com/brendanhay/amazonka.git
34+ subdir: amazonka-waf
35+
36+library
37+ default-language: Haskell2010
38+ hs-source-dirs: src gen
39+
40+ ghc-options:
41+ -Wall
42+ -fwarn-incomplete-uni-patterns
43+ -fwarn-incomplete-record-updates
44+ -funbox-strict-fields
45+
46+ exposed-modules:
47+ Network.AWS.WAF
48+ , Network.AWS.WAF.CreateByteMatchSet
49+ , Network.AWS.WAF.CreateGeoMatchSet
50+ , Network.AWS.WAF.CreateIPSet
51+ , Network.AWS.WAF.CreateRateBasedRule
52+ , Network.AWS.WAF.CreateRegexMatchSet
53+ , Network.AWS.WAF.CreateRegexPatternSet
54+ , Network.AWS.WAF.CreateRule
55+ , Network.AWS.WAF.CreateSizeConstraintSet
56+ , Network.AWS.WAF.CreateSqlInjectionMatchSet
57+ , Network.AWS.WAF.CreateWebACL
58+ , Network.AWS.WAF.CreateXSSMatchSet
59+ , Network.AWS.WAF.DeleteByteMatchSet
60+ , Network.AWS.WAF.DeleteGeoMatchSet
61+ , Network.AWS.WAF.DeleteIPSet
62+ , Network.AWS.WAF.DeleteRateBasedRule
63+ , Network.AWS.WAF.DeleteRegexMatchSet
64+ , Network.AWS.WAF.DeleteRegexPatternSet
65+ , Network.AWS.WAF.DeleteRule
66+ , Network.AWS.WAF.DeleteSizeConstraintSet
67+ , Network.AWS.WAF.DeleteSqlInjectionMatchSet
68+ , Network.AWS.WAF.DeleteWebACL
69+ , Network.AWS.WAF.DeleteXSSMatchSet
70+ , Network.AWS.WAF.GetByteMatchSet
71+ , Network.AWS.WAF.GetChangeToken
72+ , Network.AWS.WAF.GetChangeTokenStatus
73+ , Network.AWS.WAF.GetGeoMatchSet
74+ , Network.AWS.WAF.GetIPSet
75+ , Network.AWS.WAF.GetRateBasedRule
76+ , Network.AWS.WAF.GetRateBasedRuleManagedKeys
77+ , Network.AWS.WAF.GetRegexMatchSet
78+ , Network.AWS.WAF.GetRegexPatternSet
79+ , Network.AWS.WAF.GetRule
80+ , Network.AWS.WAF.GetSampledRequests
81+ , Network.AWS.WAF.GetSizeConstraintSet
82+ , Network.AWS.WAF.GetSqlInjectionMatchSet
83+ , Network.AWS.WAF.GetWebACL
84+ , Network.AWS.WAF.GetXSSMatchSet
85+ , Network.AWS.WAF.ListByteMatchSets
86+ , Network.AWS.WAF.ListGeoMatchSets
87+ , Network.AWS.WAF.ListIPSets
88+ , Network.AWS.WAF.ListRateBasedRules
89+ , Network.AWS.WAF.ListRegexMatchSets
90+ , Network.AWS.WAF.ListRegexPatternSets
91+ , Network.AWS.WAF.ListRules
92+ , Network.AWS.WAF.ListSizeConstraintSets
93+ , Network.AWS.WAF.ListSqlInjectionMatchSets
94+ , Network.AWS.WAF.ListWebACLs
95+ , Network.AWS.WAF.ListXSSMatchSets
96+ , Network.AWS.WAF.Types
97+ , Network.AWS.WAF.UpdateByteMatchSet
98+ , Network.AWS.WAF.UpdateGeoMatchSet
99+ , Network.AWS.WAF.UpdateIPSet
100+ , Network.AWS.WAF.UpdateRateBasedRule
101+ , Network.AWS.WAF.UpdateRegexMatchSet
102+ , Network.AWS.WAF.UpdateRegexPatternSet
103+ , Network.AWS.WAF.UpdateRule
104+ , Network.AWS.WAF.UpdateSizeConstraintSet
105+ , Network.AWS.WAF.UpdateSqlInjectionMatchSet
106+ , Network.AWS.WAF.UpdateWebACL
107+ , Network.AWS.WAF.UpdateXSSMatchSet
108+ , Network.AWS.WAF.Waiters
109+
110+ other-modules:
111+ Network.AWS.WAF.Types.Product
112+ , Network.AWS.WAF.Types.Sum
113+
114+ build-depends:
115+ amazonka-core == 1.5.0.*
116+ , base >= 4.7 && < 5
117+
118+test-suite amazonka-waf-test
119+ type: exitcode-stdio-1.0
120+ default-language: Haskell2010
121+ hs-source-dirs: test
122+ main-is: Main.hs
123+
124+ ghc-options: -Wall -threaded
125+
126+ -- This section is encoded by the template and any modules added by
127+ -- hand outside these namespaces will not correctly be added to the
128+ -- distribution package.
129+ other-modules:
130+ Test.AWS.WAF
131+ , Test.AWS.Gen.WAF
132+ , Test.AWS.WAF.Internal
133+
134+ build-depends:
135+ amazonka-core == 1.5.0.*
136+ , amazonka-test == 1.5.0.*
137+ , amazonka-waf
138+ , base
139+ , bytestring
140+ , tasty
141+ , tasty-hunit
142+ , text
143+ , time
144+ , unordered-containers
test/golden-test-cases/amazonka-waf.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
2+, stdenv, tasty, tasty-hunit, text, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "amazonka-waf";
6+ version = "1.5.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ amazonka-core base ];
9+ testHaskellDepends = [
10+ amazonka-core amazonka-test base bytestring tasty tasty-hunit text
11+ time unordered-containers
12+ ];
13+ homepage = "https://github.com/brendanhay/amazonka";
14+ description = "Amazon WAF SDK";
15+ license = stdenv.lib.licenses.mpl20;
16+}
test/golden-test-cases/api-field-json-th.cabalnew file+40
@@ -0,0 +1,40 @@
1+name: api-field-json-th
2+version: 0.1.0.2
3+synopsis: option of aeson's deriveJSON
4+description: Utils for using aeson's deriveJSON with lens's makeFields
5+homepage: https://github.com/nakaji-dayo/api-field-json-th
6+license: BSD3
7+license-file: LICENSE
8+author: Daishi Nakajima
9+maintainer: nakaji.dayo@gmail.com
10+copyright: 2016 Daishi Nakajima
11+category: Utils
12+build-type: Simple
13+-- extra-source-files:
14+cabal-version: >=1.10
15+
16+library
17+ exposed-modules: Data.Aeson.APIFieldJsonTH
18+ build-depends: base >= 4.7 && < 5
19+ , text
20+ , aeson
21+ , lens
22+ , split
23+ , template-haskell
24+ default-language: Haskell2010
25+
26+test-suite api-field-json-th-test
27+ type: exitcode-stdio-1.0
28+ hs-source-dirs: test
29+ main-is: Spec.hs
30+ build-depends: base
31+ , api-field-json-th
32+ , HUnit
33+ , aeson
34+ , lens
35+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
36+ default-language: Haskell2010
37+
38+source-repository head
39+ type: git
40+ location: https://github.com/nakaji-dayo/api-field-json-th
test/golden-test-cases/api-field-json-th.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, aeson, base, HUnit, lens, split, stdenv
2+, template-haskell, text
3+}:
4+mkDerivation {
5+ pname = "api-field-json-th";
6+ version = "0.1.0.2";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ aeson base lens split template-haskell text
10+ ];
11+ testHaskellDepends = [ aeson base HUnit lens ];
12+ homepage = "https://github.com/nakaji-dayo/api-field-json-th";
13+ description = "option of aeson's deriveJSON";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/app-settings.cabalnew file+138
@@ -0,0 +1,138 @@
1+-- Initial app-settings.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+name: app-settings
5+version: 0.2.0.11
6+synopsis: A library to manage application settings (INI file-like)
7+description:
8+ A library to deal with application settings.
9+ .
10+ This library deals with read-write application settings.
11+ You will have to specify the settings that your application
12+ uses, their name, types and default values.
13+ .
14+ Setting types must implement the 'Read' and 'Show' typeclasses.
15+ .
16+ The settings are saved in a file in an INI-like key-value format
17+ (without sections).
18+ .
19+ Reading and updating settings is done in pure code, the IO
20+ monad is only used to load settings and save them to disk.
21+ It is advised for the user to create a module in your project
22+ holding settings handling.
23+ .
24+ You can then declare settings:
25+ .
26+ > fontSize :: Setting Double
27+ > fontSize = Setting "fontSize" 14
28+ >
29+ > dateFormat :: Setting String
30+ > dateFormat = Setting "dateFormat" "%x"
31+ >
32+ > backgroundColor :: Setting (Int, Int, Int)
33+ > backgroundColor = Setting "backcolor" (255, 0, 0)
34+ .
35+ Optionally you can declare the list of all your settings,
36+ in that case the application will also save the default
37+ values in the configuration file, but commented out:
38+ .
39+ > fontSize=16
40+ > # dateFormat="%x"
41+ > # backcolor=(255,0,0)
42+ .
43+ If you do not specify the list of settings, only the
44+ first line would be present in the configuration file.
45+ .
46+ With an ordinary setting, one row in the configuration file
47+ means one setting. That setting may of course be a list
48+ for instance. This setup works very well for shorter lists
49+ like [1,2,3], however if you have a list of more complex
50+ items, you will get very long lines and a configuration
51+ file very difficult to edit by hand.
52+ .
53+ For these special cases there is also the 'ListSetting'
54+ constructor:
55+ .
56+ > testList :: Setting [String]
57+ > testList = ListSetting "testList" ["list1", "list2", "list3"]
58+ .
59+ Now the configuration file looks like that:
60+ .
61+ > testList_1="list1"
62+ > testList_2="list2"
63+ > testList_3="list3"
64+ .
65+ Which is much more handy for big lists. An empty list is represented
66+ like so:
67+ .
68+ > testList=
69+ .
70+ There is also another technique that you can use if you have too long
71+ lines: you can put line breaks in the setting values if you start the
72+ following lines with a leading space, like so:
73+ .
74+ > testList=["list1",
75+ > "list2", "list3"]
76+ .
77+ In that case don't use the ListSetting option. Any character after the
78+ the leading space in the next lines will go in the setting value. Note
79+ that the library will automatically wrap setting values longer than 80
80+ characters when saving.
81+ .
82+ Once we declared the settings, we can read the configuration
83+ from disk (and your settings module should export your wrapper
84+ around the function offered by this library):
85+ .
86+ > readResult <- try $ readSettings (AutoFromAppName "test")
87+ > case readResult of
88+ > Right (conf, GetSetting getSetting) -> do
89+ > let textSize = getSetting fontSize
90+ > saveSettings emptyDefaultConfig (AutoFromAppName "test") conf
91+ > Left (x :: SomeException) -> error "Error reading the config file!"
92+ .
93+ 'AutoFromAppName' specifies where to save the configuration file.
94+ And we've already covered the getSetting in this snippet, see
95+ the 'readSettings' documentation for further information.
96+ .
97+ You can also look at the tests of the library on the github project for sample use.
98+
99+homepage: https://github.com/emmanueltouzery/app-settings
100+license: BSD3
101+license-file: LICENSE
102+author: Emmanuel Touzery
103+maintainer: etouzery@gmail.com
104+-- copyright:
105+category: Configuration
106+build-type: Simple
107+extra-source-files: tests/*.conf tests/*.config tests/*.txt
108+cabal-version: >=1.10
109+
110+library
111+ exposed-modules: Data.AppSettings
112+ other-modules: Data.Serialization,
113+ Data.AppSettingsInternal
114+ -- other-extensions:
115+ build-depends: base >=4.6 && <5,
116+ mtl >= 2.1 && <2.3,
117+ containers == 0.5.*,
118+ directory >= 1.2 && < 1.4,
119+ text >= 0.10,
120+ parsec == 3.1.*
121+ -- hs-source-dirs:
122+ default-language: Haskell2010
123+ Ghc-Options: -Wall
124+
125+test-suite tests
126+ type: exitcode-stdio-1.0
127+ hs-source-dirs: ., tests
128+ main-is: Tests.hs
129+ default-language: Haskell2010
130+ build-depends: base,
131+ hspec,
132+ HUnit >= 1.2 && <1.7,
133+ mtl >= 2.1 && <2.3,
134+ containers == 0.5.*,
135+ directory >= 1.2 && < 1.4,
136+ text >= 0.10,
137+ parsec == 3.1.*
138+ Ghc-Options: -Wall
test/golden-test-cases/app-settings.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, base, containers, directory, hspec, HUnit, mtl
2+, parsec, stdenv, text
3+}:
4+mkDerivation {
5+ pname = "app-settings";
6+ version = "0.2.0.11";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base containers directory mtl parsec text
10+ ];
11+ testHaskellDepends = [
12+ base containers directory hspec HUnit mtl parsec text
13+ ];
14+ homepage = "https://github.com/emmanueltouzery/app-settings";
15+ description = "A library to manage application settings (INI file-like)";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/apply-refact.cabalnew file+96
@@ -0,0 +1,96 @@
1+-- Initial hlint-refactor.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+name: apply-refact
5+version: 0.4.1.0
6+synopsis: Perform refactorings specified by the refact library.
7+description: Perform refactorings specified by the refact library. It is primarily used with HLint's --refactor flag.
8+license: BSD3
9+license-file: LICENSE
10+author: Matthew Pickering
11+maintainer: matthewtpickering@gmail.com
12+-- copyright:
13+category: Development
14+build-type: Simple
15+extra-source-files: CHANGELOG
16+ , README.md
17+ , tests/examples/*.hs
18+ , tests/examples/*.hs.refact
19+ , tests/examples/*.hs.expected
20+cabal-version: >=1.10
21+tested-with: GHC == 8.0.1
22+
23+
24+source-repository head
25+ type: git
26+ location: https://github.com/mpickering/apply-refact.git
27+
28+library
29+ exposed-modules: Refact.Utils
30+ , Refact.Apply
31+ , Refact.Fixity
32+ GHC-Options: -Wall
33+ build-depends: base >=4.8 && <4.11
34+ , refact >= 0.2
35+ , ghc-exactprint >= 0.5.3.1
36+ , ghc >= 8.2.0 && < 8.3
37+ , containers
38+ , syb
39+ , mtl
40+ , process
41+ , transformers
42+ , temporary
43+ , filemanip
44+ , unix-compat
45+ , directory
46+ hs-source-dirs: src
47+ default-language: Haskell2010
48+
49+executable refactor
50+ main-is: Main.hs
51+ hs-source-dirs: src
52+ default-language: Haskell2010
53+ ghc-options: -Wall -fno-warn-unused-do-bind
54+ build-depends: base >= 4.8 && < 4.11
55+ , refact >= 0.2
56+ , ghc-exactprint >= 0.5.3.1
57+ , ghc >= 8.2.0 && < 8.3
58+ , containers
59+ , syb
60+ , mtl
61+ , process
62+ , directory
63+ , optparse-applicative >= 0.13
64+ , filemanip
65+ , unix-compat
66+ , filepath
67+ , temporary
68+ , transformers
69+
70+Test-Suite test
71+ type: exitcode-stdio-1.0
72+ hs-source-dirs: tests, src
73+ main-is: Test.hs
74+ GHC-Options: -threaded -main-is Test
75+ Default-language: Haskell2010
76+ if impl (ghc < 7.10)
77+ buildable: False
78+ Build-depends: tasty
79+ , tasty-golden
80+ , tasty-expected-failure
81+ , base < 5
82+ , refact >= 0.2
83+ , ghc-exactprint >= 0.5.3.1
84+ , ghc >= 8.2.0 && < 8.3
85+ , containers
86+ , syb
87+ , mtl
88+ , process
89+ , directory
90+ , optparse-applicative
91+ , filemanip
92+ , unix-compat
93+ , filepath
94+ , silently
95+ , temporary
96+ , transformers
test/golden-test-cases/apply-refact.nix.goldennew file+29
@@ -0,0 +1,29 @@
1+{ mkDerivation, base, containers, directory, filemanip, filepath
2+, ghc, ghc-exactprint, mtl, optparse-applicative, process, refact
3+, silently, stdenv, syb, tasty, tasty-expected-failure
4+, tasty-golden, temporary, transformers, unix-compat
5+}:
6+mkDerivation {
7+ pname = "apply-refact";
8+ version = "0.4.1.0";
9+ sha256 = "deadbeef";
10+ isLibrary = true;
11+ isExecutable = true;
12+ libraryHaskellDepends = [
13+ base containers directory filemanip ghc ghc-exactprint mtl process
14+ refact syb temporary transformers unix-compat
15+ ];
16+ executableHaskellDepends = [
17+ base containers directory filemanip filepath ghc ghc-exactprint mtl
18+ optparse-applicative process refact syb temporary transformers
19+ unix-compat
20+ ];
21+ testHaskellDepends = [
22+ base containers directory filemanip filepath ghc ghc-exactprint mtl
23+ optparse-applicative process refact silently syb tasty
24+ tasty-expected-failure tasty-golden temporary transformers
25+ unix-compat
26+ ];
27+ description = "Perform refactorings specified by the refact library";
28+ license = stdenv.lib.licenses.bsd3;
29+}
test/golden-test-cases/async.cabalnew file+64
@@ -0,0 +1,64 @@
1+name: async
2+version: 2.1.1.1
3+-- don't forget to update ./changelog.md!
4+synopsis: Run IO operations asynchronously and wait for their results
5+
6+description:
7+ This package provides a higher-level interface over
8+ threads, in which an @Async a@ is a concurrent
9+ thread that will eventually deliver a value of
10+ type @a@. The package provides ways to create
11+ @Async@ computations, wait for their results, and
12+ cancel them.
13+ .
14+ Using @Async@ is safer than using threads in two
15+ ways:
16+ .
17+ * When waiting for a thread to return a result,
18+ if the thread dies with an exception then the
19+ caller must either re-throw the exception
20+ ('wait') or handle it ('waitCatch'); the
21+ exception cannot be ignored.
22+ .
23+ * The API makes it possible to build a tree of
24+ threads that are automatically killed when
25+ their parent dies (see 'withAsync').
26+
27+license: BSD3
28+license-file: LICENSE
29+author: Simon Marlow
30+maintainer: Simon Marlow <marlowsd@gmail.com>
31+copyright: (c) Simon Marlow 2012
32+category: Concurrency
33+build-type: Simple
34+cabal-version: >=1.10
35+homepage: https://github.com/simonmar/async
36+bug-reports: https://github.com/simonmar/async/issues
37+tested-with: GHC==7.11.*, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4
38+
39+extra-source-files:
40+ changelog.md
41+ bench/race.hs
42+
43+source-repository head
44+ type: git
45+ location: https://github.com/simonmar/async.git
46+
47+library
48+ default-language: Haskell2010
49+ other-extensions: CPP, MagicHash, RankNTypes, UnboxedTuples
50+ if impl(ghc>=7.1)
51+ other-extensions: Trustworthy
52+ exposed-modules: Control.Concurrent.Async
53+ build-depends: base >= 4.3 && < 4.11, stm >= 2.2 && < 2.5
54+
55+test-suite test-async
56+ default-language: Haskell2010
57+ type: exitcode-stdio-1.0
58+ hs-source-dirs: test
59+ main-is: test-async.hs
60+ build-depends: base >= 4.3 && < 4.11,
61+ async,
62+ test-framework,
63+ test-framework-hunit,
64+ HUnit
test/golden-test-cases/async.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, base, HUnit, stdenv, stm, test-framework
2+, test-framework-hunit
3+}:
4+mkDerivation {
5+ pname = "async";
6+ version = "2.1.1.1";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ base stm ];
9+ testHaskellDepends = [
10+ base HUnit test-framework test-framework-hunit
11+ ];
12+ homepage = "https://github.com/simonmar/async";
13+ description = "Run IO operations asynchronously and wait for their results";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/attoparsec-expr.cabalnew file+28
@@ -0,0 +1,28 @@
1+name: attoparsec-expr
2+version: 0.1.1.2
3+description: Port of parsec's expression parser to attoparsec.
4+synopsis: Port of parsec's expression parser to attoparsec.
5+category: Text, Parsing
6+license: BSD3
7+license-file: LICENSE
8+author: Daan Leijen, Paolo Martini
9+maintainer: Silk <code@silk.co>
10+build-type: Simple
11+cabal-version: >= 1.6
12+
13+extra-source-files:
14+ CHANGELOG.md
15+ LICENSE
16+ README.md
17+
18+source-repository head
19+ type: git
20+ location: https://github.com/silkapp/attoparsec-expr
21+
22+library
23+ ghc-options: -Wall
24+ hs-source-dirs: src
25+ exposed-modules: Data.Attoparsec.Expr
26+ Build-Depends:
27+ base == 4.*
28+ , attoparsec >= 0.10 && < 0.14
test/golden-test-cases/attoparsec-expr.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, attoparsec, base, stdenv }:
2+mkDerivation {
3+ pname = "attoparsec-expr";
4+ version = "0.1.1.2";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ attoparsec base ];
7+ description = "Port of parsec's expression parser to attoparsec";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/attoparsec-time.cabalnew file+84
@@ -0,0 +1,84 @@
1+name:
2+ attoparsec-time
3+version:
4+ 1
5+synopsis:
6+ Attoparsec parsers of time
7+description:
8+ A collection of Attoparsec parsers for the \"time\" library
9+category:
10+ Attoparsec, Parsers, Time
11+homepage:
12+ https://github.com/nikita-volkov/attoparsec-time
13+bug-reports:
14+ https://github.com/nikita-volkov/attoparsec-time/issues
15+author:
16+ Nikita Volkov <nikita.y.volkov@mail.ru>
17+maintainer:
18+ Nikita Volkov <nikita.y.volkov@mail.ru>
19+copyright:
20+ (c) 2017, Nikita Volkov
21+license:
22+ MIT
23+license-file:
24+ LICENSE
25+build-type:
26+ Custom
27+cabal-version:
28+ >=1.10
29+
30+source-repository head
31+ type:
32+ git
33+ location:
34+ git://github.com/nikita-volkov/attoparsec-time.git
35+
36+custom-setup
37+ setup-depends:
38+ base, Cabal, cabal-doctest >=1.0.2 && <1.1
39+
40+library
41+ hs-source-dirs:
42+ library
43+ default-extensions:
44+ Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
45+ default-language:
46+ Haskell2010
47+ exposed-modules:
48+ Attoparsec.Time.ByteString
49+ Attoparsec.Time.Text
50+ other-modules:
51+ Attoparsec.Time.Prelude
52+ Attoparsec.Time.Validation
53+ Attoparsec.Time.Pure
54+ build-depends:
55+ --
56+ attoparsec >=0.13 && <0.15,
57+ --
58+ time >=1.4 && <2,
59+ scientific ==0.3.*,
60+ text >=1 && <2,
61+ bytestring ==0.10.*,
62+ --
63+ base-prelude <2,
64+ base >=4.7 && <5
65+
66+test-suite doctests
67+ type:
68+ exitcode-stdio-1.0
69+ hs-source-dirs:
70+ doctests
71+ main-is:
72+ Main.hs
73+ ghc-options:
74+ -threaded
75+ "-with-rtsopts=-N"
76+ -funbox-strict-fields
77+ default-language:
78+ Haskell2010
79+ build-depends:
80+ doctest ==0.13.*,
81+ directory >=1.2 && <2,
82+ filepath >=1.4 && <2,
83+ base-prelude <2,
84+ base <5
test/golden-test-cases/attoparsec-time.nix.goldennew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, attoparsec, base, base-prelude, bytestring, Cabal
2+, cabal-doctest, directory, doctest, filepath, scientific, stdenv
3+, text, time
4+}:
5+mkDerivation {
6+ pname = "attoparsec-time";
7+ version = "1";
8+ sha256 = "deadbeef";
9+ setupHaskellDepends = [ base Cabal cabal-doctest ];
10+ libraryHaskellDepends = [
11+ attoparsec base base-prelude bytestring scientific text time
12+ ];
13+ testHaskellDepends = [
14+ base base-prelude directory doctest filepath
15+ ];
16+ homepage = "https://github.com/nikita-volkov/attoparsec-time";
17+ description = "Attoparsec parsers of time";
18+ license = stdenv.lib.licenses.mit;
19+}
test/golden-test-cases/avers-server.cabalnew file+55
@@ -0,0 +1,55 @@
1+name: avers-server
2+version: 0.1.0
3+synopsis: Server implementation of the Avers API
4+description: Server implementation of the Avers API
5+homepage: http://github.com/wereHamster/avers-server
6+license: MIT
7+license-file: LICENSE
8+author: Tomas Carnecky
9+maintainer: tomas.carnecky@gmail.com
10+copyright: 2016 Tomas Carnecky
11+category: Avers
12+build-type: Simple
13+cabal-version: >=1.10
14+
15+source-repository head
16+ type: git
17+ location: https://github.com/wereHamster/avers
18+
19+library
20+ default-language: Haskell2010
21+ hs-source-dirs: src
22+ ghc-options: -Wall
23+
24+ exposed-modules:
25+ Avers.Server
26+
27+ other-modules:
28+ Avers.Server.Authorization
29+ , Avers.Server.Instances
30+
31+ build-depends:
32+ base >= 4.7 && < 5
33+ , aeson
34+ , avers
35+ , avers-api
36+ , base64-bytestring
37+ , bytestring
38+ , bytestring-conversion
39+ , containers
40+ , cookie
41+ , cryptonite
42+ , http-types
43+ , memory
44+ , mtl
45+ , resource-pool
46+ , rethinkdb-client-driver
47+ , servant
48+ , servant-server
49+ , stm
50+ , text
51+ , time
52+ , transformers
53+ , wai
54+ , wai-websockets
55+ , websockets
test/golden-test-cases/avers-server.nix.goldennew file+21
@@ -0,0 +1,21 @@
1+{ mkDerivation, aeson, avers, avers-api, base, base64-bytestring
2+, bytestring, bytestring-conversion, containers, cookie, cryptonite
3+, http-types, memory, mtl, resource-pool, rethinkdb-client-driver
4+, servant, servant-server, stdenv, stm, text, time, transformers
5+, wai, wai-websockets, websockets
6+}:
7+mkDerivation {
8+ pname = "avers-server";
9+ version = "0.1.0";
10+ sha256 = "deadbeef";
11+ libraryHaskellDepends = [
12+ aeson avers avers-api base base64-bytestring bytestring
13+ bytestring-conversion containers cookie cryptonite http-types
14+ memory mtl resource-pool rethinkdb-client-driver servant
15+ servant-server stm text time transformers wai wai-websockets
16+ websockets
17+ ];
18+ homepage = "http://github.com/wereHamster/avers-server";
19+ description = "Server implementation of the Avers API";
20+ license = stdenv.lib.licenses.mit;
21+}
test/golden-test-cases/aws.cabalnew file+430
@@ -0,0 +1,430 @@
1+Name: aws
2+Version: 0.18
3+Synopsis: Amazon Web Services (AWS) for Haskell
4+Description: Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at <https://github.com/aristidb/aws/blob/master/README.md>.
5+Homepage: http://github.com/aristidb/aws
6+License: BSD3
7+License-file: LICENSE
8+Author: Aristid Breitkreuz, contributors see README
9+Maintainer: aristidb@gmail.com
10+Copyright: See contributors list in README and LICENSE file
11+Category: Network, Web, AWS, Cloud, Distributed Computing
12+Build-type: Simple
13+
14+Extra-source-files: README.md
15+ CHANGELOG.md
16+
17+Cabal-version: >=1.10
18+
19+Source-repository this
20+ type: git
21+ location: https://github.com/aristidb/aws.git
22+ tag: 0.18
23+
24+Source-repository head
25+ type: git
26+ location: https://github.com/aristidb/aws.git
27+
28+Flag Examples
29+ Description: Build the examples.
30+ Default: False
31+
32+Library
33+ Exposed-modules:
34+ Aws
35+ Aws.Aws
36+ Aws.Core
37+ Aws.DynamoDb
38+ Aws.DynamoDb.Commands
39+ Aws.DynamoDb.Commands.BatchGetItem
40+ Aws.DynamoDb.Commands.BatchWriteItem
41+ Aws.DynamoDb.Commands.DeleteItem
42+ Aws.DynamoDb.Commands.GetItem
43+ Aws.DynamoDb.Commands.PutItem
44+ Aws.DynamoDb.Commands.Query
45+ Aws.DynamoDb.Commands.Scan
46+ Aws.DynamoDb.Commands.Table
47+ Aws.DynamoDb.Commands.UpdateItem
48+ Aws.DynamoDb.Core
49+ Aws.Ec2.InstanceMetadata
50+ Aws.Iam
51+ Aws.Iam.Commands
52+ Aws.Iam.Commands.CreateAccessKey
53+ Aws.Iam.Commands.CreateUser
54+ Aws.Iam.Commands.DeleteAccessKey
55+ Aws.Iam.Commands.DeleteUser
56+ Aws.Iam.Commands.DeleteUserPolicy
57+ Aws.Iam.Commands.GetUser
58+ Aws.Iam.Commands.GetUserPolicy
59+ Aws.Iam.Commands.ListAccessKeys
60+ Aws.Iam.Commands.ListMfaDevices
61+ Aws.Iam.Commands.ListUserPolicies
62+ Aws.Iam.Commands.ListUsers
63+ Aws.Iam.Commands.PutUserPolicy
64+ Aws.Iam.Commands.UpdateAccessKey
65+ Aws.Iam.Commands.UpdateUser
66+ Aws.Iam.Core
67+ Aws.Iam.Internal
68+ Aws.Network
69+ Aws.S3
70+ Aws.S3.Commands
71+ Aws.S3.Commands.CopyObject
72+ Aws.S3.Commands.DeleteBucket
73+ Aws.S3.Commands.DeleteObject
74+ Aws.S3.Commands.DeleteObjectVersion
75+ Aws.S3.Commands.DeleteObjects
76+ Aws.S3.Commands.GetBucket
77+ Aws.S3.Commands.GetBucketLocation
78+ Aws.S3.Commands.GetBucketObjectVersions
79+ Aws.S3.Commands.GetObject
80+ Aws.S3.Commands.GetService
81+ Aws.S3.Commands.HeadObject
82+ Aws.S3.Commands.PutBucket
83+ Aws.S3.Commands.PutObject
84+ Aws.S3.Commands.Multipart
85+ Aws.S3.Core
86+ Aws.Ses
87+ Aws.Ses.Commands
88+ Aws.Ses.Commands.DeleteIdentity
89+ Aws.Ses.Commands.GetIdentityDkimAttributes
90+ Aws.Ses.Commands.GetIdentityNotificationAttributes
91+ Aws.Ses.Commands.GetIdentityVerificationAttributes
92+ Aws.Ses.Commands.ListIdentities
93+ Aws.Ses.Commands.SendRawEmail
94+ Aws.Ses.Commands.SetIdentityDkimEnabled
95+ Aws.Ses.Commands.SetIdentityFeedbackForwardingEnabled
96+ Aws.Ses.Commands.SetIdentityNotificationTopic
97+ Aws.Ses.Commands.VerifyDomainDkim
98+ Aws.Ses.Commands.VerifyDomainIdentity
99+ Aws.Ses.Commands.VerifyEmailIdentity
100+ Aws.Ses.Core
101+ Aws.SimpleDb
102+ Aws.SimpleDb.Commands
103+ Aws.SimpleDb.Commands.Attributes
104+ Aws.SimpleDb.Commands.Domain
105+ Aws.SimpleDb.Commands.Select
106+ Aws.SimpleDb.Core
107+ Aws.Sqs
108+ Aws.Sqs.Commands
109+ Aws.Sqs.Commands.Message
110+ Aws.Sqs.Commands.Permission
111+ Aws.Sqs.Commands.Queue
112+ Aws.Sqs.Commands.QueueAttributes
113+ Aws.Sqs.Core
114+
115+ Build-depends:
116+ aeson >= 0.6,
117+ attoparsec >= 0.11 && < 0.14,
118+ base >= 4.6 && < 5,
119+ base16-bytestring == 0.1.*,
120+ base64-bytestring == 1.0.*,
121+ blaze-builder >= 0.2.1.4 && < 0.5,
122+ byteable == 0.1.*,
123+ bytestring >= 0.9 && < 0.11,
124+ case-insensitive >= 0.2 && < 1.3,
125+ cereal >= 0.3 && < 0.6,
126+ conduit >= 1.1 && < 1.3,
127+ conduit-extra >= 1.1 && < 1.3,
128+ containers >= 0.4,
129+ cryptonite >= 0.11,
130+ data-default >= 0.5.3 && < 0.8,
131+ directory >= 1.0 && < 2.0,
132+ filepath >= 1.1 && < 1.5,
133+ http-conduit >= 2.1 && < 2.3,
134+ http-types >= 0.7 && < 1.0,
135+ lifted-base >= 0.1 && < 0.3,
136+ memory,
137+ monad-control >= 0.3,
138+ mtl == 2.*,
139+ network == 2.*,
140+ old-locale == 1.*,
141+ resourcet >= 1.1 && < 1.2,
142+ safe >= 0.3 && < 0.4,
143+ scientific >= 0.3,
144+ tagged >= 0.7 && < 0.9,
145+ text >= 0.11,
146+ time >= 1.4.0 && < 2.0,
147+ transformers >= 0.2.2 && < 0.6,
148+ unordered-containers >= 0.2,
149+ utf8-string >= 0.3 && < 1.1,
150+ vector >= 0.10,
151+ xml-conduit >= 1.2 && <2.0
152+
153+ if !impl(ghc >= 7.6)
154+ Build-depends: ghc-prim
155+
156+ GHC-Options: -Wall
157+
158+ Default-Language: Haskell2010
159+ Default-Extensions:
160+ RecordWildCards,
161+ TypeFamilies,
162+ MultiParamTypeClasses,
163+ FlexibleContexts,
164+ FlexibleInstances,
165+ FunctionalDependencies,
166+ DeriveFunctor,
167+ DeriveDataTypeable,
168+ OverloadedStrings,
169+ TupleSections,
170+ ScopedTypeVariables,
171+ EmptyDataDecls,
172+ Rank2Types
173+
174+Executable GetObject
175+ Main-is: GetObject.hs
176+ Hs-source-dirs: Examples
177+
178+ if !flag(Examples)
179+ Buildable: False
180+ else
181+ Buildable: True
182+ Build-depends:
183+ base == 4.*,
184+ aws,
185+ http-conduit,
186+ conduit,
187+ conduit-extra
188+
189+ Default-Language: Haskell2010
190+
191+Executable GetObjectGoogle
192+ Main-is: GetObjectGoogle.hs
193+ Hs-source-dirs: Examples
194+
195+ if !flag(Examples)
196+ Buildable: False
197+ else
198+ Buildable: True
199+ Build-depends:
200+ base == 4.*,
201+ aws,
202+ http-conduit,
203+ conduit,
204+ conduit-extra
205+
206+ Default-Language: Haskell2010
207+
208+Executable MultipartUpload
209+ Main-is: MultipartUpload.hs
210+ Hs-source-dirs: Examples
211+
212+ if !flag(Examples)
213+ Buildable: False
214+ else
215+ Buildable: True
216+ Build-depends:
217+ base == 4.*,
218+ aws,
219+ http-conduit,
220+ conduit,
221+ conduit-extra,
222+ text,
223+ resourcet
224+
225+ Default-Language: Haskell2010
226+
227+Executable MultipartTransfer
228+ Main-is: MultipartTransfer.hs
229+ Hs-source-dirs: Examples
230+
231+ if !flag(Examples)
232+ Buildable: False
233+ else
234+ Buildable: True
235+ Build-depends:
236+ base == 4.*,
237+ aws,
238+ http-conduit,
239+ conduit,
240+ conduit-extra,
241+ text
242+
243+ Default-Language: Haskell2010
244+
245+Executable NukeBucket
246+ Main-is: NukeBucket.hs
247+ Hs-source-dirs: Examples
248+
249+ if !flag(Examples)
250+ Buildable: False
251+ else
252+ Buildable: True
253+ Build-depends:
254+ base == 4.*,
255+ aws,
256+ http-conduit,
257+ conduit,
258+ conduit-extra,
259+ text >=0.1,
260+ transformers
261+
262+ Default-Language: Haskell2010
263+
264+Executable PutBucketNearLine
265+ Main-is: PutBucketNearLine.hs
266+ Hs-source-dirs: Examples
267+
268+ if !flag(Examples)
269+ Buildable: False
270+ else
271+ Buildable: True
272+ Build-depends:
273+ base == 4.*,
274+ aws,
275+ http-conduit,
276+ conduit,
277+ conduit-extra,
278+ text >=0.1,
279+ transformers
280+
281+ Default-Language: Haskell2010
282+
283+Executable SimpleDb
284+ Main-is: SimpleDb.hs
285+ Hs-source-dirs: Examples
286+
287+ if !flag(Examples)
288+ Buildable: False
289+ else
290+ Buildable: True
291+ Build-depends:
292+ base == 4.*,
293+ aws,
294+ text >=0.11
295+
296+ Default-Language: Haskell2010
297+
298+Executable DynamoDb
299+ Main-is: DynamoDb.hs
300+ Hs-source-dirs: Examples
301+
302+ if !flag(Examples)
303+ Buildable: False
304+ else
305+ Buildable: True
306+ Build-depends:
307+ aws,
308+ base == 4.*,
309+ data-default,
310+ exceptions,
311+ http-conduit,
312+ text,
313+ conduit
314+
315+ Default-Language: Haskell2010
316+
317+
318+Executable Sqs
319+ Main-is: Sqs.hs
320+ Hs-source-dirs: Examples
321+
322+ if !flag(Examples)
323+ Buildable: False
324+ else
325+ Buildable: True
326+ Build-depends:
327+ base == 4.*,
328+ aws,
329+ errors >= 2.0,
330+ text >=0.11,
331+ transformers >= 0.3
332+
333+ Default-Language: Haskell2010
334+
335+test-suite sqs-tests
336+ type: exitcode-stdio-1.0
337+ default-language: Haskell2010
338+ hs-source-dirs: tests
339+ main-is: Sqs/Main.hs
340+
341+ other-modules:
342+ Utils
343+
344+ build-depends:
345+ QuickCheck >= 2.7,
346+ aeson >= 0.7,
347+ aws,
348+ base == 4.*,
349+ bytestring >= 0.10,
350+ errors >= 2.0,
351+ http-client >= 0.3 && < 0.6,
352+ lifted-base >= 0.2,
353+ monad-control >= 0.3,
354+ mtl >= 2.1,
355+ quickcheck-instances >= 0.3,
356+ resourcet >= 1.1,
357+ tagged >= 0.7,
358+ tasty >= 0.8,
359+ tasty-quickcheck >= 0.8,
360+ text >= 1.1,
361+ time,
362+ transformers >= 0.3,
363+ transformers-base >= 0.4
364+
365+ ghc-options: -Wall -threaded
366+
367+test-suite dynamodb-tests
368+ type: exitcode-stdio-1.0
369+ default-language: Haskell2010
370+ hs-source-dirs: tests
371+ main-is: DynamoDb/Main.hs
372+
373+ other-modules:
374+ Utils
375+ DynamoDb.Utils
376+
377+ build-depends:
378+ QuickCheck >= 2.7,
379+ aeson >= 0.7,
380+ aws,
381+ base == 4.*,
382+ bytestring >= 0.10,
383+ errors >= 2.0,
384+ http-client >= 0.3,
385+ lifted-base >= 0.2,
386+ monad-control >= 0.3,
387+ mtl >= 2.1,
388+ quickcheck-instances >= 0.3,
389+ resourcet >= 1.1,
390+ tagged >= 0.7,
391+ tasty >= 0.8,
392+ tasty-quickcheck >= 0.8,
393+ text >= 1.1,
394+ time,
395+ transformers >= 0.3,
396+ transformers-base >= 0.4
397+
398+
399+test-suite s3-tests
400+ type: exitcode-stdio-1.0
401+ default-language: Haskell2010
402+ hs-source-dirs: tests
403+ main-is: S3/Main.hs
404+
405+ other-modules:
406+ Utils
407+
408+ build-depends:
409+ aws,
410+ base == 4.*,
411+ QuickCheck >= 2.7,
412+ aeson >= 0.7,
413+ bytestring,
414+ conduit-combinators,
415+ errors >= 2.0,
416+ lifted-base >= 0.2,
417+ monad-control >= 0.3,
418+ mtl >= 2.1,
419+ http-client < 0.6,
420+ http-client-tls < 0.5,
421+ http-types,
422+ resourcet,
423+ tasty >= 0.8,
424+ tasty-hunit >= 0.8,
425+ tasty-quickcheck >= 0.8,
426+ text,
427+ time,
428+ tagged >= 0.7,
429+ transformers >= 0.3,
430+ transformers-base >= 0.4
test/golden-test-cases/aws.nix.goldennew file+35
@@ -0,0 +1,35 @@
1+{ mkDerivation, aeson, attoparsec, base, base16-bytestring
2+, base64-bytestring, blaze-builder, byteable, bytestring
3+, case-insensitive, cereal, conduit, conduit-combinators
4+, conduit-extra, containers, cryptonite, data-default, directory
5+, errors, filepath, http-client, http-client-tls, http-conduit
6+, http-types, lifted-base, memory, monad-control, mtl, network
7+, old-locale, QuickCheck, quickcheck-instances, resourcet, safe
8+, scientific, stdenv, tagged, tasty, tasty-hunit, tasty-quickcheck
9+, text, time, transformers, transformers-base, unordered-containers
10+, utf8-string, vector, xml-conduit
11+}:
12+mkDerivation {
13+ pname = "aws";
14+ version = "0.18";
15+ sha256 = "deadbeef";
16+ isLibrary = true;
17+ isExecutable = true;
18+ libraryHaskellDepends = [
19+ aeson attoparsec base base16-bytestring base64-bytestring
20+ blaze-builder byteable bytestring case-insensitive cereal conduit
21+ conduit-extra containers cryptonite data-default directory filepath
22+ http-conduit http-types lifted-base memory monad-control mtl
23+ network old-locale resourcet safe scientific tagged text time
24+ transformers unordered-containers utf8-string vector xml-conduit
25+ ];
26+ testHaskellDepends = [
27+ aeson base bytestring conduit-combinators errors http-client
28+ http-client-tls http-types lifted-base monad-control mtl QuickCheck
29+ quickcheck-instances resourcet tagged tasty tasty-hunit
30+ tasty-quickcheck text time transformers transformers-base
31+ ];
32+ homepage = "http://github.com/aristidb/aws";
33+ description = "Amazon Web Services (AWS) for Haskell";
34+ license = stdenv.lib.licenses.bsd3;
35+}
test/golden-test-cases/bbdb.cabalnew file+54
@@ -0,0 +1,54 @@
1+Name: bbdb
2+Version: 0.8
3+Synopsis: Ability to read, write, and modify BBDB files
4+Description: BBDB (http://savannah.nongnu.org/projects/bbdb/) is a
5+ contact management utility that can be used with
6+ emacs. It stores its data internally as a lisp
7+ expression. This module parses the lisp and
8+ provides some convenience functions to get at and
9+ manipulate the data all from within Haskell. See
10+ the hackage docs for usage and examples.
11+
12+Homepage: https://github.com/henrylaxen/bbdb
13+License: GPL-3
14+License-file: LICENSE
15+Author: Henry Laxen
16+Copyright: Henry Laxen
17+Maintainer: nadine.and.henry@pobox.com
18+Stability: stable
19+Bug-reports: mailto:nadine.and.henry@pobox.com
20+Category: Database
21+Build-type: Simple
22+Extra-source-files: changelog.md
23+ LICENSE
24+ README.md
25+ test/sampleData.txt
26+
27+Cabal-version: >=1.10
28+
29+Library
30+ Exposed-modules: Database.BBDB
31+ hs-source-dirs: src
32+ ghc-options: -Wall
33+ default-language: Haskell2010
34+ default-extensions: FlexibleInstances,
35+ MultiParamTypeClasses,
36+ OverloadedStrings
37+ Build-depends:
38+ base >= 3 && <= 5,
39+ parsec >= 3
40+
41+Test-Suite bbdb-tests
42+ Type: exitcode-stdio-1.0
43+ Main-is: Spec.hs
44+ hs-source-dirs: src,test
45+ Other-modules: Database.BBDB,
46+ BBDBSpec
47+ default-language: Haskell2010
48+ default-extensions: FlexibleInstances,
49+ MultiParamTypeClasses,
50+ OverloadedStrings
51+ Build-depends:
52+ base >= 3 && <= 5,
53+ hspec,
54+ parsec >= 3
test/golden-test-cases/bbdb.nix.goldennew file+11
@@ -0,0 +1,11 @@
1+{ mkDerivation, base, hspec, parsec, stdenv }:
2+mkDerivation {
3+ pname = "bbdb";
4+ version = "0.8";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base parsec ];
7+ testHaskellDepends = [ base hspec parsec ];
8+ homepage = "https://github.com/henrylaxen/bbdb";
9+ description = "Ability to read, write, and modify BBDB files";
10+ license = stdenv.lib.licenses.gpl3;
11+}
test/golden-test-cases/benchpress.cabalnew file+41
@@ -0,0 +1,41 @@
1+name: benchpress
2+version: 0.2.2.10
3+synopsis: Micro-benchmarking with detailed statistics.
4+Description: Benchmarks actions and produces statistics
5+ such as min, mean, median, standard deviation,
6+ and max execution time. Also computes
7+ execution time percentiles. Comes with
8+ functions to pretty-print the results.
9+license: BSD3
10+license-file: LICENSE
11+author: Johan Tibell
12+maintainer: me@willsewell.com
13+build-type: Simple
14+cabal-version: >= 1.2
15+category: Testing
16+homepage: https://github.com/WillSewell/benchpress
17+
18+library
19+ exposed-modules: Test.BenchPress
20+
21+ other-modules: Math.Statistics
22+
23+ build-depends: base >= 2.0 && < 4.11,
24+ mtl >= 1 && < 2.3,
25+ time >= 1 && < 1.10
26+
27+ ghc-options: -funbox-strict-fields -Wall
28+
29+executable example
30+ main-is: Main.hs
31+
32+ -- This is not in build-depends for cabal 1.2 compatibility (requires 1.8)
33+ other-modules: Test.BenchPress
34+ Math.Statistics
35+
36+ hs-source-dirs: example, .
37+
38+ build-depends: base,
39+ bytestring
40+
41+ ghc-options: -funbox-strict-fields -Wall
test/golden-test-cases/benchpress.nix.goldennew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, base, bytestring, mtl, stdenv, time }:
2+mkDerivation {
3+ pname = "benchpress";
4+ version = "0.2.2.10";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ libraryHaskellDepends = [ base mtl time ];
9+ executableHaskellDepends = [ base bytestring ];
10+ homepage = "https://github.com/WillSewell/benchpress";
11+ description = "Micro-benchmarking with detailed statistics";
12+ license = stdenv.lib.licenses.bsd3;
13+}
test/golden-test-cases/binary-bits.cabalnew file+44
@@ -0,0 +1,44 @@
1+-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/
2+name: binary-bits
3+version: 0.5
4+synopsis: Bit parsing/writing on top of binary.
5+description: Bit parsing/writing on top of binary. Provides functions to
6+ read and write bits to and from 8\/16\/32\/64 words.
7+license: BSD3
8+license-file: LICENSE
9+author: Lennart Kolmodin <kolmodin@gmail.com>
10+maintainer: Lennart Kolmodin <kolmodin@gmail.com>
11+category: Data, Parsing
12+build-type: Simple
13+
14+cabal-version: >=1.10
15+
16+source-repository head
17+ type: git
18+ location: git://github.com/kolmodin/binary-bits.git
19+
20+library
21+ build-depends: base==4.*, binary >= 0.6.0.0, bytestring
22+
23+ other-extensions: RankNTypes, MagicHash, BangPatterns, CPP
24+
25+ exposed-modules: Data.Binary.Bits ,
26+ Data.Binary.Bits.Put ,
27+ Data.Binary.Bits.Get
28+
29+ default-language: Haskell98
30+
31+ ghc-options: -O2 -Wall
32+
33+test-suite qc
34+ type: exitcode-stdio-1.0
35+ main-is: BitsQC.hs
36+ default-language: Haskell98
37+
38+ build-depends: base==4.*, binary >= 0.6.0.0, bytestring,
39+ QuickCheck>=2, random,
40+ test-framework,
41+ test-framework-quickcheck2
42+
43+ other-extensions: RankNTypes, MagicHash, BangPatterns, CPP,
44+ FlexibleInstances, FlexibleContexts, TupleSections
test/golden-test-cases/binary-bits.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, base, binary, bytestring, QuickCheck, random
2+, stdenv, test-framework, test-framework-quickcheck2
3+}:
4+mkDerivation {
5+ pname = "binary-bits";
6+ version = "0.5";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ base binary bytestring ];
9+ testHaskellDepends = [
10+ base binary bytestring QuickCheck random test-framework
11+ test-framework-quickcheck2
12+ ];
13+ description = "Bit parsing/writing on top of binary";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/binary-tagged.cabalnew file+121
@@ -0,0 +1,121 @@
1+-- This file has been generated from package.yaml by hpack version 0.14.1.
2+--
3+-- see: https://github.com/sol/hpack
4+
5+name: binary-tagged
6+version: 0.1.4.2
7+synopsis: Tagged binary serialisation.
8+description: Check <https://github.com/phadej/binary-tagged#readme README on Github>
9+category: Web
10+homepage: https://github.com/phadej/binary-tagged#readme
11+bug-reports: https://github.com/phadej/binary-tagged/issues
12+author: Oleg Grenrus <oleg.grenrus@iki.fi>
13+maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
14+license: BSD3
15+license-file: LICENSE
16+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
17+build-type: Simple
18+cabal-version: >= 1.10
19+
20+extra-source-files:
21+ CHANGELOG.md
22+ README.md
23+
24+source-repository head
25+ type: git
26+ location: https://github.com/phadej/binary-tagged
27+
28+library
29+ hs-source-dirs:
30+ src
31+ ghc-options: -Wall
32+ build-depends:
33+ base >=4.7 && <4.10
34+ , aeson >=0.8 && <1.1
35+ , array >=0.5 && <0.6
36+ , base16-bytestring >=0.1.1.6 && <0.2
37+ , binary >=0.7 && <0.9
38+ , bytestring >=0.10 && <0.11
39+ , containers >=0.5 && <0.6
40+ , generics-sop >=0.1 && <0.3
41+ , hashable >=1.2 && <1.3
42+ , nats >=1 && <1.2
43+ , scientific >=0.3 && <0.4
44+ , SHA >=1.6 && <1.7
45+ , semigroups >=0.16 && <0.19
46+ , tagged >=0.7 && <0.9
47+ , text >=1.2 && <1.3
48+ , time >=1.4 && <1.7
49+ , unordered-containers >=0.2 && <0.3
50+ , vector >=0.10 && <0.12
51+ exposed-modules:
52+ Data.Binary.Tagged
53+ default-language: Haskell2010
54+
55+test-suite binary-tagged-test
56+ type: exitcode-stdio-1.0
57+ main-is: Tests.hs
58+ hs-source-dirs:
59+ test
60+ ghc-options: -Wall
61+ build-depends:
62+ base >=4.7 && <4.10
63+ , aeson >=0.8 && <1.1
64+ , array >=0.5 && <0.6
65+ , base16-bytestring >=0.1.1.6 && <0.2
66+ , binary >=0.7 && <0.9
67+ , bytestring >=0.10 && <0.11
68+ , containers >=0.5 && <0.6
69+ , generics-sop >=0.1 && <0.3
70+ , hashable >=1.2 && <1.3
71+ , nats >=1 && <1.2
72+ , scientific >=0.3 && <0.4
73+ , SHA >=1.6 && <1.7
74+ , semigroups >=0.16 && <0.19
75+ , tagged >=0.7 && <0.9
76+ , text >=1.2 && <1.3
77+ , time >=1.4 && <1.7
78+ , unordered-containers >=0.2 && <0.3
79+ , vector >=0.10 && <0.12
80+ , binary-tagged
81+ , binary-orphans >=0.1.1
82+ , bifunctors
83+ , quickcheck-instances
84+ , tasty
85+ , tasty-quickcheck
86+ other-modules:
87+ Generators
88+ Rec1
89+ Rec2
90+ default-language: Haskell2010
91+
92+benchmark binary-tagged-bench
93+ type: exitcode-stdio-1.0
94+ main-is: Bench.hs
95+ hs-source-dirs:
96+ bench
97+ ghc-options: -Wall
98+ build-depends:
99+ base >=4.7 && <4.10
100+ , aeson >=0.8 && <1.1
101+ , array >=0.5 && <0.6
102+ , base16-bytestring >=0.1.1.6 && <0.2
103+ , binary >=0.7 && <0.9
104+ , bytestring >=0.10 && <0.11
105+ , containers >=0.5 && <0.6
106+ , generics-sop >=0.1 && <0.3
107+ , hashable >=1.2 && <1.3
108+ , nats >=1 && <1.2
109+ , scientific >=0.3 && <0.4
110+ , SHA >=1.6 && <1.7
111+ , semigroups >=0.16 && <0.19
112+ , tagged >=0.7 && <0.9
113+ , text >=1.2 && <1.3
114+ , time >=1.4 && <1.7
115+ , unordered-containers >=0.2 && <0.3
116+ , vector >=0.10 && <0.12
117+ , binary-tagged
118+ , binary-orphans >=0.1.1
119+ , deepseq
120+ , criterion
121+ default-language: Haskell2010
test/golden-test-cases/binary-tagged.nix.goldennew file+30
@@ -0,0 +1,30 @@
1+{ mkDerivation, aeson, array, base, base16-bytestring, bifunctors
2+, binary, binary-orphans, bytestring, containers, criterion
3+, deepseq, generics-sop, hashable, nats, quickcheck-instances
4+, scientific, semigroups, SHA, stdenv, tagged, tasty
5+, tasty-quickcheck, text, time, unordered-containers, vector
6+}:
7+mkDerivation {
8+ pname = "binary-tagged";
9+ version = "0.1.4.2";
10+ sha256 = "deadbeef";
11+ libraryHaskellDepends = [
12+ aeson array base base16-bytestring binary bytestring containers
13+ generics-sop hashable nats scientific semigroups SHA tagged text
14+ time unordered-containers vector
15+ ];
16+ testHaskellDepends = [
17+ aeson array base base16-bytestring bifunctors binary binary-orphans
18+ bytestring containers generics-sop hashable nats
19+ quickcheck-instances scientific semigroups SHA tagged tasty
20+ tasty-quickcheck text time unordered-containers vector
21+ ];
22+ benchmarkHaskellDepends = [
23+ aeson array base base16-bytestring binary binary-orphans bytestring
24+ containers criterion deepseq generics-sop hashable nats scientific
25+ semigroups SHA tagged text time unordered-containers vector
26+ ];
27+ homepage = "https://github.com/phadej/binary-tagged#readme";
28+ description = "Tagged binary serialisation";
29+ license = stdenv.lib.licenses.bsd3;
30+}
test/golden-test-cases/bindings-uname.cabalnew file+30
@@ -0,0 +1,30 @@
1+Name: bindings-uname
2+Version: 0.1
3+Synopsis: Low-level binding to POSIX uname(3)
4+Description:
5+ This is a low-level binding to POSIX uname(3)
6+ function. Perhaps it shoule be part of unix package.
7+Category: FFI, System
8+License: PublicDomain
9+Author: PHO <pho at cielonegro.org>
10+Maintainer: PHO <pho at cielonegro.org>
11+Stability: Experimental
12+Cabal-Version: >= 1.6
13+Build-Type: Simple
14+
15+Source-Repository head
16+ Type: git
17+ Location: git://git.cielonegro.org/bindings-uname
18+
19+Library
20+ Build-Depends:
21+ base < 5
22+
23+ Exposed-Modules:
24+ Bindings.Uname
25+
26+ Extensions:
27+ EmptyDataDecls, ForeignFunctionInterface
28+
29+ GHC-Options:
30+ -Wall
test/golden-test-cases/bindings-uname.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "bindings-uname";
4+ version = "0.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ description = "Low-level binding to POSIX uname(3)";
8+ license = stdenv.lib.licenses.publicDomain;
9+}
test/golden-test-cases/bioalign.cabalnew file+23
@@ -0,0 +1,23 @@
1+Name: bioalign
2+Version: 0.0.5
3+Synopsis: Data structures and helper functions for calculating alignments
4+Description: Data structures and helper functions for calculating alignments
5+Homepage: https://patch-tag.com/r/dfornika/biophd/home
6+License: GPL
7+License-file: LICENSE
8+Cabal-Version: >=1.6
9+Author: Dan Fornika <dfornika@gmail.com>
10+Maintainer: dfornika@gmail.com
11+Stability: Provisional
12+Category: Bioinformatics
13+Build-Type: Simple
14+
15+Library
16+ Build-depends: base >= 2 && < 5, biocore, bytestring
17+ Exposed-modules: Bio.Alignment.AlignData
18+ Hs-source-dirs: src
19+
20+source-Repository head
21+ type: darcs
22+ location: http://www.patch-tag.com/r/dfornika/bioalign
23+
test/golden-test-cases/bioalign.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, biocore, bytestring, stdenv }:
2+mkDerivation {
3+ pname = "bioalign";
4+ version = "0.0.5";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base biocore bytestring ];
7+ homepage = "https://patch-tag.com/r/dfornika/biophd/home";
8+ description = "Data structures and helper functions for calculating alignments";
9+ license = "GPL";
10+}
test/golden-test-cases/bits.cabalnew file+73
@@ -0,0 +1,73 @@
1+name: bits
2+category: Data, Serialization
3+version: 0.5.1
4+license: BSD3
5+cabal-version: >= 1.8
6+license-file: LICENSE
7+author: Edward A. Kmett
8+maintainer: Edward A. Kmett <ekmett@gmail.com>
9+stability: experimental
10+homepage: http://github.com/ekmett/bits
11+bug-reports: http://github.com/ekmett/bits/issues
12+copyright: Copyright (C) 2013 Edward A. Kmett
13+build-type: Custom
14+tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
15+synopsis: Various bit twiddling and bitwise serialization primitives
16+description: Various bit twiddling and bitwise serialization primitives
17+
18+extra-source-files:
19+ .travis.yml
20+ .ghci
21+ .gitignore
22+ .vim.custom
23+ travis/cabal-apt-install
24+ travis/config
25+ AUTHORS.markdown
26+ README.markdown
27+ CHANGELOG.markdown
28+
29+source-repository head
30+ type: git
31+ location: git://github.com/ekmett/bits.git
32+
33+custom-setup
34+ setup-depends:
35+ base >= 4 && < 5,
36+ Cabal,
37+ cabal-doctest >= 1 && < 1.1
38+
39+-- You can disable the doctests test suite with -f-test-doctests
40+flag test-doctests
41+ default: True
42+ manual: True
43+
44+library
45+ build-depends:
46+ base >= 4.7 && < 5,
47+ bytes >= 0.11 && < 1,
48+ mtl >= 2.0 && < 2.3,
49+ transformers >= 0.2 && < 0.6
50+
51+ exposed-modules:
52+ Data.Bits.Coding
53+ Data.Bits.Coded
54+ Data.Bits.Extras
55+
56+ c-sources: cbits/debruijn.c
57+ ghc-options: -Wall -fwarn-tabs -O2
58+ hs-source-dirs: src
59+
60+test-suite doctests
61+ type: exitcode-stdio-1.0
62+ main-is: doctests.hs
63+ ghc-options: -Wall -threaded
64+ hs-source-dirs: tests
65+ c-sources: cbits/debruijn.c
66+
67+ if !flag(test-doctests)
68+ buildable: False
69+ else
70+ build-depends:
71+ base,
72+ bits,
73+ doctest >= 0.11.1 && < 0.12
test/golden-test-cases/bits.nix.goldennew file+14
@@ -0,0 +1,14 @@
1+{ mkDerivation, base, bytes, Cabal, cabal-doctest, doctest, mtl
2+, stdenv, transformers
3+}:
4+mkDerivation {
5+ pname = "bits";
6+ version = "0.5.1";
7+ sha256 = "deadbeef";
8+ setupHaskellDepends = [ base Cabal cabal-doctest ];
9+ libraryHaskellDepends = [ base bytes mtl transformers ];
10+ testHaskellDepends = [ base doctest ];
11+ homepage = "http://github.com/ekmett/bits";
12+ description = "Various bit twiddling and bitwise serialization primitives";
13+ license = stdenv.lib.licenses.bsd3;
14+}
test/golden-test-cases/blank-canvas.cabalnew file+172
@@ -0,0 +1,172 @@
1+Name: blank-canvas
2+Version: 0.6.1
3+Synopsis: HTML5 Canvas Graphics Library
4+
5+Description: @blank-canvas@ is a Haskell binding to the complete
6+ <https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API HTML5 Canvas API>.
7+ @blank-canvas@ allows Haskell users to write, in Haskell,
8+ interactive images onto their web browsers. @blank-canvas@
9+ gives the user a single full-window canvas, and provides
10+ many well-documented functions for rendering
11+ images.
12+ .
13+ @
14+ &#123;-&#35; LANGUAGE OverloadedStrings &#35;-&#125;
15+ module Main where
16+ import Graphics.Blank -- import the blank canvas
17+ .
18+ main = blankCanvas 3000 $ \\ context -> do -- start blank canvas on port 3000
19+ &#32;&#32;send context $ do -- send commands to this specific context
20+ &#32;&#32;&#32;&#32;moveTo(50,50)
21+ &#32;&#32;&#32;&#32;lineTo(200,100)
22+ &#32;&#32;&#32;&#32;lineWidth 10
23+ &#32;&#32;&#32;&#32;strokeStyle \"red\"
24+ &#32;&#32;&#32;&#32;stroke() -- this draws the ink into the canvas
25+ @
26+ .
27+ <<https://github.com/ku-fpg/blank-canvas/wiki/images/Red_Line.png>>
28+ .
29+ For more details, read the <https://github.com/ku-fpg/blank-canvas/wiki blank-canvas wiki>.
30+ .
31+License: BSD3
32+License-file: LICENSE
33+Author: Andy Gill and Ryan Scott
34+Maintainer: andygill@ku.edu
35+Copyright: Copyright (c) 2014 The University of Kansas
36+Homepage: https://github.com/ku-fpg/blank-canvas/wiki
37+Bug-reports: https://github.com/ku-fpg/blank-canvas/issues
38+Category: Graphics
39+Build-type: Simple
40+Stability: Beta
41+Extra-source-files: README.md
42+ Changelog.md
43+Cabal-version: >= 1.10
44+tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
45+data-files:
46+ static/index.html
47+ static/jquery.js
48+ static/jquery-json.js
49+
50+
51+Library
52+ Exposed-modules: Graphics.Blank
53+ Graphics.Blank.Cursor
54+ Graphics.Blank.Font
55+ Graphics.Blank.GHCi
56+ Graphics.Blank.Style
57+ other-modules: Graphics.Blank.Canvas
58+ Graphics.Blank.DeviceContext
59+ Graphics.Blank.Events
60+ Graphics.Blank.Generated
61+ Graphics.Blank.JavaScript
62+ Graphics.Blank.Parser
63+ Graphics.Blank.Types
64+ Graphics.Blank.Types.CSS
65+ Graphics.Blank.Types.Cursor
66+ Graphics.Blank.Types.Font
67+ Graphics.Blank.Utils
68+ Paths_blank_canvas
69+
70+ default-language: Haskell2010
71+ build-depends: aeson >= 0.7 && < 1.3,
72+ base64-bytestring == 1.0.*,
73+ base >= 4.7 && < 4.11,
74+ base-compat >= 0.8.1 && < 1,
75+ bytestring == 0.10.*,
76+ colour >= 2.2 && < 3.0,
77+ containers == 0.5.*,
78+ data-default-class >= 0.0.1 && < 0.2,
79+ http-types >= 0.8 && < 0.10,
80+ mime-types >= 0.1.0.3 && < 0.2,
81+ kansas-comet >= 0.4 && < 0.5,
82+ scotty >= 0.10 && < 0.12,
83+ stm >= 2.2 && < 2.5,
84+ text >= 1.1 && < 1.3,
85+ text-show >= 2 && < 4,
86+ transformers >= 0.3 && < 0.6,
87+ wai == 3.*,
88+ wai-extra >= 3.0.1 && < 3.1,
89+ warp == 3.*,
90+ vector >= 0.10 && < 0.13
91+
92+ GHC-options: -Wall
93+ GHC-prof-options: -Wall -fsimpl-tick-factor=100000
94+
95+
96+test-suite wiki-suite
97+ build-depends: base >= 4.7 && < 4.11,
98+ blank-canvas,
99+ containers == 0.5.*,
100+ process >= 1.2 && < 1.7,
101+ directory >= 1.2,
102+ shake >= 0.13,
103+ stm >= 2.2 && < 2.5,
104+ text >= 1.1 && < 1.3,
105+ time >= 1.4 && < 1.9,
106+ unix == 2.7.*,
107+ vector >= 0.10 && < 0.13
108+
109+ default-language: Haskell2010
110+ GHC-options: -threaded -Wall
111+ main-is: Main.hs
112+ hs-source-dirs: wiki-suite
113+ type: exitcode-stdio-1.0
114+ other-modules: Arc
115+ Bezier_Curve
116+ Bounce
117+ Circle
118+ Clipping_Region
119+ Color_Fill
120+ Color_Square
121+ Custom_Shape
122+ Custom_Transform
123+ Draw_Canvas
124+ Draw_Device
125+ Draw_Image
126+ Favicon
127+ Font_Size_and_Style
128+ Get_Image_Data_URL
129+ Global_Alpha
130+ Global_Composite_Operations
131+ Grayscale
132+ Image_Crop
133+ Image_Loader
134+ Image_Size
135+ Is_Point_In_Path
136+ Key_Read
137+ Line
138+ Line_Cap
139+ Line_Color
140+ Line_Join
141+ Line_Width
142+ Linear_Gradient
143+ Load_Image_Data_URL
144+ Load_Image_Data_URL_2
145+ Miter_Limit
146+ Path
147+ Pattern
148+ Quadratic_Curve
149+ Radial_Gradient
150+ Rectangle
151+ Red_Line
152+ Rotate_Transform
153+ Rotating_Square
154+ Rounded_Corners
155+ Scale_Transform
156+ Semicircle
157+ Shadow
158+ Square
159+ Text_Align
160+ Text_Baseline
161+ Text_Color
162+ Text_Metrics
163+ Text_Stroke
164+ Text_Wrap
165+ Tic_Tac_Toe
166+ Translate_Transform
167+ Wiki
168+
169+
170+source-repository head
171+ type: git
172+ location: https://github.com/ku-fpg/blank-canvas.git
test/golden-test-cases/blank-canvas.nix.goldennew file+23
@@ -0,0 +1,23 @@
1+{ mkDerivation, aeson, base, base-compat, base64-bytestring
2+, bytestring, colour, containers, data-default-class, directory
3+, http-types, kansas-comet, mime-types, process, scotty, shake
4+, stdenv, stm, text, text-show, time, transformers, unix, vector
5+, wai, wai-extra, warp
6+}:
7+mkDerivation {
8+ pname = "blank-canvas";
9+ version = "0.6.1";
10+ sha256 = "deadbeef";
11+ enableSeparateDataOutput = true;
12+ libraryHaskellDepends = [
13+ aeson base base-compat base64-bytestring bytestring colour
14+ containers data-default-class http-types kansas-comet mime-types
15+ scotty stm text text-show transformers vector wai wai-extra warp
16+ ];
17+ testHaskellDepends = [
18+ base containers directory process shake stm text time unix vector
19+ ];
20+ homepage = "https://github.com/ku-fpg/blank-canvas/wiki";
21+ description = "HTML5 Canvas Graphics Library";
22+ license = stdenv.lib.licenses.bsd3;
23+}
test/golden-test-cases/blaze-html.cabalnew file+87
@@ -0,0 +1,87 @@
1+Name: blaze-html
2+Version: 0.9.0.1
3+Homepage: http://jaspervdj.be/blaze
4+Bug-Reports: http://github.com/jaspervdj/blaze-html/issues
5+License: BSD3
6+License-file: LICENSE
7+Author: Jasper Van der Jeugt, Simon Meier
8+Maintainer: Jasper Van der Jeugt <m@jaspervdj.be>
9+Stability: Experimental
10+Category: Text
11+Synopsis: A blazingly fast HTML combinator library for Haskell
12+Description:
13+ A blazingly fast HTML combinator library for the Haskell
14+ programming language. The Text.Blaze module is a good
15+ starting point, as well as this tutorial:
16+ <http://jaspervdj.be/blaze/tutorial.html>.
17+
18+Build-type: Simple
19+Cabal-version: >= 1.8
20+
21+Extra-source-files:
22+ CHANGELOG
23+ src/Util/Sanitize.hs
24+ src/Util/GenerateHtmlCombinators.hs
25+
26+Library
27+ Hs-source-dirs: src
28+ Ghc-Options: -Wall
29+
30+ Exposed-modules:
31+ Text.Blaze.Html
32+ Text.Blaze.Html.Renderer.Pretty
33+ Text.Blaze.Html.Renderer.String
34+ Text.Blaze.Html.Renderer.Text
35+ Text.Blaze.Html.Renderer.Utf8
36+ Text.Blaze.Html4.FrameSet
37+ Text.Blaze.Html4.FrameSet.Attributes
38+ Text.Blaze.Html4.Strict
39+ Text.Blaze.Html4.Strict.Attributes
40+ Text.Blaze.Html4.Transitional
41+ Text.Blaze.Html4.Transitional.Attributes
42+ Text.Blaze.Html5
43+ Text.Blaze.Html5.Attributes
44+ Text.Blaze.XHtml1.FrameSet
45+ Text.Blaze.XHtml1.FrameSet.Attributes
46+ Text.Blaze.XHtml1.Strict
47+ Text.Blaze.XHtml1.Strict.Attributes
48+ Text.Blaze.XHtml1.Transitional
49+ Text.Blaze.XHtml1.Transitional.Attributes
50+ Text.Blaze.XHtml5
51+ Text.Blaze.XHtml5.Attributes
52+
53+ Build-depends:
54+ base >= 4 && < 5,
55+ blaze-builder >= 0.3 && < 0.5,
56+ blaze-markup >= 0.8 && < 0.9,
57+ bytestring >= 0.9 && < 0.11,
58+ text >= 0.10 && < 1.3
59+
60+Test-suite blaze-html-tests
61+ Type: exitcode-stdio-1.0
62+ Hs-source-dirs: src tests
63+ Main-is: TestSuite.hs
64+ Ghc-options: -Wall
65+
66+ Other-modules:
67+ Text.Blaze.Html.Tests
68+ Text.Blaze.Html.Tests.Util
69+ Util.Tests
70+
71+ Build-depends:
72+ HUnit >= 1.2 && < 1.6,
73+ QuickCheck >= 2.4 && < 2.10,
74+ containers >= 0.3 && < 0.6,
75+ test-framework >= 0.4 && < 0.9,
76+ test-framework-hunit >= 0.3 && < 0.4,
77+ test-framework-quickcheck2 >= 0.3 && < 0.4,
78+ -- Copied from regular dependencies...
79+ base >= 4 && < 5,
80+ blaze-builder >= 0.3 && < 0.5,
81+ blaze-markup >= 0.8 && < 0.9,
82+ bytestring >= 0.9 && < 0.11,
83+ text >= 0.10 && < 1.3
84+
85+Source-repository head
86+ Type: git
87+ Location: http://github.com/jaspervdj/blaze-html.git
test/golden-test-cases/blaze-html.nix.goldennew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, base, blaze-builder, blaze-markup, bytestring
2+, containers, HUnit, QuickCheck, stdenv, test-framework
3+, test-framework-hunit, test-framework-quickcheck2, text
4+}:
5+mkDerivation {
6+ pname = "blaze-html";
7+ version = "0.9.0.1";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ base blaze-builder blaze-markup bytestring text
11+ ];
12+ testHaskellDepends = [
13+ base blaze-builder blaze-markup bytestring containers HUnit
14+ QuickCheck test-framework test-framework-hunit
15+ test-framework-quickcheck2 text
16+ ];
17+ homepage = "http://jaspervdj.be/blaze";
18+ description = "A blazingly fast HTML combinator library for Haskell";
19+ license = stdenv.lib.licenses.bsd3;
20+}
test/golden-test-cases/blaze-markup.cabalnew file+67
@@ -0,0 +1,67 @@
1+Name: blaze-markup
2+Version: 0.8.0.0
3+Homepage: http://jaspervdj.be/blaze
4+Bug-Reports: http://github.com/jaspervdj/blaze-markup/issues
5+License: BSD3
6+License-file: LICENSE
7+Author: Jasper Van der Jeugt, Simon Meier, Deepak Jois
8+Maintainer: Jasper Van der Jeugt <m@jaspervdj.be>
9+Stability: Experimental
10+Category: Text
11+Synopsis: A blazingly fast markup combinator library for Haskell
12+Description:
13+ Core modules of a blazingly fast markup combinator library for the Haskell
14+ programming language. The Text.Blaze module is a good
15+ starting point, as well as this tutorial:
16+ <http://jaspervdj.be/blaze/tutorial.html>.
17+
18+Build-type: Simple
19+Cabal-version: >= 1.8
20+
21+Extra-source-files:
22+ CHANGELOG
23+
24+Library
25+ Hs-source-dirs: src
26+ Ghc-Options: -Wall
27+
28+ Exposed-modules:
29+ Text.Blaze
30+ Text.Blaze.Internal
31+ Text.Blaze.Renderer.Pretty
32+ Text.Blaze.Renderer.String
33+ Text.Blaze.Renderer.Text
34+ Text.Blaze.Renderer.Utf8
35+
36+ Build-depends:
37+ base >= 4 && < 5,
38+ blaze-builder >= 0.3 && < 0.5,
39+ text >= 0.10 && < 1.3,
40+ bytestring >= 0.9 && < 0.11
41+
42+Test-suite blaze-markup-tests
43+ Type: exitcode-stdio-1.0
44+ Hs-source-dirs: src tests
45+ Main-is: TestSuite.hs
46+ Ghc-options: -Wall
47+
48+ Other-modules:
49+ Text.Blaze.Tests
50+ Text.Blaze.Tests.Util
51+
52+ Build-depends:
53+ HUnit >= 1.2 && < 1.6,
54+ QuickCheck >= 2.4 && < 2.10,
55+ containers >= 0.3 && < 0.6,
56+ test-framework >= 0.4 && < 0.9,
57+ test-framework-hunit >= 0.3 && < 0.4,
58+ test-framework-quickcheck2 >= 0.3 && < 0.4,
59+ -- Copied from regular dependencies...
60+ base >= 4 && < 5,
61+ blaze-builder >= 0.3 && < 0.5,
62+ text >= 0.10 && < 1.3,
63+ bytestring >= 0.9 && < 0.11
64+
65+Source-repository head
66+ Type: git
67+ Location: http://github.com/jaspervdj/blaze-markup
test/golden-test-cases/blaze-markup.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, base, blaze-builder, bytestring, containers, HUnit
2+, QuickCheck, stdenv, test-framework, test-framework-hunit
3+, test-framework-quickcheck2, text
4+}:
5+mkDerivation {
6+ pname = "blaze-markup";
7+ version = "0.8.0.0";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [ base blaze-builder bytestring text ];
10+ testHaskellDepends = [
11+ base blaze-builder bytestring containers HUnit QuickCheck
12+ test-framework test-framework-hunit test-framework-quickcheck2 text
13+ ];
14+ homepage = "http://jaspervdj.be/blaze";
15+ description = "A blazingly fast markup combinator library for Haskell";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/blaze-svg.cabalnew file+54
@@ -0,0 +1,54 @@
1+name: blaze-svg
2+version: 0.3.6.1
3+synopsis: SVG combinator library
4+homepage: https://github.com/deepakjois/blaze-svg
5+license: BSD3
6+license-file: LICENSE
7+author: Deepak Jois
8+maintainer: deepak.jois@gmail.com
9+category: Graphics
10+build-type: Simple
11+cabal-version: >=1.8
12+description:
13+ A blazingly fast SVG combinator library for the Haskell
14+ programming language. The "Text.Blaze.SVG" module is a good
15+ starting point.
16+ .
17+ Other documentation:
18+ .
19+ * Programs in the /examples/ folder of this project: <https://github.com/deepakjois/blaze-svg/tree/master/examples/>
20+ .
21+ * Jasper Van Der Jeugt has written a tutorial for /blaze-html/,
22+ which is a sister library of /blaze-svg/. It may not be directly relevant,
23+ but still it gives a good overview on how to use the combinators in
24+ "Text.Blaze.Svg11" and "Text.Blaze.Svg11.Attributes":
25+ <http://jaspervdj.be/blaze/tutorial.html>.
26+
27+Extra-source-files:
28+ src/Util/Sanitize.hs
29+ src/Util/GenerateSvgCombinators.hs
30+ examples/*.hs
31+ CHANGES.md
32+
33+Library
34+ Hs-Source-Dirs: src
35+ Ghc-Options: -Wall
36+
37+ Exposed-modules:
38+ Text.Blaze.Svg
39+ Text.Blaze.Svg.Internal
40+ Text.Blaze.Svg11
41+ Text.Blaze.Svg11.Attributes
42+ Text.Blaze.Svg.Renderer.Pretty
43+ Text.Blaze.Svg.Renderer.String
44+ Text.Blaze.Svg.Renderer.Text
45+ Text.Blaze.Svg.Renderer.Utf8
46+
47+ Build-depends:
48+ base >= 4 && < 5,
49+ mtl >= 2 && < 3,
50+ blaze-markup >= 0.5 && < 0.9
51+
52+Source-repository head
53+ Type: git
54+ Location: http://github.com/deepakjois/blaze-svg.git
test/golden-test-cases/blaze-svg.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, blaze-markup, mtl, stdenv }:
2+mkDerivation {
3+ pname = "blaze-svg";
4+ version = "0.3.6.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base blaze-markup mtl ];
7+ homepage = "https://github.com/deepakjois/blaze-svg";
8+ description = "SVG combinator library";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/blosum.cabalnew file+48
@@ -0,0 +1,48 @@
1+name: blosum
2+version: 0.1.1.4
3+synopsis: BLOSUM generator
4+description: Generates BLOSUMs for use with finding the degree of amino acid conservation.
5+homepage: http://github.com/GregorySchwartz/blosum#readme
6+license: GPL-2
7+license-file: LICENSE
8+author: Gregory W. Schwartz
9+maintainer: gregory.schwartz@drexel.edu
10+copyright: Copyright 2016 Gregory W. Schwartz
11+category: Bioinformatics
12+build-type: Simple
13+-- extra-source-files:
14+cabal-version: >=1.10
15+
16+library
17+ hs-source-dirs: src
18+ exposed-modules: Types
19+ , Utility
20+ , Cluster
21+ , Matrix
22+ , Print
23+ build-depends: base >= 4.9 && < 5
24+ , containers
25+ , text
26+ , text-show
27+ , fasta
28+ , lens
29+ default-language: Haskell2010
30+
31+executable blosum
32+ hs-source-dirs: app
33+ main-is: Main.hs
34+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2
35+ build-depends: base
36+ , blosum
37+ , containers
38+ , fasta
39+ , text
40+ , split
41+ , pipes
42+ , pipes-text
43+ , optparse-applicative >=0.13
44+ default-language: Haskell2010
45+
46+source-repository head
47+ type: git
48+ location: https://github.com/GregorySchwartz/blosum
test/golden-test-cases/blosum.nix.goldennew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, base, containers, fasta, lens, optparse-applicative
2+, pipes, pipes-text, split, stdenv, text, text-show
3+}:
4+mkDerivation {
5+ pname = "blosum";
6+ version = "0.1.1.4";
7+ sha256 = "deadbeef";
8+ isLibrary = true;
9+ isExecutable = true;
10+ libraryHaskellDepends = [
11+ base containers fasta lens text text-show
12+ ];
13+ executableHaskellDepends = [
14+ base containers fasta optparse-applicative pipes pipes-text split
15+ text
16+ ];
17+ homepage = "http://github.com/GregorySchwartz/blosum#readme";
18+ description = "BLOSUM generator";
19+ license = stdenv.lib.licenses.gpl2;
20+}
test/golden-test-cases/boomerang.cabalnew file+45
@@ -0,0 +1,45 @@
1+Name: boomerang
2+Version: 1.4.5.3
3+License: BSD3
4+License-File: LICENSE
5+Author: jeremy@seereason.com
6+Maintainer: partners@seereason.com
7+Bug-Reports: http://code.google.com/p/happstack/issues/list
8+Category: Parsing, Text
9+Synopsis: Library for invertible parsing and printing
10+Description: Specify a single unified grammar which can be used for parsing and pretty-printing
11+Cabal-Version: >= 1.6
12+Build-type: Simple
13+tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
14+
15+Library
16+ Build-Depends: base >= 4 && < 5,
17+ mtl >= 2.0 && < 2.3,
18+ template-haskell < 2.13,
19+ text >= 0.11 && < 1.3
20+ Exposed-Modules: Text.Boomerang
21+ Text.Boomerang.Combinators
22+ Text.Boomerang.Error
23+ Text.Boomerang.HStack
24+ Text.Boomerang.Pos
25+ Text.Boomerang.Prim
26+ Text.Boomerang.String
27+ Text.Boomerang.Strings
28+ Text.Boomerang.Texts
29+ Text.Boomerang.TH
30+
31+ Extensions: DeriveDataTypeable,
32+ FlexibleContexts,
33+ FlexibleContexts,
34+ FlexibleInstances,
35+ RankNTypes,
36+ ScopedTypeVariables,
37+ TemplateHaskell,
38+ TypeFamilies,
39+ TypeFamilies,
40+ TypeOperators,
41+ TypeSynonymInstances
42+
43+source-repository head
44+ type: git
45+ location: https://github.com/Happstack/boomerang.git
test/golden-test-cases/boomerang.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, mtl, stdenv, template-haskell, text }:
2+mkDerivation {
3+ pname = "boomerang";
4+ version = "1.4.5.3";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base mtl template-haskell text ];
7+ description = "Library for invertible parsing and printing";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/boxes.cabalnew file+35
@@ -0,0 +1,35 @@
1+name: boxes
2+version: 0.1.4
3+synopsis: 2D text pretty-printing library
4+description: A pretty-printing library for laying out text in
5+ two dimensions, using a simple box model.
6+category: Text
7+license: BSD3
8+license-file: LICENSE
9+extra-source-files: CHANGES, README.md
10+author: Brent Yorgey
11+maintainer: David Feuer <David.Feuer@gmail.com>
12+build-type: Simple
13+cabal-version: >= 1.9.2
14+-- Minimum Cabal version supporting test suites
15+
16+library
17+ build-depends: base >= 3 && < 5, split >=0.2 && <0.3
18+ exposed-modules: Text.PrettyPrint.Boxes
19+ extensions: CPP
20+ if impl(ghc)
21+ extensions: OverloadedStrings
22+
23+Test-Suite test-boxes
24+ type: exitcode-stdio-1.0
25+ main-is: Text/PrettyPrint/Tests.hs
26+ build-depends: base >= 3 && < 5, split >=0.2 && <0.3, QuickCheck
27+ extensions: CPP
28+ if impl(ghc)
29+ extensions: OverloadedStrings
30+ cpp-options: -DTESTING
31+-- Export some internals so the tests can get at them
32+
33+source-repository head
34+ type: git
35+ location: git://github.com/treeowl/boxes.git
test/golden-test-cases/boxes.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, QuickCheck, split, stdenv }:
2+mkDerivation {
3+ pname = "boxes";
4+ version = "0.1.4";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base split ];
7+ testHaskellDepends = [ base QuickCheck split ];
8+ description = "2D text pretty-printing library";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/brittany.cabalnew file+372
@@ -0,0 +1,372 @@
1+name: brittany
2+version: 0.9.0.0
3+synopsis: Haskell source code formatter
4+description: {
5+ See <https://github.com/lspitzner/brittany/blob/master/README.md the README>.
6+ .
7+ If you are interested in the implementation, have a look at <https://github.com/lspitzner/brittany/blob/master/doc/implementation/theory.md this document>;
8+ .
9+ The implementation is documented in more detail <https://github.com/lspitzner/brittany/blob/master/doc/implementation/index.md here>.
10+}
11+license: AGPL-3
12+license-file: LICENSE
13+author: Lennart Spitzner
14+maintainer: Lennart Spitzner <hexagoxel@hexagoxel.de>
15+copyright: Copyright (C) 2016-2017 Lennart Spitzner
16+category: Language
17+build-type: Simple
18+cabal-version: >=1.18
19+homepage: https://github.com/lspitzner/brittany/
20+bug-reports: https://github.com/lspitzner/brittany/issues
21+extra-doc-files: {
22+ ChangeLog.md
23+ README.md
24+ doc/implementation/*.md
25+}
26+extra-source-files: {
27+ src-literatetests/*.blt
28+}
29+
30+source-repository head {
31+ type: git
32+ location: https://github.com/lspitzner/brittany.git
33+}
34+
35+flag brittany-dev-lib
36+ description: set buildable false for anything but lib
37+ default: False
38+ manual: True
39+
40+library {
41+ default-language:
42+ Haskell2010
43+ hs-source-dirs:
44+ src
45+ install-includes: {
46+ srcinc/prelude.inc
47+ }
48+ exposed-modules: {
49+ Language.Haskell.Brittany
50+ Language.Haskell.Brittany.Internal
51+ Language.Haskell.Brittany.Internal.Prelude
52+ Language.Haskell.Brittany.Internal.PreludeUtils
53+ Language.Haskell.Brittany.Internal.Types
54+ Language.Haskell.Brittany.Internal.Utils
55+ Language.Haskell.Brittany.Internal.Config
56+ Language.Haskell.Brittany.Internal.Config.Types
57+ Language.Haskell.Brittany.Internal.Config.Types.Instances
58+ Paths_brittany
59+ }
60+ other-modules: {
61+ Language.Haskell.Brittany.Internal.LayouterBasics
62+ Language.Haskell.Brittany.Internal.Backend
63+ Language.Haskell.Brittany.Internal.BackendUtils
64+ Language.Haskell.Brittany.Internal.ExactPrintUtils
65+ Language.Haskell.Brittany.Internal.Layouters.Type
66+ Language.Haskell.Brittany.Internal.Layouters.Decl
67+ Language.Haskell.Brittany.Internal.Layouters.Expr
68+ Language.Haskell.Brittany.Internal.Layouters.Stmt
69+ Language.Haskell.Brittany.Internal.Layouters.Pattern
70+ Language.Haskell.Brittany.Internal.Transformations.Alt
71+ Language.Haskell.Brittany.Internal.Transformations.Floating
72+ Language.Haskell.Brittany.Internal.Transformations.Par
73+ Language.Haskell.Brittany.Internal.Transformations.Columns
74+ Language.Haskell.Brittany.Internal.Transformations.Indent
75+ }
76+ ghc-options: {
77+ -Wall
78+ -fno-warn-unused-imports
79+ -fno-warn-redundant-constraints
80+ }
81+ build-depends:
82+ { base >=4.9 && <4.11
83+ , ghc >=8.0.1 && <8.3
84+ , ghc-paths >=0.1.0.9 && <0.2
85+ , ghc-exactprint >=0.5.3.0 && <0.6
86+ , transformers >=0.5.2.0 && <0.6
87+ , containers >=0.5.7.1 && <0.6
88+ , mtl >=2.2.1 && <2.3
89+ , text >=1.2 && <1.3
90+ , multistate >=0.7.1.1 && <0.8
91+ , syb >=0.6 && <0.8
92+ , neat-interpolation >=0.3.2 && <0.4
93+ , data-tree-print
94+ , pretty >=1.1.3.3 && <1.2
95+ , bytestring >=0.10.8.1 && <0.11
96+ , directory >=1.2.6.2 && <1.4
97+ , butcher >=1.2 && <1.3
98+ , yaml >=0.8.18 && <0.9
99+ , aeson >=1.0.1.0 && <1.3
100+ , extra >=1.4.10 && <1.7
101+ , uniplate >=1.6.12 && <1.7
102+ , strict >=0.3.2 && <0.4
103+ , monad-memo >=0.4.1 && <0.5
104+ , unsafe >=0.0 && <0.1
105+ , safe >=0.3.9 && <0.4
106+ , deepseq >=1.4.2.0 && <1.5
107+ , semigroups >=0.18.2 && <0.19
108+ , cmdargs >=0.10.14 && <0.11
109+ , czipwith >=1.0.0.0 && <1.1
110+ , ghc-boot-th >=8.0.1 && <8.3
111+ }
112+ default-extensions: {
113+ CPP
114+
115+ NoImplicitPrelude
116+
117+ GADTs
118+
119+ FlexibleContexts
120+ FlexibleInstances
121+ ScopedTypeVariables
122+ MonadComprehensions
123+ LambdaCase
124+ MultiWayIf
125+ KindSignatures
126+ }
127+ include-dirs:
128+ srcinc
129+}
130+
131+executable brittany
132+ if flag(brittany-dev-lib) {
133+ buildable: False
134+ } else {
135+ buildable: True
136+ }
137+ main-is: Main.hs
138+ other-modules: {
139+ Paths_brittany
140+ }
141+ -- other-extensions:
142+ build-depends:
143+ { brittany
144+ , base
145+ , ghc
146+ , ghc-paths
147+ , ghc-exactprint
148+ , transformers
149+ , containers
150+ , mtl
151+ , text
152+ , multistate
153+ , syb
154+ , neat-interpolation
155+ , data-tree-print
156+ , pretty
157+ , bytestring
158+ , directory
159+ , butcher
160+ , yaml
161+ , aeson
162+ , extra
163+ , uniplate
164+ , strict
165+ , monad-memo
166+ , unsafe
167+ , safe
168+ , deepseq
169+ , semigroups
170+ , cmdargs
171+ , czipwith
172+ , ghc-boot-th
173+ , hspec >=2.4.1 && <2.5
174+ , filepath >=1.4.1.0 && <1.5
175+ }
176+ hs-source-dirs: src-brittany
177+ default-language: Haskell2010
178+ default-extensions: {
179+ CPP
180+
181+ NoImplicitPrelude
182+
183+ GADTs
184+
185+ FlexibleContexts
186+ FlexibleInstances
187+ ScopedTypeVariables
188+ MonadComprehensions
189+ LambdaCase
190+ MultiWayIf
191+ KindSignatures
192+ }
193+ ghc-options: {
194+ -Wall
195+ -fno-spec-constr
196+ -fno-warn-unused-imports
197+ -fno-warn-redundant-constraints
198+ -rtsopts
199+ -with-rtsopts "-M2G"
200+ }
201+
202+test-suite unittests
203+ if flag(brittany-dev-lib) {
204+ buildable: False
205+ } else {
206+ buildable: True
207+ }
208+ type: exitcode-stdio-1.0
209+ default-language: Haskell2010
210+ build-depends:
211+ { brittany
212+ , base
213+ , ghc
214+ , ghc-paths
215+ , ghc-exactprint
216+ , transformers
217+ , containers
218+ , mtl
219+ , text
220+ , multistate
221+ , syb
222+ , neat-interpolation
223+ , data-tree-print
224+ , pretty
225+ , bytestring
226+ , directory
227+ , butcher
228+ , yaml
229+ , aeson
230+ , extra
231+ , uniplate
232+ , strict
233+ , monad-memo
234+ , unsafe
235+ , safe
236+ , deepseq
237+ , semigroups
238+ , cmdargs
239+ , czipwith
240+ , ghc-boot-th
241+ , hspec >=2.4.1 && <2.5
242+ }
243+ ghc-options: -Wall
244+ main-is: TestMain.hs
245+ other-modules: TestUtils
246+ AsymptoticPerfTests
247+ hs-source-dirs: src-unittests
248+ default-extensions: {
249+ CPP
250+
251+ NoImplicitPrelude
252+
253+ GADTs
254+
255+ FlexibleContexts
256+ FlexibleInstances
257+ ScopedTypeVariables
258+ MonadComprehensions
259+ LambdaCase
260+ MultiWayIf
261+ KindSignatures
262+ }
263+ ghc-options: {
264+ -Wall
265+ -fno-warn-unused-imports
266+ -rtsopts
267+ -with-rtsopts "-M2G"
268+ }
269+
270+test-suite littests
271+ if flag(brittany-dev-lib) {
272+ buildable: False
273+ } else {
274+ buildable: True
275+ }
276+ type: exitcode-stdio-1.0
277+ default-language: Haskell2010
278+ build-depends:
279+ { brittany
280+ , base
281+ , ghc
282+ , ghc-paths
283+ , ghc-exactprint
284+ , transformers
285+ , containers
286+ , mtl
287+ , text
288+ , multistate
289+ , syb
290+ , neat-interpolation
291+ , data-tree-print
292+ , pretty
293+ , bytestring
294+ , directory
295+ , butcher
296+ , yaml
297+ , aeson
298+ , extra
299+ , uniplate
300+ , strict
301+ , monad-memo
302+ , unsafe
303+ , safe
304+ , deepseq
305+ , semigroups
306+ , cmdargs
307+ , czipwith
308+ , ghc-boot-th
309+ , hspec >=2.4.1 && <2.5
310+ , filepath
311+ , parsec >=3.1.11 && <3.2
312+ }
313+ ghc-options: -Wall
314+ main-is: Main.hs
315+ other-modules:
316+ hs-source-dirs: src-literatetests
317+ default-extensions: {
318+ CPP
319+
320+ NoImplicitPrelude
321+
322+ GADTs
323+
324+ FlexibleContexts
325+ FlexibleInstances
326+ ScopedTypeVariables
327+ MonadComprehensions
328+ LambdaCase
329+ MultiWayIf
330+ KindSignatures
331+ }
332+ ghc-options: {
333+ -Wall
334+ -fno-warn-unused-imports
335+ -rtsopts
336+ -with-rtsopts "-M2G"
337+ }
338+
339+test-suite libinterfacetests
340+ if flag(brittany-dev-lib) {
341+ buildable: False
342+ } else {
343+ buildable: True
344+ }
345+ type: exitcode-stdio-1.0
346+ default-language: Haskell2010
347+ build-depends:
348+ { brittany
349+ , base
350+ , text
351+ , transformers
352+ , hspec >=2.4.1 && <2.5
353+ }
354+ ghc-options: -Wall
355+ main-is: Main.hs
356+ other-modules:
357+ hs-source-dirs: src-libinterfacetests
358+ default-extensions: {
359+ FlexibleContexts
360+ FlexibleInstances
361+ ScopedTypeVariables
362+ MonadComprehensions
363+ LambdaCase
364+ MultiWayIf
365+ KindSignatures
366+ }
367+ ghc-options: {
368+ -Wall
369+ -fno-warn-unused-imports
370+ -rtsopts
371+ -with-rtsopts "-M2G"
372+ }
test/golden-test-cases/brittany.nix.goldennew file+38
@@ -0,0 +1,38 @@
1+{ mkDerivation, aeson, base, butcher, bytestring, cmdargs
2+, containers, czipwith, data-tree-print, deepseq, directory, extra
3+, filepath, ghc, ghc-boot-th, ghc-exactprint, ghc-paths, hspec
4+, monad-memo, mtl, multistate, neat-interpolation, parsec, pretty
5+, safe, semigroups, stdenv, strict, syb, text, transformers
6+, uniplate, unsafe, yaml
7+}:
8+mkDerivation {
9+ pname = "brittany";
10+ version = "0.9.0.0";
11+ sha256 = "deadbeef";
12+ isLibrary = true;
13+ isExecutable = true;
14+ libraryHaskellDepends = [
15+ aeson base butcher bytestring cmdargs containers czipwith
16+ data-tree-print deepseq directory extra ghc ghc-boot-th
17+ ghc-exactprint ghc-paths monad-memo mtl multistate
18+ neat-interpolation pretty safe semigroups strict syb text
19+ transformers uniplate unsafe yaml
20+ ];
21+ executableHaskellDepends = [
22+ aeson base butcher bytestring cmdargs containers czipwith
23+ data-tree-print deepseq directory extra filepath ghc ghc-boot-th
24+ ghc-exactprint ghc-paths hspec monad-memo mtl multistate
25+ neat-interpolation pretty safe semigroups strict syb text
26+ transformers uniplate unsafe yaml
27+ ];
28+ testHaskellDepends = [
29+ aeson base butcher bytestring cmdargs containers czipwith
30+ data-tree-print deepseq directory extra filepath ghc ghc-boot-th
31+ ghc-exactprint ghc-paths hspec monad-memo mtl multistate
32+ neat-interpolation parsec pretty safe semigroups strict syb text
33+ transformers uniplate unsafe yaml
34+ ];
35+ homepage = "https://github.com/lspitzner/brittany/";
36+ description = "Haskell source code formatter";
37+ license = stdenv.lib.licenses.agpl3;
38+}
test/golden-test-cases/broadcast-chan.cabalnew file+53
@@ -0,0 +1,53 @@
1+Name: broadcast-chan
2+Version: 0.1.1
3+
4+Homepage: https://github.com/merijn/broadcast-chan
5+Bug-Reports: https://github.com/merijn/broadcast-chan/issues
6+
7+Author: Merijn Verstraaten
8+Maintainer: Merijn Verstraaten <merijn@inconsistent.nl>
9+Copyright: Copyright © 2014 Merijn Verstraaten
10+
11+License: BSD3
12+License-File: LICENSE
13+
14+Category: System
15+Cabal-Version: >= 1.10
16+Build-Type: Simple
17+Tested-With: GHC == 7.8.3
18+
19+Synopsis: Broadcast channel type that avoids 0 reader space leaks.
20+
21+Description:
22+ A variation of "Control.Concurrent.Chan" from base, which allows to the
23+ easy creation of broadcast channels without the space-leaks that may arise
24+ from using 'Control.Concurrent.Chan.dupChan'.
25+
26+ The 'Control.Concurrent.Chan.Chan' type from "Control.Concurrent.Chan"
27+ consists of both a read and write end. This presents a problem when one
28+ wants to have a broadcast channel that, at times, has zero listeners. To
29+ write to a 'Control.Concurrent.Chan.Chan' there must always be a read end
30+ and this read end will hold ALL messages alive until read.
31+
32+ The simple solution applied in this module is to separate read and write
33+ ends. As a result, any messages written to the write end can be immediately
34+ garbage collected if there are no active read ends, avoding space leaks.
35+
36+Library
37+ Default-Language: Haskell2010
38+ GHC-Options: -Wall -fno-warn-unused-do-bind
39+ Exposed-Modules: Control.Concurrent.BroadcastChan
40+
41+ Build-Depends: base >= 4 && < 5
42+
43+Source-Repository head
44+ Type: git
45+ Location: ssh://github.com:merijn/broadcast-chan.git
46+
47+Source-Repository head
48+ Type: mercurial
49+ Location: git+ssh://github.com:merijn/broadcast-chan.git
50+
51+Source-Repository head
52+ Type: mercurial
53+ Location: https://bitbucket.org/merijnv/broadcast-chan
test/golden-test-cases/broadcast-chan.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "broadcast-chan";
4+ version = "0.1.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ homepage = "https://github.com/merijn/broadcast-chan";
8+ description = "Broadcast channel type that avoids 0 reader space leaks";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/butcher.cabalnew file+157
@@ -0,0 +1,157 @@
1+name: butcher
2+version: 1.2.1.0
3+synopsis: Chops a command or program invocation into digestable pieces.
4+description: See the <https://github.com/lspitzner/butcher/blob/master/README.md README> (it is properly formatted on github).
5+license: BSD3
6+license-file: LICENSE
7+author: Lennart Spitzner
8+maintainer: Lennart Spitzner <hexagoxel@hexagoxel.de>
9+copyright: Copyright (C) 2016-2017 Lennart Spitzner
10+category: UI
11+build-type: Simple
12+Stability: experimental
13+extra-source-files: {
14+ ChangeLog.md
15+ srcinc/prelude.inc
16+ README.md
17+}
18+cabal-version: >=1.10
19+homepage: https://github.com/lspitzner/butcher/
20+bug-reports: https://github.com/lspitzner/butcher/issues
21+
22+source-repository head {
23+ type: git
24+ location: https://github.com/lspitzner/butcher.git
25+}
26+
27+flag butcher-dev
28+ description: dev options
29+ default: False
30+ manual: True
31+
32+library
33+ exposed-modules: UI.Butcher.Monadic.Types
34+ UI.Butcher.Monadic
35+ UI.Butcher.Monadic.Command
36+ UI.Butcher.Monadic.Param
37+ UI.Butcher.Monadic.Flag
38+ UI.Butcher.Monadic.Pretty
39+ UI.Butcher.Monadic.IO
40+ UI.Butcher.Monadic.Interactive
41+ UI.Butcher.Monadic.BuiltinCommands
42+ other-modules: UI.Butcher.Monadic.Internal.Types
43+ UI.Butcher.Monadic.Internal.Core
44+ build-depends:
45+ { base >=4.8 && <4.11
46+ , free
47+ , unsafe
48+ , microlens
49+ , microlens-th
50+ , multistate
51+ , pretty
52+ , containers
53+ , either
54+ , transformers
55+ , mtl
56+ , extra
57+ , void
58+ , bifunctors
59+ , deque
60+ }
61+ if flag(butcher-dev) {
62+ build-depends:
63+ hspec
64+ }
65+ hs-source-dirs: src
66+ default-language: Haskell2010
67+ default-extensions: {
68+ CPP
69+
70+ NoImplicitPrelude
71+
72+ GADTs
73+
74+ FlexibleContexts
75+ FlexibleInstances
76+ ScopedTypeVariables
77+ MonadComprehensions
78+ LambdaCase
79+ MultiWayIf
80+ KindSignatures
81+ }
82+ other-extensions: {
83+ DeriveFunctor
84+ ExistentialQuantification
85+ GeneralizedNewtypeDeriving
86+ StandaloneDeriving
87+ DataKinds
88+ TypeOperators
89+ TemplateHaskell
90+ }
91+ ghc-options: {
92+ -Wall
93+ -fno-spec-constr
94+ -fno-warn-unused-imports
95+ -fno-warn-orphans
96+ }
97+ if flag(butcher-dev) {
98+ ghc-options: -O0 -Werror -fprof-auto -fprof-cafs
99+ }
100+ include-dirs:
101+ srcinc
102+
103+test-suite tests
104+ type: exitcode-stdio-1.0
105+ default-language: Haskell2010
106+ build-depends:
107+ { base >=4.8 && <4.11
108+ , butcher
109+ , free
110+ , unsafe
111+ , microlens
112+ , microlens-th
113+ , multistate
114+ , pretty
115+ , containers
116+ , either
117+ , transformers
118+ , mtl
119+ , extra
120+ , deque
121+ }
122+ if flag(butcher-dev) {
123+ buildable: True
124+ build-depends:
125+ hspec
126+ } else {
127+ buildable: False
128+ }
129+ ghc-options: -Wall
130+ main-is: TestMain.hs
131+ other-modules:
132+ hs-source-dirs: src-tests
133+ default-extensions: {
134+ CPP
135+
136+ NoImplicitPrelude
137+
138+ GADTs
139+
140+ FlexibleContexts
141+ FlexibleInstances
142+ ScopedTypeVariables
143+ MonadComprehensions
144+ LambdaCase
145+ MultiWayIf
146+ KindSignatures
147+ }
148+ ghc-options: {
149+ -Wall
150+ -fno-spec-constr
151+ -fno-warn-unused-imports
152+ -fno-warn-orphans
153+ }
154+ if flag(butcher-dev) {
155+ ghc-options: -Werror -fprof-auto -fprof-cafs -O0
156+ }
157+
test/golden-test-cases/butcher.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, base, bifunctors, containers, deque, either, extra
2+, free, microlens, microlens-th, mtl, multistate, pretty, stdenv
3+, transformers, unsafe, void
4+}:
5+mkDerivation {
6+ pname = "butcher";
7+ version = "1.2.1.0";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ base bifunctors containers deque either extra free microlens
11+ microlens-th mtl multistate pretty transformers unsafe void
12+ ];
13+ homepage = "https://github.com/lspitzner/butcher/";
14+ description = "Chops a command or program invocation into digestable pieces";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/bzlib.cabalnew file+47
@@ -0,0 +1,47 @@
1+name: bzlib
2+version: 0.5.0.5
3+copyright: (c) 2006-2015 Duncan Coutts
4+license: BSD3
5+license-file: LICENSE
6+author: Duncan Coutts <duncan@community.haskell.org>
7+maintainer: Duncan Coutts <duncan@community.haskell.org>
8+category: Codec
9+synopsis: Compression and decompression in the bzip2 format
10+description: This package provides a pure interface for compressing and
11+ decompressing streams of data represented as lazy
12+ 'ByteString's. It uses the bz2 C library so it has high
13+ performance.
14+ .
15+ It provides a convenient high level API suitable for most
16+ tasks and for the few cases where more control is needed it
17+ provides access to the full bzip2 feature set.
18+build-type: Simple
19+cabal-version: >= 1.6
20+extra-source-files: cbits/bzlib_private.h cbits/LICENSE
21+ -- demo programs:
22+ examples/bzip2.hs examples/bunzip2.hs
23+
24+source-repository head
25+ type: darcs
26+ location: http://code.haskell.org/bzlib/
27+
28+library
29+ exposed-modules: Codec.Compression.BZip,
30+ Codec.Compression.BZip.Internal
31+ other-modules: Codec.Compression.BZip.Stream
32+ extensions: CPP, ForeignFunctionInterface
33+ build-depends: base >= 3 && < 5,
34+ bytestring == 0.9.* || == 0.10.*
35+ includes: bzlib.h
36+ ghc-options: -Wall
37+ if !os(windows)
38+ -- Normally we use the the standard system bz2 lib:
39+ extra-libraries: bz2
40+ else
41+ -- However for the benefit of users of Windows (which does not have zlib
42+ -- by default) we bundle a complete copy of the C sources of bzip2-1.0.6
43+ c-sources: cbits/blocksort.c cbits/bzlib.c cbits/compress.c
44+ cbits/crctable.c cbits/decompress.c cbits/huffman.c
45+ cbits/randtable.c
46+ include-dirs: cbits
47+ install-includes: bzlib.h
test/golden-test-cases/bzlib.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, bytestring, bzip2, stdenv }:
2+mkDerivation {
3+ pname = "bzlib";
4+ version = "0.5.0.5";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base bytestring ];
7+ librarySystemDepends = [ bzip2 ];
8+ description = "Compression and decompression in the bzip2 format";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/case-insensitive.cabalnew file+73
@@ -0,0 +1,73 @@
1+name: case-insensitive
2+version: 1.2.0.10
3+cabal-version: >=1.8
4+build-type: Simple
5+license: BSD3
6+license-file: LICENSE
7+copyright: 2011 Bas van Dijk
8+author: Bas van Dijk
9+maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
10+homepage: https://github.com/basvandijk/case-insensitive
11+bug-reports: https://github.com/basvandijk/case-insensitive/issues
12+category: Data, Text
13+synopsis: Case insensitive string comparison
14+description: The module @Data.CaseInsensitive@ provides the 'CI' type
15+ constructor which can be parameterised by a string-like
16+ type like: 'String', 'ByteString', 'Text',
17+ etc.. Comparisons of values of the resulting type will be
18+ insensitive to cases.
19+tested-with:
20+ GHC==7.0.4,
21+ GHC==7.2.2
22+ GHC==7.4.2,
23+ GHC==7.6.3,
24+ GHC==7.8.4,
25+ GHC==7.10.3,
26+ GHC==8.0.1
27+
28+extra-source-files: README.markdown CHANGELOG pg2189.txt
29+
30+source-repository head
31+ Type: git
32+ Location: git://github.com/basvandijk/case-insensitive.git
33+
34+Library
35+ ghc-options: -Wall
36+ build-depends: base >= 3 && < 4.11
37+ , bytestring >= 0.9 && < 0.11
38+ , text >= 0.3 && < 1.3
39+ , deepseq >= 1.1 && < 1.5
40+ , hashable >= 1.0 && < 1.3
41+ if !impl(ghc >= 8.0)
42+ build-depends: semigroups >= 0.18 && < 0.19
43+ exposed-modules: Data.CaseInsensitive, Data.CaseInsensitive.Unsafe
44+ other-modules: Data.CaseInsensitive.Internal
45+
46+test-suite test-case-insensitive
47+ type: exitcode-stdio-1.0
48+ main-is: test.hs
49+ hs-source-dirs: test
50+
51+ build-depends: case-insensitive
52+ , base >= 3 && < 4.11
53+ , bytestring >= 0.9 && < 0.11
54+ , text >= 0.3 && < 1.3
55+ , HUnit >= 1.2.2 && < 1.6
56+ , test-framework >= 0.2.4 && < 0.9
57+ , test-framework-hunit >= 0.2.4 && < 0.4
58+
59+ ghc-options: -Wall
60+
61+benchmark bench-case-insensitive
62+ type: exitcode-stdio-1.0
63+ main-is: bench.hs
64+ other-modules: NoClass
65+ hs-source-dirs: bench
66+
67+ ghc-options: -Wall -O2
68+
69+ build-depends: case-insensitive
70+ , base >= 3 && < 4.11
71+ , bytestring >= 0.9 && < 0.11
72+ , criterion >= 0.6.1 && < 1.3
73+ , deepseq >= 1.1 && < 1.5
test/golden-test-cases/case-insensitive.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, base, bytestring, criterion, deepseq, hashable
2+, HUnit, stdenv, test-framework, test-framework-hunit, text
3+}:
4+mkDerivation {
5+ pname = "case-insensitive";
6+ version = "1.2.0.10";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ base bytestring deepseq hashable text ];
9+ testHaskellDepends = [
10+ base bytestring HUnit test-framework test-framework-hunit text
11+ ];
12+ benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
13+ homepage = "https://github.com/basvandijk/case-insensitive";
14+ description = "Case insensitive string comparison";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/cassava-conduit.cabalnew file+79
@@ -0,0 +1,79 @@
1+name: cassava-conduit
2+version: 0.4.0.1
3+license: BSD3
4+license-file: etc/LICENCE.md
5+author: Dom De Re
6+maintainer: Dom De Re
7+copyright: Copyright (C) 2014-2017 Dom De Re
8+synopsis: Conduit interface for cassava package
9+category: Data
10+description: Conduit interface for cassava package
11+ .
12+ PRs welcome.
13+homepage: https://github.com/domdere/cassava-conduit
14+bug-reports: https://github.com/domdere/cassava-conduit/issues
15+cabal-version: >= 1.18
16+build-type: Simple
17+tested-with: GHC == 7.10.1
18+ , GHC == 7.10.2
19+extra-source-files: README.md
20+ , CHANGELOG.md
21+
22+source-repository head
23+ type: git
24+ location: https://github.com/domdere/cassava-conduit
25+
26+flag small_base
27+ description: Choose the new, split-up base package.
28+
29+library
30+ default-language: Haskell2010
31+
32+ build-depends: base < 5 && >= 4
33+ , containers
34+ , array
35+ , bifunctors >= 4.2 && < 6
36+ , bytestring == 0.10.*
37+ , cassava == 0.5.*
38+ , conduit == 1.2.*
39+ , conduit-extra == 1.2.*
40+ , mtl == 2.2.*
41+ , text == 1.2.*
42+
43+ ghc-options: -Wall
44+
45+ hs-source-dirs: src
46+
47+ exposed-modules: Data.Csv.Conduit
48+
49+ other-modules: LocalPrelude
50+
51+ default-extensions: NoImplicitPrelude
52+
53+test-suite quickcheck
54+ default-language: Haskell2010
55+ type: exitcode-stdio-1.0
56+ main-is: Main.hs
57+ hs-source-dirs: quickcheck
58+ other-modules: Test.Arbitrary
59+ Test.Data.Csv.Conduit
60+
61+ build-depends: base >= 4 && < 5
62+ , bytestring == 0.10.*
63+ , cassava == 0.5.*
64+ , conduit == 1.2.*
65+ , conduit-extra == 1.2.*
66+ , QuickCheck == 2.10.*
67+ , text == 1.2.*
68+ , cassava-conduit
69+
70+benchmark benchmarks
71+ default-language: Haskell2010
72+ type: exitcode-stdio-1.0
73+ hs-source-dirs: benchmarks
74+ main-is: Main.hs
75+ ghc-options: -O2 -rtsopts
76+
77+ build-depends: base > 4 && <= 5
78+ , cassava-conduit
79+ , criterion >= 0.8
test/golden-test-cases/cassava-conduit.nix.goldennew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, array, base, bifunctors, bytestring, cassava
2+, conduit, conduit-extra, containers, criterion, mtl, QuickCheck
3+, stdenv, text
4+}:
5+mkDerivation {
6+ pname = "cassava-conduit";
7+ version = "0.4.0.1";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ array base bifunctors bytestring cassava conduit conduit-extra
11+ containers mtl text
12+ ];
13+ testHaskellDepends = [
14+ base bytestring cassava conduit conduit-extra QuickCheck text
15+ ];
16+ benchmarkHaskellDepends = [ base criterion ];
17+ homepage = "https://github.com/domdere/cassava-conduit";
18+ description = "Conduit interface for cassava package";
19+ license = stdenv.lib.licenses.bsd3;
20+}
test/golden-test-cases/cassette.cabalnew file+28
@@ -0,0 +1,28 @@
1+Name: cassette
2+Version: 0.1.0
3+Author: Mathieu Boespflug
4+Maintainer: Mathieu Boespflug <mboes@cs.mcgill.ca>
5+Synopsis: A combinator library for simultaneously defining parsers and pretty printers.
6+Description:
7+ Combinator library for defining both type safe parsers and pretty printers simultaneously.
8+ This library performs well in practice because parsers and printers are implemented in CPS
9+ and because arguments are always curried, rather than packed into nested tuples.
10+Category: Parsing, Text
11+License: BSD3
12+License-File: LICENSE
13+Cabal-Version: >= 1.10.0
14+Build-Type: Simple
15+Tested-With: GHC == 7.4.1
16+
17+library
18+ Hs-Source-Dirs: src
19+ Build-Depends: base >= 4 && < 5
20+ Default-Language: Haskell2010
21+ default-extensions: RankNTypes
22+ other-extensions: ImpredicativeTypes
23+ Exposed-Modules: Text.Cassette
24+ Text.Cassette.Prim
25+ Text.Cassette.Lead
26+ Text.Cassette.Combinator
27+ Text.Cassette.Char
28+ Text.Cassette.Number
test/golden-test-cases/cassette.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "cassette";
4+ version = "0.1.0";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ description = "A combinator library for simultaneously defining parsers and pretty printers";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/cereal-text.cabalnew file+38
@@ -0,0 +1,38 @@
1+-- Initial cereal-text.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+name: cereal-text
5+version: 0.1.0.2
6+synopsis: Data.Text instances for the cereal serialization library
7+description: Data.Text instances for the cereal serialization library.
8+ .
9+ Provides instances for Text and lazy Text.
10+ Uses UTF-8 encoding for serialization.
11+ .
12+ Use
13+ @import Data.Serialize.Text ()@
14+ to import instances.
15+homepage: https://github.com/ulikoehler/cereal-text
16+license: Apache-2.0
17+license-file: LICENSE
18+author: Uli Köhler
19+maintainer: ukoehler@btronik.de
20+-- copyright:
21+category: Data
22+build-type: Simple
23+extra-source-files: README.md
24+cabal-version: >=1.10
25+
26+source-repository head
27+ type: git
28+ location: https://github.com/ulikoehler/cereal-text
29+
30+library
31+ exposed-modules: Data.Serialize.Text
32+ -- other-modules:
33+ -- other-extensions:
34+ build-depends: base >= 4.0 && < 6.0,
35+ cereal >= 0.2,
36+ text >= 0.10
37+ -- hs-source-dirs:
38+ default-language: Haskell2010
test/golden-test-cases/cereal-text.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, cereal, stdenv, text }:
2+mkDerivation {
3+ pname = "cereal-text";
4+ version = "0.1.0.2";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base cereal text ];
7+ homepage = "https://github.com/ulikoehler/cereal-text";
8+ description = "Data.Text instances for the cereal serialization library";
9+ license = stdenv.lib.licenses.asl20;
10+}
test/golden-test-cases/cheapskate.cabalnew file+81
@@ -0,0 +1,81 @@
1+name: cheapskate
2+version: 0.1.1
3+synopsis: Experimental markdown processor.
4+description: This is an experimental Markdown processor in pure
5+ Haskell. It aims to process Markdown efficiently and in
6+ the most forgiving possible way. It is designed to deal
7+ with any input, including garbage, with linear
8+ performance. Output is sanitized by default for
9+ protection against XSS attacks.
10+ .
11+ Several markdown extensions are implemented, including
12+ fenced code blocks, significant list start numbers, and
13+ autolinked URLs. See README.markdown for details.
14+homepage: http://github.com/jgm/cheapskate
15+license: BSD3
16+license-file: LICENSE
17+author: John MacFarlane
18+maintainer: jgm@berkeley.edu
19+copyright: (C) 2012-2013 John MacFarlane
20+category: Text
21+build-type: Simple
22+extra-source-files: README.markdown
23+ changelog
24+ man/man1/cheapskate.1
25+cabal-version: >=1.10
26+Source-repository head
27+ type: git
28+ location: git://github.com/jgm/cheapskate.git
29+
30+Flag dingus
31+ Description: Build cheapskate-dingus cgi script.
32+ Default: False
33+
34+library
35+ hs-source-dirs: .
36+ exposed-modules: Cheapskate
37+ Cheapskate.Parse
38+ Cheapskate.Types
39+ Cheapskate.Html
40+ other-modules: Cheapskate.Util
41+ Cheapskate.Inlines
42+ Cheapskate.ParserCombinators
43+ Paths_cheapskate
44+ build-depends: base >=4.4 && <5,
45+ containers >=0.4 && <0.6,
46+ mtl >=2.1 && <2.3,
47+ text >= 0.9 && < 1.3,
48+ blaze-html >=0.6 && < 0.10,
49+ xss-sanitize >= 0.3 && < 0.4,
50+ data-default >= 0.5 && < 0.8,
51+ syb,
52+ uniplate >= 1.6 && < 1.7,
53+ deepseq
54+ default-language: Haskell2010
55+ ghc-options: -Wall -fno-warn-unused-do-bind
56+
57+executable cheapskate
58+ main-is: main.hs
59+ hs-source-dirs: bin
60+ build-depends: base >=4.4 && <5,
61+ cheapskate,
62+ bytestring,
63+ blaze-html >=0.6 && < 0.10,
64+ text >= 0.9 && < 1.3
65+ default-language: Haskell2010
66+ ghc-options: -Wall -fno-warn-unused-do-bind
67+ ghc-prof-options: -auto-exported -rtsopts
68+
69+executable cheapskate-dingus
70+ main-is: cheapskate-dingus.hs
71+ hs-source-dirs: bin
72+ if flag(dingus)
73+ build-depends: base, aeson, cheapskate, blaze-html,
74+ text, wai-extra, wai >= 0.3, http-types
75+ default-language: Haskell2010
76+ if flag(dingus)
77+ Buildable: True
78+ else
79+ Buildable: False
80+ ghc-options: -Wall -fno-warn-unused-do-bind
81+ ghc-prof-options: -auto-exported -rtsopts
test/golden-test-cases/cheapskate.nix.goldennew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, base, blaze-html, bytestring, containers
2+, data-default, deepseq, mtl, stdenv, syb, text, uniplate
3+, xss-sanitize
4+}:
5+mkDerivation {
6+ pname = "cheapskate";
7+ version = "0.1.1";
8+ sha256 = "deadbeef";
9+ isLibrary = true;
10+ isExecutable = true;
11+ libraryHaskellDepends = [
12+ base blaze-html containers data-default deepseq mtl syb text
13+ uniplate xss-sanitize
14+ ];
15+ executableHaskellDepends = [ base blaze-html bytestring text ];
16+ homepage = "http://github.com/jgm/cheapskate";
17+ description = "Experimental markdown processor";
18+ license = stdenv.lib.licenses.bsd3;
19+}
test/golden-test-cases/chell.cabalnew file+88
@@ -0,0 +1,88 @@
1+name: chell
2+version: 0.4.0.2
3+license: MIT
4+license-file: license.txt
5+author: John Millikin <john@john-millikin.com>
6+maintainer: John Millikin <john@john-millikin.com>
7+build-type: Simple
8+cabal-version: >= 1.6
9+category: Testing
10+bug-reports: mailto:jmillikin@gmail.com
11+homepage: https://john-millikin.com/software/chell/
12+
13+synopsis: A simple and intuitive library for automated testing.
14+description:
15+ Chell is a simple and intuitive library for automated testing. It natively
16+ supports assertion-based testing, and can use companion libraries
17+ such as @chell-quickcheck@ to support more complex testing strategies.
18+ .
19+ An example test suite, which verifies the behavior of artithmetic operators.
20+ .
21+ @
22+ &#x7b;-\# LANGUAGE TemplateHaskell \#-&#x7d;
23+ .
24+ import Test.Chell
25+ .
26+ tests_Math :: Suite
27+ tests_Math = suite \"math\"
28+ &#x20; [ test_Addition
29+ &#x20; , test_Subtraction
30+ &#x20; ]
31+ .
32+ test_Addition :: Test
33+ test_Addition = assertions \"addition\" $ do
34+ &#x20; $expect (equal (2 + 1) 3)
35+ &#x20; $expect (equal (1 + 2) 3)
36+ .
37+ test_Subtraction :: Test
38+ test_Subtraction = assertions \"subtraction\" $ do
39+ &#x20; $expect (equal (2 - 1) 1)
40+ &#x20; $expect (equal (1 - 2) (-1))
41+ .
42+ main :: IO ()
43+ main = defaultMain [tests_Math]
44+ @
45+ .
46+ @
47+ $ ghc --make chell-example.hs
48+ $ ./chell-example
49+ PASS: 2 tests run, 2 tests passed
50+ @
51+
52+source-repository head
53+ type: git
54+ location: https://john-millikin.com/code/chell/
55+
56+source-repository this
57+ type: git
58+ location: https://john-millikin.com/code/chell/
59+ tag: chell_0.4.0.2
60+
61+flag color-output
62+ description: Enable colored output in test results
63+ default: True
64+
65+library
66+ ghc-options: -Wall
67+
68+ build-depends:
69+ base >= 4.1 && < 5.0
70+ , bytestring >= 0.9
71+ , options >= 1.0 && < 2.0
72+ , patience >= 0.1 && < 0.2
73+ , random >= 1.0
74+ , template-haskell >= 2.3
75+ , text
76+ , transformers >= 0.2
77+
78+ if flag(color-output)
79+ build-depends:
80+ ansi-terminal >= 0.5 && < 0.8
81+
82+ exposed-modules:
83+ Test.Chell
84+
85+ other-modules:
86+ Test.Chell.Main
87+ Test.Chell.Output
88+ Test.Chell.Types
test/golden-test-cases/chell.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, ansi-terminal, base, bytestring, options, patience
2+, random, stdenv, template-haskell, text, transformers
3+}:
4+mkDerivation {
5+ pname = "chell";
6+ version = "0.4.0.2";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ ansi-terminal base bytestring options patience random
10+ template-haskell text transformers
11+ ];
12+ homepage = "https://john-millikin.com/software/chell/";
13+ description = "A simple and intuitive library for automated testing";
14+ license = stdenv.lib.licenses.mit;
15+}
test/golden-test-cases/clumpiness.cabalnew file+72
@@ -0,0 +1,72 @@
1+-- Initial clumpiness.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+-- The name of the package.
5+name: clumpiness
6+
7+-- The package version. See the Haskell package versioning policy (PVP)
8+-- for standards guiding when and how versions should be incremented.
9+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
10+-- PVP summary: +-+------- breaking API changes
11+-- | | +----- non-breaking API additions
12+-- | | | +--- code changes with no API change
13+version: 0.17.0.0
14+
15+-- A short (one-line) description of the package.
16+synopsis: Calculate the clumpiness of leaf properties in a tree
17+
18+-- A longer description of the package.
19+-- description:
20+
21+-- The license under which the package is released.
22+license: GPL-3
23+
24+-- The file containing the license text.
25+license-file: LICENSE
26+
27+-- The package author(s).
28+author: Gregory Schwartz
29+
30+-- An email address to which users can send suggestions, bug reports, and
31+-- patches.
32+maintainer: gs394@drexel.edu
33+
34+-- A copyright notice.
35+-- copyright:
36+
37+category: Math
38+
39+build-type: Simple
40+
41+-- Extra files to be distributed with the package, such as examples or a
42+-- README.
43+-- extra-source-files:
44+
45+-- Constraint on the version of Cabal needed to build this package.
46+cabal-version: >=1.10
47+
48+
49+library
50+ -- Modules exported by the library.
51+ exposed-modules: Math.Clumpiness.Algorithms
52+ , Math.Clumpiness.Types
53+ , Math.Clumpiness.Utilities
54+ , Math.Clumpiness.Pinpoint
55+
56+ -- Modules included in this library but not exported.
57+ -- other-modules:
58+
59+ -- LANGUAGE extensions used by modules in this package.
60+ other-extensions: BangPatterns
61+
62+ -- Other library packages from which modules are imported.
63+ build-depends: base >=4.6 && <5
64+ , containers >=0.5
65+ , tree-fun >=0.7
66+
67+ -- Directories containing source files.
68+ hs-source-dirs: src
69+
70+ -- Base language which the package is written in.
71+ default-language: Haskell2010
72+
test/golden-test-cases/clumpiness.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, containers, stdenv, tree-fun }:
2+mkDerivation {
3+ pname = "clumpiness";
4+ version = "0.17.0.0";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base containers tree-fun ];
7+ description = "Calculate the clumpiness of leaf properties in a tree";
8+ license = stdenv.lib.licenses.gpl3;
9+}
test/golden-test-cases/code-page.cabalnew file+60
@@ -0,0 +1,60 @@
1+name: code-page
2+version: 0.1.3
3+synopsis: Windows code page library for Haskell
4+description: This library provides two modules:
5+ .
6+ * "System.IO.CodePage": a cross-platform module that exports
7+ functions which adjust code pages on Windows, and do nothing
8+ on other operating systems.
9+ .
10+ * "System.Win32.CodePage": On Windows, this exports functions
11+ for getting, setting, and analyzing code pages. On other
12+ operating systems, this module exports nothing.
13+homepage: https://github.com/RyanGlScott/code-page
14+bug-reports: https://github.com/RyanGlScott/code-page/issues
15+license: BSD3
16+license-file: LICENSE
17+author: Ryan Scott
18+maintainer: Ryan Scott <ryan.gl.scott@gmail.com>
19+stability: Provisional
20+copyright: (C) 2016-2017 Ryan Scott
21+category: System
22+build-type: Simple
23+extra-source-files: CHANGELOG.md, README.md, include/*.h
24+cabal-version: >=1.10
25+tested-with: GHC == 7.0.4
26+ , GHC == 7.2.2
27+ , GHC == 7.4.2
28+ , GHC == 7.6.3
29+ , GHC == 7.8.4
30+ , GHC == 7.10.3
31+ , GHC == 8.0.2
32+
33+source-repository head
34+ type: git
35+ location: https://github.com/RyanGlScott/code-page
36+
37+library
38+ exposed-modules: System.IO.CodePage
39+ System.Win32.CodePage
40+ build-depends: base >= 4.3 && < 5
41+ build-tools: hsc2hs
42+ if os(windows)
43+ include-dirs: include
44+ includes: windows_cconv.h
45+ cpp-options: "-DWINDOWS"
46+ build-depends: Win32
47+
48+ hs-source-dirs: src
49+ default-language: Haskell2010
50+ ghc-options: -Wall
51+
52+test-suite tests
53+ type: exitcode-stdio-1.0
54+ main-is: Tests.hs
55+
56+ build-depends: base >= 4.3 && < 5
57+ , code-page
58+
59+ hs-source-dirs: tests
60+ default-language: Haskell2010
test/golden-test-cases/code-page.nix.goldennew file+11
@@ -0,0 +1,11 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "code-page";
4+ version = "0.1.3";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ testHaskellDepends = [ base ];
8+ homepage = "https://github.com/RyanGlScott/code-page";
9+ description = "Windows code page library for Haskell";
10+ license = stdenv.lib.licenses.bsd3;
11+}
test/golden-test-cases/colorize-haskell.cabalnew file+33
@@ -0,0 +1,33 @@
1+name: colorize-haskell
2+version: 1.0.1
3+license: BSD3
4+license-file: LICENSE
5+author: Iavor S. Diatchki
6+maintainer: iavor.diatchki@gmail.com
7+homepage: http://github.com/yav/colorize-haskell
8+build-type: Simple
9+cabal-version: >= 1.2
10+synopsis: Highligt Haskell source
11+description: Highligt Haskell source
12+category: Development
13+
14+library
15+ build-depends:
16+ base >= 3 && < 5,
17+ haskell-lexer,
18+ ansi-terminal
19+ exposed-modules:
20+ Language.Haskell.Colorize
21+ ghc-options:
22+ -Wall -O2
23+
24+
25+executable hscolor
26+ main-is: Main.hs
27+ -- because we cannot depend on self:
28+ build-depends:
29+ base >= 3 && < 5,
30+ haskell-lexer,
31+ ansi-terminal
32+ ghc-options: -Wall -O2
33+
test/golden-test-cases/colorize-haskell.nix.goldennew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, ansi-terminal, base, haskell-lexer, stdenv }:
2+mkDerivation {
3+ pname = "colorize-haskell";
4+ version = "1.0.1";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ libraryHaskellDepends = [ ansi-terminal base haskell-lexer ];
9+ executableHaskellDepends = [ ansi-terminal base haskell-lexer ];
10+ homepage = "http://github.com/yav/colorize-haskell";
11+ description = "Highligt Haskell source";
12+ license = stdenv.lib.licenses.bsd3;
13+}
test/golden-test-cases/countable.cabalnew file+78
@@ -0,0 +1,78 @@
1+cabal-version: >=1.14
2+name: countable
3+version: 1.0
4+x-follows-version-policy:
5+license: BSD3
6+license-file: LICENSE
7+copyright: Ashley Yakeley <ashley@semantic.org>
8+author: Ashley Yakeley <ashley@semantic.org>
9+maintainer: Ashley Yakeley <ashley@semantic.org>
10+homepage: https://github.com/AshleyYakeley/countable
11+bug-reports: https://github.com/AshleyYakeley/countable/issues
12+synopsis: Countable, Searchable, Finite, Empty classes
13+description:
14+ * @class Countable@, for countable types
15+ .
16+ * @class AtLeastOneCountable@, for countable types that have at least one value
17+ .
18+ * @class InfiniteCountable@, for infinite countable types
19+ .
20+ * @class Searchable@, for types that can be searched over. This turns out to include some infinite types, see <http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/>.
21+ .
22+ * @class Finite@, for finite types
23+ .
24+ * @class Empty@, for empty types
25+ .
26+ * @data Nothing@, an empty type
27+ .
28+ Some orphan instances:
29+ .
30+ * @(Searchable a,Eq b) => Eq (a -> b)@ / /
31+ .
32+ * @(Finite t) => Foldable ((->) t)@ / /
33+ .
34+ * @(Finite a) => Traversable ((->) a)@ / /
35+ .
36+ * @(Show a,Finite a,Show b) => Show (a -> b)@ / /
37+category: Data
38+build-type: Simple
39+
40+library
41+ hs-source-dirs: src
42+ default-language: Haskell2010
43+ default-extensions:
44+ ExistentialQuantification
45+ EmptyCase
46+ build-depends:
47+ base >= 4.8 && < 5
48+ exposed-modules:
49+ Data.Expression
50+ Data.Searchable
51+ Data.Countable
52+ Data.Empty
53+ ghc-options: -Wall
54+
55+test-suite tests
56+ type: exitcode-stdio-1.0
57+ hs-source-dirs: test
58+ default-language: Haskell2010
59+ default-extensions:
60+ ExistentialQuantification
61+ EmptyCase
62+ GeneralizedNewtypeDeriving
63+ ScopedTypeVariables
64+ build-depends:
65+ base >= 4.8 && < 5,
66+ countable,
67+ bytestring,
68+ silently,
69+ tasty,
70+ tasty-hunit,
71+ tasty-golden
72+ main-is: Count.hs
73+ other-modules:
74+ Show
75+ TypeName
76+ Three
77+ Golden
78+ ghc-options: -Wall
test/golden-test-cases/countable.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, base, bytestring, silently, stdenv, tasty
2+, tasty-golden, tasty-hunit
3+}:
4+mkDerivation {
5+ pname = "countable";
6+ version = "1.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ base ];
9+ testHaskellDepends = [
10+ base bytestring silently tasty tasty-golden tasty-hunit
11+ ];
12+ homepage = "https://github.com/AshleyYakeley/countable";
13+ description = "Countable, Searchable, Finite, Empty classes";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/cpu.cabalnew file+81
@@ -0,0 +1,81 @@
1+Name: cpu
2+Version: 0.1.2
3+Description:
4+ Lowlevel cpu routines to get basic properties of the cpu platform, like endianness and architecture.
5+License: BSD3
6+License-file: LICENSE
7+Copyright: Vincent Hanquez <vincent@snarc.org>
8+Author: Vincent Hanquez <vincent@snarc.org>
9+Maintainer: Vincent Hanquez <vincent@snarc.org>
10+Synopsis: Cpu information and properties helpers.
11+Build-Type: Simple
12+Category: Data
13+stability: experimental
14+Cabal-Version: >=1.8
15+Homepage: http://github.com/vincenthz/hs-cpu
16+data-files: README.md
17+Extra-source-files: cbits/endian.c
18+
19+Flag executable
20+ Description: Build the executable
21+ Default: False
22+
23+Library
24+ Build-Depends: base >= 3 && < 5
25+ Exposed-modules: System.Cpuid
26+ System.Endian
27+ System.Arch
28+ ghc-options: -Wall
29+
30+ if impl(ghc < 7.8)
31+ C-sources: cbits/endian.c
32+
33+ if arch(i386)
34+ Cpp-options: -DARCH_X86
35+ if arch(x86_64)
36+ Cpp-options: -DARCH_X86_64
37+ if arch(ppc)
38+ Cpp-options: -DARCH_PPC
39+ if arch(ppc64)
40+ Cpp-options: -DARCH_PPC64
41+ if arch(sparc)
42+ Cpp-options: -DARCH_SPARC
43+ if arch(arm)
44+ Cpp-options: -DARCH_ARM
45+ if arch(mips)
46+ Cpp-options: -DARCH_MIPS
47+ if arch(sh)
48+ Cpp-options: -DARCH_SH
49+ if arch(ia64)
50+ Cpp-options: -DARCH_IA64
51+ if arch(s390)
52+ Cpp-options: -DARCH_S390
53+ if arch(alpha)
54+ Cpp-options: -DARCH_ALPHA
55+ if arch(hppa)
56+ Cpp-options: -DARCH_HPPA
57+ if arch(rs6000)
58+ Cpp-options: -DARCH_RS6000
59+ if arch(m68k)
60+ Cpp-options: -DARCH_M68K
61+ if arch(vax)
62+ Cpp-options: -DARCH_VAX
63+
64+ if arch(i386) || arch(x86_64)
65+ C-sources: cbits/cpuid.c
66+
67+executable cpuid
68+ hs-source-dirs: cpuid
69+ Main-is: Cpuid.hs
70+ if flag(executable)
71+ Buildable: True
72+ Build-Depends: base >= 3 && < 5
73+ , cpu
74+ , bytestring
75+ else
76+ Buildable: False
77+ ghc-options: -Wall -fno-warn-orphans -fno-warn-missing-signatures
78+
79+source-repository head
80+ type: git
81+ location: git://github.com/vincenthz/hs-cpu
test/golden-test-cases/cpu.nix.goldennew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "cpu";
4+ version = "0.1.2";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ enableSeparateDataOutput = true;
9+ libraryHaskellDepends = [ base ];
10+ homepage = "http://github.com/vincenthz/hs-cpu";
11+ description = "Cpu information and properties helpers";
12+ license = stdenv.lib.licenses.bsd3;
13+}
test/golden-test-cases/criterion.cabalnew file+218
@@ -0,0 +1,218 @@
1+name: criterion
2+version: 1.2.6.0
3+synopsis: Robust, reliable performance measurement and analysis
4+license: BSD3
5+license-file: LICENSE
6+author: Bryan O'Sullivan <bos@serpentine.com>
7+maintainer: Bryan O'Sullivan <bos@serpentine.com>
8+copyright: 2009-2016 Bryan O'Sullivan and others
9+category: Development, Performance, Testing, Benchmarking
10+homepage: http://www.serpentine.com/criterion
11+bug-reports: https://github.com/bos/criterion/issues
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files:
15+ README.markdown
16+ changelog.md
17+ examples/*.cabal
18+ examples/*.hs
19+ examples/*.html
20+tested-with:
21+ GHC==7.4.2,
22+ GHC==7.6.3,
23+ GHC==7.8.4,
24+ GHC==7.10.3,
25+ GHC==8.0.2,
26+ GHC==8.2.2
27+
28+data-files:
29+ templates/*.css
30+ templates/*.tpl
31+ templates/js/jquery.criterion.js
32+
33+description:
34+ This library provides a powerful but simple way to measure software
35+ performance. It provides both a framework for executing and
36+ analysing benchmarks and a set of driver functions that makes it
37+ easy to build and run benchmarks, and to analyse their results.
38+ .
39+ The fastest way to get started is to read the
40+ <http://www.serpentine.com/criterion/tutorial.html online tutorial>,
41+ followed by the documentation and examples in the "Criterion.Main"
42+ module.
43+ .
44+ For examples of the kinds of reports that criterion generates, see
45+ <http://www.serpentine.com/criterion the home page>.
46+
47+flag fast
48+ description: compile without optimizations
49+ default: False
50+ manual: True
51+
52+flag embed-data-files
53+ description: Embed the data files in the binary for a relocatable executable.
54+ (Warning: This will increase the executable size significantly.)
55+ default: False
56+ manual: True
57+
58+library
59+ exposed-modules:
60+ Criterion
61+ Criterion.Analysis
62+ Criterion.IO
63+ Criterion.IO.Printf
64+ Criterion.Internal
65+ Criterion.Main
66+ Criterion.Main.Options
67+ Criterion.Measurement
68+ Criterion.Monad
69+ Criterion.Report
70+ Criterion.Types
71+
72+ other-modules:
73+ Criterion.Monad.Internal
74+ Criterion.Types.Internal
75+
76+ c-sources: cbits/cycles.c
77+ if os(darwin)
78+ c-sources: cbits/time-osx.c
79+ else {
80+ if os(windows)
81+ c-sources: cbits/time-windows.c
82+ else
83+ c-sources: cbits/time-posix.c
84+ }
85+
86+ other-modules:
87+ Paths_criterion
88+
89+ build-depends:
90+ aeson >= 0.8,
91+ ansi-wl-pprint >= 0.6.7.2,
92+ base >= 4.5 && < 5,
93+ base-compat >= 0.9,
94+ binary >= 0.5.1.0,
95+ bytestring >= 0.9 && < 1.0,
96+ cassava >= 0.3.0.0,
97+ code-page,
98+ containers,
99+ deepseq >= 1.1.0.0,
100+ directory,
101+ exceptions >= 0.8.2 && < 0.9,
102+ filepath,
103+ Glob >= 0.7.2,
104+ microstache >= 1.0.1 && < 1.1,
105+ js-flot,
106+ js-jquery,
107+ mtl >= 2,
108+ mwc-random >= 0.8.0.3,
109+ optparse-applicative >= 0.13,
110+ parsec >= 3.1.0,
111+ semigroups,
112+ statistics >= 0.14 && < 0.15,
113+ text >= 0.11,
114+ time,
115+ transformers,
116+ transformers-compat >= 0.4,
117+ vector >= 0.7.1,
118+ vector-algorithms >= 0.4
119+ if impl(ghc < 7.6)
120+ build-depends:
121+ ghc-prim
122+
123+ default-language: Haskell2010
124+ ghc-options: -Wall -funbox-strict-fields
125+ if impl(ghc >= 6.8)
126+ ghc-options: -fwarn-tabs
127+ if flag(fast)
128+ ghc-options: -O0
129+ else
130+ ghc-options: -O2
131+
132+ if flag(embed-data-files)
133+ other-modules: Criterion.EmbeddedData
134+ build-depends: file-embed < 0.1,
135+ template-haskell
136+ cpp-options: "-DEMBED"
137+
138+Executable criterion-report
139+ Default-Language: Haskell2010
140+ GHC-Options: -Wall -rtsopts
141+ Main-Is: Report.hs
142+ Other-Modules: Options
143+ Paths_criterion
144+ Hs-Source-Dirs: app
145+
146+ Build-Depends:
147+ base,
148+ criterion,
149+ optparse-applicative >= 0.13
150+
151+ if impl(ghc < 7.6)
152+ build-depends:
153+ ghc-prim
154+
155+test-suite sanity
156+ type: exitcode-stdio-1.0
157+ hs-source-dirs: tests
158+ main-is: Sanity.hs
159+ default-language: Haskell2010
160+ ghc-options: -Wall -rtsopts
161+ if flag(fast)
162+ ghc-options: -O0
163+ else
164+ ghc-options: -O2
165+
166+ build-depends:
167+ HUnit,
168+ base,
169+ bytestring,
170+ criterion,
171+ deepseq,
172+ tasty,
173+ tasty-hunit
174+
175+test-suite tests
176+ type: exitcode-stdio-1.0
177+ hs-source-dirs: tests
178+ main-is: Tests.hs
179+ default-language: Haskell2010
180+ other-modules: Properties
181+
182+ ghc-options:
183+ -Wall -threaded -O0 -rtsopts
184+
185+ build-depends:
186+ QuickCheck >= 2.4,
187+ base,
188+ criterion,
189+ statistics,
190+ HUnit,
191+ tasty,
192+ tasty-hunit,
193+ tasty-quickcheck,
194+ vector,
195+ aeson >= 0.8
196+
197+test-suite cleanup
198+ type: exitcode-stdio-1.0
199+ hs-source-dirs: tests
200+ default-language: Haskell2010
201+ main-is: Cleanup.hs
202+
203+ ghc-options:
204+ -Wall -threaded -O0 -rtsopts
205+
206+ build-depends:
207+ HUnit,
208+ base,
209+ bytestring,
210+ criterion,
211+ deepseq,
212+ directory,
213+ tasty,
214+ tasty-hunit
215+
216+source-repository head
217+ type: git
218+ location: https://github.com/bos/criterion.git
test/golden-test-cases/criterion.nix.goldennew file+31
@@ -0,0 +1,31 @@
1+{ mkDerivation, aeson, ansi-wl-pprint, base, base-compat, binary
2+, bytestring, cassava, code-page, containers, deepseq, directory
3+, exceptions, filepath, Glob, HUnit, js-flot, js-jquery
4+, microstache, mtl, mwc-random, optparse-applicative, parsec
5+, QuickCheck, semigroups, statistics, stdenv, tasty, tasty-hunit
6+, tasty-quickcheck, text, time, transformers, transformers-compat
7+, vector, vector-algorithms
8+}:
9+mkDerivation {
10+ pname = "criterion";
11+ version = "1.2.6.0";
12+ sha256 = "deadbeef";
13+ isLibrary = true;
14+ isExecutable = true;
15+ enableSeparateDataOutput = true;
16+ libraryHaskellDepends = [
17+ aeson ansi-wl-pprint base base-compat binary bytestring cassava
18+ code-page containers deepseq directory exceptions filepath Glob
19+ js-flot js-jquery microstache mtl mwc-random optparse-applicative
20+ parsec semigroups statistics text time transformers
21+ transformers-compat vector vector-algorithms
22+ ];
23+ executableHaskellDepends = [ base optparse-applicative ];
24+ testHaskellDepends = [
25+ aeson base bytestring deepseq directory HUnit QuickCheck statistics
26+ tasty tasty-hunit tasty-quickcheck vector
27+ ];
28+ homepage = "http://www.serpentine.com/criterion";
29+ description = "Robust, reliable performance measurement and analysis";
30+ license = stdenv.lib.licenses.bsd3;
31+}
test/golden-test-cases/crypt-sha512.cabalnew file+60
@@ -0,0 +1,60 @@
1+name: crypt-sha512
2+version: 0
3+synopsis: Pure Haskell implelementation for GNU SHA512 crypt algorithm
4+description:
5+ crypt() is the password encryption function. It is based on the Data
6+ Encryption Standard algorithm with variations intended (among other things) to
7+ discourage use of hardware implementations of a key search.
8+ .
9+ This package provides a pure Haskell implementation of SHA512 crypt scheme.
10+category: Data
11+license: BSD3
12+license-file: LICENSE
13+author: Oleg Grenrus <oleg.grenrus@iki.fi>
14+maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
15+copyright: 2017 Oleg Grenrus
16+homepage: https://github.com/phadej/crypt-sha512
17+bug-reports: https://github.com/phadej/crypt-sha512
18+extra-source-files: README.md
19+build-type: Simple
20+cabal-version: >= 1.10
21+tested-with:
22+ GHC==7.6.3,
23+ GHC==7.8.4,
24+ GHC==7.10.3,
25+ GHC==8.0.2,
26+ GHC==8.2.1
27+
28+source-repository head
29+ type: git
30+ location: git://github.com/phadej/crypt-sha512.git
31+
32+library
33+ exposed-modules: System.POSIX.Crypt.SHA512
34+ build-depends: base >=4.5 && <4.11,
35+ bytestring,
36+ attoparsec >=0.13.1.0 && <0.14,
37+ cryptohash-sha512 >=0.11.100.1 && <0.12
38+ default-language: Haskell2010
39+ hs-source-dirs: src
40+ ghc-options: -Wall
41+
42+test-suite example
43+ if !os(linux)
44+ buildable: False
45+
46+ build-depends: base,
47+ crypt-sha512,
48+ bytestring,
49+ tasty,
50+ tasty-hunit,
51+ tasty-quickcheck,
52+ quickcheck-instances
53+ default-language: Haskell2010
54+ main-is: Example.hs
55+ other-modules: System.POSIX.Crypt
56+ type: exitcode-stdio-1.0
57+ hs-source-dirs: test
58+ other-extensions: OverloadedStrings CApiFFI
59+ extra-libraries: crypt
60+ ghc-options: -Wall
test/golden-test-cases/crypt-sha512.nix.goldennew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, attoparsec, base, bytestring, cryptohash-sha512
2+, quickcheck-instances, stdenv, tasty, tasty-hunit
3+, tasty-quickcheck
4+}:
5+mkDerivation {
6+ pname = "crypt-sha512";
7+ version = "0";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ attoparsec base bytestring cryptohash-sha512
11+ ];
12+ testHaskellDepends = [
13+ base bytestring quickcheck-instances tasty tasty-hunit
14+ tasty-quickcheck
15+ ];
16+ homepage = "https://github.com/phadej/crypt-sha512";
17+ description = "Pure Haskell implelementation for GNU SHA512 crypt algorithm";
18+ license = stdenv.lib.licenses.bsd3;
19+}
test/golden-test-cases/crypto-random-api.cabalnew file+23
@@ -0,0 +1,23 @@
1+Name: crypto-random-api
2+Version: 0.2.0
3+Description: Simple random generators API for cryptography related code
4+License: BSD3
5+License-file: LICENSE
6+Copyright: Vincent Hanquez <vincent@snarc.org>
7+Author: Vincent Hanquez <vincent@snarc.org>
8+Maintainer: Vincent Hanquez <vincent@snarc.org>
9+Synopsis: Simple random generators API for cryptography related code
10+Category: Cryptography
11+Build-Type: Simple
12+Homepage: http://github.com/vincenthz/hs-crypto-random-api
13+Cabal-Version: >=1.6
14+
15+Library
16+ Exposed-modules: Crypto.Random.API
17+ Build-depends: base >= 4 && < 5
18+ , bytestring
19+ , entropy
20+
21+source-repository head
22+ type: git
23+ location: git://github.com/vincenthz/hs-crypto-random-api
test/golden-test-cases/crypto-random-api.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, bytestring, entropy, stdenv }:
2+mkDerivation {
3+ pname = "crypto-random-api";
4+ version = "0.2.0";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base bytestring entropy ];
7+ homepage = "http://github.com/vincenthz/hs-crypto-random-api";
8+ description = "Simple random generators API for cryptography related code";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/csv.cabalnew file+23
@@ -0,0 +1,23 @@
1+Name: csv
2+Version: 0.1.2
3+Category: Text
4+Synopsis: CSV loader and dumper
5+cabal-version: >= 1.4
6+build-type: Simple
7+Description: CSV loader and dumper
8+ .
9+ This library parses and dumps documents that are formatted
10+ according to RFC 4180, \"The common Format and MIME Type for
11+ Comma-Separated Values (CSV) Files\". This format is used, among
12+ many other things, as a lingua franca for spreadsheets, and for
13+ certain web services.
14+Copyright: Jaap Weel, 2007
15+License: MIT
16+License-file: COPYING
17+Author: Jaap Weel <weel@ugcs.caltech.edu>
18+Maintainer: Jaap Weel <weel@ugcs.caltech.edu>
19+
20+Library
21+ Build-Depends: base, parsec, filepath
22+ build-depends: base >= 2 && < 5
23+ Exposed-modules: Text.CSV
test/golden-test-cases/csv.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, filepath, parsec, stdenv }:
2+mkDerivation {
3+ pname = "csv";
4+ version = "0.1.2";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base filepath parsec ];
7+ description = "CSV loader and dumper";
8+ license = stdenv.lib.licenses.mit;
9+}
test/golden-test-cases/data-accessor.cabalnew file+128
@@ -0,0 +1,128 @@
1+Name: data-accessor
2+Version: 0.2.2.7
3+License: BSD3
4+License-File: LICENSE
5+Author: Henning Thielemann <haskell@henning-thielemann.de>, Luke Palmer <lrpalmer@gmail.com>
6+Maintainer: Henning Thielemann <haskell@henning-thielemann.de>
7+Homepage: http://www.haskell.org/haskellwiki/Record_access
8+Category: Data
9+-- Default-Language: Haskell98
10+Cabal-Version: >=1.6
11+Build-Type: Simple
12+Tested-With: GHC==6.4.1, GHC==6.8.2, GHC==6.10.4, GHC==6.12.3
13+Tested-With: GHC==7.0.1, GHC==7.2.1, GHC==7.4.1, GHC==7.6.3
14+Tested-With: JHC==0.7.3
15+Synopsis: Utilities for accessing and manipulating fields of records
16+Description:
17+ In Haskell 98 the name of a record field
18+ is automatically also the name of a function which gets the value
19+ of the according field.
20+ E.g. if we have
21+ .
22+ data Pair a b = Pair {first :: a, second :: b}
23+ .
24+ then
25+ .
26+ > first :: Pair a b -> a
27+ > second :: Pair a b -> b
28+ .
29+ However for setting or modifying a field value
30+ we need to use some syntactic sugar, which is often clumsy.
31+ .
32+ modifyFirst :: (a -> a) -> (Pair a b -> Pair a b)
33+ modifyFirst f r\@(Pair {first=a}) = r{first = f a}
34+ .
35+ With this package you can define record field accessors
36+ which allow setting, getting and modifying values easily.
37+ The package clearly demonstrates the power of the functional approach:
38+ You can combine accessors of a record and sub-records,
39+ to make the access look like the fields of the sub-record belong to the main record.
40+ .
41+ Example:
42+ .
43+ > *Data.Accessor.Example> (first^:second^=10) (('b',7),"hallo")
44+ > (('b',10),"hallo")
45+ .
46+ You can easily manipulate record fields in a 'Control.Monad.State.State' monad,
47+ you can easily code 'Show' instances that use the Accessor syntax
48+ and you can parse binary streams into records.
49+ See @Data.Accessor.Example@ for demonstration of all features.
50+ .
51+ It would be great if in revised Haskell versions the names of record fields
52+ are automatically 'Data.Accessor.Accessor's
53+ rather than plain @get@ functions.
54+ For now, the package @data-accessor-template@ provides Template Haskell functions
55+ for automated generation of 'Data.Acesssor.Accessor's.
56+ See also the other @data-accessor@ packages
57+ that provide an Accessor interface to other data types.
58+ The package @enumset@ provides accessors to bit-packed records.
59+ .
60+ For similar packages see @lenses@ and @fclabel@.
61+ A related concept are editors
62+ <http://conal.net/blog/posts/semantic-editor-combinators/>.
63+ Editors only consist of a modify method
64+ (and @modify@ applied to a 'const' function is a @set@ function).
65+ This way, they can modify all function values of a function at once,
66+ whereas an accessor can only change a single function value,
67+ say, it can change @f 0 = 1@ to @f 0 = 2@.
68+ This way, editors can even change the type of a record or a function.
69+ An Arrow instance can be defined for editors,
70+ but for accessors only a Category instance is possible ('(.)' method).
71+ The reason is the @arr@ method of the @Arrow@ class,
72+ that conflicts with the two-way nature (set and get) of accessors.
73+
74+Extra-Source-Files:
75+ RegExp
76+ src-3/Data/Accessor/Private.hs
77+ src-4/Data/Accessor/Private.hs
78+
79+Source-Repository this
80+ Tag: 0.2.2.7
81+ Type: darcs
82+ Location: http://code.haskell.org/data-accessor/core/
83+
84+Source-Repository head
85+ Type: darcs
86+ Location: http://code.haskell.org/data-accessor/core/
87+
88+Flag category
89+ description: Check whether Arrow class is split into Arrow and Category.
90+
91+Flag splitBase
92+ description: Choose the smaller, split-up base package from version 2 on.
93+
94+Library
95+ Build-Depends:
96+ transformers >=0.2 && <0.6
97+ If flag(splitBase)
98+ Build-Depends:
99+ array >=0.1 && <0.6,
100+ containers >=0.1 && <0.6
101+ If flag(category)
102+ Hs-Source-Dirs: src-4
103+ Build-Depends: base >= 4 && <5
104+ Else
105+ Hs-Source-Dirs: src-3
106+ Build-Depends: base >= 2 && <4
107+ Else
108+ Hs-Source-Dirs: src-3
109+ Build-Depends:
110+ base >= 1 && <2
111+ If impl(jhc)
112+ Build-Depends:
113+ containers >=0.1 && <0.6
114+
115+ GHC-Options: -Wall
116+ Hs-Source-Dirs: src
117+ Exposed-Modules:
118+ Data.Accessor
119+ Data.Accessor.Basic
120+ Data.Accessor.Container
121+ Data.Accessor.Show
122+ Data.Accessor.Tuple
123+ Data.Accessor.BinaryRead
124+ Data.Accessor.MonadState
125+ Other-Modules:
126+ Data.Accessor.Example
127+ Data.Accessor.Private
128+ Data.Accessor.MonadStatePrivate
test/golden-test-cases/data-accessor.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, array, base, containers, stdenv, transformers }:
2+mkDerivation {
3+ pname = "data-accessor";
4+ version = "0.2.2.7";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ array base containers transformers ];
7+ homepage = "http://www.haskell.org/haskellwiki/Record_access";
8+ description = "Utilities for accessing and manipulating fields of records";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/data-default-instances-containers.cabalnew file+18
@@ -0,0 +1,18 @@
1+Name: data-default-instances-containers
2+Version: 0.0.1
3+Cabal-Version: >= 1.6
4+Category: Data
5+Synopsis: Default instances for types in containers
6+Build-Type: Simple
7+License: BSD3
8+License-File: LICENSE
9+Author: Lukas Mai
10+Maintainer: <l.mai@web.de>
11+
12+source-repository head
13+ type: git
14+ location: https://github.com/mauke/data-default
15+
16+Library
17+ Build-Depends: base >=2 && <5, data-default-class, containers
18+ Exposed-Modules: Data.Default.Instances.Containers
test/golden-test-cases/data-default-instances-containers.nix.goldennew file+9
@@ -0,0 +1,9 @@
1+{ mkDerivation, base, containers, data-default-class, stdenv }:
2+mkDerivation {
3+ pname = "data-default-instances-containers";
4+ version = "0.0.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base containers data-default-class ];
7+ description = "Default instances for types in containers";
8+ license = stdenv.lib.licenses.bsd3;
9+}
test/golden-test-cases/data-endian.cabalnew file+30
@@ -0,0 +1,30 @@
1+Name: data-endian
2+Version: 0.1.1
3+Category: Data
4+Stability: experimental
5+Synopsis: Endian-sensitive data
6+Description:
7+ This package provides helpers for converting endian-sensitive data.
8+
9+Homepage: https://github.com/mvv/data-endian
10+Bug-Reports: https://github.com/mvv/data-endian/issues
11+
12+Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
13+Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
14+Copyright: 2011-2016 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
15+License: BSD3
16+License-File: LICENSE
17+
18+Cabal-Version: >= 1.6.0
19+Build-Type: Simple
20+
21+Source-Repository head
22+ Type: git
23+ Location: https://github.com/mvv/data-endian.git
24+
25+Library
26+ Build-Depends: base >= 4 && < 5
27+ Hs-Source-Dirs: src
28+ GHC-Options: -Wall
29+ Exposed-Modules:
30+ Data.Endian
test/golden-test-cases/data-endian.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "data-endian";
4+ version = "0.1.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ homepage = "https://github.com/mvv/data-endian";
8+ description = "Endian-sensitive data";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/data-msgpack.cabalnew file+114
@@ -0,0 +1,114 @@
1+name: data-msgpack
2+version: 0.0.10
3+synopsis: A Haskell implementation of MessagePack
4+homepage: http://msgpack.org/
5+license: BSD3
6+license-file: LICENSE
7+author: Hideyuki Tanaka
8+maintainer: Iphigenia Df <iphydf@gmail.com>
9+copyright: Copyright (c) 2009-2016, Hideyuki Tanaka
10+category: Data
11+stability: Experimental
12+cabal-version: >= 1.10
13+build-type: Simple
14+description:
15+ A Haskell implementation of MessagePack <http://msgpack.org/>
16+ .
17+ This is a fork of msgpack-haskell <https://github.com/msgpack/msgpack-haskell>,
18+ since the original author is unreachable. This fork incorporates a number of
19+ bugfixes and is actively being developed.
20+
21+source-repository head
22+ type: git
23+ location: https://github.com/TokTok/hs-msgpack.git
24+
25+library
26+ default-language: Haskell2010
27+ hs-source-dirs:
28+ src
29+ ghc-options:
30+ -Wall
31+ -fno-warn-unused-imports
32+ exposed-modules:
33+ Data.MessagePack
34+ Data.MessagePack.Option
35+ Data.MessagePack.Result
36+ other-modules:
37+ Data.MessagePack.Assoc
38+ Data.MessagePack.Class
39+ Data.MessagePack.Generic
40+ Data.MessagePack.Get
41+ Data.MessagePack.Instances
42+ Data.MessagePack.Object
43+ Data.MessagePack.Put
44+ build-depends:
45+ base < 5
46+ , QuickCheck
47+ , binary >= 0.7.0.0
48+ , bytestring
49+ , containers
50+ , data-binary-ieee754
51+ , deepseq
52+ , hashable
53+ , text
54+ , unordered-containers
55+ , vector
56+ , void
57+
58+executable msgpack-parser
59+ default-language: Haskell2010
60+ hs-source-dirs:
61+ tools
62+ ghc-options:
63+ -Wall
64+ -fno-warn-unused-imports
65+ build-depends:
66+ base < 5
67+ , bytestring
68+ , groom
69+ , data-msgpack
70+ main-is: msgpack-parser.hs
71+
72+test-suite testsuite
73+ type: exitcode-stdio-1.0
74+ default-language: Haskell2010
75+ hs-source-dirs: test
76+ main-is: testsuite.hs
77+ other-modules:
78+ Data.MessagePack.OptionSpec
79+ Data.MessagePack.ResultSpec
80+ Data.MessagePackSpec
81+ ghc-options:
82+ -Wall
83+ -fno-warn-unused-imports
84+ build-depends:
85+ base < 5
86+ , QuickCheck
87+ , bytestring
88+ , containers
89+ , data-msgpack
90+ , hashable
91+ , hspec
92+ , text
93+ , unordered-containers
94+ , vector
95+ , void
96+
97+benchmark benchmark
98+ type: exitcode-stdio-1.0
99+ default-language: Haskell2010
100+ hs-source-dirs: bench
101+ main-is: benchmark.hs
102+ other-modules:
103+ Data.MessagePack.IntBench
104+ Data.MessagePackBench
105+ ghc-options:
106+ -Wall
107+ -fno-warn-unused-imports
108+ build-depends:
109+ base < 5
110+ , QuickCheck
111+ , bytestring
112+ , criterion
113+ , data-msgpack
114+ , deepseq
test/golden-test-cases/data-msgpack.nix.goldennew file+26
@@ -0,0 +1,26 @@
1+{ mkDerivation, base, binary, bytestring, containers, criterion
2+, data-binary-ieee754, deepseq, groom, hashable, hspec, QuickCheck
3+, stdenv, text, unordered-containers, vector, void
4+}:
5+mkDerivation {
6+ pname = "data-msgpack";
7+ version = "0.0.10";
8+ sha256 = "deadbeef";
9+ isLibrary = true;
10+ isExecutable = true;
11+ libraryHaskellDepends = [
12+ base binary bytestring containers data-binary-ieee754 deepseq
13+ hashable QuickCheck text unordered-containers vector void
14+ ];
15+ executableHaskellDepends = [ base bytestring groom ];
16+ testHaskellDepends = [
17+ base bytestring containers hashable hspec QuickCheck text
18+ unordered-containers vector void
19+ ];
20+ benchmarkHaskellDepends = [
21+ base bytestring criterion deepseq QuickCheck
22+ ];
23+ homepage = "http://msgpack.org/";
24+ description = "A Haskell implementation of MessagePack";
25+ license = stdenv.lib.licenses.bsd3;
26+}
test/golden-test-cases/data-serializer.cabalnew file+60
@@ -0,0 +1,60 @@
1+Name: data-serializer
2+Version: 0.3.2
3+Category: Data
4+Stability: experimental
5+Synopsis: Common API for serialization libraries
6+Description:
7+ This package provides a common API for serialization libraries like
8+ <http://hackage.haskell.org/package/binary binary> and
9+ <http://hackage.haskell.org/package/cereal cereal>.
10+
11+Homepage: https://github.com/mvv/data-serializer
12+Bug-Reports: https://github.com/mvv/data-serializer/issues
13+
14+Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
15+Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
16+Copyright: 2016 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
17+License: BSD3
18+License-File: LICENSE
19+
20+Extra-Source-Files:
21+ README.md
22+
23+Tested-With: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
24+
25+Cabal-Version: >= 1.10.0
26+Build-Type: Simple
27+
28+Source-Repository head
29+ Type: git
30+ Location: https://github.com/mvv/data-serializer.git
31+
32+Library
33+ Default-Language: Haskell2010
34+ Build-Depends: base >= 4.8 && < 5
35+ , semigroups >= 0.18.2
36+ , bytestring >= 0.10.4
37+ , binary >= 0.7.2
38+ , cereal >= 0.4.1
39+ , data-endian >= 0.1.1
40+ , parsers >= 0.12.3
41+ , split >= 0.2
42+ Hs-Source-Dirs: src
43+ GHC-Options: -Wall
44+ Exposed-Modules:
45+ Data.Serializer
46+ Data.Deserializer
47+
48+Test-Suite tests
49+ Default-Language: Haskell2010
50+ Type: exitcode-stdio-1.0
51+ Build-Depends: base
52+ , bytestring
53+ , binary
54+ , cereal
55+ , tasty >= 0.8
56+ , tasty-quickcheck >= 0.8
57+ , data-serializer
58+ Hs-Source-Dirs: tests
59+ GHC-Options: -Wall
60+ Main-Is: Tests.hs
test/golden-test-cases/data-serializer.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, base, binary, bytestring, cereal, data-endian
2+, parsers, semigroups, split, stdenv, tasty, tasty-quickcheck
3+}:
4+mkDerivation {
5+ pname = "data-serializer";
6+ version = "0.3.2";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base binary bytestring cereal data-endian parsers semigroups split
10+ ];
11+ testHaskellDepends = [
12+ base binary bytestring cereal tasty tasty-quickcheck
13+ ];
14+ homepage = "https://github.com/mvv/data-serializer";
15+ description = "Common API for serialization libraries";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/deque.cabalnew file+45
@@ -0,0 +1,45 @@
1+name:
2+ deque
3+version:
4+ 0.2
5+synopsis:
6+ Double-ended queue
7+description:
8+ An implementation of Double-Ended Queue (aka Dequeue or Deque)
9+ based on the head-tail linked list.
10+homepage:
11+ https://github.com/nikita-volkov/deque
12+bug-reports:
13+ https://github.com/nikita-volkov/deque/issues
14+author:
15+ Nikita Volkov <nikita.y.volkov@mail.ru>
16+maintainer:
17+ Nikita Volkov <nikita.y.volkov@mail.ru>
18+copyright:
19+ (c) 2016, Nikita Volkov
20+license:
21+ MIT
22+license-file:
23+ LICENSE
24+build-type:
25+ Simple
26+cabal-version:
27+ >=1.10
28+
29+source-repository head
30+ type:
31+ git
32+ location:
33+ git://github.com/nikita-volkov/deque.git
34+
35+library
36+ hs-source-dirs:
37+ library
38+ default-extensions:
39+ DeriveFunctor, StandaloneDeriving
40+ default-language:
41+ Haskell2010
42+ exposed-modules:
43+ Deque
44+ build-depends:
45+ base >= 4.6 && < 5
test/golden-test-cases/deque.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "deque";
4+ version = "0.2";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ homepage = "https://github.com/nikita-volkov/deque";
8+ description = "Double-ended queue";
9+ license = stdenv.lib.licenses.mit;
10+}
test/golden-test-cases/dhall-bash.cabalnew file+54
@@ -0,0 +1,54 @@
1+Name: dhall-bash
2+Version: 1.0.6
3+Cabal-Version: >=1.8.0.2
4+Build-Type: Simple
5+Tested-With: GHC == 7.10.2, GHC == 8.0.1
6+License: BSD3
7+License-File: LICENSE
8+Copyright: 2017 Gabriel Gonzalez
9+Author: Gabriel Gonzalez
10+Maintainer: Gabriel439@gmail.com
11+Bug-Reports: https://github.com/Gabriel439/Haskell-Dhall-Bash-Library/issues
12+Synopsis: Compile Dhall to Bash
13+Description:
14+ Use this package if you want to compile Dhall expressions to Bash.
15+ You can use this package as a library or an executable:
16+ .
17+ * See the "Dhall.Bash" module if you want to use this package as a library
18+ .
19+ * Use the @dhall-to-bash@ if you want an executable
20+ .
21+ The "Dhall.Bash" module also contains instructions for how to use this
22+ package
23+Category: Compiler
24+Source-Repository head
25+ Type: git
26+ Location: https://github.com/Gabriel439/Haskell-Dhall-Bash-Library
27+
28+Library
29+ Hs-Source-Dirs: src
30+ Build-Depends:
31+ base >= 4.8.0.0 && < 5 ,
32+ bytestring < 0.11,
33+ containers < 0.6 ,
34+ dhall >= 1.0.1 && < 1.9 ,
35+ neat-interpolation < 0.4 ,
36+ shell-escape < 0.3 ,
37+ text-format < 0.4 ,
38+ text >= 0.2 && < 1.3 ,
39+ vector >= 0.3 && < 0.13
40+ Exposed-Modules: Dhall.Bash
41+ GHC-Options: -Wall
42+
43+Executable dhall-to-bash
44+ Hs-Source-Dirs: exec
45+ Main-Is: Main.hs
46+ Build-Depends:
47+ base ,
48+ bytestring ,
49+ dhall ,
50+ dhall-bash ,
51+ optparse-generic >= 1.1.1 && < 1.3 ,
52+ trifecta >= 1.6 && < 1.8 ,
53+ text
54+ GHC-Options: -Wall
test/golden-test-cases/dhall-bash.nix.goldennew file+20
@@ -0,0 +1,20 @@
1+{ mkDerivation, base, bytestring, containers, dhall
2+, neat-interpolation, optparse-generic, shell-escape, stdenv, text
3+, text-format, trifecta, vector
4+}:
5+mkDerivation {
6+ pname = "dhall-bash";
7+ version = "1.0.6";
8+ sha256 = "deadbeef";
9+ isLibrary = true;
10+ isExecutable = true;
11+ libraryHaskellDepends = [
12+ base bytestring containers dhall neat-interpolation shell-escape
13+ text text-format vector
14+ ];
15+ executableHaskellDepends = [
16+ base bytestring dhall optparse-generic text trifecta
17+ ];
18+ description = "Compile Dhall to Bash";
19+ license = stdenv.lib.licenses.bsd3;
20+}
test/golden-test-cases/diagrams-solve.cabalnew file+42
@@ -0,0 +1,42 @@
1+name: diagrams-solve
2+version: 0.1.1
3+synopsis: Pure Haskell solver routines used by diagrams
4+description: Pure Haskell solver routines used by the diagrams
5+ project. Currently includes finding real roots
6+ of low-degree (n < 5) polynomials, and solving
7+ tridiagonal and cyclic tridiagonal linear
8+ systems.
9+homepage: http://projects.haskell.org/diagrams
10+license: BSD3
11+license-file: LICENSE
12+author: various
13+maintainer: diagrams-discuss@googlegroups.com
14+category: Math
15+build-type: Simple
16+extra-source-files: README.markdown, CHANGES.markdown
17+cabal-version: >=1.10
18+Tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1
19+Source-repository head
20+ type: git
21+ location: http://github.com/diagrams/diagrams-solve.git
22+
23+library
24+ exposed-modules: Diagrams.Solve.Polynomial,
25+ Diagrams.Solve.Tridiagonal
26+ build-depends: base >=4.5 && < 4.11
27+ hs-source-dirs: src
28+ default-language: Haskell2010
29+
30+test-suite tests
31+ type: exitcode-stdio-1.0
32+ main-is: Test.hs
33+ -- other-modules: Instances
34+ hs-source-dirs: tests
35+ default-language: Haskell2010
36+ build-depends: base >= 4.2 && < 4.11,
37+ tasty >= 0.10 && < 0.12,
38+ tasty-hunit >= 0.9.2 && < 0.10,
39+ tasty-quickcheck >= 0.8 && < 0.9,
40+ deepseq >= 1.3 && < 1.5,
41+ diagrams-solve
42+
test/golden-test-cases/diagrams-solve.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, base, deepseq, stdenv, tasty, tasty-hunit
2+, tasty-quickcheck
3+}:
4+mkDerivation {
5+ pname = "diagrams-solve";
6+ version = "0.1.1";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ base ];
9+ testHaskellDepends = [
10+ base deepseq tasty tasty-hunit tasty-quickcheck
11+ ];
12+ homepage = "http://projects.haskell.org/diagrams";
13+ description = "Pure Haskell solver routines used by diagrams";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/discrimination.cabalnew file+76
@@ -0,0 +1,76 @@
1+name: discrimination
2+category: Data, Sorting
3+version: 0.3
4+license: BSD3
5+cabal-version: >= 1.10
6+license-file: LICENSE
7+author: Edward A. Kmett
8+maintainer: Edward A. Kmett <ekmett@gmail.com>
9+stability: experimental
10+homepage: http://github.com/ekmett/discrimination/
11+bug-reports: http://github.com/ekmett/discrimination/issues
12+copyright: Copyright (C) 2014-2015 Edward A. Kmett
13+build-type: Simple
14+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
15+synopsis: Fast generic linear-time sorting, joins and container construction.
16+description:
17+ This package provides fast, generic, linear-time discrimination and sorting.
18+ .
19+ The techniques applied are based on <http://www.diku.dk/hjemmesider/ansatte/henglein/papers/henglein2011a.pdf multiple> <http://www.diku.dk/hjemmesider/ansatte/henglein/papers/henglein2011c.pdf papers> and <https://www.youtube.com/watch?v=sz9ZlZIRDAg talks> by <http://www.diku.dk/hjemmesider/ansatte/henglein/ Fritz Henglein>.
20+
21+extra-source-files:
22+ .gitignore
23+ README.markdown
24+ CHANGELOG.markdown
25+ HLint.hs
26+
27+source-repository head
28+ type: git
29+ location: git://github.com/ekmett/discrimination.git
30+
31+library
32+ default-language: Haskell2010
33+ ghc-options: -Wall -O2
34+ hs-source-dirs: src
35+
36+ exposed-modules:
37+ Data.Discrimination
38+ Data.Discrimination.Class
39+ Data.Discrimination.Grouping
40+ Data.Discrimination.Internal
41+ Data.Discrimination.Internal.SmallArray
42+ Data.Discrimination.Internal.WordMap
43+ Data.Discrimination.Sorting
44+
45+ build-depends:
46+ array >= 0.5 && < 0.6,
47+ base >= 4.8 && < 5,
48+ containers >= 0.4 && < 0.6,
49+ contravariant >= 1.3.1 && < 2,
50+ deepseq >= 1.3 && < 1.5,
51+ ghc-prim,
52+ hashable >= 1.2 && < 1.3,
53+ primitive >= 0.6 && < 0.7,
54+ profunctors >= 5 && < 6,
55+ promises >= 0.2 && < 0.4,
56+ semigroups >= 0.16.2 && < 1,
57+ transformers >= 0.2 && < 0.6,
58+ transformers-compat >= 0.3 && < 1,
59+ vector >= 0.10 && < 0.13,
60+ void >= 0.5 && < 1
61+
62+benchmark wordmap
63+ type: exitcode-stdio-1.0
64+ main-is: wordmap.hs
65+ ghc-options: -Wall -O2 -threaded
66+ hs-source-dirs: benchmarks
67+ default-language: Haskell2010
68+ build-depends:
69+ base >= 4.9,
70+ containers,
71+ criterion,
72+ deepseq,
73+ discrimination,
74+ ghc-prim,
75+ unordered-containers,
76+ primitive
test/golden-test-cases/discrimination.nix.goldennew file+22
@@ -0,0 +1,22 @@
1+{ mkDerivation, array, base, containers, contravariant, criterion
2+, deepseq, ghc-prim, hashable, primitive, profunctors, promises
3+, semigroups, stdenv, transformers, transformers-compat
4+, unordered-containers, vector, void
5+}:
6+mkDerivation {
7+ pname = "discrimination";
8+ version = "0.3";
9+ sha256 = "deadbeef";
10+ libraryHaskellDepends = [
11+ array base containers contravariant deepseq ghc-prim hashable
12+ primitive profunctors promises semigroups transformers
13+ transformers-compat vector void
14+ ];
15+ benchmarkHaskellDepends = [
16+ base containers criterion deepseq ghc-prim primitive
17+ unordered-containers
18+ ];
19+ homepage = "http://github.com/ekmett/discrimination/";
20+ description = "Fast generic linear-time sorting, joins and container construction";
21+ license = stdenv.lib.licenses.bsd3;
22+}
test/golden-test-cases/dotenv.cabalnew file+153
@@ -0,0 +1,153 @@
1+name: dotenv
2+version: 0.5.2.1
3+synopsis: Loads environment variables from dotenv files
4+homepage: https://github.com/stackbuilders/dotenv-hs
5+description:
6+ .
7+ In most applications,
8+ <http://12factor.net/config configuration should be separated from code>.
9+ While it usually works well to keep configuration in the
10+ environment, there are cases where you may want to store
11+ configuration in a file outside of version control.
12+ .
13+ "Dotenv" files have become popular for storing configuration,
14+ especially in development and test environments. In
15+ <https://github.com/bkeepers/dotenv Ruby>,
16+ <https://github.com/theskumar/python-dotenv Python> and
17+ <https://www.npmjs.com/package/dotenv Javascript> there are libraries
18+ to facilitate loading of configuration options from configuration
19+ files. This library loads configuration to environment variables for
20+ programs written in Haskell.
21+ .
22+ To use, call `loadFile` from your application:
23+ .
24+ > import Configuration.Dotenv
25+ > loadFile False "/my/dotenvfile"
26+ .
27+ This package also includes an executable that can be used
28+ to inspect the results of applying one or more Dotenv files
29+ to the environment, or for invoking your executables with
30+ an environment after one or more Dotenv files is applied.
31+ .
32+ See the <https://github.com/stackbuilders/dotenv-hs Github>
33+ page for more information on this package.
34+license: MIT
35+license-file: LICENSE
36+author: Justin Leitgeb
37+maintainer: hackage@stackbuilders.com
38+copyright: 2015-2017 Stack Builders Inc.
39+category: Configuration
40+build-type: Simple
41+extra-source-files: spec/fixtures/.dotenv
42+ , CHANGELOG.md
43+ , README.md
44+cabal-version: >=1.10
45+bug-reports: https://github.com/stackbuilders/dotenv-hs/issues
46+
47+data-dir: spec/fixtures/
48+data-files:
49+ .dotenv
50+ .dotenv.example
51+ .scheme.yml
52+
53+flag dev
54+ description: Turn on development settings.
55+ manual: True
56+ default: False
57+
58+executable dotenv
59+ main-is: Main.hs
60+ build-depends: base >=4.7 && <5.0
61+ , base-compat >= 0.4
62+ , dotenv
63+ , optparse-applicative >=0.11 && < 0.15
64+ , megaparsec >= 6.0 && < 7.0
65+ , process >= 1.4.3.0
66+ , text
67+ , transformers >=0.4 && < 0.6
68+ , yaml
69+ other-modules: Paths_dotenv
70+
71+ hs-source-dirs: app
72+ if flag(dev)
73+ ghc-options: -Wall -Werror
74+ else
75+ ghc-options: -O2 -Wall
76+ default-language: Haskell2010
77+
78+library
79+ exposed-modules: Configuration.Dotenv
80+ , Configuration.Dotenv.Parse
81+ , Configuration.Dotenv.ParsedVariable
82+ , Configuration.Dotenv.Text
83+ , Configuration.Dotenv.Types
84+ , Configuration.Dotenv.Scheme
85+ , Configuration.Dotenv.Scheme.Helpers
86+ , Configuration.Dotenv.Scheme.Parser
87+ , Configuration.Dotenv.Scheme.Types
88+
89+ build-depends: base >=4.7 && <5.0
90+ , base-compat >= 0.4
91+ , directory
92+ , megaparsec >= 6.0 && < 7.0
93+ , process >= 1.4.3.0
94+ , text
95+ , transformers >=0.4 && < 0.6
96+ , exceptions >= 0.8 && < 0.9
97+ , yaml
98+
99+ if !impl(ghc >= 7.10)
100+ build-depends: void == 0.7.*
101+
102+ hs-source-dirs: src
103+ ghc-options: -Wall
104+ if flag(dev)
105+ ghc-options: -Wall -Werror
106+ else
107+ ghc-options: -O2 -Wall
108+ default-language: Haskell2010
109+
110+test-suite dotenv-test
111+ type: exitcode-stdio-1.0
112+ hs-source-dirs: spec, src
113+ main-is: Spec.hs
114+ other-modules: Configuration.DotenvSpec
115+ , Configuration.Dotenv.TextSpec
116+ , Configuration.Dotenv.ParseSpec
117+ , Configuration.Dotenv
118+ , Configuration.Dotenv.Text
119+ , Configuration.Dotenv.Types
120+ , Configuration.Dotenv.Parse
121+ , Configuration.Dotenv.ParsedVariable
122+ , Configuration.Dotenv.SchemeSpec
123+ , Configuration.Dotenv.Scheme.ParseSpec
124+ , Configuration.Dotenv.Scheme
125+ , Configuration.Dotenv.Scheme.Helpers
126+ , Configuration.Dotenv.Scheme.Parser
127+ , Configuration.Dotenv.Scheme.Types
128+
129+ build-depends: base >=4.7 && <5.0
130+ , base-compat >= 0.4
131+ , dotenv
132+ , directory
133+ , megaparsec >= 6.0 && < 7.0
134+ , hspec
135+ , process >= 1.4.3.0
136+ , text
137+ , transformers >=0.4 && < 0.6
138+ , exceptions >= 0.8 && < 0.9
139+ , hspec-megaparsec >= 1.0 && < 2.0
140+ , yaml
141+
142+ if !impl(ghc >= 7.10)
143+ build-depends: void == 0.7.*
144+
145+ if flag(dev)
146+ ghc-options: -Wall -Werror
147+ else
148+ ghc-options: -O2 -Wall
149+ default-language: Haskell2010
150+
151+source-repository head
152+ type: git
153+ location: git@github.com:stackbuilders/dotenv-hs.git
test/golden-test-cases/dotenv.nix.goldennew file+27
@@ -0,0 +1,27 @@
1+{ mkDerivation, base, base-compat, directory, exceptions, hspec
2+, hspec-megaparsec, megaparsec, optparse-applicative, process
3+, stdenv, text, transformers, yaml
4+}:
5+mkDerivation {
6+ pname = "dotenv";
7+ version = "0.5.2.1";
8+ sha256 = "deadbeef";
9+ isLibrary = true;
10+ isExecutable = true;
11+ enableSeparateDataOutput = true;
12+ libraryHaskellDepends = [
13+ base base-compat directory exceptions megaparsec process text
14+ transformers yaml
15+ ];
16+ executableHaskellDepends = [
17+ base base-compat megaparsec optparse-applicative process text
18+ transformers yaml
19+ ];
20+ testHaskellDepends = [
21+ base base-compat directory exceptions hspec hspec-megaparsec
22+ megaparsec process text transformers yaml
23+ ];
24+ homepage = "https://github.com/stackbuilders/dotenv-hs";
25+ description = "Loads environment variables from dotenv files";
26+ license = stdenv.lib.licenses.mit;
27+}
test/golden-test-cases/dotnet-timespan.cabalnew file+79
@@ -0,0 +1,79 @@
1+-- Initial eventstore.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+-- The name of the package.
5+name: dotnet-timespan
6+
7+-- The package version. See the Haskell package versioning policy (PVP)
8+-- for standards guiding when and how versions should be incremented.
9+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
10+-- PVP summary: +-+------- breaking API changes
11+-- | | +----- non-breaking API additions
12+-- | | | +--- code changes with no API change
13+version: 0.0.1.0
14+
15+tested-with: GHC >= 7.8.3 && < 7.11
16+
17+-- A short (one-line) description of the package.
18+synopsis: .NET TimeSpan
19+
20+-- A longer description of the package.
21+description: .NET TimeSpan
22+
23+-- The license under which the package is released.
24+license: BSD3
25+
26+-- The file containing the license text.
27+license-file: LICENSE
28+
29+-- The package author(s).
30+author: Yorick Laupa
31+
32+-- An email address to which users can send suggestions, bug reports, and
33+-- patches.
34+maintainer: yo.eight@gmail.com
35+
36+-- A copyright notice.
37+-- copyright:
38+
39+homepage: http://github.com/YoEight/dotnet-timespan
40+bug-reports: http://github.com/YoEight/dotnet-timespan/issues
41+category: Data
42+
43+build-type: Simple
44+
45+-- Extra files to be distributed with the package, such as examples or a
46+-- README.
47+extra-source-files: README.md
48+ CHANGELOG.markdown
49+ .gitignore
50+ .travis.yml
51+
52+-- Constraint on the version of Cabal needed to build this package.
53+cabal-version: >=1.10
54+
55+source-repository head
56+ type: git
57+ location: git://github.com/YoEight/dotnet-timespan.git
58+
59+library
60+ -- Modules exported by the library.
61+ exposed-modules: Data.DotNet.TimeSpan
62+ Data.DotNet.TimeSpan.Internal
63+ -- Modules included in this library but not exported.
64+ -- other-modules:
65+
66+ -- LANGUAGE extensions used by modules in this package.
67+ -- other-extensions:
68+
69+ -- Other library packages from which modules are imported.
70+ build-depends: base >=4.7 && <5
71+
72+
73+ -- Directories containing source files.
74+ -- hs-source-dirs:
75+
76+ -- Base language which the package is written in.
77+ ghc-options: -Wall
78+
79+ default-language: Haskell2010
test/golden-test-cases/dotnet-timespan.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, stdenv }:
2+mkDerivation {
3+ pname = "dotnet-timespan";
4+ version = "0.0.1.0";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base ];
7+ homepage = "http://github.com/YoEight/dotnet-timespan";
8+ description = ".NET TimeSpan";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/dpor.cabalnew file+74
@@ -0,0 +1,74 @@
1+-- Initial dpor.cabal generated by cabal init. For further documentation,
2+-- see http://haskell.org/cabal/users-guide/
3+
4+name: dpor
5+version: 0.2.0.0
6+synopsis: A generic implementation of dynamic partial-order reduction (DPOR) for testing arbitrary models of concurrency.
7+
8+description:
9+ We can characterise the state of a concurrent computation by
10+ considering the ordering of dependent events. This is a partial
11+ order: independent events can be performed in any order without
12+ affecting the result. DPOR is a technique for computing these
13+ partial orders at run-time, and only testing one total order for
14+ each partial order. This cuts down the amount of work to be done
15+ significantly. In particular, this package implemented bounded
16+ partial-order reduction, which is a further optimisation. Only
17+ schedules within some *bound* are considered.
18+ .
19+ * DPOR with no schedule bounding is __complete__, it /will/ find all
20+ distinct executions!
21+ .
22+ * DPOR with schedule bounding is __incomplete__, it will only find
23+ all distinct executions /within the bound/!
24+ .
25+ __Caution:__ The fundamental assumption behind DPOR is that the
26+ *only* source of nondeterminism in your program is the
27+ scheduler. Or, to put it another way, if you execute the same
28+ program with the same schedule twice, you get the same result. If
29+ you are using this library in combination with something which
30+ performs I/O, be *very* certain that this is the case!
31+ .
32+ See the <https://github.com/barrucadu/dejafu README> for more
33+ details.
34+ .
35+ For details on the algorithm, albeit presented in a very imperative
36+ way, see /Bounded partial-order reduction/, K. Coons, M. Musuvathi,
37+ and K. McKinley (2013), available at
38+ <http://research.microsoft.com/pubs/202164/bpor-oopsla-2013.pdf>
39+
40+homepage: https://github.com/barrucadu/dejafu
41+license: MIT
42+license-file: LICENSE
43+author: Michael Walker
44+maintainer: mike@barrucadu.co.uk
45+-- copyright:
46+category: Testing
47+build-type: Simple
48+-- extra-source-files:
49+cabal-version: >=1.10
50+
51+source-repository head
52+ type: git
53+ location: https://github.com/barrucadu/dejafu.git
54+
55+source-repository this
56+ type: git
57+ location: https://github.com/barrucadu/dejafu.git
58+ tag: dpor-0.2.0.0
59+
60+library
61+ exposed-modules: Test.DPOR
62+ , Test.DPOR.Internal
63+ , Test.DPOR.Random
64+ , Test.DPOR.Schedule
65+ -- other-modules:
66+ -- other-extensions:
67+ build-depends: base >=4.8 && <5
68+ , containers >=0.5 && <0.6
69+ , deepseq >=1.3 && <1.5
70+ , random >=1.0 && <1.2
71+ , semigroups >=0.16 && <0.19
72+ -- hs-source-dirs:
73+ default-language: Haskell2010
74+ ghc-options: -Wall
test/golden-test-cases/dpor.nix.goldennew file+14
@@ -0,0 +1,14 @@
1+{ mkDerivation, base, containers, deepseq, random, semigroups
2+, stdenv
3+}:
4+mkDerivation {
5+ pname = "dpor";
6+ version = "0.2.0.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base containers deepseq random semigroups
10+ ];
11+ homepage = "https://github.com/barrucadu/dejafu";
12+ description = "A generic implementation of dynamic partial-order reduction (DPOR) for testing arbitrary models of concurrency";
13+ license = stdenv.lib.licenses.mit;
14+}
test/golden-test-cases/drawille.cabalnew file+102
@@ -0,0 +1,102 @@
1+-- This file has been generated from package.yaml by hpack version 0.14.0.
2+--
3+-- see: https://github.com/sol/hpack
4+
5+name: drawille
6+version: 0.1.2.0
7+synopsis: A port of asciimoo's drawille to haskell
8+description: A tiny library for drawing with braille.
9+category: System
10+homepage: https://github.com/yamadapc/haskell-drawille#readme
11+bug-reports: https://github.com/yamadapc/haskell-drawille/issues
12+author: Pedro Yamada <tacla.yamada@gmail.com>
13+maintainer: Pedro Yamada <tacla.yamada@gmail.com>
14+copyright: (c) Pedro Yamada
15+license: GPL-3
16+license-file: LICENSE
17+build-type: Simple
18+cabal-version: >= 1.10
19+
20+source-repository head
21+ type: git
22+ location: https://github.com/yamadapc/haskell-drawille
23+
24+flag examples
25+ description: Build examples
26+ manual: False
27+ default: False
28+
29+flag no-tests
30+ description: Don't build test suites
31+ manual: False
32+ default: False
33+
34+library
35+ hs-source-dirs:
36+ src
37+ build-depends:
38+ base >=4 && <5
39+ , containers >=0.5 && <0.6
40+ exposed-modules:
41+ System.Drawille
42+ other-modules:
43+ Paths_drawille
44+ default-language: Haskell2010
45+
46+executable image2term
47+ main-is: Image2Term.hs
48+ hs-source-dirs:
49+ examples
50+ , src
51+ ghc-options: -Wall -threaded -O3
52+ if flag(examples)
53+ build-depends:
54+ base >=4 && <5
55+ , containers >=0.5
56+ , friday >=0.1 && <0.2
57+ , terminal-size >=0.2
58+ , vector
59+ else
60+ buildable: False
61+ other-modules:
62+ Senoid
63+ System.Drawille
64+ default-language: Haskell2010
65+
66+executable senoid
67+ main-is: Senoid.hs
68+ hs-source-dirs:
69+ examples
70+ , src
71+ ghc-options: -threaded -Wall -O3
72+ if flag(examples)
73+ build-depends:
74+ base >=4 && <5
75+ , containers >=0.5 && <0.6
76+ , AC-Angle >=1.0 && <1.1
77+ else
78+ buildable: False
79+ other-modules:
80+ Image2Term
81+ System.Drawille
82+ default-language: Haskell2010
83+
84+test-suite spec
85+ type: exitcode-stdio-1.0
86+ main-is: Spec.hs
87+ hs-source-dirs:
88+ src
89+ , test
90+ ghc-options: -Wall
91+ if !(flag(no-tests))
92+ build-depends:
93+ base >=4 && <5
94+ , hspec >=1.11 && <2.4
95+ , QuickCheck >=2.6
96+ , containers >=0.5 && <0.6
97+ else
98+ buildable: False
99+ other-modules:
100+ System.Drawille
101+ DrawilleSpec
102+ default-language: Haskell2010
test/golden-test-cases/drawille.nix.goldennew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, base, containers, hspec, QuickCheck, stdenv }:
2+mkDerivation {
3+ pname = "drawille";
4+ version = "0.1.2.0";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ libraryHaskellDepends = [ base containers ];
9+ testHaskellDepends = [ base containers hspec QuickCheck ];
10+ homepage = "https://github.com/yamadapc/haskell-drawille#readme";
11+ description = "A port of asciimoo's drawille to haskell";
12+ license = stdenv.lib.licenses.gpl3;
13+}
test/golden-test-cases/drifter-postgresql.cabalnew file+63
@@ -0,0 +1,63 @@
1+name: drifter-postgresql
2+version: 0.2.1
3+synopsis: PostgreSQL support for the drifter schema migration tool
4+description: Support for postgresql-simple Query migrations as well as
5+ arbitrary Haskell IO functions. Be sure to check the
6+ examples dir for a usage example.
7+license: MIT
8+license-file: LICENSE
9+author: Michael Xavier
10+maintainer: michael@michaelxavier.net
11+category: Database
12+build-type: Simple
13+cabal-version: >=1.10
14+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2
15+extra-source-files:
16+ README.md
17+ changelog.md
18+ examples/Example.hs
19+homepage: http://github.com/michaelxavier/drifter-postgresql
20+bug-reports: http://github.com/michaelxavier/drifter-postgresql/issues
21+
22+flag lib-Werror
23+ default: False
24+ manual: True
25+
26+library
27+ exposed-modules: Drifter.PostgreSQL
28+ build-depends: base >=4.8 && <5
29+ , postgresql-simple >= 0.2
30+ , containers
31+ , drifter >= 0.2
32+ , time
33+ , mtl
34+ , transformers
35+ , transformers-compat >=0.2
36+ hs-source-dirs: src
37+ default-language: Haskell2010
38+
39+ if flag(lib-Werror)
40+ ghc-options: -Werror
41+
42+ ghc-options: -Wall
43+
44+
45+test-suite test
46+ type: exitcode-stdio-1.0
47+ main-is: Main.hs
48+ hs-source-dirs: test
49+ default-language: Haskell2010
50+
51+ build-depends: base
52+ , drifter
53+ , postgresql-simple
54+ , drifter-postgresql
55+ , tasty
56+ , tasty-hunit
57+ , either
58+ , text
59+
60+ if flag(lib-Werror)
61+ ghc-options: -Werror
62+
63+ ghc-options: -Wall
test/golden-test-cases/drifter-postgresql.nix.goldennew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, base, containers, drifter, either, mtl
2+, postgresql-simple, stdenv, tasty, tasty-hunit, text, time
3+, transformers, transformers-compat
4+}:
5+mkDerivation {
6+ pname = "drifter-postgresql";
7+ version = "0.2.1";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ base containers drifter mtl postgresql-simple time transformers
11+ transformers-compat
12+ ];
13+ testHaskellDepends = [
14+ base drifter either postgresql-simple tasty tasty-hunit text
15+ ];
16+ homepage = "http://github.com/michaelxavier/drifter-postgresql";
17+ description = "PostgreSQL support for the drifter schema migration tool";
18+ license = stdenv.lib.licenses.mit;
19+}
test/golden-test-cases/ede.cabalnew file+110
@@ -0,0 +1,110 @@
1+name: ede
2+version: 0.2.8.7
3+synopsis: Templating language with similar syntax and features to Liquid or Jinja2.
4+homepage: http://github.com/brendanhay/ede
5+license: OtherLicense
6+license-file: LICENSE
7+author: Brendan Hay
8+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
9+copyright: Copyright (c) 2013-2015 Brendan Hay
10+stability: Experimental
11+category: Text, Template, Web
12+build-type: Simple
13+cabal-version: >= 1.10
14+
15+description:
16+ ED-E is a templating language written in Haskell with a specific set of features:
17+ .
18+ * Logicless within reason. A small set of consistent predicates
19+ and expressions for formatting and presentational logic are provided.
20+ .
21+ * Secure. No arbitrary code evaluation, with input data required to be fully specified
22+ at render time.
23+ .
24+ * Stateless. Parsing and rendering are separate steps so that loading, parsing,
25+ include resolution, and embedding of the compiled template can optionally be
26+ done ahead of time, amortising cost.
27+ .
28+ * Markup agnostic. ED-E is used to write out everything from configuration files for
29+ system services, to HTML and formatted emails.
30+ .
31+ * Control over purity. Users can choose pure or IO-based resolution of
32+ @include@ expressions.
33+ .
34+ * No surprises. All parsing, type assurances, and rendering steps report helpful
35+ error messages with line/column metadata. Variable shadowing, unprintable expressions,
36+ implicit type coercion, and unbound variable access are all treated as errors.
37+
38+extra-source-files:
39+ README.md
40+
41+data-files:
42+ test/resources/*.ede
43+ , test/resources/*.golden
44+
45+source-repository head
46+
47+ type: git
48+ location: git://github.com/brendanhay/ede.git
49+
50+library
51+ default-language: Haskell2010
52+ hs-source-dirs: src
53+
54+ exposed-modules:
55+ Text.EDE
56+ , Text.EDE.Filters
57+
58+ other-modules:
59+ Paths_ede
60+ , Text.EDE.Internal.AST
61+ , Text.EDE.Internal.Eval
62+ , Text.EDE.Internal.Filters
63+ , Text.EDE.Internal.Parser
64+ , Text.EDE.Internal.Quoting
65+ , Text.EDE.Internal.Syntax
66+ , Text.EDE.Internal.Types
67+
68+ ghc-options: -Wall
69+
70+ build-depends:
71+ aeson >= 0.7
72+ , ansi-wl-pprint >= 0.6.6
73+ , base >= 4.6 && < 5
74+ , bifunctors >= 4
75+ , bytestring >= 0.9
76+ , comonad >= 4.2
77+ , directory >= 1.2
78+ , double-conversion >= 2.0.2
79+ , filepath >= 1.2
80+ , free >= 4.8
81+ , lens >= 4.0
82+ , mtl >= 2.1.3.1
83+ , parsers >= 0.12.1.1
84+ , scientific >= 0.3.1
85+ , semigroups >= 0.15
86+ , text >= 1.2
87+ , text-format >= 0.3
88+ , text-manipulate >= 0.1.2
89+ , trifecta >= 1.6
90+ , unordered-containers >= 0.2.3
91+ , vector >= 0.7.1
92+
93+test-suite golden
94+ default-language: Haskell2010
95+ type: exitcode-stdio-1.0
96+ hs-source-dirs: test
97+ main-is: Main.hs
98+
99+ ghc-options: -Wall -threaded
100+
101+ build-depends:
102+ aeson
103+ , base >= 4.6 && < 5
104+ , bifunctors
105+ , bytestring
106+ , directory
107+ , ede
108+ , text
109+ , tasty
110+ , tasty-golden
test/golden-test-cases/ede.nix.goldennew file+25
@@ -0,0 +1,25 @@
1+{ mkDerivation, aeson, ansi-wl-pprint, base, bifunctors, bytestring
2+, comonad, directory, double-conversion, filepath, free, lens, mtl
3+, parsers, scientific, semigroups, stdenv, tasty, tasty-golden
4+, text, text-format, text-manipulate, trifecta
5+, unordered-containers, vector
6+}:
7+mkDerivation {
8+ pname = "ede";
9+ version = "0.2.8.7";
10+ sha256 = "deadbeef";
11+ enableSeparateDataOutput = true;
12+ libraryHaskellDepends = [
13+ aeson ansi-wl-pprint base bifunctors bytestring comonad directory
14+ double-conversion filepath free lens mtl parsers scientific
15+ semigroups text text-format text-manipulate trifecta
16+ unordered-containers vector
17+ ];
18+ testHaskellDepends = [
19+ aeson base bifunctors bytestring directory tasty tasty-golden text
20+ ];
21+ homepage = "http://github.com/brendanhay/ede";
22+ description = "Templating language with similar syntax and features to Liquid or Jinja2";
23+ license = "unknown";
24+ hydraPlatforms = stdenv.lib.platforms.none;
25+}
test/golden-test-cases/ekg-cloudwatch.cabalnew file+46
@@ -0,0 +1,46 @@
1+-- This file has been generated from package.yaml by hpack version 0.17.1.
2+--
3+-- see: https://github.com/sol/hpack
4+
5+name: ekg-cloudwatch
6+version: 0.0.1.6
7+synopsis: An ekg backend for Amazon Cloudwatch
8+description: Push ekg metrics to Amazon Cloudwatch
9+homepage: https://github.com/sellerlabs/ekg-cloudwatch#readme
10+bug-reports: https://github.com/sellerlabs/ekg-cloudwatch/issues
11+license: BSD3
12+license-file: LICENSE
13+author: Matt Parsons
14+maintainer: matt@sellerlabs.com
15+copyright: 2016 Seller Labs
16+category: Web
17+build-type: Simple
18+cabal-version: >= 1.10
19+
20+extra-source-files:
21+ CHANGELOG.md
22+ README.md
23+
24+source-repository head
25+ type: git
26+ location: https://github.com/sellerlabs/ekg-cloudwatch
27+
28+library
29+ hs-source-dirs:
30+ src
31+ build-depends:
32+ base >=4.7 && <5
33+ , ekg-core >= 0.1 && < 1.0
34+ , amazonka >= 1.0.0
35+ , amazonka-cloudwatch >= 1.0.0
36+ , amazonka-core >= 1.0.0
37+ , bytestring
38+ , lens
39+ , resourcet
40+ , semigroups
41+ , text
42+ , time
43+ , unordered-containers
44+ exposed-modules:
45+ System.Remote.Monitoring.CloudWatch
46+ default-language: Haskell2010
test/golden-test-cases/ekg-cloudwatch.nix.goldennew file+16
@@ -0,0 +1,16 @@
1+{ mkDerivation, amazonka, amazonka-cloudwatch, amazonka-core, base
2+, bytestring, ekg-core, lens, resourcet, semigroups, stdenv, text
3+, time, unordered-containers
4+}:
5+mkDerivation {
6+ pname = "ekg-cloudwatch";
7+ version = "0.0.1.6";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ amazonka amazonka-cloudwatch amazonka-core base bytestring ekg-core
11+ lens resourcet semigroups text time unordered-containers
12+ ];
13+ homepage = "https://github.com/sellerlabs/ekg-cloudwatch#readme";
14+ description = "An ekg backend for Amazon Cloudwatch";
15+ license = stdenv.lib.licenses.bsd3;
16+}
test/golden-test-cases/emailaddress.cabalnew file+49
@@ -0,0 +1,49 @@
1+name: emailaddress
2+version: 0.2.0.0
3+synopsis: Wrapper around email-validate library adding instances for common type classes.
4+description: Please see README.md
5+homepage: https://github.com/cdepillabout/emailaddress#readme
6+license: BSD3
7+license-file: LICENSE
8+author: Dennis Gosnell
9+maintainer: cdep.illabout@gmail.com
10+copyright: 2016 Dennis Gosnell
11+category: Text
12+build-type: Simple
13+extra-source-files: README.md
14+ , CHANGELOG.md
15+cabal-version: >=1.10
16+
17+library
18+ hs-source-dirs: src
19+ exposed-modules: Text.EmailAddress
20+ other-modules: Text.EmailAddress.Internal
21+ build-depends: base >= 4.6 && < 5
22+ , aeson >= 0.9
23+ , bifunctors >= 5
24+ , bytestring >= 0.9
25+ , email-validate >= 2
26+ , http-api-data >= 0.2
27+ , opaleye >= 0.4
28+ , path-pieces >= 0.2
29+ , persistent >= 2
30+ , postgresql-simple >= 0.5
31+ , product-profunctors >= 0.6
32+ , profunctors >= 0.5
33+ , text >= 1.2
34+ default-language: Haskell2010
35+ ghc-options: -Wall
36+
37+test-suite emailaddress-doctest
38+ type: exitcode-stdio-1.0
39+ main-is: DocTest.hs
40+ hs-source-dirs: test
41+ build-depends: base
42+ , doctest
43+ , Glob
44+ default-language: Haskell2010
45+ ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
46+
47+source-repository head
48+ type: git
49+ location: git@github.com:cdepillabout/emailaddress.git
test/golden-test-cases/emailaddress.nix.goldennew file+19
@@ -0,0 +1,19 @@
1+{ mkDerivation, aeson, base, bifunctors, bytestring, doctest
2+, email-validate, Glob, http-api-data, opaleye, path-pieces
3+, persistent, postgresql-simple, product-profunctors, profunctors
4+, stdenv, text
5+}:
6+mkDerivation {
7+ pname = "emailaddress";
8+ version = "0.2.0.0";
9+ sha256 = "deadbeef";
10+ libraryHaskellDepends = [
11+ aeson base bifunctors bytestring email-validate http-api-data
12+ opaleye path-pieces persistent postgresql-simple
13+ product-profunctors profunctors text
14+ ];
15+ testHaskellDepends = [ base doctest Glob ];
16+ homepage = "https://github.com/cdepillabout/emailaddress#readme";
17+ description = "Wrapper around email-validate library adding instances for common type classes";
18+ license = stdenv.lib.licenses.bsd3;
19+}
test/golden-test-cases/envelope.cabalnew file+38
@@ -0,0 +1,38 @@
1+name: envelope
2+version: 0.2.2.0
3+synopsis: Defines generic 'Envelope' type to wrap reponses from a JSON API.
4+description: Please see README.md
5+homepage: https://github.com/cdepillabout/envelope#readme
6+license: BSD3
7+license-file: LICENSE
8+author: Dennis Gosnell
9+maintainer: cdep.illabout@gmail.com
10+copyright: 2016-2017 Dennis Gosnell
11+category: Web
12+build-type: Simple
13+extra-source-files: README.md
14+cabal-version: >=1.10
15+
16+library
17+ hs-source-dirs: src
18+ exposed-modules: Web.Envelope
19+ build-depends: base >= 4.8 && < 5
20+ , aeson >= 0.11
21+ , http-api-data >= 0.3
22+ , mtl >= 2.2
23+ , text >= 1.2
24+ default-language: Haskell2010
25+
26+test-suite envelope-doctest
27+ type: exitcode-stdio-1.0
28+ main-is: DocTest.hs
29+ hs-source-dirs: test
30+ build-depends: base
31+ , doctest
32+ , Glob
33+ default-language: Haskell2010
34+ ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
35+
36+source-repository head
37+ type: git
38+ location: git@github.com:cdepillabout/envelope.git
test/golden-test-cases/envelope.nix.goldennew file+13
@@ -0,0 +1,13 @@
1+{ mkDerivation, aeson, base, doctest, Glob, http-api-data, mtl
2+, stdenv, text
3+}:
4+mkDerivation {
5+ pname = "envelope";
6+ version = "0.2.2.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [ aeson base http-api-data mtl text ];
9+ testHaskellDepends = [ base doctest Glob ];
10+ homepage = "https://github.com/cdepillabout/envelope#readme";
11+ description = "Defines generic 'Envelope' type to wrap reponses from a JSON API";
12+ license = stdenv.lib.licenses.bsd3;
13+}
test/golden-test-cases/eventful-sqlite.cabalnew file+69
@@ -0,0 +1,69 @@
1+-- This file has been generated from package.yaml by hpack version 0.17.0.
2+--
3+-- see: https://github.com/sol/hpack
4+
5+name: eventful-sqlite
6+version: 0.2.0
7+synopsis: SQLite implementations for eventful
8+description: SQLite implementations for eventful
9+category: Database,Eventsourcing,SQLite
10+stability: experimental
11+homepage: https://github.com/jdreaver/eventful#readme
12+bug-reports: https://github.com/jdreaver/eventful/issues
13+maintainer: David Reaver
14+license: MIT
15+license-file: LICENSE.md
16+build-type: Simple
17+cabal-version: >= 1.10
18+
19+extra-source-files:
20+ CHANGELOG.md
21+ README.md
22+
23+source-repository head
24+ type: git
25+ location: https://github.com/jdreaver/eventful
26+
27+library
28+ hs-source-dirs:
29+ src
30+ ghc-options: -Wall
31+ build-depends:
32+ base >= 4.9 && < 5
33+ , eventful-core
34+ , eventful-sql-common
35+ , aeson
36+ , bytestring
37+ , mtl
38+ , persistent
39+ , text
40+ , uuid
41+ exposed-modules:
42+ Eventful.Store.Sqlite
43+ default-language: Haskell2010
44+
45+test-suite spec
46+ type: exitcode-stdio-1.0
47+ main-is: Spec.hs
48+ hs-source-dirs:
49+ tests
50+ src
51+ ghc-options: -Wall
52+ build-depends:
53+ base >= 4.9 && < 5
54+ , eventful-core
55+ , eventful-sql-common
56+ , aeson
57+ , bytestring
58+ , mtl
59+ , persistent
60+ , text
61+ , uuid
62+ , hspec
63+ , HUnit
64+ , eventful-test-helpers
65+ , persistent-sqlite
66+ other-modules:
67+ Eventful.Store.SqliteSpec
68+ Eventful.Store.Sqlite
69+ default-language: Haskell2010
test/golden-test-cases/eventful-sqlite.nix.goldennew file+21
@@ -0,0 +1,21 @@
1+{ mkDerivation, aeson, base, bytestring, eventful-core
2+, eventful-sql-common, eventful-test-helpers, hspec, HUnit, mtl
3+, persistent, persistent-sqlite, stdenv, text, uuid
4+}:
5+mkDerivation {
6+ pname = "eventful-sqlite";
7+ version = "0.2.0";
8+ sha256 = "deadbeef";
9+ libraryHaskellDepends = [
10+ aeson base bytestring eventful-core eventful-sql-common mtl
11+ persistent text uuid
12+ ];
13+ testHaskellDepends = [
14+ aeson base bytestring eventful-core eventful-sql-common
15+ eventful-test-helpers hspec HUnit mtl persistent persistent-sqlite
16+ text uuid
17+ ];
18+ homepage = "https://github.com/jdreaver/eventful#readme";
19+ description = "SQLite implementations for eventful";
20+ license = stdenv.lib.licenses.mit;
21+}
test/golden-test-cases/exact-pi.cabalnew file+35
@@ -0,0 +1,35 @@
1+-- Initial exact-pi.cabal generated by cabal init. For further
2+-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+name: exact-pi
5+version: 0.4.1.2
6+synopsis: Exact rational multiples of pi (and integer powers of pi)
7+description: Provides an exact representation for rational multiples of pi alongside an approximate representation of all reals.
8+ Useful for storing and computing with conversion factors between physical units.
9+homepage: https://github.com/dmcclean/exact-pi/
10+bug-reports: https://github.com/dmcclean/exact-pi/issues/
11+license: MIT
12+license-file: LICENSE
13+author: Douglas McClean
14+maintainer: douglas.mcclean@gmail.com
15+-- copyright:
16+category: Data
17+build-type: Simple
18+extra-source-files: README.md,
19+ changelog.md
20+cabal-version: >=1.10
21+
22+library
23+ exposed-modules: Data.ExactPi,
24+ Data.ExactPi.TypeLevel
25+ -- other-modules:
26+ -- other-extensions:
27+ build-depends: base >=4.7 && <5,
28+ numtype-dk >= 0.5
29+ ghc-options: -Wall
30+ hs-source-dirs: src
31+ default-language: Haskell2010
32+
33+source-repository head
34+ type: git
35+ location: https://github.com/dmcclean/exact-pi.git
test/golden-test-cases/exact-pi.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, numtype-dk, stdenv }:
2+mkDerivation {
3+ pname = "exact-pi";
4+ version = "0.4.1.2";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base numtype-dk ];
7+ homepage = "https://github.com/dmcclean/exact-pi/";
8+ description = "Exact rational multiples of pi (and integer powers of pi)";
9+ license = stdenv.lib.licenses.mit;
10+}
test/golden-test-cases/expiring-cache-map.cabalnew file+108
@@ -0,0 +1,108 @@
1+name: expiring-cache-map
2+version: 0.0.6.1
3+synopsis: General purpose simple caching.
4+description:
5+ A simple general purpose shared state cache map with automatic expiration
6+ of values, for caching the results of accessing a resource such as reading
7+ a file. With variations for Ord and Hashable keys using "Data.Map.Strict"
8+ and "Data.HashMap.Strict", respectively.
9+
10+homepage: https://github.com/elblake/expiring-cache-map
11+bug-reports: https://github.com/elblake/expiring-cache-map/issues
12+license: BSD3
13+license-file: LICENSE
14+author: Edward L. Blake
15+maintainer: edwardlblake@gmail.com
16+copyright: (c) 2014 Edward L. Blake
17+category: Caching
18+build-type: Simple
19+cabal-version: >=1.8
20+
21+extra-source-files:
22+ README.md
23+
24+library
25+ exposed-modules:
26+ Caching.ExpiringCacheMap.OrdECM
27+ Caching.ExpiringCacheMap.HashECM
28+ Caching.ExpiringCacheMap.Internal.Internal
29+ Caching.ExpiringCacheMap.Internal.Types
30+ Caching.ExpiringCacheMap.Types
31+ Caching.ExpiringCacheMap.Utils.TestSequence
32+ Caching.ExpiringCacheMap.Utils.Types
33+ -- other-modules:
34+ build-depends:
35+ base == 4.*,
36+ containers >= 0.5.0.0,
37+ hashable >= 1.0.1.1,
38+ unordered-containers >= 0.2.0.0
39+
40+test-suite test-threads
41+ type: exitcode-stdio-1.0
42+ hs-source-dirs: . tests
43+ main-is: TestWithThreads.hs
44+ build-depends:
45+ base,
46+ bytestring >= 0.10.0.0,
47+ time >= 1.0,
48+ containers >= 0.5.0.0,
49+ hashable >= 1.0.1.1,
50+ unordered-containers >= 0.2.0.0
51+ other-modules:
52+ TestHashECMWithThreads
53+ TestHashECMWithThreadsInvalidating
54+ TestOrdECMWithThreads
55+ TestOrdECMWithThreadsInvalidating
56+ Caching.ExpiringCacheMap.Internal.Internal
57+
58+test-suite test-sequence
59+ type: exitcode-stdio-1.0
60+ hs-source-dirs: . tests
61+ main-is: TestWithTestSequence.hs
62+ build-depends:
63+ base,
64+ bytestring >= 0.10.0.0,
65+ containers >= 0.5.0.0,
66+ hashable >= 1.0.1.1,
67+ unordered-containers >= 0.2.0.0
68+ other-modules:
69+ TestECMWithTestSequenceCommon
70+ TestECMWithTestSequenceCommonInvalidating
71+ TestHashECMWithTestSequence
72+ TestHashECMWithTestSequenceInvalidating
73+ TestOrdECMWithTestSequence
74+ TestOrdECMWithTestSequenceInvalidating
75+
76+test-suite invalidate-test
77+ type: exitcode-stdio-1.0
78+ hs-source-dirs: . tests
79+ main-is: InvalidateTest.hs
80+ build-depends:
81+ base,
82+ bytestring >= 0.10.0.0,
83+ time >= 1.0,
84+ containers >= 0.5.0.0,
85+ hashable >= 1.0.1.1,
86+ unordered-containers >= 0.2.0.0
87+ other-modules:
88+ InvalidateTestCommon
89+ InvalidateTestHashECM
90+ InvalidateTestOrdECM
91+ Caching.ExpiringCacheMap.Internal.Internal
92+
93+test-suite invalidate-cache-test
94+ type: exitcode-stdio-1.0
95+ hs-source-dirs: . tests
96+ main-is: InvalidateCacheTest.hs
97+ build-depends:
98+ base,
99+ bytestring >= 0.10.0.0,
100+ time >= 1.0,
101+ containers >= 0.5.0.0,
102+ hashable >= 1.0.1.1,
103+ unordered-containers >= 0.2.0.0
104+ other-modules:
105+ InvalidateCacheTestCommon
106+ InvalidateCacheTestHashECM
107+ InvalidateCacheTestOrdECM
108+ Caching.ExpiringCacheMap.Internal.Internal
test/golden-test-cases/expiring-cache-map.nix.goldennew file+17
@@ -0,0 +1,17 @@
1+{ mkDerivation, base, bytestring, containers, hashable, stdenv
2+, time, unordered-containers
3+}:
4+mkDerivation {
5+ pname = "expiring-cache-map";
6+ version = "0.0.6.1";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ base containers hashable unordered-containers
10+ ];
11+ testHaskellDepends = [
12+ base bytestring containers hashable time unordered-containers
13+ ];
14+ homepage = "https://github.com/elblake/expiring-cache-map";
15+ description = "General purpose simple caching";
16+ license = stdenv.lib.licenses.bsd3;
17+}
test/golden-test-cases/explicit-exception.cabalnew file+124
@@ -0,0 +1,124 @@
1+Name: explicit-exception
2+Version: 0.1.9
3+License: BSD3
4+License-File: LICENSE
5+Author: Henning Thielemann <haskell@henning-thielemann.de>
6+Maintainer: Henning Thielemann <haskell@henning-thielemann.de>
7+Homepage: http://www.haskell.org/haskellwiki/Exception
8+Category: Control
9+Stability: Experimental
10+Synopsis: Exceptions which are explicit in the type signature.
11+Description:
12+ Synchronous and Asynchronous exceptions which are explicit in the type signature.
13+ The first ones are very similar to 'Either' and 'Control.Monad.Error.ErrorT'.
14+ The second ones are used for 'System.IO.readFile' and 'System.IO.hGetContents'.
15+ This package is a proposal for improved exception handling in Haskell.
16+ It strictly separates between handling of
17+ exceptional situations (file not found, invalid user input,
18+ see <http://www.haskell.org/haskellwiki/Exception>) and
19+ (programming) errors (division by zero, index out of range,
20+ see <http://www.haskell.org/haskellwiki/Error>).
21+ Handling of the first one is called \"exception handling\",
22+ whereas handling of errors is better known as \"debugging\".
23+ .
24+ For applications see the packages @midi@, @spreadsheet@, @http-monad@.
25+ .
26+ Although I'm not happy with the identifier style of the Monad Transformer Library
27+ (partially intended for unqualified use)
28+ I have tried to adopt it for this library,
29+ in order to let Haskell programmers get accustomed easily to it.
30+ .
31+ See also: @unexceptionalio@
32+Tested-With: GHC==6.8.2
33+Tested-With: GHC==7.4.2, GHC==7.6.1, GHC==7.8.2
34+Tested-With: GHC==8.0.1
35+Cabal-Version: >=1.6
36+Build-Type: Simple
37+
38+Source-Repository head
39+ type: darcs
40+ location: http://code.haskell.org/explicit-exception/
41+
42+Source-Repository this
43+ type: darcs
44+ location: http://code.haskell.org/explicit-exception/
45+ tag: 0.1.9
46+
47+Flag buildTests
48+ description: Build executables that demonstrate some space leaks
49+ default: False
50+
51+Flag splitBase
52+ description: Choose the smaller, split-up base package from version 2 on.
53+
54+
55+Library
56+ Build-Depends:
57+ transformers >=0.2 && <0.6,
58+ deepseq >=1.1 && <1.5
59+ If impl(jhc)
60+ Build-Depends:
61+ applicative >=1.0 && <1.1,
62+ base >= 1 && <2
63+ Else
64+ If flag(splitBase)
65+ Build-Depends: base >= 2 && <5
66+ Else
67+ Build-Depends:
68+ special-functors >=1.0 && <1.1,
69+ base >= 1 && <2
70+
71+ GHC-Options: -Wall
72+ Hs-Source-Dirs: src
73+ Exposed-Modules:
74+ Control.Monad.Exception.Asynchronous
75+ Control.Monad.Exception.Asynchronous.Lazy
76+ Control.Monad.Exception.Asynchronous.Strict
77+ Control.Monad.Exception.Synchronous
78+ If !impl(jhc)
79+ Other-Modules:
80+ Control.Monad.Exception.Warning
81+ Control.Monad.Exception.Label
82+ Control.Monad.Label
83+ System.IO.Straight
84+ System.IO.Exception.File
85+ System.IO.Exception.BinaryFile
86+ System.IO.Exception.TextFile
87+-- System.IO.Exception.Std
88+-- Debug.Error
89+
90+Executable ee-tar
91+ If flag(buildTests)
92+ Build-Depends:
93+ bytestring >=0.9.0.1 && <0.11,
94+ tar >=0.3 && <0.4
95+ Else
96+ Buildable: False
97+ GHC-Options: -Wall
98+ Hs-Source-Dirs: src, spaceleak
99+ Main-Is: Tar.hs
100+
101+Executable ee-test
102+ If flag(buildTests)
103+ Build-Depends:
104+ bytestring >=0.9.0.1 && <0.11
105+ Else
106+ Buildable: False
107+ GHC-Options: -Wall
108+ Hs-Source-Dirs: src, spaceleak
109+ Main-Is: Example.hs
110+
111+Executable ee-unzip
112+ If !flag(buildTests)
113+ Buildable: False
114+ GHC-Options: -Wall
115+ Hs-Source-Dirs: spaceleak
116+ Main-Is: Unzip.hs
117+
118+Executable ee-writer
119+ If !flag(buildTests)
120+ Buildable: False
121+ Buildable: False
122+ GHC-Options: -Wall
123+ Hs-Source-Dirs: spaceleak
124+ Main-Is: Writer.hs
test/golden-test-cases/explicit-exception.nix.goldennew file+12
@@ -0,0 +1,12 @@
1+{ mkDerivation, base, deepseq, stdenv, transformers }:
2+mkDerivation {
3+ pname = "explicit-exception";
4+ version = "0.1.9";
5+ sha256 = "deadbeef";
6+ isLibrary = true;
7+ isExecutable = true;
8+ libraryHaskellDepends = [ base deepseq transformers ];
9+ homepage = "http://www.haskell.org/haskellwiki/Exception";
10+ description = "Exceptions which are explicit in the type signature";
11+ license = stdenv.lib.licenses.bsd3;
12+}
test/golden-test-cases/fdo-notify.cabalnew file+26
@@ -0,0 +1,26 @@
1+name: fdo-notify
2+version: 0.3.1
3+synopsis: Desktop Notifications client
4+description:
5+ A library for issuing notifications using FreeDesktop.org's Desktop
6+ Notifications protcol. This protocol is supported by services such
7+ as Ubuntu's NotifyOSD.
8+category: Desktop
9+license: BSD3
10+license-file: LICENSE
11+author: Max Rabkin
12+maintainer: max.rabkin@gmail.com
13+homepage: http://bitbucket.org/taejo/fdo-notify/
14+cabal-version: >= 1.2.1
15+build-type: Simple
16+
17+extra-source-files:
18+ examples/fib.hs
19+
20+library
21+ build-depends:
22+ base >= 3 && < 5
23+ , containers >= 0.1
24+ , dbus >= 0.10.7
25+
26+ exposed-modules: DBus.Notify
test/golden-test-cases/fdo-notify.nix.goldennew file+10
@@ -0,0 +1,10 @@
1+{ mkDerivation, base, containers, dbus, stdenv }:
2+mkDerivation {
3+ pname = "fdo-notify";
4+ version = "0.3.1";
5+ sha256 = "deadbeef";
6+ libraryHaskellDepends = [ base containers dbus ];
7+ homepage = "http://bitbucket.org/taejo/fdo-notify/";
8+ description = "Desktop Notifications client";
9+ license = stdenv.lib.licenses.bsd3;
10+}
test/golden-test-cases/fgl.cabalnew file+134
@@ -0,0 +1,134 @@
1+name: fgl
2+version: 5.5.4.0
3+license: BSD3
4+license-file: LICENSE
5+author: Martin Erwig, Ivan Lazar Miljenovic
6+maintainer: Ivan.Miljenovic@gmail.com
7+category: Data Structures, Graphs
8+synopsis: Martin Erwig's Functional Graph Library
9+
10+description: {
11+An inductive representation of manipulating graph data structures.
12+.
13+Original website can be found at <http://web.engr.oregonstate.edu/~erwig/fgl/haskell>.
14+}
15+cabal-version: >= 1.10
16+build-type: Simple
17+extra-source-files:
18+ ChangeLog
19+
20+tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
21+ GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
22+
23+source-repository head
24+ type: git
25+ location: https://github.com/haskell/fgl.git
26+
27+flag containers042 {
28+ manual: False
29+ default: True
30+}
31+
32+library {
33+ default-language: Haskell98
34+
35+ exposed-modules:
36+ Data.Graph.Inductive.Internal.Heap,
37+ Data.Graph.Inductive.Internal.Queue,
38+ Data.Graph.Inductive.Internal.RootPath,
39+ Data.Graph.Inductive.Internal.Thread,
40+ Data.Graph.Inductive.Basic,
41+ Data.Graph.Inductive.Example,
42+ Data.Graph.Inductive.Graph,
43+ Data.Graph.Inductive.Monad,
44+ Data.Graph.Inductive.NodeMap,
45+ Data.Graph.Inductive.PatriciaTree,
46+ Data.Graph.Inductive.Query,
47+ Data.Graph.Inductive.Tree,
48+ Data.Graph.Inductive.Monad.IOArray,
49+ Data.Graph.Inductive.Monad.STArray,
50+ Data.Graph.Inductive.Query.ArtPoint,
51+ Data.Graph.Inductive.Query.BCC,
52+ Data.Graph.Inductive.Query.BFS,
53+ Data.Graph.Inductive.Query.DFS,
54+ Data.Graph.Inductive.Query.Dominators,
55+ Data.Graph.Inductive.Query.GVD,
56+ Data.Graph.Inductive.Query.Indep,
57+ Data.Graph.Inductive.Query.MST,
58+ Data.Graph.Inductive.Query.MaxFlow,
59+ Data.Graph.Inductive.Query.MaxFlow2,
60+ Data.Graph.Inductive.Query.Monad,
61+ Data.Graph.Inductive.Query.SP,
62+ Data.Graph.Inductive.Query.TransClos,
63+ Data.Graph.Inductive
64+
65+ other-modules:
66+ Paths_fgl
67+
68+ build-depends: base < 5
69+ , transformers
70+ , array
71+
72+ if flag(containers042)
73+ build-depends: containers >= 0.4.2
74+ , deepseq >= 1.1.0.0 && < 1.5
75+ else
76+ build-depends: containers < 0.4.2
77+
78+ if impl(ghc >= 7.2) && impl(ghc < 7.6)
79+ build-depends:
80+ ghc-prim
81+
82+ ghc-options: -Wall
83+
84+}
85+
86+test-suite fgl-tests {
87+ default-language: Haskell98
88+
89+ type: exitcode-stdio-1.0
90+
91+ build-depends: fgl
92+ , base
93+ , QuickCheck >= 2.8 && < 2.10
94+ , hspec >= 2.1 && < 2.5
95+ , containers
96+
97+ hs-source-dirs: test
98+ fgl-arbitrary
99+
100+ main-is: TestSuite.hs
101+
102+ other-modules: Data.Graph.Inductive.Arbitrary
103+ , Data.Graph.Inductive.Graph.Properties
104+ , Data.Graph.Inductive.Proxy
105+ , Data.Graph.Inductive.Query.Properties
106+
107+ ghc-options: -Wall
108+
109+}
110+
111+benchmark fgl-benchmark {
112+ if flag(containers042)
113+ buildable: True
114+ else
115+ buildable: False
116+
117+ default-language: Haskell98
118+
119+ type: exitcode-stdio-1.0
120+
121+ hs-source-dirs: test
122+
123+ main-is: benchmark.hs
124+
125+ other-modules: Data.Graph.Inductive.Proxy
126+
127+ build-depends: fgl
128+ , base
129+ , microbench
130+ , deepseq
131+
132+ ghc-options: -Wall
133+
134+}
test/golden-test-cases/fgl.nix.goldennew file+15
@@ -0,0 +1,15 @@
1+{ mkDerivation, array, base, containers, deepseq, hspec, microbench
2+, QuickCheck, stdenv, transformers
3+}:
4+mkDerivation {
5+ pname = "fgl";
6+ version = "5.5.4.0";
7+ sha256 = "deadbeef";
8+ libraryHaskellDepends = [
9+ array base containers deepseq transformers
10+ ];
11+ testHaskellDepends = [ base containers hspec QuickCheck ];
12+ benchmarkHaskellDepends = [ base deepseq microbench ];
13+ description = "Martin Erwig's Functional Graph Library";
14+ license = stdenv.lib.licenses.bsd3;
15+}
test/golden-test-cases/file-modules.cabalnew file+46
@@ -0,0 +1,46 @@
1+name: file-modules
2+version: 0.1.2.4
3+cabal-version: >=1.10
4+build-type: Simple
5+license: MIT
6+license-file: LICENSE
7+copyright: Copyright (c) Pedro Tacla Yamada 2015
8+maintainer: tacla.yamada@gmail.com
9+homepage: https://github.com/yamadapc/stack-run-auto
10+synopsis: Takes a Haskell source-code file and outputs its modules.
11+description:
12+ Uses @haskell-src-exts@ to parse module imports and follows links
13+ . to local modules in order to build a list of module dependencies.
14+category: Development
15+author: Pedro Tacla Yamada
16+
17+library
18+ exposed-modules:
19+ Development.FileModules
20+ build-depends:
21+ MissingH,
22+ async,
23+ base >=4.5 && <5,
24+ directory,
25+ filepath,
26+ haskell-src-exts >=1.17 && <2,
27+ regex-compat >= 0.95.1,
28+ regex-pcre
29+ default-language: Haskell2010
30+ hs-source-dirs: src
31+
32+executable file-modules
33+ main-is: Main.hs
34+ build-depends:
35+ MissingH,
36+ async,
37+ base >=4.5 && <5,
38+ directory,
39+ filepath,
40+ haskell-src-exts >=1.17 && <2,
41+ regex-compat >= 0.95.1,
42+ regex-pcre
43+ default-language: Haskell2010
44+ hs-source-dirs: src
45+ ghc-options: -O2 -threaded
46+
test/golden-test-cases/file-modules.nix.goldennew file+21
@@ -0,0 +1,21 @@
1+{ mkDerivation, async, base, directory, filepath, haskell-src-exts
2+, MissingH, regex-compat, regex-pcre, stdenv
3+}:
4+mkDerivation {
5+ pname = "file-modules";
6+ version = "0.1.2.4";
7+ sha256 = "deadbeef";
8+ isLibrary = true;
9+ isExecutable = true;
10+ libraryHaskellDepends = [
11+ async base directory filepath haskell-src-exts MissingH
12+ regex-compat regex-pcre
13+ ];
14+ executableHaskellDepends = [
15+ async base directory filepath haskell-src-exts MissingH
16+ regex-compat regex-pcre
17+ ];
18+ homepage = "https://github.com/yamadapc/stack-run-auto";
19+ description = "Takes a Haskell source-code file and outputs its modules";
20+ license = stdenv.lib.licenses.mit;
21+}
test/golden-test-cases/fingertree.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/fingertree.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/fixed-vector.cabalnew file+87

This diff is too big to show here.

test/golden-test-cases/fixed-vector.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/fixed.cabalnew file+32

This diff is too big to show here.

test/golden-test-cases/fixed.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/foundation.cabalnew file+280

This diff is too big to show here.

test/golden-test-cases/foundation.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/frisby.cabalnew file+37

This diff is too big to show here.

test/golden-test-cases/frisby.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/funcmp.cabalnew file+92

This diff is too big to show here.

test/golden-test-cases/funcmp.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/functor-classes-compat.cabalnew file+147

This diff is too big to show here.

test/golden-test-cases/functor-classes-compat.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/general-games.cabalnew file+53

This diff is too big to show here.

test/golden-test-cases/general-games.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/generic-lens.cabalnew file+123

This diff is too big to show here.

test/golden-test-cases/generic-lens.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/genvalidity-aeson.cabalnew file+51

This diff is too big to show here.

test/golden-test-cases/genvalidity-aeson.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/genvalidity-hspec-aeson.cabalnew file+63

This diff is too big to show here.

test/golden-test-cases/genvalidity-hspec-aeson.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/genvalidity-hspec-binary.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/genvalidity-hspec-binary.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/genvalidity-scientific.cabalnew file+48

This diff is too big to show here.

test/golden-test-cases/genvalidity-scientific.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/genvalidity-uuid.cabalnew file+48

This diff is too big to show here.

test/golden-test-cases/genvalidity-uuid.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/ghc-syb-utils.cabalnew file+51

This diff is too big to show here.

test/golden-test-cases/ghc-syb-utils.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/ghcid.cabalnew file+117

This diff is too big to show here.

test/golden-test-cases/ghcid.nix.goldennew file+25

This diff is too big to show here.

test/golden-test-cases/giphy-api.cabalnew file+94

This diff is too big to show here.

test/golden-test-cases/giphy-api.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/github.cabalnew file+202

This diff is too big to show here.

test/golden-test-cases/github.nix.goldennew file+30

This diff is too big to show here.

test/golden-test-cases/gl.cabalnew file+917

This diff is too big to show here.

test/golden-test-cases/gl.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/gogol-adexchange-buyer.cabalnew file+85

This diff is too big to show here.

test/golden-test-cases/gogol-adexchange-buyer.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-admin-emailmigration.cabalnew file+46

This diff is too big to show here.

test/golden-test-cases/gogol-admin-emailmigration.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-affiliates.cabalnew file+55

This diff is too big to show here.

test/golden-test-cases/gogol-affiliates.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-apps-tasks.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/gogol-apps-tasks.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-appstate.cabalnew file+50

This diff is too big to show here.

test/golden-test-cases/gogol-appstate.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-blogger.cabalnew file+82

This diff is too big to show here.

test/golden-test-cases/gogol-blogger.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-datastore.cabalnew file+52

This diff is too big to show here.

test/golden-test-cases/gogol-datastore.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-dfareporting.cabalnew file+249

This diff is too big to show here.

test/golden-test-cases/gogol-dfareporting.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-firebase-rules.cabalnew file+56

This diff is too big to show here.

test/golden-test-cases/gogol-firebase-rules.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-gmail.cabalnew file+102

This diff is too big to show here.

test/golden-test-cases/gogol-gmail.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-kgsearch.cabalnew file+46

This diff is too big to show here.

test/golden-test-cases/gogol-kgsearch.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-maps-engine.cabalnew file+123

This diff is too big to show here.

test/golden-test-cases/gogol-maps-engine.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-plus.cabalnew file+54

This diff is too big to show here.

test/golden-test-cases/gogol-plus.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-resourceviews.cabalnew file+61

This diff is too big to show here.

test/golden-test-cases/gogol-resourceviews.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-translate.cabalnew file+48

This diff is too big to show here.

test/golden-test-cases/gogol-translate.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-webmaster-tools.cabalnew file+58

This diff is too big to show here.

test/golden-test-cases/gogol-webmaster-tools.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/gogol-youtube.cabalnew file+117

This diff is too big to show here.

test/golden-test-cases/gogol-youtube.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/groundhog-mysql.cabalnew file+32

This diff is too big to show here.

test/golden-test-cases/groundhog-mysql.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/gsasl.cabalnew file+38

This diff is too big to show here.

test/golden-test-cases/gsasl.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/hOpenPGP.cabalnew file+342

This diff is too big to show here.

test/golden-test-cases/hOpenPGP.nix.goldennew file+49

This diff is too big to show here.

test/golden-test-cases/hPDB-examples.cabalnew file+97

This diff is too big to show here.

test/golden-test-cases/hPDB-examples.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/haddock-library.cabalnew file+130

This diff is too big to show here.

test/golden-test-cases/haddock-library.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/hakyll.cabalnew file+321

This diff is too big to show here.

test/golden-test-cases/hakyll.nix.goldennew file+42

This diff is too big to show here.

test/golden-test-cases/happstack-hsp.cabalnew file+37

This diff is too big to show here.

test/golden-test-cases/happstack-hsp.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/happy.cabalnew file+180

This diff is too big to show here.

test/golden-test-cases/happy.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/harp.cabalnew file+31

This diff is too big to show here.

test/golden-test-cases/harp.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/hashtables.cabalnew file+199

This diff is too big to show here.

test/golden-test-cases/hashtables.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/haskell-tools-debug.cabalnew file+38

This diff is too big to show here.

test/golden-test-cases/haskell-tools-debug.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/haskell-tools-rewrite.cabalnew file+64

This diff is too big to show here.

test/golden-test-cases/haskell-tools-rewrite.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/hasql.cabalnew file+205

This diff is too big to show here.

test/golden-test-cases/hasql.nix.goldennew file+27

This diff is too big to show here.

test/golden-test-cases/hformat.cabalnew file+45

This diff is too big to show here.

test/golden-test-cases/hformat.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/highlighting-kate.cabalnew file+276

This diff is too big to show here.

test/golden-test-cases/highlighting-kate.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/hit.cabalnew file+125

This diff is too big to show here.

test/golden-test-cases/hit.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/hjson.cabalnew file+19

This diff is too big to show here.

test/golden-test-cases/hjson.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/hmpfr.cabalnew file+83

This diff is too big to show here.

test/golden-test-cases/hmpfr.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/hoogle.cabalnew file+142

This diff is too big to show here.

test/golden-test-cases/hoogle.nix.goldennew file+30

This diff is too big to show here.

test/golden-test-cases/hostname-validate.cabalnew file+20

This diff is too big to show here.

test/golden-test-cases/hostname-validate.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/hsinstall.cabalnew file+45

This diff is too big to show here.

test/golden-test-cases/hsinstall.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/hstatsd.cabalnew file+24

This diff is too big to show here.

test/golden-test-cases/hstatsd.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/hsx-jmacro.cabalnew file+33

This diff is too big to show here.

test/golden-test-cases/hsx-jmacro.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/hsyslog.cabalnew file+77

This diff is too big to show here.

test/golden-test-cases/hsyslog.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/htoml.cabalnew file+89

This diff is too big to show here.

test/golden-test-cases/htoml.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/http-conduit.cabalnew file+82

This diff is too big to show here.

test/golden-test-cases/http-conduit.nix.goldennew file+29

This diff is too big to show here.

test/golden-test-cases/http-link-header.cabalnew file+74

This diff is too big to show here.

test/golden-test-cases/http-link-header.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/http-media.cabalnew file+128

This diff is too big to show here.

test/golden-test-cases/http-media.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/hxt-charproperties.cabalnew file+46

This diff is too big to show here.

test/golden-test-cases/hxt-charproperties.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/hxt-expat.cabalnew file+36

This diff is too big to show here.

test/golden-test-cases/hxt-expat.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/hxt-tagsoup.cabalnew file+42

This diff is too big to show here.

test/golden-test-cases/hxt-tagsoup.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/iconv.cabalnew file+34

This diff is too big to show here.

test/golden-test-cases/iconv.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/incremental-parser.cabalnew file+55

This diff is too big to show here.

test/golden-test-cases/incremental-parser.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/indentation-core.cabalnew file+39

This diff is too big to show here.

test/golden-test-cases/indentation-core.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/indentation-parsec.cabalnew file+70

This diff is too big to show here.

test/golden-test-cases/indentation-parsec.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/inline-c-cpp.cabalnew file+41

This diff is too big to show here.

test/golden-test-cases/inline-c-cpp.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/integer-logarithms.cabalnew file+111

This diff is too big to show here.

test/golden-test-cases/integer-logarithms.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/intero.cabalnew file+116

This diff is too big to show here.

test/golden-test-cases/intero.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/invariant.cabalnew file+69

This diff is too big to show here.

test/golden-test-cases/invariant.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/io-machine.cabalnew file+34

This diff is too big to show here.

test/golden-test-cases/io-machine.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/io-streams-haproxy.cabalnew file+78

This diff is too big to show here.

test/golden-test-cases/io-streams-haproxy.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/ip.cabalnew file+124

This diff is too big to show here.

test/golden-test-cases/ip.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/iso639.cabalnew file+26

This diff is too big to show here.

test/golden-test-cases/iso639.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/iso8601-time.cabalnew file+60

This diff is too big to show here.

test/golden-test-cases/iso8601-time.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/jmacro-rpc-happstack.cabalnew file+29

This diff is too big to show here.

test/golden-test-cases/jmacro-rpc-happstack.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/jmacro-rpc.cabalnew file+26

This diff is too big to show here.

test/golden-test-cases/jmacro-rpc.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/jose.cabalnew file+147

This diff is too big to show here.

test/golden-test-cases/jose.nix.goldennew file+30

This diff is too big to show here.

test/golden-test-cases/katip-elasticsearch.cabalnew file+114

This diff is too big to show here.

test/golden-test-cases/katip-elasticsearch.nix.goldennew file+30

This diff is too big to show here.

test/golden-test-cases/katip.cabalnew file+151

This diff is too big to show here.

test/golden-test-cases/katip.nix.goldennew file+35

This diff is too big to show here.

test/golden-test-cases/katydid.cabalnew file+89

This diff is too big to show here.

test/golden-test-cases/katydid.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/kawhi.cabalnew file+66

This diff is too big to show here.

test/golden-test-cases/kawhi.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/kraken.cabalnew file+41

This diff is too big to show here.

test/golden-test-cases/kraken.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/l10n.cabalnew file+29

This diff is too big to show here.

test/golden-test-cases/l10n.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/lambdabot-social-plugins.cabalnew file+60

This diff is too big to show here.

test/golden-test-cases/lambdabot-social-plugins.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/lazy-csv.cabalnew file+36

This diff is too big to show here.

test/golden-test-cases/lazy-csv.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/lens-aeson.cabalnew file+80

This diff is too big to show here.

test/golden-test-cases/lens-aeson.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/lens.cabalnew file+503

This diff is too big to show here.

test/golden-test-cases/lens.nix.goldennew file+39

This diff is too big to show here.

test/golden-test-cases/libgit.cabalnew file+29

This diff is too big to show here.

test/golden-test-cases/libgit.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/librato.cabalnew file+52

This diff is too big to show here.

test/golden-test-cases/librato.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/lifted-async.cabalnew file+115

This diff is too big to show here.

test/golden-test-cases/lifted-async.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/lmdb.cabalnew file+51

This diff is too big to show here.

test/golden-test-cases/lmdb.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/logging-effect-extra-file.cabalnew file+63

This diff is too big to show here.

test/golden-test-cases/logging-effect-extra-file.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/lucid.cabalnew file+75

This diff is too big to show here.

test/golden-test-cases/lucid.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/mainland-pretty.cabalnew file+40

This diff is too big to show here.

test/golden-test-cases/mainland-pretty.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/matrices.cabalnew file+73

This diff is too big to show here.

test/golden-test-cases/matrices.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/median-stream.cabalnew file+38

This diff is too big to show here.

test/golden-test-cases/median-stream.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/megaparsec.cabalnew file+142

This diff is too big to show here.

test/golden-test-cases/megaparsec.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/mersenne-random.cabalnew file+111

This diff is too big to show here.

test/golden-test-cases/mersenne-random.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/messagepack.cabalnew file+48

This diff is too big to show here.

test/golden-test-cases/messagepack.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/microlens-ghc.cabalnew file+44

This diff is too big to show here.

test/golden-test-cases/microlens-ghc.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/microlens.cabalnew file+71

This diff is too big to show here.

test/golden-test-cases/microlens.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/minio-hs.cabalnew file+245

This diff is too big to show here.

test/golden-test-cases/minio-hs.nix.goldennew file+34

This diff is too big to show here.

test/golden-test-cases/mmorph.cabalnew file+28

This diff is too big to show here.

test/golden-test-cases/mmorph.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/mnist-idx.cabalnew file+83

This diff is too big to show here.

test/golden-test-cases/mnist-idx.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/mole.cabalnew file+98

This diff is too big to show here.

test/golden-test-cases/mole.nix.goldennew file+26

This diff is too big to show here.

test/golden-test-cases/monad-products.cabalnew file+30

This diff is too big to show here.

test/golden-test-cases/monad-products.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/monadcryptorandom.cabalnew file+41

This diff is too big to show here.

test/golden-test-cases/monadcryptorandom.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/monadloc.cabalnew file+43

This diff is too big to show here.

test/golden-test-cases/monadloc.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/mongoDB.cabalnew file+117

This diff is too big to show here.

test/golden-test-cases/mongoDB.nix.goldennew file+29

This diff is too big to show here.

test/golden-test-cases/monoid-extras.cabalnew file+57

This diff is too big to show here.

test/golden-test-cases/monoid-extras.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/mwc-random-monad.cabalnew file+41

This diff is too big to show here.

test/golden-test-cases/mwc-random-monad.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/mwc-random.cabalnew file+88

This diff is too big to show here.

test/golden-test-cases/mwc-random.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/nanospec.cabalnew file+45

This diff is too big to show here.

test/golden-test-cases/nanospec.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/netpbm.cabalnew file+166

This diff is too big to show here.

test/golden-test-cases/netpbm.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/network-protocol-xmpp.cabalnew file+57

This diff is too big to show here.

test/golden-test-cases/network-protocol-xmpp.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/network-transport-tcp.cabalnew file+93

This diff is too big to show here.

test/golden-test-cases/network-transport-tcp.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/nix-paths.cabalnew file+37

This diff is too big to show here.

test/golden-test-cases/nix-paths.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/nvim-hs.cabalnew file+201

This diff is too big to show here.

test/golden-test-cases/nvim-hs.nix.goldennew file+39

This diff is too big to show here.

test/golden-test-cases/once.cabalnew file+30

This diff is too big to show here.

test/golden-test-cases/once.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/one-liner.cabalnew file+50

This diff is too big to show here.

test/golden-test-cases/one-liner.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/online.cabalnew file+85

This diff is too big to show here.

test/golden-test-cases/online.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/opencv.cabalnew file+263

This diff is too big to show here.

test/golden-test-cases/opencv.nix.goldennew file+30

This diff is too big to show here.

test/golden-test-cases/openexr-write.cabalnew file+52

This diff is too big to show here.

test/golden-test-cases/openexr-write.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/openpgp-asciiarmor.cabalnew file+62

This diff is too big to show here.

test/golden-test-cases/openpgp-asciiarmor.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/pager.cabalnew file+69

This diff is too big to show here.

test/golden-test-cases/pager.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/partial-isomorphisms.cabalnew file+50

This diff is too big to show here.

test/golden-test-cases/partial-isomorphisms.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/partial-semigroup.cabalnew file+154

This diff is too big to show here.

test/golden-test-cases/partial-semigroup.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/pathtype.cabalnew file+150

This diff is too big to show here.

test/golden-test-cases/pathtype.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/pcap.cabalnew file+39

This diff is too big to show here.

test/golden-test-cases/pcap.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/pdfinfo.cabalnew file+30

This diff is too big to show here.

test/golden-test-cases/pdfinfo.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/pell.cabalnew file+54

This diff is too big to show here.

test/golden-test-cases/pell.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/persistable-types-HDBC-pg.cabalnew file+42

This diff is too big to show here.

test/golden-test-cases/persistable-types-HDBC-pg.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/persistent-mysql-haskell.cabalnew file+66

This diff is too big to show here.

test/golden-test-cases/persistent-mysql-haskell.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/picosat.cabalnew file+72

This diff is too big to show here.

test/golden-test-cases/picosat.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/pinch.cabalnew file+111

This diff is too big to show here.

test/golden-test-cases/pinch.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/pipes-network.cabalnew file+51

This diff is too big to show here.

test/golden-test-cases/pipes-network.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/pipes-safe.cabalnew file+52

This diff is too big to show here.

test/golden-test-cases/pipes-safe.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/pointed.cabalnew file+98

This diff is too big to show here.

test/golden-test-cases/pointed.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/poly-arity.cabalnew file+23

This diff is too big to show here.

test/golden-test-cases/poly-arity.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/polynomials-bernstein.cabalnew file+22

This diff is too big to show here.

test/golden-test-cases/polynomials-bernstein.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/postgresql-simple-url.cabalnew file+43

This diff is too big to show here.

test/golden-test-cases/postgresql-simple-url.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/prelude-safeenum.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/prelude-safeenum.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/presburger.cabalnew file+32

This diff is too big to show here.

test/golden-test-cases/presburger.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/prettyclass.cabalnew file+15

This diff is too big to show here.

test/golden-test-cases/prettyclass.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.cabalnew file+36

This diff is too big to show here.

test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/prettyprinter-compat-wl-pprint.cabalnew file+35

This diff is too big to show here.

test/golden-test-cases/prettyprinter-compat-wl-pprint.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/primitive.cabalnew file+76

This diff is too big to show here.

test/golden-test-cases/primitive.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/product-profunctors.cabalnew file+53

This diff is too big to show here.

test/golden-test-cases/product-profunctors.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/profiterole.cabalnew file+44

This diff is too big to show here.

test/golden-test-cases/profiterole.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/projectroot.cabalnew file+43

This diff is too big to show here.

test/golden-test-cases/projectroot.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/proto-lens-optparse.cabalnew file+26

This diff is too big to show here.

test/golden-test-cases/proto-lens-optparse.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/proto-lens.cabalnew file+45

This diff is too big to show here.

test/golden-test-cases/proto-lens.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/psqueues.cabalnew file+156

This diff is too big to show here.

test/golden-test-cases/psqueues.nix.goldennew file+22

This diff is too big to show here.

test/golden-test-cases/pusher-http-haskell.cabalnew file+92

This diff is too big to show here.

test/golden-test-cases/pusher-http-haskell.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/quickcheck-arbitrary-adt.cabalnew file+40

This diff is too big to show here.

test/golden-test-cases/quickcheck-arbitrary-adt.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/quickcheck-combinators.cabalnew file+43

This diff is too big to show here.

test/golden-test-cases/quickcheck-combinators.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/rank1dynamic.cabalnew file+43

This diff is too big to show here.

test/golden-test-cases/rank1dynamic.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/rasterific-svg.cabalnew file+74

This diff is too big to show here.

test/golden-test-cases/rasterific-svg.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/ratio-int.cabalnew file+25

This diff is too big to show here.

test/golden-test-cases/ratio-int.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/rawstring-qm.cabalnew file+34

This diff is too big to show here.

test/golden-test-cases/rawstring-qm.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/reactive-banana.cabalnew file+88

This diff is too big to show here.

test/golden-test-cases/reactive-banana.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/readline.cabalnew file+33

This diff is too big to show here.

test/golden-test-cases/readline.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/rebase.cabalnew file+372

This diff is too big to show here.

test/golden-test-cases/rebase.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/reform-blaze.cabalnew file+29

This diff is too big to show here.

test/golden-test-cases/reform-blaze.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/reform-hsp.cabalnew file+28

This diff is too big to show here.

test/golden-test-cases/reform-hsp.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/regex-compat.cabalnew file+36

This diff is too big to show here.

test/golden-test-cases/regex-compat.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/regex-pcre.cabalnew file+68

This diff is too big to show here.

test/golden-test-cases/regex-pcre.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/relational-query.cabalnew file+171

This diff is too big to show here.

test/golden-test-cases/relational-query.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/relational-schemas.cabalnew file+100

This diff is too big to show here.

test/golden-test-cases/relational-schemas.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/repa-io.cabalnew file+40

This diff is too big to show here.

test/golden-test-cases/repa-io.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/repa.cabalnew file+98

This diff is too big to show here.

test/golden-test-cases/repa.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/rosezipper.cabalnew file+16

This diff is too big to show here.

test/golden-test-cases/rosezipper.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/rvar.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/rvar.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/scalpel-core.cabalnew file+87

This diff is too big to show here.

test/golden-test-cases/scalpel-core.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/sdl2.cabalnew file+452

This diff is too big to show here.

test/golden-test-cases/sdl2.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/selda-sqlite.cabalnew file+38

This diff is too big to show here.

test/golden-test-cases/selda-sqlite.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/selda.cabalnew file+110

This diff is too big to show here.

test/golden-test-cases/selda.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/servant-checked-exceptions.cabalnew file+145

This diff is too big to show here.

test/golden-test-cases/servant-checked-exceptions.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/set-cover.cabalnew file+253

This diff is too big to show here.

test/golden-test-cases/set-cover.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/sets.cabalnew file+85

This diff is too big to show here.

test/golden-test-cases/sets.nix.goldennew file+27

This diff is too big to show here.

test/golden-test-cases/simple-smt.cabalnew file+24

This diff is too big to show here.

test/golden-test-cases/simple-smt.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/slack-web.cabalnew file+97

This diff is too big to show here.

test/golden-test-cases/slack-web.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/slug.cabalnew file+65

This diff is too big to show here.

test/golden-test-cases/slug.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/soxlib.cabalnew file+70

This diff is too big to show here.

test/golden-test-cases/soxlib.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/speedy-slice.cabalnew file+80

This diff is too big to show here.

test/golden-test-cases/speedy-slice.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/splice.cabalnew file+66

This diff is too big to show here.

test/golden-test-cases/splice.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/spreadsheet.cabalnew file+108

This diff is too big to show here.

test/golden-test-cases/spreadsheet.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/stack-type.cabalnew file+25

This diff is too big to show here.

test/golden-test-cases/stack-type.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/state-codes.cabalnew file+60

This diff is too big to show here.

test/golden-test-cases/state-codes.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/stb-image-redux.cabalnew file+45

This diff is too big to show here.

test/golden-test-cases/stb-image-redux.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/stm-containers.cabalnew file+251

This diff is too big to show here.

test/golden-test-cases/stm-containers.nix.goldennew file+27

This diff is too big to show here.

test/golden-test-cases/streaming-commons.cabalnew file+161

This diff is too big to show here.

test/golden-test-cases/streaming-commons.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/strict-base-types.cabalnew file+130

This diff is too big to show here.

test/golden-test-cases/strict-base-types.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/strict-types.cabalnew file+34

This diff is too big to show here.

test/golden-test-cases/strict-types.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/string-class.cabalnew file+60

This diff is too big to show here.

test/golden-test-cases/string-class.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/stripe-haskell.cabalnew file+35

This diff is too big to show here.

test/golden-test-cases/stripe-haskell.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/svg-tree.cabalnew file+61

This diff is too big to show here.

test/golden-test-cases/svg-tree.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/swagger.cabalnew file+61

This diff is too big to show here.

test/golden-test-cases/swagger.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/system-argv0.cabalnew file+42

This diff is too big to show here.

test/golden-test-cases/system-argv0.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/system-fileio.cabalnew file+91

This diff is too big to show here.

test/golden-test-cases/system-fileio.nix.goldennew file+18

This diff is too big to show here.

test/golden-test-cases/system-filepath.cabalnew file+61

This diff is too big to show here.

test/golden-test-cases/system-filepath.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/tagged.cabalnew file+67

This diff is too big to show here.

test/golden-test-cases/tagged.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/taggy.cabalnew file+140

This diff is too big to show here.

test/golden-test-cases/taggy.nix.goldennew file+27

This diff is too big to show here.

test/golden-test-cases/tagstream-conduit.cabalnew file+62

This diff is too big to show here.

test/golden-test-cases/tagstream-conduit.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/tasty-hedgehog.cabalnew file+41

This diff is too big to show here.

test/golden-test-cases/tasty-hedgehog.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/tasty-rerun.cabalnew file+87

This diff is too big to show here.

test/golden-test-cases/tasty-rerun.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/tce-conf.cabalnew file+66

This diff is too big to show here.

test/golden-test-cases/tce-conf.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/terminal-progress-bar.cabalnew file+69

This diff is too big to show here.

test/golden-test-cases/terminal-progress-bar.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/test-fixture.cabalnew file+78

This diff is too big to show here.

test/golden-test-cases/test-fixture.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/texmath.cabalnew file+156

This diff is too big to show here.

test/golden-test-cases/texmath.nix.goldennew file+21

This diff is too big to show here.

test/golden-test-cases/text-icu.cabalnew file+118

This diff is too big to show here.

test/golden-test-cases/text-icu.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/text-postgresql.cabalnew file+50

This diff is too big to show here.

test/golden-test-cases/text-postgresql.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/th-expand-syns.cabalnew file+39

This diff is too big to show here.

test/golden-test-cases/th-expand-syns.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/these.cabalnew file+90

This diff is too big to show here.

test/golden-test-cases/these.nix.goldennew file+24

This diff is too big to show here.

test/golden-test-cases/timezone-series.cabalnew file+57

This diff is too big to show here.

test/golden-test-cases/timezone-series.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/transformers-compat.cabalnew file+99

This diff is too big to show here.

test/golden-test-cases/transformers-compat.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/transformers-lift.cabalnew file+36

This diff is too big to show here.

test/golden-test-cases/transformers-lift.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/tree-fun.cabalnew file+70

This diff is too big to show here.

test/golden-test-cases/tree-fun.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/ttrie.cabalnew file+68

This diff is too big to show here.

test/golden-test-cases/ttrie.nix.goldennew file+26

This diff is too big to show here.

test/golden-test-cases/tuple-th.cabalnew file+23

This diff is too big to show here.

test/golden-test-cases/tuple-th.nix.goldennew file+9

This diff is too big to show here.

test/golden-test-cases/tuples-homogenous-h98.cabalnew file+59

This diff is too big to show here.

test/golden-test-cases/tuples-homogenous-h98.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/turtle-options.cabalnew file+56

This diff is too big to show here.

test/golden-test-cases/turtle-options.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/type-operators.cabalnew file+26

This diff is too big to show here.

test/golden-test-cases/type-operators.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/type-spec.cabalnew file+102

This diff is too big to show here.

test/golden-test-cases/type-spec.nix.goldennew file+11

This diff is too big to show here.

test/golden-test-cases/unicode-show.cabalnew file+48

This diff is too big to show here.

test/golden-test-cases/unicode-show.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/unique.cabalnew file+31

This diff is too big to show here.

test/golden-test-cases/unique.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/unix-bytestring.cabalnew file+62

This diff is too big to show here.

test/golden-test-cases/unix-bytestring.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/unlit.cabalnew file+44

This diff is too big to show here.

test/golden-test-cases/unlit.nix.goldennew file+12

This diff is too big to show here.

test/golden-test-cases/utility-ht.cabalnew file+108

This diff is too big to show here.

test/golden-test-cases/utility-ht.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/validity-aeson.cabalnew file+33

This diff is too big to show here.

test/golden-test-cases/validity-aeson.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/validity-containers.cabalnew file+33

This diff is too big to show here.

test/golden-test-cases/validity-containers.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/vector-mmap.cabalnew file+33

This diff is too big to show here.

test/golden-test-cases/vector-mmap.nix.goldennew file+13

This diff is too big to show here.

test/golden-test-cases/vivid-supercollider.cabalnew file+69

This diff is too big to show here.

test/golden-test-cases/vivid-supercollider.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/vty.cabalnew file+624

This diff is too big to show here.

test/golden-test-cases/vty.nix.goldennew file+33

This diff is too big to show here.

test/golden-test-cases/wai-cors.cabalnew file+168

This diff is too big to show here.

test/golden-test-cases/wai-cors.nix.goldennew file+23

This diff is too big to show here.

test/golden-test-cases/wai-middleware-auth.cabalnew file+75

This diff is too big to show here.

test/golden-test-cases/wai-middleware-auth.nix.goldennew file+28

This diff is too big to show here.

test/golden-test-cases/wai-middleware-caching-redis.cabalnew file+40

This diff is too big to show here.

test/golden-test-cases/wai-middleware-caching-redis.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/wai-middleware-prometheus.cabalnew file+46

This diff is too big to show here.

test/golden-test-cases/wai-middleware-prometheus.nix.goldennew file+16

This diff is too big to show here.

test/golden-test-cases/warp.cabalnew file+208

This diff is too big to show here.

test/golden-test-cases/warp.nix.goldennew file+34

This diff is too big to show here.

test/golden-test-cases/weigh.cabalnew file+60

This diff is too big to show here.

test/golden-test-cases/weigh.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/xml-hamlet.cabalnew file+44

This diff is too big to show here.

test/golden-test-cases/xml-hamlet.nix.goldennew file+19

This diff is too big to show here.

test/golden-test-cases/xmonad-contrib.cabalnew file+338

This diff is too big to show here.

test/golden-test-cases/xmonad-contrib.nix.goldennew file+17

This diff is too big to show here.

test/golden-test-cases/yahoo-finance-api.cabalnew file+71

This diff is too big to show here.

test/golden-test-cases/yahoo-finance-api.nix.goldennew file+20

This diff is too big to show here.

test/golden-test-cases/yesod-form-bootstrap4.cabalnew file+31

This diff is too big to show here.

test/golden-test-cases/yesod-form-bootstrap4.nix.goldennew file+10

This diff is too big to show here.

test/golden-test-cases/yesod-gitrepo.cabalnew file+28

This diff is too big to show here.

test/golden-test-cases/yesod-gitrepo.nix.goldennew file+15

This diff is too big to show here.

test/golden-test-cases/yesod-recaptcha2.cabalnew file+37

This diff is too big to show here.

test/golden-test-cases/yesod-recaptcha2.nix.goldennew file+14

This diff is too big to show here.

test/golden-test-cases/zlib.cabalnew file+97

This diff is too big to show here.

test/golden-test-cases/zlib.nix.goldennew file+15

This diff is too big to show here.

update-hackage-snapshot.shnew file+19

This diff is too big to show here.

update-nixpkgs.shnew file+47

This diff is too big to show here.

update-stackage.shnew file+53

This diff is too big to show here.