Merge pull request #5704 from eduarrrd/nixos-version

Add option to display git revision to nixos-version
This commit is contained in:
Peter Simons 2015-02-20 16:35:56 +01:00
commit 263a49be20
2 changed files with 10 additions and 2 deletions

View File

@ -1,2 +1,10 @@
#! @shell@ #! @shell@
case "$1" in
--hash|--revision)
echo "@nixosRevision@"
;;
*)
echo "@nixosVersion@ (@nixosCodeName@)" echo "@nixosVersion@ (@nixosCodeName@)"
;;
esac

View File

@ -50,7 +50,7 @@ let
nixos-version = makeProg { nixos-version = makeProg {
name = "nixos-version"; name = "nixos-version";
src = ./nixos-version.sh; src = ./nixos-version.sh;
inherit (config.system) nixosVersion nixosCodeName; inherit (config.system) nixosVersion nixosCodeName nixosRevision;
}; };
in in