Abort on nix prior to 2.0

This commit is contained in:
Alexandre Esteves 2018-05-14 22:47:04 +01:00
parent 43fa3393d9
commit 701f15f94a

View file

@ -5,12 +5,14 @@
, doStrict ? false
, rev ? "9d0b6b9dfc92a2704e2111aa836f5bdbf8c9ba42"
, sha256 ? "096r7ylnwz4nshrfkh127dg8nhrcvgpr69l4xrdgy3kbq049r3nb"
, nixpkgs ? import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256; }) {
config.allowUnfree = true;
config.allowBroken = false;
}
, nixpkgs ? if builtins.compareVersions builtins.nixVersion "2.0" < 0
then abort "hnix requires nix 2.0"
else import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256; }) {
config.allowUnfree = true;
config.allowBroken = false;
}
}:
let inherit (nixpkgs) pkgs;