File tree Expand file tree Collapse file tree 3 files changed +51
-15
lines changed Expand file tree Collapse file tree 3 files changed +51
-15
lines changed Original file line number Diff line number Diff line change
1
+ steps :
2
+ - label : ' Update hackage.nix'
3
+ command :
4
+ - nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz -A maintainer-scripts.update-hackage -o update-hackage.sh
5
+ - echo "+++ Updating hackage.nix"
6
+ - ./update-hackage.sh
7
+ agents :
8
+ system : x86_64-linux
9
+
10
+ - label : ' Update stackage.nix'
11
+ command :
12
+ - nix-build -I nixpkgs=channel:nixos-18.09 -A maintainer-scripts.update-stackage -o update-stackage.sh
13
+ - echo "+++ Updating stackage.nix"
14
+ - ./update-stackage.sh
15
+ agents :
16
+ system : x86_64-linux
Original file line number Diff line number Diff line change 4
4
5
5
with stdenv . lib ;
6
6
7
- writeScript "update-${ name } -nix.sh" ''
8
- #!${ stdenv . shell }
7
+ let
8
+ repoHTTPS = "https://github.com/input-output-hk/${ name } .nix.git" ;
9
+ repoSSH = "[email protected] :input-output-hk/${ name } .nix.git" ;
10
+ sshKey = "/run/keys/buildkite-${ name } -ssh-private" ;
11
+ in
12
+ writeScript "update-${ name } -nix.sh" ''
13
+ #!${ stdenv . shell }
9
14
10
- set -euo pipefail
15
+ set -euo pipefail
11
16
12
- export PATH="${ makeBinPath [ coreutils glibc git nix-tools cabal-install nix-prefetch-git ] } "
17
+ export PATH="${ makeBinPath [ coreutils glibc git nix-tools cabal-install nix-prefetch-git ] } "
13
18
14
- ${ script }
19
+ ${ script }
15
20
16
- git add .
17
- git commit --allow-empty -m "Automatic update for $(date)"
21
+ echo "Committing changes..."
22
+ export GIT_COMMITTER_NAME="IOHK"
23
+ export GIT_COMMITTER_EMAIL="[email protected] "
24
+ export GIT_AUTHOR_NAME="$GIT_COMMITTER_NAME"
25
+ export GIT_AUTHOR_EMAIL="$GIT_COMMITTER_EMAIL"
26
+ git add .
27
+ git commit --allow-empty --message "Automatic update for $(date)"
18
28
19
- rev=$(git rev-parse HEAD)
29
+ rev=$(git rev-parse HEAD)
20
30
21
- git push
31
+ if [ -e ${ sshKey } ]
32
+ then
33
+ echo "Authenticating using SSH with ${ sshKey } "
34
+ export GIT_SSH_COMMAND="ssh -i ${ sshKey } -F /dev/null"
35
+ else
36
+ echo "There is no SSH key at ${ sshKey } "
37
+ echo "Git push may not work."
38
+ fi
22
39
23
- cd ..
40
+ git push ${ repoSSH }
24
41
25
- nix-prefetch-git https://github.com/input-output-hk/${ name } .nix.git --rev "$rev" | tee ${ name } -src.json
26
- ''
42
+ cd ..
43
+
44
+ nix-prefetch-git ${ repoHTTPS } --rev "$rev" | tee ${ name } -src.json
45
+ ''
Original file line number Diff line number Diff line change 3
3
import ./update-external.nix args {
4
4
name = "hackage" ;
5
5
script = ''
6
- # Make sure the hackage index is recent.
7
- cabal new-update
8
-
9
6
# Clone or update the Hackage Nix expressions repo.
10
7
if [ -d hackage.nix ]; then
11
8
cd hackage.nix
@@ -15,6 +12,10 @@ import ./update-external.nix args {
15
12
git clone [email protected] :input-output-hk/hackage.nix.git
16
13
fi
17
14
15
+ # Make sure the hackage index is recent.
16
+ echo "Updating local hackage index..."
17
+ cabal update
18
+
18
19
echo "Running hackage-to-nix..."
19
20
20
21
hackage-to-nix hackage.nix
You can’t perform that action at this time.
0 commit comments