diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -11,6 +11,10 @@
 
 ## Install
 
+`niv` is available in [`nixpkgs`](https://github.com/NixOS/nixpkgs) on the
+`master` branch as `niv`. It is also available on the `release-19.09` branch as
+`haskellPackages.niv`. Otherwise, run:
+
 ``` bash
 $ nix-env -iA niv -f https://github.com/nmattia/niv/tarball/master
 ```
@@ -199,7 +203,7 @@
 ```
 niv - dependency manager for Nix projects
 
-version: 0.2.11
+version: 0.2.12
 
 Usage: niv [-s|--sources-file FILE] COMMAND
 
diff --git a/niv.cabal b/niv.cabal
--- a/niv.cabal
+++ b/niv.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: eef9107fe1bba6e167622d8a09a0918171aeaa083a2a74d2f4ffb5e921472169
+-- hash: 2bd705c1e78363bb062880212f798145d4fb15e51d7324e15c95327ba9632d35
 
 name:           niv
-version:        0.2.11
+version:        0.2.12
 synopsis:       Easy dependency management for Nix projects
 description:    Easy dependency management for Nix projects.
 category:       Development
diff --git a/nix/sources.nix b/nix/sources.nix
--- a/nix/sources.nix
+++ b/nix/sources.nix
@@ -49,26 +49,22 @@
 
   # The set of packages used when specs are fetched using non-builtins.
   mkPkgs = sources:
-    if hasNixpkgsPath
-    then
-      if hasThisAsNixpkgsPath
-      then import (builtins_fetchTarball { inherit (mkNixpkgs sources) url sha256; }) {}
-      else import <nixpkgs> {}
-    else
-      import (builtins_fetchTarball { inherit (mkNixpkgs sources) url sha256; }) {};
-
-  mkNixpkgs = sources:
-    if builtins.hasAttr "nixpkgs" sources
-    then sources.nixpkgs
-    else abort
-      ''
-        Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
-        add a package called "nixpkgs" to your sources.json.
-      '';
-
-  hasNixpkgsPath = (builtins.tryEval <nixpkgs>).success;
-  hasThisAsNixpkgsPath =
-    (builtins.tryEval <nixpkgs>).success && <nixpkgs> == ./.;
+    let
+      sourcesNixpkgs =
+        import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {};
+      hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
+      hasThisAsNixpkgsPath = <nixpkgs> == ./.;
+    in
+      if builtins.hasAttr "nixpkgs" sources
+      then sourcesNixpkgs
+      else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
+        import <nixpkgs> {}
+      else
+        abort
+          ''
+            Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
+            add a package called "nixpkgs" to your sources.json.
+          '';
 
   # The actual fetching function.
   fetch = pkgs: name: spec:
diff --git a/src/Niv/Sources.hs b/src/Niv/Sources.hs
--- a/src/Niv/Sources.hs
+++ b/src/Niv/Sources.hs
@@ -146,6 +146,7 @@
   | V13
   | V14
   | V15
+  | V16
   deriving stock (Bounded, Enum, Eq)
 
 -- | A user friendly version
@@ -166,6 +167,7 @@
     V13 -> "13"
     V14 -> "14"
     V15 -> "15"
+    V16 -> "16"
 
 latestVersionMD5 :: T.Text
 latestVersionMD5 = sourcesVersionToMD5 maxBound
@@ -193,6 +195,7 @@
     V13 -> "5e23c56b92eaade4e664cb16dcac1e0a"
     V14 -> "b470e235e7bcbf106d243fea90b6cfc9"
     V15 -> "dc11af910773ec9b4e505e0f49ebcfd2"
+    V16 -> "2d93c52cab8e960e767a79af05ca572a"
 
 -- | The MD5 sum of ./nix/sources.nix
 sourcesNixMD5 :: IO T.Text
