From a91049c31af80098801d6bc7588ffe9354d30ecb Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Thu, 21 Mar 2024 11:08:30 -0400 Subject: [PATCH] sbcl: create version file if none exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fallback for when there is no such file (e.g. building from git) The blanket recreation of this file was removed by me in d09db9c0967989234a07a4188f43392271b5ed7e but I hadn’t considered this edge case. --- pkgs/development/compilers/sbcl/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 78b3ed07602b..2371ed651950 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -146,6 +146,12 @@ stdenv.mkDerivation (self: rec { --replace-quiet /bin/uname "${coreutils}/bin/uname" \ --replace-quiet /bin/sh "${stdenv.shell}" ) + # Official source release tarballs will have a version.lispexpr, but if you + # want to override { src = ... } it might not exist. It’s required for + # building, so create a mock version as a backup. + if [[ ! -a version.lisp-expr ]]; then + echo '"${version}.nixos"' > version.lisp-expr + fi ''; preBuild = ''