From 0338c74d745c55635123907338ff760273e8542b Mon Sep 17 00:00:00 2001 From: Philip Patsch Date: Mon, 22 Oct 2018 19:35:05 +0200 Subject: [PATCH] Add a test for `nixpkgs_git_repository` Make sure the migration instructions given for `path` actually work in practice. --- WORKSPACE | 18 +++++++++++++++++- tests/BUILD | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index a35b5ddc0..731c028ee 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,7 +4,23 @@ load("//nixpkgs:nixpkgs.bzl", "nixpkgs_git_repository", "nixpkgs_package") # For tests -nixpkgs_package(name = "hello", repositories = { "nixpkgs": "//:nix/default.nix" }) +nixpkgs_git_repository( + name = "remote_nixpkgs", + remote = "https://github.com/NixOS/nixpkgs", + revision = "18.09", + sha256 = "6451af4083485e13daa427f745cbf859bc23cb8b70454c017887c006a13bd65e", +) + +nixpkgs_package( + name = "nixpkgs-git-repository-test", + repositories = { "nixpkgs": "@remote_nixpkgs//:default.nix" }, + attribute_path = "hello", +) + +nixpkgs_package( + name = "hello", + repositories = { "nixpkgs": "//:nix/default.nix" } +) nixpkgs_package( name = "expr-test", diff --git a/tests/BUILD b/tests/BUILD index 46c6f05b3..373d2bb56 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -13,4 +13,5 @@ package(default_testonly = 1) "expr-attribute-test", "nix-file-test", "nix-file-deps-test", + "nixpkgs-git-repository-test", ]]