Skip to content

Commit 488dc4d

Browse files
authored
Merge branch 'master' into angerman/android-static
2 parents ddc654e + 506208f commit 488dc4d

File tree

1,442 files changed

+215002
-18388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,442 files changed

+215002
-18388
lines changed

.buildkite/pipeline.yml

+135-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,117 @@
11
steps:
2-
- label: 'Run tests with ghc8107'
3-
command: "./test/tests.sh ghc8107"
2+
- label: 'Run tests with ghc8107: Running the nix-build tests...'
3+
command: "./test/tests.sh ghc8107 nix-build"
44
agents:
55
system: x86_64-linux
66

7-
- label: 'Check that jobset will evaluate in Hydra'
7+
- label: 'Run tests with ghc8107: Running the unit tests...'
8+
command: "./test/tests.sh ghc8107 unit-tests"
9+
agents:
10+
system: x86_64-linux
11+
12+
- label: 'Run tests with ghc8107: Checking that a nix-shell works for runghc...'
13+
command: "./test/tests.sh ghc8107 runghc"
14+
agents:
15+
system: x86_64-linux
16+
17+
- label: 'Run tests with ghc8107: Checking that a nix-shell works for cabal...'
18+
command: "./test/tests.sh ghc8107 cabal"
19+
agents:
20+
system: x86_64-linux
21+
22+
- label: 'Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)...'
23+
command: "./test/tests.sh ghc8107 cabal-doExactConfig"
24+
agents:
25+
system: x86_64-linux
26+
27+
- label: 'Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks...'
28+
command: "./test/tests.sh ghc8107 tests-benchmarks"
29+
agents:
30+
system: x86_64-linux
31+
32+
- label: 'Run tests with ghc8107: Checking that a nix-shell works for a multi-target project...'
33+
command: "./test/tests.sh ghc8107 multi-target"
34+
agents:
35+
system: x86_64-linux
36+
37+
- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages...'
38+
command: "./test/tests.sh ghc8107 shellFor-single-package"
39+
agents:
40+
system: x86_64-linux
41+
42+
- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y'
43+
command: "./test/tests.sh ghc8107 shellFor-multiple-package"
44+
agents:
45+
system: x86_64-linux
46+
47+
- label: 'Run tests with ghc8107: Checking shellFor works for a cabal project, single package...'
48+
command: "./test/tests.sh ghc8107 shellFor-hoogle"
49+
agents:
50+
system: x86_64-linux
51+
52+
- label: 'Run tests with ghc8107: Checking shellFor does not depend on given packages...y'
53+
command: "./test/tests.sh ghc8107 shellFor-not-depends"
54+
agents:
55+
system: x86_64-linux
56+
57+
- label: 'Run tests with ghc8107: Checking the maintainer scripts...y'
58+
command: "./test/tests.sh ghc8107 maintainer-scripts"
59+
agents:
60+
system: x86_64-linux
61+
62+
- label: 'Run tests with ghc8107: Checking that plan construction works with extra Hackages...'
63+
command: "./test/tests.sh ghc8107 plan-extra-hackages"
64+
agents:
65+
system: x86_64-linux
66+
67+
- label: 'Run tests with ghc8107: Checking that package with extra Hackages can be build...'
68+
command: "./test/tests.sh ghc8107 build-extra-hackages"
69+
agents:
70+
system: x86_64-linux
71+
72+
- label: 'Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ...'
73+
command: "./test/tests.sh ghc8107 hix"
74+
agents:
75+
system: x86_64-linux
76+
77+
- label: 'Test examples in documentation ...'
78+
command: "./test/tests.sh ghc8107 docs"
79+
agents:
80+
system: x86_64-linux
81+
82+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 0 and 1'
83+
command:
84+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
85+
- ./check-hydra.sh --arg ifdLevel 0
86+
- ./check-hydra.sh --arg ifdLevel 1
87+
agents:
88+
system: x86_64-linux
89+
90+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 2'
91+
command:
92+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
93+
- ./check-hydra.sh --arg ifdLevel 2
94+
agents:
95+
system: x86_64-linux
96+
97+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 8.10'
98+
command:
99+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
100+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 6 x == \"ghc810\"'"
101+
agents:
102+
system: x86_64-linux
103+
104+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 9.2'
8105
command:
9106
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
10-
- ./check-hydra.sh 0
11-
- ./check-hydra.sh 1
12-
- ./check-hydra.sh 2
13-
- ./check-hydra.sh 3
107+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 5 x == \"ghc92\"'"
108+
agents:
109+
system: x86_64-linux
110+
111+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and not (ghc 8.10 or ghc 9.2)'
112+
command:
113+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
114+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: !(__substring 0 6 x == \"ghc810\" || __substring 0 5 x == \"ghc92\")'"
14115
agents:
15116
system: x86_64-linux
16117

@@ -33,8 +134,35 @@ steps:
33134
command:
34135
- nix-build build.nix -A maintainer-scripts.check-materialization-concurrency -o check-materialization-concurrency.sh
35136
- ./check-materialization-concurrency.sh
137+
retry:
138+
automatic:
139+
- exit_status: "*"
140+
limit: 10
36141

37142
- label: 'Make sure non store paths like can be used as src'
38143
command:
39144
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
40145
- ./check-path-support.sh
146+
147+
- label: 'Check that the haskell.nix roots do not require IFDs'
148+
command:
149+
- nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
150+
agents:
151+
system: x86_64-linux
152+
153+
- label: 'Check that evaluation of hydra jobs works without using remote builders'
154+
command:
155+
- nix-instantiate release.nix -A x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders ''
156+
agents:
157+
system: x86_64-linux
158+
159+
- label: 'Check hix -- run github:haskell/cabal/3.8#cabal-install:exe:cabal -- --version'
160+
command:
161+
- "HIX_DIR=$(mktemp -d) nix run .#hix --accept-flake-config -- run github:haskell/cabal/3.8#cabal-install:exe:cabal --accept-flake-config --override-input haskellNix . -- --version"
162+
agents:
163+
system: x86_64-linux
164+
165+
- label: 'nix-tools build'
166+
command: cd ./nix-tools && .buildkite/nix-tools-build.sh
167+
agents:
168+
system: x86_64-linux

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
This template is a guide only, feel free add or omit sections as appropriate.
11+
12+
**Describe the bug**
13+
14+
A clear and concise description of what the bug is, including:
15+
16+
* Build system (eg. `x86_64-linux` or `aarch64-darwin`).
17+
* GHC version.
18+
* Haskell.nix version (or commit) used.
19+
20+
**Steps To Reproduce**
21+
22+
Steps for reproducing (try to minimise the size of the code base if possible).
23+
24+
Bonus points if it is in a PR to add a test case.
25+
26+
**Expected behavior**
27+
28+
A clear and concise description of what you expected to happen.
29+
30+
**Additional context**
31+
32+
Add any other context about the problem here.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
This template is a guide only, feel free add or omit sections as appropriate.
11+
12+
**Is your feature request related to a problem? Please describe.**
13+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14+
15+
**Describe the solution you'd like**
16+
A clear and concise description of what you want to happen.
17+
18+
**Describe alternatives you've considered**
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
**Additional context**
22+
Add any other context or screenshots about the feature request here.

.github/stale.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 120
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 60
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- "help wanted"
8+
- pinned
9+
- preserved
10+
- security
11+
# Label to use when marking an issue as stale
12+
staleLabel: wontfix
13+
# Comment to post when marking an issue as stale. Set to `false` to disable
14+
markComment: >
15+
This issue has been automatically marked as stale because it has not had
16+
recent activity. It will be closed if no further activity occurs. Thank you
17+
for your contributions.
18+
# Comment to post when closing a stale issue. Set to `false` to disable
19+
closeComment: false

.github/workflows/autotag.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
jobs:
7+
tag:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node-version:
12+
- 12
13+
steps:
14+
- uses: phish108/[email protected]
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Test secp256k1 on windows"
2+
on: workflow_dispatch
3+
jobs:
4+
tests:
5+
runs-on: windows-latest
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
steps:
12+
13+
- uses: haskell/actions/setup@v1
14+
id: setup-haskell
15+
with:
16+
ghc-version: 8.10.7
17+
cabal-version: 3.6.2.0
18+
19+
- name: Install pkgconfiglite
20+
run: choco install -y pkgconfiglite
21+
22+
- name: Install libsecp256k1
23+
run: |
24+
curl -Ls \
25+
--connect-timeout 5 \
26+
--max-time 10 \
27+
--retry 5 \
28+
--retry-delay 0 \
29+
--retry-max-time 40 \
30+
https://hydra.iohk.io/job/Cardano/haskell-nix/windows-secp256k1/latest/download/1 -o secp256k1.zip
31+
mkdir secp256k1
32+
cd secp256k1
33+
unzip ../secp256k1.zip
34+
cd ..
35+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH;$(readlink -f secp256k1/lib/pkgconfig | sed 's|^/d|D:|g' | tr / '\\')"
36+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
37+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
38+
export SECP256K1_PATH="$(readlink -f secp256k1/bin | sed 's|^/d|D:|g' | tr / '\\')"
39+
echo "SECP256K1_PATH=$SECP256K1_PATH"
40+
echo "$SECP256K1_PATH" >> $GITHUB_PATH
41+
42+
- name: Cabal update
43+
run: cabal update
44+
45+
- name: Build and run haskell-secp256k1 tests
46+
run: |
47+
cabal unpack secp256k1-haskell
48+
cd secp256k1-haskell-*
49+
cabal build --enable-tests
50+
cabal test
51+

.gitignore

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# The output of "mkdocs build"
2-
/site/
3-
docs/reference/modules.md
1+
# The output of "mdbook build"
2+
/book/
3+
/docs/reference/modules.md
4+
/docs/**/index.html
45

56
# Nix build results
67
result*
78
/nt
89

10+
# https://github.com/nix-community/nix-direnv
11+
.direnv
12+
913
# Created by https://www.gitignore.io/api/haskell,emacs,vim
1014

1115
### Emacs ###

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ its dependencies into Nix code.
99
## Documentation
1010

1111
- [Introduction](https://input-output-hk.github.io/haskell.nix/index.html)
12-
- [Getting Started](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html)
13-
- [Troubleshooting](https://input-output-hk.github.io/haskell.nix/troubleshooting.html)
12+
- [Getting Started](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started)
13+
- [Troubleshooting](https://input-output-hk.github.io/haskell.nix/troubleshooting)
1414
- Explore the documentation from there to find further topics.
1515

1616
## Help! Something isn't working
1717

1818
The #1 problem that people have when using `haskell.nix` is that they find themselves building GHC.
1919
This should not happen, but you *must* follow the `haskell.nix` setup instructions properly to avoid it.
2020
If you find this happening to you, please check that you have followed the
21-
[getting started instructions](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html#setting-up-the-binary-cache) and
22-
consult the corresponding [troubleshooting section](https://input-output-hk.github.io/haskell.nix/troubleshooting.html#why-am-i-building-ghc).
21+
[getting started instructions](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started#setting-up-the-binary-cache) and
22+
consult the corresponding [troubleshooting section](https://input-output-hk.github.io/haskell.nix/troubleshooting#why-am-i-building-ghc).
2323

2424
The troubleshooting documentation also contains some help for other common issues.
2525
Please give it a read before asking on IRC or opening an issue.

book.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[book]
2+
language = "en"
3+
multilingual = false
4+
src = "docs"
5+
title = "Alternative Haskell Infrastructure for Nixpkgs"

0 commit comments

Comments
 (0)