diff --git a/.circleci/config.yml b/.circleci/config.yml index 29d8e04d9..44e5c59ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - run: name: System dependencies command: | - export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/75942f96b3f7136cdc9cc7d9704824f17fabec02.tar.gz + export NIX_PATH=nixpkgs=$PWD/nix/default.nix apk update --no-progress && apk --no-progress add bash ca-certificates nix-env -iA nixpkgs.bazel nixpkgs.gcc - run: diff --git a/BUILD b/BUILD new file mode 100644 index 000000000..e69de29bb diff --git a/WORKSPACE b/WORKSPACE index c94de60d3..bf50b5675 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 {}; 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 {}", 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", ) diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 000000000..4da4ebde4 --- /dev/null +++ b/nix/default.nix @@ -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