Skip to content

Commit

Permalink
Merge pull request tweag#31 from tweag/pin-nixpkgs
Browse files Browse the repository at this point in the history
Pin nixpkgs revision in the CI
  • Loading branch information
Profpatsch authored Sep 27, 2018
2 parents b83e0d0 + 36d0ee1 commit da7574a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ jobs:
- run:
name: System dependencies
command: |
export NIX_PATH=nixpkgs=$PWD/nix/default.nix
apk update --no-progress && apk --no-progress add bash ca-certificates
nix-channel --update && nix-env -iA nixpkgs.bazel nixpkgs.gcc
nix-env -iA nixpkgs.bazel nixpkgs.gcc
- run:
name: Run tests
command: bazel test //...
Empty file added BUILD
Empty file.
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,38 @@ nixpkgs_git_repository(
sha256 = "405f1d6ba523630c83fbabef93f0da11ea388510a576adf2ded26a744fbf793e",
)

nixpkgs_package(name = "hello", repository = "@nixpkgs")
nixpkgs_package(name = "hello", repository = "//:nix/default.nix")

nixpkgs_package(
name = "expr-test",
nix_file_content = "let pkgs = import <nixpkgs> {}; in pkgs.hello",
repository = "@nixpkgs"
repository = "//:nix/default.nix"
)

nixpkgs_package(
name = "attribute-test",
attribute_path = "hello",
repository = "@nixpkgs"
repository = "//:nix/default.nix"
)

nixpkgs_package(
name = "expr-attribute-test",
nix_file_content = "import <nixpkgs> {}",
attribute_path = "hello",
repository = "@nixpkgs",
repository = "//:nix/default.nix",
)

nixpkgs_package(
name = "nix-file-test",
nix_file = "//tests:nixpkgs.nix",
attribute_path = "hello",
repository = "@nixpkgs",
repository = "//:nix/default.nix",
)

nixpkgs_package(
name = "nix-file-deps-test",
nix_file = "//tests:hello.nix",
nix_file_deps = ["//tests:pkgname.nix"],
repository = "@nixpkgs",
repository = "//:nix/default.nix",
)

9 changes: 9 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let
nixpkgsRev = "75942f96b3f7136cdc9cc7d9704824f17fabec02";
nixpkgsSha256 = "0ay4v4n856xl79ilym4w6vbp6pxzmn8l31j1ch98wa1lj7l71lgi";
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgsRev}.tar.gz";
sha256 = nixpkgsSha256;
};
in
import nixpkgs

0 comments on commit da7574a

Please sign in to comment.