From ea744d4cf8ffcf03cb3b2e4e1ac974fd582a868f Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 2 Sep 2018 18:53:33 -0400 Subject: [PATCH 1/2] Mark repository revision as required, fixes #26. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b52a4f38..1f8f79d6 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ nixpkgs_git_repository(name, revision, sha256) revision -

String; optional

+

String; required

Git commit hash or tag identifying the version of Nixpkgs to use.

From 944d1b080e37e863595e4e999c434b2827ed0984 Mon Sep 17 00:00:00 2001 From: Philip Patsch Date: Mon, 3 Sep 2018 11:44:43 +0200 Subject: [PATCH 2/2] Make revision attr mandatory & improve docs --- README.md | 6 ++++-- nixpkgs/nixpkgs.bzl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f8f79d6..d05c83fb 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,16 @@ nixpkgs_git_repository(name, revision, sha256)

String; optional

The URI of the remote Git repository. This must be a HTTP - URL. There is currently no support for authentication.

+ URL. There is currently no support for authentication. + Defaults to + upstream nixpkgs.

sha256

String; optional

-

The SHA256 used to verify the integrity of the repository

+

The SHA256 used to verify the integrity of the repository.

diff --git a/nixpkgs/nixpkgs.bzl b/nixpkgs/nixpkgs.bzl index 46ce8077..07ab9662 100644 --- a/nixpkgs/nixpkgs.bzl +++ b/nixpkgs/nixpkgs.bzl @@ -13,7 +13,7 @@ def _nixpkgs_git_repository_impl(ctx): nixpkgs_git_repository = repository_rule( implementation = _nixpkgs_git_repository_impl, attrs = { - "revision": attr.string(), + "revision": attr.string(mandatory = True), "remote": attr.string(default = "https://github.com/NixOS/nixpkgs"), "sha256": attr.string(), },