Skip to content

Commit edad820

Browse files
authored
Fix buildkite issues (input-output-hk#73)
* Fix buildkite issues * Use default nixpkgs truncateIndex test. Update hash
1 parent f081608 commit edad820

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

nix-tools/.buildkite/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#! /usr/bin/env nix-shell
2-
#! nix-shell -I "nixpkgs=channel:nixos-19.03" --pure -i bash -p nix cabal-install ghc git nix-prefetch-git
2+
#! nix-shell -I "nixpkgs=channel:nixos-19.09" --pure -i bash -p nix cabal-install ghc git nix-prefetch-git cacert
33

4-
export NIX_PATH="nixpkgs=channel:nixos-19.03"
5-
index_state="2019-09-15T00:00:00Z"
6-
expected_hash="1qgk0dnsq2j7sa5ww9vv8ikj0cxc4b1y87z22a1mvizjd8h5nlw8"
4+
export NIX_PATH="nixpkgs=channel:nixos-19.09"
5+
index_state="2020-01-10T00:00:00Z"
6+
expected_hash="0z2jc4fibfxz88pfgjq3wk5j3v7sn34xkwb8h60hbwfwhhy63vx6"
77

88
set -euo pipefail
99

@@ -17,7 +17,7 @@ cabal new-configure
1717

1818
echo
1919
echo "+++ Run stable version of plan-to-nix"
20-
nix build -f https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz nix-tools -o nt
20+
nix build '(let haskellNix = builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz"; in (import (haskellNix + "/nixpkgs") (import haskellNix)).haskell-nix.nix-tools)' -o nt
2121
./nt/bin/plan-to-nix --output .buildkite/nix1 --plan-json dist-newstyle/cache/plan.json
2222

2323
echo

nix-tools/.buildkite/nix1/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{ nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/2255f292063ccbe184ff8f9b35ce475c04d5ae69.tar.gz }:
1+
{ haskellNixSrc ? builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz
2+
, nixpkgs ? haskellNixSrc + "/nixpkgs" }:
23

34
let
4-
pkgs = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/hkm/overlays-2.tar.gz) { inherit nixpkgs; };
5+
pkgs = import nixpkgs (import haskellNixSrc);
56

67
pkgSet = pkgs.haskell-nix.mkCabalProjectPkgSet {
78
plan-pkgs = import ./pkgs.nix;

nix-tools/.buildkite/nix2/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{ nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/2255f292063ccbe184ff8f9b35ce475c04d5ae69.tar.gz }:
1+
{ haskellNixSrc ? builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz
2+
, nixpkgs ? haskellNixSrc + "/nixpkgs" }:
23

34
let
4-
pkgs = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/hkm/overlays-2.tar.gz) { inherit nixpkgs; };
5+
pkgs = import nixpkgs (import haskellNixSrc);
56

67
pkgSet = pkgs.haskell-nix.mkCabalProjectPkgSet {
78
plan-pkgs = import ./pkgs.nix;

nix-tools/plan2nix/Plan2Nix.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,13 @@ value2plan plan = Plan { packages, extras, compilerVersion, compilerPackages }
239239

240240

241241
defaultNixContents = unlines $
242-
[ "{ pkgs ? import <nixpkgs> {} }:"
242+
[ "{ haskellNixSrc ? builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz"
243+
, ", nixpkgs ? haskellNixSrc + \"/nixpkgs\" }:"
243244
, ""
244245
, "let"
245-
, " haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) { inherit pkgs; };"
246+
, " pkgs = import nixpkgs (import haskellNixSrc);"
246247
, ""
247-
, " pkgSet = haskell.mkCabalProjectPkgSet {"
248+
, " pkgSet = pkgs.haskell-nix.mkCabalProjectPkgSet {"
248249
, " plan-pkgs = import ./pkgs.nix;"
249250
, " pkg-def-extras = [];"
250251
, " modules = [];"

nix-tools/stack2nix/Stack2nix.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,13 @@ packages2nix args pkgs =
192192

193193
defaultNixContents :: String
194194
defaultNixContents = unlines
195-
[ "{ pkgs ? import <nixpkgs> {} }:"
195+
[ "{ haskellNixSrc ? builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz"
196+
, ", nixpkgs ? haskellNixSrc + \"/nixpkgs\" }:"
196197
, ""
197198
, "let"
198-
, " haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) { inherit pkgs; };"
199+
, " pkgs = import nixpkgs (import haskellNixSrc);"
199200
, ""
200-
, " pkgSet = haskell.mkStackPkgSet {"
201+
, " pkgSet = pkgs.haskell-nix.mkStackPkgSet {"
201202
, " stack-pkgs = import ./pkgs.nix;"
202203
, " pkg-def-extras = [];"
203204
, " modules = [];"

nix-tools/test/truncate-index.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
rec {
88
pkgs = import nixpkgs {};
9-
hsPkgs = import nix-tools-path { inherit nixpkgs; };
9+
hsPkgs = import nix-tools-path {};
1010
index = builtins.fetchurl http://hackage.haskell.org/01-index.tar.gz;
1111
indexTruncated = pkgs.runCommand "00-index.tar.gz" {
1212
outputHashAlgo = "sha256";

0 commit comments

Comments
 (0)