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
isInt add sub lessThan
63
seq deepSeq genericClosure;
64
0
0
65
# Return the Nixpkgs version number.
66
nixpkgsVersion =
67
let suffixFile = ../.version-suffix; in
68
-
readFile ../.version
69
-
+ (if pathExists suffixFile then readFile suffixFile else "pre-git");
70
71
# Whether we're being called by nix-shell.
72
inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";
···
62
isInt add sub lessThan
63
seq deepSeq genericClosure;
64
65
+
inherit (import ./strings.nix) fileContents;
66
+
67
# Return the Nixpkgs version number.
68
nixpkgsVersion =
69
let suffixFile = ../.version-suffix; in
70
+
fileContents ../.version
71
+
+ (if pathExists suffixFile then fileContents suffixFile else "pre-git");
72
73
# Whether we're being called by nix-shell.
74
inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";