From 18218ed3803b21242ea1746676c5ec2be9f10199 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sun, 15 Oct 2023 12:51:30 +0900 Subject: [PATCH] Put the Emacs versions provided from the actual executables --- flake.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index be61a5b..133092e 100644 --- a/flake.nix +++ b/flake.nix @@ -49,9 +49,13 @@ name = "${emacsName}.nix"; path = pkgs.runCommand "build-${emacsName}-builtins-nix" { + buildInputs = [emacsPackage]; } '' + EMACS_VERSION="$(emacs --version \ + | grep -F "GNU Emacs" \ + | grep -oE "[[:digit:]]+(:?\.[[:digit:]]+)+")" echo >>$out '{' - echo >>$out ' version = "${emacsPackage.version}";' + echo >>$out ' version = "''${EMACS_VERSION}";' echo >>$out ' libraries = [' sed -e 's/^/"/' -e 's/$/"/' ${(pkgs.emacsTwist { inherit emacsPackage;