Skip to content

Commit

Permalink
Add a test for nixpkgs_git_repository
Browse files Browse the repository at this point in the history
Make sure the migration instructions given for `path` actually work in
practice.
  • Loading branch information
Profpatsch committed Oct 22, 2018
1 parent 894ee7a commit 0338c74
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ package(default_testonly = 1)
"expr-attribute-test",
"nix-file-test",
"nix-file-deps-test",
"nixpkgs-git-repository-test",
]]

0 comments on commit 0338c74

Please sign in to comment.