nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

ecl: refactor

+70 -58
+36 -30
pkgs/development/compilers/ecl/16.1.2.nix
··· 1 - { lib, stdenv, fetchurl, fetchpatch 2 - , libtool, autoconf, automake 3 - , gmp, mpfr, libffi, makeWrapper 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchpatch 5 + , libtool 6 + , autoconf 7 + , automake 8 + , gmp 9 + , mpfr 10 + , libffi 11 + , makeWrapper 4 12 , noUnicode ? false 5 13 , gcc 6 14 , threadSupport ? false 7 - , useBoehmgc ? true, boehmgc 15 + , useBoehmgc ? true 16 + , boehmgc 8 17 }: 9 18 10 - let 11 - s = # Generated upstream information 12 - rec { 13 - baseName="ecl"; 14 - version="16.1.2"; 15 - name="${baseName}-${version}"; 16 - url="https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz"; 17 - sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d"; 19 + stdenv.mkDerivation rec { 20 + pname = "ecl"; 21 + version = "16.1.2"; 22 + 23 + src = fetchurl { 24 + url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz"; 25 + sha256 = "sha256-LUgrGgpPvV2IFDRRcDInnYCMtkBeIt2R721zNTRGS5k="; 18 26 }; 27 + 19 28 buildInputs = [ 20 - libtool autoconf automake makeWrapper 29 + libtool 30 + autoconf 31 + automake 32 + makeWrapper 21 33 ]; 22 34 propagatedBuildInputs = [ 23 - libffi gmp mpfr gcc 35 + libffi 36 + gmp 37 + mpfr 38 + gcc 24 39 ] ++ lib.optionals useBoehmgc [ 25 40 # replaces ecl's own gc which other packages can depend on, thus propagated 26 41 boehmgc 27 42 ]; 28 - in 29 - stdenv.mkDerivation { 30 - inherit (s) name version; 31 - inherit buildInputs propagatedBuildInputs; 32 - 33 - src = fetchurl { 34 - inherit (s) url sha256; 35 - }; 36 43 37 44 configureFlags = [ 38 45 (if threadSupport then "--enable-threads" else "--disable-threads") ··· 47 40 "--with-gmp-libdir=${lib.getLib gmp}/lib" 48 41 # -incdir, -libdir doesn't seem to be supported for libffi 49 42 "--with-libffi-prefix=${lib.getDev libffi}" 50 - ] ++ lib.optional (! noUnicode) "--enable-unicode" 51 - ; 43 + ] ++ lib.optional (! noUnicode) "--enable-unicode" 44 + ; 52 45 53 46 patches = [ 54 47 (fetchpatch { ··· 87 80 # create the variables with suffixSalt (which seems to be necessary for 88 81 # NIX_CFLAGS_COMPILE even). 89 82 + lib.optionalString useBoehmgc '' 90 - --prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \ 91 - --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \ 83 + --prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \ 84 + --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \ 92 85 '' + '' 93 - --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib" 86 + --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib" 94 87 ''; 95 88 96 89 meta = with lib; { 97 - inherit (s) version; 98 90 description = "Lisp implementation aiming to be small, fast and easy to embed"; 99 - license = licenses.mit ; 100 - maintainers = [ maintainers.raskin ]; 91 + license = licenses.mit; 92 + maintainers = with maintainers; [ raskin ]; 101 93 platforms = platforms.unix; 102 94 }; 103 95 }
+34 -26
pkgs/development/compilers/ecl/default.nix
··· 1 - {lib, stdenv, fetchurl, fetchpatch 2 - , libtool, autoconf, automake 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchpatch 5 + , libtool 6 + , autoconf 7 + , automake 3 8 , texinfo 4 - , gmp, mpfr, libffi, makeWrapper 9 + , gmp 10 + , mpfr 11 + , libffi 12 + , makeWrapper 5 13 , noUnicode ? false 6 14 , gcc 7 15 , threadSupport ? true 8 - , useBoehmgc ? false, boehmgc 16 + , useBoehmgc ? false 17 + , boehmgc 9 18 }: 10 - let 11 - s = # Generated upstream information 12 - rec { 13 - baseName="ecl"; 14 - version="21.2.1"; 15 - name="${baseName}-${version}"; 16 - url="https://common-lisp.net/project/ecl/static/files/release/${name}.tgz"; 17 - sha256="000906nnq25177bgsfndiw3iqqgrjc9spk10hzk653sbz3f7anmi"; 19 + 20 + stdenv.mkDerivation rec { 21 + pname = "ecl"; 22 + version = "21.2.1"; 23 + 24 + src = fetchurl { 25 + url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz"; 26 + sha256 = "sha256-sVp13PhLj2LmhyDMqxOT+WEcB4/NOv3WOaEIbK0BCQA="; 18 27 }; 28 + 19 29 nativeBuildInputs = [ 20 - libtool autoconf automake texinfo makeWrapper 30 + libtool 31 + autoconf 32 + automake 33 + texinfo 34 + makeWrapper 21 35 ]; 22 36 propagatedBuildInputs = [ 23 - libffi gmp mpfr gcc 37 + libffi 38 + gmp 39 + mpfr 40 + gcc 24 41 # replaces ecl's own gc which other packages can depend on, thus propagated 25 42 ] ++ lib.optionals useBoehmgc [ 26 43 # replaces ecl's own gc which other packages can depend on, thus propagated 27 44 boehmgc 28 45 ]; 29 - in 30 - stdenv.mkDerivation { 31 - inherit (s) version; 32 - pname = s.baseName; 33 - inherit nativeBuildInputs propagatedBuildInputs; 34 - 35 - src = fetchurl { 36 - inherit (s) url sha256; 37 - }; 38 46 39 47 patches = [ 40 48 # https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1 ··· 78 70 meta = with lib; { 79 71 description = "Lisp implementation aiming to be small, fast and easy to embed"; 80 72 homepage = "https://common-lisp.net/project/ecl/"; 81 - license = licenses.mit ; 82 - maintainers = [ maintainers.raskin ]; 73 + license = licenses.mit; 74 + maintainers = with maintainers; [ raskin ]; 83 75 platforms = platforms.unix; 84 - changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${s.version}/CHANGELOG"; 76 + changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${version}/CHANGELOG"; 85 77 }; 86 78 }
-2
pkgs/development/compilers/ecl/default.upstream
··· 1 - url https://common-lisp.net/project/ecl/ 2 - version_link '[.]tgz$'