From 7c25f76f8b9dc4a96e24e1bd7fa6571d7850b1a3 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 3 Jul 2024 13:58:18 +0200 Subject: [PATCH] Bake the git commit inside the uboot env file --- lagarto-ox.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lagarto-ox.nix b/lagarto-ox.nix index 14a0dec..fbe3da0 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, pkgs, modulesPath, self, ... }: { imports = [ @@ -175,8 +175,12 @@ uboot-env = let init = "${config.system.build.toplevel}/init"; initrd = "${config.system.build.initialRamdisk}/initrd"; + rev = if self ? rev then self.rev + else throw ("Refusing to build from a dirty Git tree!"); in prev.runCommand "uboot.txt" {} '' cat > $out <