From 944d1b080e37e863595e4e999c434b2827ed0984 Mon Sep 17 00:00:00 2001
From: Philip Patsch <philip.patsch@tweag.io>
Date: Mon, 3 Sep 2018 11:44:43 +0200
Subject: [PATCH] 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)
       <td>
         <p><code>String; optional</code></p>
         <p>The URI of the remote Git repository. This must be a HTTP
-           URL. There is currently no support for authentication.</p>
+           URL. There is currently no support for authentication.
+           Defaults to <a href="https://github.com/NixOS/nixpkgs">
+           upstream nixpkgs.</a></p>
       </td>
     </tr>
     <tr>
       <td><code>sha256</code></td>
       <td>
         <p><code>String; optional</code></p>
-        <p>The SHA256 used to verify the integrity of the repository</p>
+        <p>The SHA256 used to verify the integrity of the repository.</p>
       </td>
     </tr>
   </tbody>
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(),
   },