ecl: refactor
This commit is contained in:
parent
459f9fe2be
commit
f6d7348cee
|
@ -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")
|
||||
|
@ -40,8 +47,8 @@ stdenv.mkDerivation {
|
|||
"--with-gmp-libdir=${lib.getLib gmp}/lib"
|
||||
# -incdir, -libdir doesn't seem to be supported for libffi
|
||||
"--with-libffi-prefix=${lib.getDev libffi}"
|
||||
] ++ lib.optional (! noUnicode) "--enable-unicode"
|
||||
;
|
||||
] ++ lib.optional (! noUnicode) "--enable-unicode"
|
||||
;
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
|
@ -80,17 +87,16 @@ stdenv.mkDerivation {
|
|||
# create the variables with suffixSalt (which seems to be necessary for
|
||||
# NIX_CFLAGS_COMPILE even).
|
||||
+ lib.optionalString useBoehmgc ''
|
||||
--prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \
|
||||
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \
|
||||
--prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \
|
||||
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \
|
||||
'' + ''
|
||||
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib"
|
||||
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib"
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
url https://common-lisp.net/project/ecl/
|
||||
version_link '[.]tgz$'
|
Loading…
Reference in a new issue