shen-sbcl: rewrite

Move sbcl to nativeBuildInputs and separate the check phase correctly.
This commit is contained in:
Mario Rodas 2021-09-01 04:20:00 +00:00
parent d431839ab4
commit 4f7808842d

View File

@ -1,30 +1,39 @@
{ lib, stdenv
{ lib
, stdenv
, fetchurl
, shen-sources
, sbcl
}:
stdenv.mkDerivation rec {
name = "shen-sbcl-${version}";
pname = "shen-sbcl";
version = "3.0.3";
src = fetchurl {
url = "https://github.com/Shen-Language/shen-cl/releases/download/v${version}/shen-cl-v${version}-sources.tar.gz";
sha256 = "0mc10jlrxqi337m6ngwbr547zi4qgk69g1flz5dsddjy5x41j0yz";
};
buildInputs = [
sbcl shen-sources
];
buildPhase = ''
nativeBuildInputs = [ sbcl ];
preBuild = ''
ln -s ${shen-sources} kernel
make sbcl
'';
buildFlags = [ "build-sbcl" ];
checkTarget = "test-sbcl";
doCheck = true;
installPhase = ''
mkdir -p $out
install -m755 -D bin/sbcl/shen $out/bin/shen-sbcl
'';
meta = with lib; {
homepage = https://shenlanguage.org;
homepage = "https://shenlanguage.org";
description = "Port of Shen running on Steel Bank Common Lisp";
changelog = "https://github.com/Shen-Language/shen-cl/raw/v${version}/CHANGELOG.md";
platforms = sbcl.meta.platforms;
maintainers = with maintainers; [ bsima ];
license = licenses.bsd3;