File tree 2 files changed +64
-0
lines changed
2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Update hackage.nix"
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ - cron : " 0 0 * * *"
7
+
8
+ jobs :
9
+ update-hackage :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+
14
+ - uses : cachix/install-nix-action@v15
15
+ with :
16
+ nix_path : nixpkgs=channel:nixos-unstable
17
+ extra_nix_config : |
18
+ trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
19
+ substituters = https://cache.iog.io https://cache.zw3rk.com https://cache.nixos.org/
20
+
21
+ - name : " Update hackage.nix and stackage.nix"
22
+ run : |
23
+ export CABAL_DIR=$HOME/.cabal
24
+ nix run github:input-output-hk/haskell.nix#cabal -- v2-update
25
+ nix run github:input-output-hk/haskell.nix#hackage-to-nix -- . $CABAL_DIR/packages/hackage.haskell.org/01-index.tar
26
+ nix run github:input-output-hk/haskell.nix#haskell-nix.update-index-state-hashes > index-state-hashes.nix
27
+
28
+ - name : " Commit and push changes to the for-stackage branch"
29
+ run : |
30
+ git checkout for-stackage
31
+
32
+ git config --local user.email "[email protected] "
33
+ git config --local user.name "IOHK"
34
+ git add .
35
+ git commit -m "Automatic Update" || echo "No changes to commit"
36
+ git push
37
+
38
+ - name : " Update master branch"
39
+ run : |
40
+ git checkout master
41
+ git merge for-stackage --no-edit
42
+
43
+ # Remove files only needed for stackage
44
+ rm -rf hackage nix
45
+ rm hackage.json update.sh default.nix
46
+
47
+ # Stage deletions and any other changes, and commit if there are differences.
48
+ git add -A
49
+ git diff --cached --quiet || git commit -m "Update index-state-only branch"
50
+ git push
Original file line number Diff line number Diff line change
1
+ # hackage.nix
2
+
3
+ This repository contains the index-state hashes of [[http://hackage.org][hackage.org]]
4
+ needed for [[https://github.com/input-output-hk/haskell.nix][haskell.nix]].
5
+
6
+ It is periodically updated to stay in sync.
7
+
8
+ ## for-stackage branch
9
+
10
+ The for-stackage branch also contains all cabal expressions from
11
+ [[http://hackage.org][hackage.org]] as nix expressions.
12
+
13
+ This branch is used when working with stack projects in
14
+ haskell.nix.
You can’t perform that action at this time.
0 commit comments