Add a constant ‘nixpkgsVersion’
This makes it a bit easier to find out the current Nixpkgs version, e.g. $ nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion "14.02.35657.66f51a9"
This commit is contained in:
parent
ad0732313d
commit
484403bf0e
|
@ -41,4 +41,10 @@ rec {
|
||||||
pathExists readFile isBool isFunction
|
pathExists readFile isBool isFunction
|
||||||
isInt add sub lessThan;
|
isInt add sub lessThan;
|
||||||
|
|
||||||
|
# Return the Nixpkgs version number.
|
||||||
|
nixpkgsVersion =
|
||||||
|
let suffixFile = ../.version-suffix; in
|
||||||
|
readFile ../.version
|
||||||
|
+ (if pathExists suffixFile then readFile suffixFile else "pre-git");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue