git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #5704 from eduarrrd/nixos-version

Add option to display git revision to nixos-version

commit263a49be2091b8752a45f7e8b269e599fdd709d1 authorPeter Simons <simons@cryp.to> dateFri 20 Feb 2015, 16:35 (12 years ago) parenta638f8386cd055
2 files changed+10−2
nixos/modules/installer/tools/nixos-version.sh+9−1 nixos/modules/installer/tools/tools.nix+1−1
nixos/modules/installer/tools/nixos-version.sh+9−1
@@ -1,2 +1,10 @@
11#! @shell@
2−echo "@nixosVersion@ (@nixosCodeName@)"
2+
3+case "$1" in
4+ --hash|--revision)
5+ echo "@nixosRevision@"
6+ ;;
7+ *)
8+ echo "@nixosVersion@ (@nixosCodeName@)"
9+ ;;
10+esac
nixos/modules/installer/tools/tools.nix+1−1
@@ -50,7 +50,7 @@ let
5050 nixos-version = makeProg {
5151 name = "nixos-version";
5252 src = ./nixos-version.sh;
53− inherit (config.system) nixosVersion nixosCodeName;
53+ inherit (config.system) nixosVersion nixosCodeName nixosRevision;
5454 };
5555
5656in