ecl: refactor

This commit is contained in:
Felix Buehler 2021-12-21 12:08:34 +01:00
parent 459f9fe2be
commit f6d7348cee
3 changed files with 70 additions and 58 deletions

View file

@ -1,38 +1,45 @@
{ lib, stdenv, fetchurl, fetchpatch
, libtool, autoconf, automake
, gmp, mpfr, libffi, makeWrapper
{ lib
, stdenv
, fetchurl
, fetchpatch
, libtool
, autoconf
, automake
, gmp
, mpfr
, libffi
, makeWrapper
, noUnicode ? false
, gcc
, threadSupport ? false
, useBoehmgc ? true, boehmgc
, useBoehmgc ? true
, boehmgc
}:
let
s = # Generated upstream information
rec {
baseName="ecl";
version="16.1.2";
name="${baseName}-${version}";
url="https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d";
stdenv.mkDerivation rec {
pname = "ecl";
version = "16.1.2";
src = fetchurl {
url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
sha256 = "sha256-LUgrGgpPvV2IFDRRcDInnYCMtkBeIt2R721zNTRGS5k=";
};
buildInputs = [
libtool autoconf automake makeWrapper
libtool
autoconf
automake
makeWrapper
];
propagatedBuildInputs = [
libffi gmp mpfr gcc
libffi
gmp
mpfr
gcc
] ++ lib.optionals useBoehmgc [
# replaces ecl's own gc which other packages can depend on, thus propagated
boehmgc
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs propagatedBuildInputs;
src = fetchurl {
inherit (s) url sha256;
};
configureFlags = [
(if threadSupport then "--enable-threads" else "--disable-threads")
@ -87,10 +94,9 @@ stdenv.mkDerivation {
'';
meta = with lib; {
inherit (s) version;
description = "Lisp implementation aiming to be small, fast and easy to embed";
license = licenses.mit ;
maintainers = [ maintainers.raskin ];
license = licenses.mit;
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
};
}

View file

@ -1,40 +1,48 @@
{lib, stdenv, fetchurl, fetchpatch
, libtool, autoconf, automake
{ lib
, stdenv
, fetchurl
, fetchpatch
, libtool
, autoconf
, automake
, texinfo
, gmp, mpfr, libffi, makeWrapper
, gmp
, mpfr
, libffi
, makeWrapper
, noUnicode ? false
, gcc
, threadSupport ? true
, useBoehmgc ? false, boehmgc
, useBoehmgc ? false
, boehmgc
}:
let
s = # Generated upstream information
rec {
baseName="ecl";
version="21.2.1";
name="${baseName}-${version}";
url="https://common-lisp.net/project/ecl/static/files/release/${name}.tgz";
sha256="000906nnq25177bgsfndiw3iqqgrjc9spk10hzk653sbz3f7anmi";
stdenv.mkDerivation rec {
pname = "ecl";
version = "21.2.1";
src = fetchurl {
url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
sha256 = "sha256-sVp13PhLj2LmhyDMqxOT+WEcB4/NOv3WOaEIbK0BCQA=";
};
nativeBuildInputs = [
libtool autoconf automake texinfo makeWrapper
libtool
autoconf
automake
texinfo
makeWrapper
];
propagatedBuildInputs = [
libffi gmp mpfr gcc
libffi
gmp
mpfr
gcc
# replaces ecl's own gc which other packages can depend on, thus propagated
] ++ lib.optionals useBoehmgc [
# replaces ecl's own gc which other packages can depend on, thus propagated
boehmgc
];
in
stdenv.mkDerivation {
inherit (s) version;
pname = s.baseName;
inherit nativeBuildInputs propagatedBuildInputs;
src = fetchurl {
inherit (s) url sha256;
};
patches = [
# https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1
@ -70,9 +78,9 @@ stdenv.mkDerivation {
meta = with lib; {
description = "Lisp implementation aiming to be small, fast and easy to embed";
homepage = "https://common-lisp.net/project/ecl/";
license = licenses.mit ;
maintainers = [ maintainers.raskin ];
license = licenses.mit;
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${s.version}/CHANGELOG";
changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${version}/CHANGELOG";
};
}

View file

@ -1,2 +0,0 @@
url https://common-lisp.net/project/ecl/
version_link '[.]tgz$'