tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
lib: refactor nixpkgsVersion with fileContents
Eric Sagnes
9 years ago
e276842f
85d8b016
+4
-2
1 changed file
expand all
collapse all
unified
split
lib
trivial.nix
+4
-2
lib/trivial.nix
···
62
62
isInt add sub lessThan
63
63
seq deepSeq genericClosure;
64
64
65
65
+
inherit (import ./strings.nix) fileContents;
66
66
+
65
67
# Return the Nixpkgs version number.
66
68
nixpkgsVersion =
67
69
let suffixFile = ../.version-suffix; in
68
68
-
readFile ../.version
69
69
-
+ (if pathExists suffixFile then readFile suffixFile else "pre-git");
70
70
+
fileContents ../.version
71
71
+
+ (if pathExists suffixFile then fileContents suffixFile else "pre-git");
70
72
71
73
# Whether we're being called by nix-shell.
72
74
inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";