diff options
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters')
27 files changed, 326 insertions, 114 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/chibi/default.nix b/nixpkgs/pkgs/development/interpreters/chibi/default.nix index 92531eacd20d..c0ee8988c094 100644 --- a/nixpkgs/pkgs/development/interpreters/chibi/default.nix +++ b/nixpkgs/pkgs/development/interpreters/chibi/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, makeWrapper }: let - version = "0.9.1"; + version = "0.10"; name = "chibi-scheme-${version}"; in stdenv.mkDerivation { @@ -18,7 +18,7 @@ stdenv.mkDerivation { owner = "ashinn"; repo = "chibi-scheme"; rev = version; - sha256 = "0nd63i924ifh39cba1hd4sbi6vh1cb73v97nrn4bf8rrjh3k8pdi"; + sha256 = "sha256-7vDxcnXhq1wJSLFHGxtwh+H+KWxh6B0JXSMPzSmQFXo="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix b/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix index e52d6c20b970..58ed4c689b14 100644 --- a/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix +++ b/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "babashka"; - version = "0.4.3"; + version = "0.4.5"; reflectionJson = fetchurl { name = "reflection.json"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/babashka/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar"; - sha256 = "sha256-teZKAwSv9wliVFKdT76yQjMC5g7SGPAqcq/jZ07sYjQ="; + sha256 = "sha256-SnKs30c6VTp1yzW2Glooi6ghSUIZgF6nsob1hDljTA8="; }; dontUnpack = true; diff --git a/nixpkgs/pkgs/development/interpreters/dart/default.nix b/nixpkgs/pkgs/development/interpreters/dart/default.nix index 685d58f11027..1d6abb59504e 100644 --- a/nixpkgs/pkgs/development/interpreters/dart/default.nix +++ b/nixpkgs/pkgs/development/interpreters/dart/default.nix @@ -2,33 +2,32 @@ , lib , fetchurl , unzip -, version ? "2.12.2" -, sources ? - let +, version ? "2.13.1" +, sources ? let base = "https://storage.googleapis.com/dart-archive/channels"; x86_64 = "x64"; i686 = "ia32"; aarch64 = "arm64"; # Make sure that if the user overrides version parameter they're # also need to override sources, to avoid mistakes - version = "2.12.2"; + version = "2.13.1"; in { "${version}-x86_64-darwin" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${x86_64}-release.zip"; - sha256 = "0h6mpy0kfc842vhg053fyxbjnd8lw1d1shdcsj800048260lxhyd"; + sha256 = "0kb6r2rmp5d0shvgyy37fmykbgww8qaj4f8k79rmqfv5lwa3izya"; }; "${version}-x86_64-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip"; - sha256 = "1gg210gf4yif3bl9k19znkndc4c1cd529xwxpi20ykaw3zfxxz2z"; + sha256 = "0zq8wngyrw01wjc5s6w1vz2jndms09ifiymjjixxby9k41mr6jrq"; }; "${version}-i686-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${i686}-release.zip"; - sha256 = "1wngxba71j20gq9vy7n8q0m9rnqs047xm5b03bxk3hhaq6dyzkwn"; + sha256 = "0zv4q8xv2i08a6izpyhhnil75qhs40m5mgyvjqjsswqkwqdf7lkj"; }; "${version}-aarch64-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip"; - sha256 = "0rqsmzl5g5kgk54qb03kamjm5n5g5pqfl79np37xdzwqbv0zx22b"; + sha256 = "0bb9jdmg5p608jmmiqibp13ydiw9avgysxlmljvgsl7wl93j6rgc"; }; } }: @@ -40,9 +39,7 @@ stdenv.mkDerivation { pname = "dart"; inherit version; - nativeBuildInputs = [ - unzip - ]; + nativeBuildInputs = [ unzip ]; src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}"); diff --git a/nixpkgs/pkgs/development/interpreters/duktape/default.nix b/nixpkgs/pkgs/development/interpreters/duktape/default.nix index 360666d898af..ba533a172761 100644 --- a/nixpkgs/pkgs/development/interpreters/duktape/default.nix +++ b/nixpkgs/pkgs/development/interpreters/duktape/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, validatePkgConfig }: stdenv.mkDerivation rec { pname = "duktape"; @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n"; }; + nativeBuildInputs = [ validatePkgConfig ]; + postPatch = '' substituteInPlace Makefile.sharedlibrary \ --replace 'gcc' '${stdenv.cc.targetPrefix}cc' \ @@ -23,9 +25,10 @@ stdenv.mkDerivation rec { installPhase = '' install -d $out/bin install -m755 duk $out/bin/ - install -d $out/lib + install -d $out/lib/pkgconfig install -d $out/include make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out + substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc ''; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/development/interpreters/duktape/duktape.pc.in b/nixpkgs/pkgs/development/interpreters/duktape/duktape.pc.in new file mode 100644 index 000000000000..d34edb320e2e --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/duktape/duktape.pc.in @@ -0,0 +1,10 @@ +prefix=@out@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: duktape +Description: An embeddable Javascript engine, with a focus on portability and compact footprint +Version: @version@ +Libs: -L${libdir} -lduktape +Cflags: -I${includedir} diff --git a/nixpkgs/pkgs/development/interpreters/erlang/R22.nix b/nixpkgs/pkgs/development/interpreters/erlang/R22.nix index c69c26d4cb01..9236ea428948 100644 --- a/nixpkgs/pkgs/development/interpreters/erlang/R22.nix +++ b/nixpkgs/pkgs/development/interpreters/erlang/R22.nix @@ -3,6 +3,6 @@ # How to obtain `sha256`: # nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz mkDerivation { - version = "22.3.4.19"; - sha256 = "sha256-U3ks7pDIqS8HVJ+yBobhEbKvnd9svEcQd9BsJQwajDs="; + version = "22.3.4.20"; + sha256 = "sha256-EUErOCW16eUb/p5dLpFV7sQ3mXlCF/OgOvGAAyYEvLo="; } diff --git a/nixpkgs/pkgs/development/interpreters/erlang/R23.nix b/nixpkgs/pkgs/development/interpreters/erlang/R23.nix index ee788560dcf4..9e344adc15a3 100644 --- a/nixpkgs/pkgs/development/interpreters/erlang/R23.nix +++ b/nixpkgs/pkgs/development/interpreters/erlang/R23.nix @@ -3,6 +3,6 @@ # How to obtain `sha256`: # nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz mkDerivation { - version = "23.3.4.2"; - sha256 = "QAIkiYBhYnUzyRg70SQ4BwjjYqclDA4uruqRNTgB2Sk="; + version = "23.3.4.4"; + sha256 = "dnoSGfBUZrgcnNQNAoqmVOxK/NQlt1DC187sxg7mPq8="; } diff --git a/nixpkgs/pkgs/development/interpreters/gnu-apl/default.nix b/nixpkgs/pkgs/development/interpreters/gnu-apl/default.nix index abfa74bb67d3..108da08b80d7 100644 --- a/nixpkgs/pkgs/development/interpreters/gnu-apl/default.nix +++ b/nixpkgs/pkgs/development/interpreters/gnu-apl/default.nix @@ -37,6 +37,7 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.kovirobi ]; platforms = with platforms; linux ++ darwin; inherit version; + mainProgram = "apl"; longDescription = '' GNU APL is a free interpreter for the programming language APL, with an diff --git a/nixpkgs/pkgs/development/interpreters/janet/default.nix b/nixpkgs/pkgs/development/interpreters/janet/default.nix index 4c836264017b..c0438d1e0076 100644 --- a/nixpkgs/pkgs/development/interpreters/janet/default.nix +++ b/nixpkgs/pkgs/development/interpreters/janet/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "janet"; - version = "1.16.0"; + version = "1.16.1"; src = fetchFromGitHub { owner = "janet-lang"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Wrr2zie251oB+uhsLMmkPBV0b3MwTmcPTgNJOsgCems="; + sha256 = "sha256-TzJbHmHIySlf3asQ02HOdehMR+s0KkPifBiaQ4FvFCg="; }; nativeBuildInputs = [ meson ninja ]; diff --git a/nixpkgs/pkgs/development/interpreters/jruby/default.nix b/nixpkgs/pkgs/development/interpreters/jruby/default.nix index 4e540dc8aacb..f5368e405387 100644 --- a/nixpkgs/pkgs/development/interpreters/jruby/default.nix +++ b/nixpkgs/pkgs/development/interpreters/jruby/default.nix @@ -6,11 +6,11 @@ rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "5" "7" ""; jruby = stdenv.mkDerivation rec { pname = "jruby"; - version = "9.2.17.0"; + version = "9.2.18.0"; src = fetchurl { url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz"; - sha256 = "sha256-dwHTU3s6YG0nZaxtXEDmdd2qAdPOutJqIaZuOq3VwgI="; + sha256 = "sha256-QlpclwptkYrlMSdYUGNNEhaeNVd1SyuBf7+3mHoywac="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/development/interpreters/micropython/default.nix b/nixpkgs/pkgs/development/interpreters/micropython/default.nix index 0441e48685ea..2e0b587acfde 100644 --- a/nixpkgs/pkgs/development/interpreters/micropython/default.nix +++ b/nixpkgs/pkgs/development/interpreters/micropython/default.nix @@ -1,43 +1,82 @@ -{ stdenv, lib, fetchFromGitHub, pkg-config, libffi, python3, readline }: +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, pkg-config +, libffi +, python3 +, readline +}: stdenv.mkDerivation rec { pname = "micropython"; - version = "1.13"; + version = "1.15"; src = fetchFromGitHub { owner = "micropython"; repo = "micropython"; rev = "v${version}"; - sha256 = "0m9g6isys4pnlnkdmrw7lxaxdrjn02j481wz5x5cdrmrbi4zi17z"; + sha256 = "11bf1lq4kgfs1nzg5cnshh2dqxyk5w2k816i04innri6fj0g7y6p"; fetchSubmodules = true; }; + # drop the following patches when upgrading to 1.16 + patches = [ + # fix build with modern clang https://github.com/micropython/micropython/pull/7254 + (fetchpatch { + url = "https://github.com/micropython/micropython/commit/126b1c727118352923703719a2a3d45b9fad3c97.patch"; + sha256 = "13a2bmz24syhd1qsqbx39dcjkjdhf05ln7lanh816m94lkfib21j"; + }) + # fix build with modern clang https://github.com/micropython/micropython/pull/7254 + (fetchpatch { + url = "https://github.com/micropython/micropython/commit/7ceccad4e2f1e9d073f5781c32e5b377e8391a25.patch"; + sha256 = "04mbxmb5yr6pbhhf9villq8km4wy579r46v9p4n0ysivrxij7i6f"; + }) + # fix build on aarch64-darwin https://github.com/micropython/micropython/pull/7393 + (fetchpatch { + url = "https://github.com/micropython/micropython/commit/95048129b1d93854c25f501c02801929aeeb23f0.patch"; + sha256 = "1cngcwq4jviyhdnfcrrkdadfikhffzbj0d634j0344cp247jb41n"; + }) + ]; + nativeBuildInputs = [ pkg-config python3 ]; buildInputs = [ libffi readline ]; - doCheck = true; - buildPhase = '' + runHook preBuild make -C mpy-cross make -C ports/unix + runHook postBuild ''; + doCheck = true; + + skippedTests = "" + + lib.optionalString (stdenv.isDarwin) " -e uasyncio_basic -e uasyncio_wait_task" + + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -e ffi_callback" + + lib.optionalString (stdenv.isLinux && stdenv.isAarch64) " -e float_parse" + ; + checkPhase = '' + runHook preCheck pushd tests - MICROPY_MICROPYTHON=../ports/unix/micropython ${python3.interpreter} ./run-tests + ${python3.interpreter} ./run-tests.py ${skippedTests} popd + runHook postCheck ''; installPhase = '' + runHook preInstall mkdir -p $out/bin - install -Dm755 ports/unix/micropython $out/bin/micropython + install -Dm755 ports/unix/micropython -t $out/bin + runHook postInstall ''; meta = with lib; { description = "A lean and efficient Python implementation for microcontrollers and constrained systems"; homepage = "https://micropython.org"; - platforms = [ "x86_64-linux" ]; + platforms = platforms.unix; license = licenses.mit; maintainers = with maintainers; [ sgo ]; }; diff --git a/nixpkgs/pkgs/development/interpreters/php/generic.nix b/nixpkgs/pkgs/development/interpreters/php/generic.nix index 558fa45a1fd9..d86ea48afe1a 100644 --- a/nixpkgs/pkgs/development/interpreters/php/generic.nix +++ b/nixpkgs/pkgs/development/interpreters/php/generic.nix @@ -124,15 +124,15 @@ let ln -s ${extraInit} $out/lib/php.ini if test -e $out/bin/php; then - wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/php --prefix PHP_INI_SCAN_DIR : $out/lib fi if test -e $out/bin/php-fpm; then - wrapProgram $out/bin/php-fpm --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/php-fpm --prefix PHP_INI_SCAN_DIR : $out/lib fi if test -e $out/bin/phpdbg; then - wrapProgram $out/bin/phpdbg --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/phpdbg --prefix PHP_INI_SCAN_DIR : $out/lib fi ''; }; diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix index 38ee086a88fe..b8132cea4fc7 100644 --- a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix @@ -208,7 +208,7 @@ in with passthru; stdenv.mkDerivation { # * https://bugs.python.org/issue35523 # * https://github.com/python/cpython/commit/e6b247c8e524 ./3.7/no-win64-workaround.patch - ] ++ optionals (isPy37 || isPy38 || isPy39) [ + ] ++ optionals (pythonAtLeast "3.7") [ # Fix darwin build https://bugs.python.org/issue34027 ./3.7/darwin-libutil.patch ] ++ optionals (pythonOlder "3.8") [ @@ -227,7 +227,7 @@ in with passthru; stdenv.mkDerivation { ( if isPy35 then ./3.5/python-3.x-distutils-C++.patch - else if isPy37 || isPy38 || isPy39 then + else if pythonAtLeast "3.7" then ./3.7/python-3.x-distutils-C++.patch else fetchpatch { diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh b/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh index 6dd384b4847f..745f02e8c9bc 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh @@ -7,7 +7,7 @@ pipBuildPhase() { mkdir -p dist echo "Creating a wheel..." - @pythonInterpreter@ -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist . + @pythonInterpreter@ -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist . echo "Finished creating a wheel..." runHook postBuild diff --git a/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix b/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix index 4917b167046e..963073df6200 100644 --- a/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -176,6 +176,8 @@ let # default to python's platforms platforms = python.meta.platforms; isBuildPythonPackage = python.meta.platforms; + } // lib.optionalAttrs (attrs?pname) { + mainProgram = attrs.pname; } // meta; } // lib.optionalAttrs (attrs?checkPhase) { # If given use the specified checkPhase, otherwise use the setup hook. diff --git a/nixpkgs/pkgs/development/interpreters/racket/default.nix b/nixpkgs/pkgs/development/interpreters/racket/default.nix index 48be64aa0b8d..0b5084d43584 100644 --- a/nixpkgs/pkgs/development/interpreters/racket/default.nix +++ b/nixpkgs/pkgs/development/interpreters/racket/default.nix @@ -47,7 +47,7 @@ in stdenv.mkDerivation rec { pname = "racket"; - version = "8.0"; # always change at once with ./minimal.nix + version = "8.1"; # always change at once with ./minimal.nix src = (lib.makeOverridable ({ name, sha256 }: fetchurl { @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { } )) { name = "${pname}-${version}"; - sha256 = "0lqqpa88v0br93qw7450a4blyi3pwn7sq2k04h0ikbsqrdnfj7lj"; + sha256 = "0wlgp9dlibhv1d181arz309fszz31l5gb5gl94bqzfcav014g3k8"; }; FONTCONFIG_FILE = fontsConf; diff --git a/nixpkgs/pkgs/development/interpreters/racket/minimal.nix b/nixpkgs/pkgs/development/interpreters/racket/minimal.nix index c954b4f05ea4..4cfb178d42de 100644 --- a/nixpkgs/pkgs/development/interpreters/racket/minimal.nix +++ b/nixpkgs/pkgs/development/interpreters/racket/minimal.nix @@ -5,7 +5,7 @@ racket.overrideAttrs (oldAttrs: rec { name = "racket-minimal-${oldAttrs.version}"; src = oldAttrs.src.override { inherit name; - sha256 = "0qvfi6rg9cwzh716q5j7m30rqq9xysi6zsalqlpdqrzhnx8y54k0"; + sha256 = "1q54n16s0hmnry8q381wd7zfpyjndfjswn97vsbd4isngwz3w12k"; }; meta = oldAttrs.meta // { diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/default.nix b/nixpkgs/pkgs/development/interpreters/rakudo/default.nix index 358b8663196b..fdb3a78a1b7e 100644 --- a/nixpkgs/pkgs/development/interpreters/rakudo/default.nix +++ b/nixpkgs/pkgs/development/interpreters/rakudo/default.nix @@ -1,14 +1,16 @@ -{ stdenv, fetchurl, perl, icu, zlib, gmp, lib, nqp }: +{ stdenv, fetchurl, perl, icu, zlib, gmp, lib, nqp, removeReferencesTo }: stdenv.mkDerivation rec { pname = "rakudo"; - version = "2021.02.1"; + version = "2021.06"; src = fetchurl { - url = "https://www.rakudo.org/dl/rakudo/rakudo-${version}.tar.gz"; - sha256 = "1xwqx4357bw7h5pdmwxm5wxh8wjvrcdk4rvr3wyrhg1wzy5qvsn8"; + url = "https://rakudo.org/dl/rakudo/rakudo-${version}.tar.gz"; + sha256 = "11ixlqmvbb37abksdysg5r4lkbwzr486lkc0ssl3wca4iiy3mhgf"; }; + nativeBuildInputs = [ removeReferencesTo ]; + buildInputs = [ icu zlib gmp perl ]; configureScript = "perl ./Configure.pl"; configureFlags = [ @@ -16,15 +18,14 @@ stdenv.mkDerivation rec { "--with-nqp=${nqp}/bin/nqp" ]; - # Remove test of profiler, fails since 2020.09 - preCheck = "rm t/09-moar/01-profilers.t"; - - # Some tests fail on Darwin - doCheck = !stdenv.isDarwin; + disallowedReferences = [ stdenv.cc.cc ]; + postFixup = '' + remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/share/perl6/runtime/dynext/libperl6_ops_moar.so)" + ''; meta = with lib; { description = "Raku implementation on top of Moar virtual machine"; - homepage = "https://www.rakudo.org"; + homepage = "https://rakudo.org"; license = licenses.artistic2; platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice vrthra sgo ]; diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix b/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix index e5baacf5c295..60a5e071545e 100644 --- a/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix +++ b/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "moarvm"; - version = "2021.02"; + version = "2021.06"; src = fetchurl { - url = "https://www.moarvm.org/releases/MoarVM-${version}.tar.gz"; - sha256 = "08ri9mvbk97qfxcy6lj4cb7j3a789ck052m2vqfhis3vkrkw780r"; + url = "https://moarvm.org/releases/MoarVM-${version}.tar.gz"; + sha256 = "19vjcyb9fg9msjw1ih00c2qby480gl4highw24zx7j84slhsj013"; }; buildInputs = [ perl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "VM with adaptive optimization and JIT compilation, built for Rakudo"; - homepage = "https://www.moarvm.org/"; + homepage = "https://moarvm.org"; license = licenses.artistic2; platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice vrthra sgo ]; diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix b/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix index cd60bb3b7900..4b456d819f6d 100644 --- a/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix +++ b/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "nqp"; - version = "2021.02"; + version = "2021.06"; src = fetchurl { url = "https://github.com/raku/nqp/releases/download/${version}/nqp-${version}.tar.gz"; - sha256 = "1vyl6x811f8mbdnp34yj6kfmfpxp2yfrr8cqf1w47rzmr741sjyj"; + sha256 = "1d00lajjdd2k510fb0cb6c8bpklvlnncykf6jz8j8djfp0b2i696"; }; buildInputs = [ perl ]; diff --git a/nixpkgs/pkgs/development/interpreters/ruby/default.nix b/nixpkgs/pkgs/development/interpreters/ruby/default.nix index 8563eb60210d..454539c93ec8 100644 --- a/nixpkgs/pkgs/development/interpreters/ruby/default.nix +++ b/nixpkgs/pkgs/development/interpreters/ruby/default.nix @@ -11,7 +11,7 @@ let opString = lib.optionalString; patchSet = import ./rvm-patchsets.nix { inherit fetchFromGitHub; }; config = import ./config.nix { inherit fetchFromSavannah; }; - rubygems = import ./rubygems { inherit stdenv lib fetchurl; }; + rubygems = import ./rubygems { inherit stdenv lib fetchurl fetchpatch; }; # Contains the ruby version heuristics rubyVersion = import ./ruby-version.nix { inherit lib; }; diff --git a/nixpkgs/pkgs/development/interpreters/ruby/rubygems/default.nix b/nixpkgs/pkgs/development/interpreters/ruby/rubygems/default.nix index db508caae310..cf2ca1b766ea 100644 --- a/nixpkgs/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/nixpkgs/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl }: +{ stdenv, lib, fetchurl, fetchpatch }: stdenv.mkDerivation rec { name = "rubygems"; @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { ./0001-add-post-extract-hook.patch ./0002-binaries-with-env-shebang.patch ./0003-gem-install-default-to-user.patch + # Ensure tmp directory are not left behind + # https://github.com/rubygems/rubygems/pull/4610 + (fetchpatch { + url = "https://github.com/rubygems/rubygems/commit/2c2ffde6e4a9f7f571d38af687034fb8507a833d.patch"; + sha256 = "sha256-bs2dXALKiJvMgk7lKjMx0NzGqlEqDYBBO35UrzNifms="; + }) ]; installPhase = '' diff --git a/nixpkgs/pkgs/development/interpreters/tcl/generic.nix b/nixpkgs/pkgs/development/interpreters/tcl/generic.nix index e665e8cfb1ea..beb95d51d2c1 100644 --- a/nixpkgs/pkgs/development/interpreters/tcl/generic.nix +++ b/nixpkgs/pkgs/development/interpreters/tcl/generic.nix @@ -1,55 +1,67 @@ -{ lib, stdenv +{ lib, stdenv, callPackage, makeSetupHook, makeWrapper # Version specific stuff , release, version, src , ... }: -stdenv.mkDerivation { - pname = "tcl"; - inherit version; - - inherit src; - - outputs = [ "out" "man" ]; - - setOutputFlags = false; - - preConfigure = '' - cd unix - ''; - - configureFlags = [ - "--enable-threads" - # Note: using $out instead of $man to prevent a runtime dependency on $man. - "--mandir=${placeholder "out"}/share/man" - "--enable-man-symlinks" - # Don't install tzdata because NixOS already has a more up-to-date copy. - "--with-tzdata=no" - "tcl_cv_strtod_unbroken=ok" - ] ++ lib.optional stdenv.is64bit "--enable-64bit"; - - enableParallelBuilding = true; - - postInstall = let - dllExtension = stdenv.hostPlatform.extensions.sharedLibrary; - in '' - make install-private-headers - ln -s $out/bin/tclsh${release} $out/bin/tclsh - ln -s $out/lib/libtcl${release}${dllExtension} $out/lib/libtcl${dllExtension} - ''; - - meta = with lib; { - description = "The Tcl scripting language"; - homepage = "https://www.tcl.tk/"; - license = licenses.tcltk; - platforms = platforms.all; - maintainers = with maintainers; [ vrthra ]; - }; - - passthru = rec { - inherit release version; - libPrefix = "tcl${release}"; - libdir = "lib/${libPrefix}"; - }; -} +let + baseInterp = + stdenv.mkDerivation { + pname = "tcl"; + inherit version src; + + outputs = [ "out" "man" ]; + + setOutputFlags = false; + + preConfigure = '' + cd unix + ''; + + configureFlags = [ + "--enable-threads" + # Note: using $out instead of $man to prevent a runtime dependency on $man. + "--mandir=${placeholder "out"}/share/man" + "--enable-man-symlinks" + # Don't install tzdata because NixOS already has a more up-to-date copy. + "--with-tzdata=no" + "tcl_cv_strtod_unbroken=ok" + ] ++ lib.optional stdenv.is64bit "--enable-64bit"; + + enableParallelBuilding = true; + + postInstall = let + dllExtension = stdenv.hostPlatform.extensions.sharedLibrary; + in '' + make install-private-headers + ln -s $out/bin/tclsh${release} $out/bin/tclsh + ln -s $out/lib/libtcl${release}${dllExtension} $out/lib/libtcl${dllExtension} + ''; + + meta = with lib; { + description = "The Tcl scripting language"; + homepage = "https://www.tcl.tk/"; + license = licenses.tcltk; + platforms = platforms.all; + maintainers = with maintainers; [ agbrooks ]; + }; + + passthru = rec { + inherit release version; + libPrefix = "tcl${release}"; + libdir = "lib/${libPrefix}"; + tclPackageHook = callPackage ({}: makeSetupHook { + name = "tcl-package-hook"; + deps = [ makeWrapper ]; + } ./tcl-package-hook.sh) {}; + }; + }; + + mkTclDerivation = callPackage ./mk-tcl-derivation.nix { tcl = baseInterp; }; + +in baseInterp.overrideAttrs (self: { + passthru = self.passthru // { + inherit mkTclDerivation; + }; +}) diff --git a/nixpkgs/pkgs/development/interpreters/tcl/mk-tcl-derivation.nix b/nixpkgs/pkgs/development/interpreters/tcl/mk-tcl-derivation.nix new file mode 100644 index 000000000000..4f3ffe6f995f --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/tcl/mk-tcl-derivation.nix @@ -0,0 +1,69 @@ +# Generic builder for tcl packages/applications, generally based on mk-python-derivation.nix +{ tcl +, lib +, makeWrapper +, runCommand +, writeScript +}: + +{ buildInputs ? [] +, nativeBuildInputs ? [] +, propagatedBuildInputs ? [] +, checkInputs ? [] + +# true if we should skip the configuration phase altogether +, dontConfigure ? false + +# Extra flags passed to configure step +, configureFlags ? [] + +# Whether or not we should add common Tcl-related configure flags +, addTclConfigureFlags ? true + +, meta ? {} +, passthru ? {} +, doCheck ? true +, ... } @ attrs: + +let + inherit (tcl) stdenv; + inherit (lib) getBin optionalAttrs optionals; + + defaultTclPkgConfigureFlags = [ + "--with-tcl=${tcl}/lib" + "--with-tclinclude=${tcl}/include" + "--exec-prefix=\${out}" + ]; + + self = (stdenv.mkDerivation ((builtins.removeAttrs attrs [ + "addTclConfigureFlags" "checkPhase" "checkInputs" "doCheck" + ]) // { + + buildInputs = buildInputs ++ [ makeWrapper tcl.tclPackageHook ]; + nativeBuildInputs = nativeBuildInputs ++ [ tcl ]; + propagatedBuildInputs = propagatedBuildInputs ++ [ tcl ]; + + TCLSH = "${getBin tcl}/bin/tclsh"; + + # Run tests after install, at which point we've done all TCLLIBPATH setup + doCheck = false; + doInstallCheck = attrs.doCheck or ((attrs ? doInstallCheck) && attrs.doInstallCheck); + installCheckInputs = checkInputs ++ (optionals (attrs ? installCheckInputs) attrs.installCheckInputs); + + # Add typical values expected by TEA for configureFlags + configureFlags = + if (!dontConfigure && addTclConfigureFlags) + then (configureFlags ++ defaultTclPkgConfigureFlags) + else configureFlags; + + meta = { + platforms = tcl.meta.platforms; + } // meta; + + + } // optionalAttrs (attrs?checkPhase) { + installCheckPhase = attrs.checkPhase; + } + )); + +in lib.extendDerivation true passthru self diff --git a/nixpkgs/pkgs/development/interpreters/tcl/tcl-package-hook.sh b/nixpkgs/pkgs/development/interpreters/tcl/tcl-package-hook.sh new file mode 100644 index 000000000000..747783cb1c27 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/tcl/tcl-package-hook.sh @@ -0,0 +1,74 @@ +# This hook ensures that we do the following in post-fixup: +# * wrap any installed executables with a wrapper that configures TCLLIBPATH +# * write a setup hook that extends the TCLLIBPATH of any anti-dependencies + +# Add a directory to TCLLIBPATH, provided that it exists +_addToTclLibPath() { + local tclPkg="$1" + if [[ -z "$tclPkg" ]]; then + return + fi + + if [[ ! -d "$tclPkg" ]]; then + >&2 echo "can't add $tclPkg to TCLLIBPATH; that directory doesn't exist" + exit 1 + fi + + if [[ "$tclPkg" == *" "* ]]; then + tclPkg="{$tclPkg}" + fi + + if [[ -z "${TCLLIBPATH-}" ]]; then + export TCLLIBPATH="$tclPkg" + else + if [[ "$TCLLIBPATH" != *"$tclPkg "* && "$TCLLIBPATH" != *"$tclPkg" ]]; then + export TCLLIBPATH="${TCLLIBPATH} $tclPkg" + fi + fi +} + +# Locate any directory containing an installed pkgIndex file +findInstalledTclPkgs() { + local -r newLibDir="${!outputLib}/lib" + if [[ ! -d "$newLibDir" ]]; then + >&2 echo "Assuming no loadable tcl packages installed ($newLibDir does not exist)" + return + fi + echo "$(find "$newLibDir" -name pkgIndex.tcl -exec dirname {} \;)" +} + +# Wrap any freshly-installed binaries and set up their TCLLIBPATH +wrapTclBins() { + if [[ -z "${TCLLIBPATH-}" ]]; then + echo "skipping automatic Tcl binary wrapping (nothing to do)" + return + fi + + local -r tclBinsDir="${!outputBin}/bin" + if [[ ! -d "$tclBinsDir" ]]; then + echo "No outputBin found, not using any TCLLIBPATH wrapper" + return + fi + + find "$tclBinsDir" -type f -executable -print | + while read -r someBin; do + echo "Adding TCLLIBPATH wrapper for $someBin" + wrapProgram "$someBin" --prefix TCLLIBPATH ' ' "$TCLLIBPATH" + done +} + +# Generate hook to adjust TCLLIBPATH in anti-dependencies +writeTclLibPathHook() { + local -r hookPath="${!outputLib}/nix-support/setup-hook" + mkdir -p "$(dirname "$hookPath")" + + typeset -f _addToTclLibPath >> "$hookPath" + local -r tclPkgs=$(findInstalledTclPkgs) + while IFS= read -r tclPkg; do + echo "_addToTclLibPath \"$tclPkg\"" >> "$hookPath" + _addToTclLibPath "$tclPkg" true + done <<< "$tclPkgs" +} + +postFixupHooks+=(writeTclLibPathHook) +postFixupHooks+=(wrapTclBins) diff --git a/nixpkgs/pkgs/development/interpreters/tclreadline/default.nix b/nixpkgs/pkgs/development/interpreters/tclreadline/default.nix index 44d2745dac8b..de671bab5739 100644 --- a/nixpkgs/pkgs/development/interpreters/tclreadline/default.nix +++ b/nixpkgs/pkgs/development/interpreters/tclreadline/default.nix @@ -8,7 +8,7 @@ , tk }: -stdenv.mkDerivation rec { +tcl.mkTclDerivation rec { pname = "tclreadline"; version = "2.3.8"; @@ -26,7 +26,6 @@ stdenv.mkDerivation rec { ]; buildInputs = [ readline - tcl tk ]; @@ -35,7 +34,6 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-tclshrl" "--enable-wishrl" - "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-readline-includes=${readline.dev}/include/readline" "--with-libtool=${libtool}" diff --git a/nixpkgs/pkgs/development/interpreters/trealla/default.nix b/nixpkgs/pkgs/development/interpreters/trealla/default.nix index 165251c8c5c3..4321130044cc 100644 --- a/nixpkgs/pkgs/development/interpreters/trealla/default.nix +++ b/nixpkgs/pkgs/development/interpreters/trealla/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "trealla"; - version = "1.7.65"; + version = "1.8.74"; src = fetchFromGitHub { owner = "infradig"; repo = "trealla"; rev = "v${version}"; - sha256 = "sha256-uCDACBwdiCeAwF6IZHz7s5pD83JXTP7jAQDjGld8tt0="; + sha256 = "sha256-pg9SfEFUTuyAnhP+Q1vR/QImZuLuRb8NpaOiCEcTFj8="; }; postPatch = '' |