diff options
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters')
24 files changed, 596 insertions, 130 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/angelscript/default.nix b/nixpkgs/pkgs/development/interpreters/angelscript/default.nix index 9a6aae053f9d..abd680ad2342 100644 --- a/nixpkgs/pkgs/development/interpreters/angelscript/default.nix +++ b/nixpkgs/pkgs/development/interpreters/angelscript/default.nix @@ -1,20 +1,17 @@ -{ lib, stdenv, fetchurl, unzip, cmake }: -let - s = # Generated upstream information - rec { - baseName="angelscript"; - version = "2.35.0"; - name="${baseName}-${version}"; - url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; - sha256 = "sha256-AQ3UXiPnNNRvWJHXDiaGB6EsuasSUD3aQvhC2dt+iFc="; - }; +{ lib +, stdenv +, fetchurl +, unzip +, cmake +}: -in -stdenv.mkDerivation { - inherit (s) name version; +stdenv.mkDerivation rec { + pname = "angelscript"; + version = "2.35.1"; src = fetchurl { - inherit (s) url sha256; + url = "https://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; + sha256 = "12x12fs2bjkbh73n2w84wnqhg6xn6mnp6g79gbkwfl6gssv9c42w"; }; nativeBuildInputs = [ unzip cmake ]; @@ -32,7 +29,6 @@ stdenv.mkDerivation { ''; meta = with lib; { - inherit (s) version; description = "Light-weight scripting library"; license = licenses.zlib; maintainers = with maintainers; [ raskin ]; diff --git a/nixpkgs/pkgs/development/interpreters/angelscript/default.upstream b/nixpkgs/pkgs/development/interpreters/angelscript/default.upstream deleted file mode 100644 index 7dbe527b276c..000000000000 --- a/nixpkgs/pkgs/development/interpreters/angelscript/default.upstream +++ /dev/null @@ -1,4 +0,0 @@ -url http://www.angelcode.com/angelscript/downloads.html -version_link '[.]zip$' -version '.*_([0-9.]+)[.].*' '\1' -do_overwrite () { do_overwrite_just_version ; } diff --git a/nixpkgs/pkgs/development/interpreters/bqn/cbqn/default.nix b/nixpkgs/pkgs/development/interpreters/bqn/cbqn/default.nix new file mode 100644 index 000000000000..4d414dc04e1d --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/bqn/cbqn/default.nix @@ -0,0 +1,70 @@ +{ lib +, stdenv +, fetchFromGitHub +, genBytecode ? false +, bqn-path ? null +, mbqn-source ? null +}: + +let + cbqn-bytecode-files = fetchFromGitHub { + name = "cbqn-bytecode-files"; + owner = "dzaima"; + repo = "CBQN"; + rev = "4d23479cdbd5ac6eb512c376ade58077b814b2b7"; + hash = "sha256-MTvg4lOB26bqvJTqV71p4Y4qDjTYaOE40Jk4Sle/hsY="; + }; +in +assert genBytecode -> ((bqn-path != null) && (mbqn-source != null)); + +stdenv.mkDerivation rec { + pname = "cbqn" + lib.optionalString (!genBytecode) "-standalone"; + version = "0.pre+unstable=2021-10-09"; + + src = fetchFromGitHub { + owner = "dzaima"; + repo = "CBQN"; + rev = "debc4e2afe313a3c54133df9f26969c2927dc8aa"; + hash = "sha256-ixFDmtq6hd2enmPbBT0JCv1bmxt84zle4zPQzz+rMCI="; + }; + + dontConfigure = true; + + postPatch = '' + sed -i '/SHELL =.*/ d' makefile + ''; + + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + + preBuild = '' + # Purity: avoids git downloading bytecode files + touch src/gen/customRuntime + '' + (if genBytecode then '' + ${bqn-path} genRuntime ${mbqn-source} + '' else '' + cp ${cbqn-bytecode-files}/src/gen/{compiler,formatter,runtime0,runtime1,src} src/gen/ + ''); + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin/ + cp BQN -t $out/bin/ + ln -s $out/bin/BQN $out/bin/bqn + ln -s $out/bin/BQN $out/bin/cbqn + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/dzaima/CBQN/"; + description = "BQN implementation in C"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres sternenseemann synthetica ]; + platforms = platforms.all; + }; +} +# TODO: version cbqn-bytecode-files +# TODO: test suite diff --git a/nixpkgs/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix b/nixpkgs/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix new file mode 100644 index 000000000000..e9b6bdf83c78 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix @@ -0,0 +1,71 @@ +{ lib +, stdenv +, fetchFromGitHub +, jdk +, makeWrapper +, buildNativeImage ? true +}: + +stdenv.mkDerivation rec { + pname = "dbqn" + lib.optionalString buildNativeImage "-native"; + version = "0.pre+date=2021-10-08"; + + src = fetchFromGitHub { + owner = "dzaima"; + repo = "BQN"; + rev = "0001109a1c5a420421b368c79d34b1e93bfe606e"; + hash = "sha256-riHHclTLkrVbtzmcz9ungAIc7kaoFHS77+SNatsfNhc="; + }; + + nativeBuildInputs = [ + jdk + makeWrapper + ]; + + dontConfigure = true; + + postPatch = '' + patchShebangs --build ./build8 + ''; + + buildPhase = '' + runHook preBuild + + ./build8 + '' + lib.optionalString buildNativeImage '' + native-image --report-unsupported-elements-at-runtime \ + -H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \ + -jar BQN.jar dbqn + '' + '' + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + + '' + (if buildNativeImage then '' + mv dbqn $out/bin + '' else '' + mkdir -p $out/share/${pname} + mv BQN.jar $out/share/${pname}/ + + makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dbqn" \ + --add-flags "-jar $out/share/${pname}/BQN.jar" + '') + '' + ln -s $out/bin/dbqn $out/bin/bqn + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/dzaima/BQN"; + description = "A BQN implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image"; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres sternenseemann ]; + inherit (jdk.meta) platforms; + }; +} +# TODO: Processing app +# TODO: minimalistic JDK diff --git a/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch b/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch new file mode 100644 index 000000000000..b23c3de44af6 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch @@ -0,0 +1,12 @@ +diff -Naur source-old/bqn.js source-new/bqn.js +--- source-old/bqn.js 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/bqn.js 2021-10-03 01:28:00.268998916 -0300 +@@ -4,7 +4,7 @@ + let path = require('path'); + let fs = require('fs'); + +-let bqn = require("./docs/bqn.js"); ++let bqn = require("@libbqn@"); + module.exports = bqn; + let {fmt,fmtErr,sysvals,sysargs,makebqn,makerepl}=bqn; + let {has,list,str,unstr,dynsys,req1str,makens}=bqn.util; diff --git a/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix b/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix new file mode 100644 index 000000000000..d49347d2ab4a --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +, makeWrapper +, nodejs +}: + +stdenvNoCC.mkDerivation rec { + pname = "bqn"; + version = "0.pre+unstable=2021-10-06"; + + src = fetchFromGitHub { + owner = "mlochbaum"; + repo = "BQN"; + rev = "2ce2dc40702431ef3d3ffece9e2f6f8b883ac6c5"; + hash = "sha256-bvXKOaBlddG6O0GbmtqU9prklqmOOvlbXuCUaFO+j0M="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ nodejs ]; + + patches = [ + # Creates a @libbqn@ substitution variable, to be filled in the fixupPhase + ./001-libbqn-path.patch + ]; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share/${pname} + cp bqn.js $out/share/${pname}/bqn.js + cp docs/bqn.js $out/share/${pname}/libbqn.js + + makeWrapper "${lib.getBin nodejs}/bin/node" "$out/bin/mbqn" \ + --add-flags "$out/share/${pname}/bqn.js" + + ln -s $out/bin/mbqn $out/bin/bqn + + runHook postInstall + ''; + + fixupPhase = '' + runHook preFixup + + substituteInPlace $out/share/${pname}/bqn.js \ + --subst-var-by "libbqn" "$out/share/${pname}/libbqn.js" + + runHook postFixup + ''; + + meta = with lib; { + homepage = "https://github.com/mlochbaum/BQN/"; + description = "The original BQN implementation in Javascript"; + license = licenses.isc; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.all; + }; +} +# TODO: install docs and other stuff diff --git a/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix b/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix index b167a4e9b12f..df75a233fff4 100644 --- a/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix +++ b/nixpkgs/pkgs/development/interpreters/clojure/babashka.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { # https://github.com/babashka/babashka/blob/v0.6.1/script/compile#L41-L52 args=("-jar" "$BABASHKA_JAR" + "-H:CLibraryPath=${graalvm11-ce.lib}/lib" # Required to build babashka on darwin. Do not remove. "${lib.optionalString stdenv.isDarwin "-H:-CheckToolchain"}" "-H:Name=$BABASHKA_BINARY" diff --git a/nixpkgs/pkgs/development/interpreters/clojure/default.nix b/nixpkgs/pkgs/development/interpreters/clojure/default.nix index 659f9b87e619..4ce8cacb845a 100644 --- a/nixpkgs/pkgs/development/interpreters/clojure/default.nix +++ b/nixpkgs/pkgs/development/interpreters/clojure/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "clojure"; - version = "1.10.3.943"; + version = "1.10.3.986"; src = fetchurl { # https://clojure.org/releases/tools url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; - sha256 = "sha256-w3DRvZsie22uoJMrNQTxN5hW0pIFjH5zAw5Z41I1M/s="; + sha256 = "1xhfp186mk9h3jdl9bpkigqrrrgdhgij7ba65j6783nh11llpa3x"; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/interpreters/dart/default.nix b/nixpkgs/pkgs/development/interpreters/dart/default.nix index 1d6abb59504e..452d0edc3e0a 100644 --- a/nixpkgs/pkgs/development/interpreters/dart/default.nix +++ b/nixpkgs/pkgs/development/interpreters/dart/default.nix @@ -2,7 +2,7 @@ , lib , fetchurl , unzip -, version ? "2.13.1" +, version ? "2.14.3" , sources ? let base = "https://storage.googleapis.com/dart-archive/channels"; x86_64 = "x64"; @@ -10,24 +10,24 @@ aarch64 = "arm64"; # Make sure that if the user overrides version parameter they're # also need to override sources, to avoid mistakes - version = "2.13.1"; + version = "2.14.3"; in { "${version}-x86_64-darwin" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${x86_64}-release.zip"; - sha256 = "0kb6r2rmp5d0shvgyy37fmykbgww8qaj4f8k79rmqfv5lwa3izya"; + sha256 = "0is4gz99i06yb4jisxcz2c15jqkaz6ayhg9b8zb3s0s8yp59r2iq"; }; "${version}-x86_64-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip"; - sha256 = "0zq8wngyrw01wjc5s6w1vz2jndms09ifiymjjixxby9k41mr6jrq"; + sha256 = "0wg1mnj4qrv22z510032jnwb3z39gvzlrv5wic2ci5mg7316xlya"; }; "${version}-i686-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${i686}-release.zip"; - sha256 = "0zv4q8xv2i08a6izpyhhnil75qhs40m5mgyvjqjsswqkwqdf7lkj"; + sha256 = "0gnjk3lh63m0naaw67g9w7wys5cgx2ipzd1dznqnlvxp2vj1gj5p"; }; "${version}-aarch64-linux" = fetchurl { url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip"; - sha256 = "0bb9jdmg5p608jmmiqibp13ydiw9avgysxlmljvgsl7wl93j6rgc"; + sha256 = "1j7snnf3a0jly85njq8npqikrdhz9lkirhvik1hkpd9sv7qfbvd6"; }; } }: @@ -56,7 +56,7 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://www.dartlang.org/"; - maintainers = with maintainers; [ grburst thiagokokada ]; + maintainers = with maintainers; [ grburst thiagokokada flexagoon ]; description = "Scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps"; longDescription = '' Dart is a class-based, single inheritance, object-oriented language diff --git a/nixpkgs/pkgs/development/interpreters/dzaima-apl/default.nix b/nixpkgs/pkgs/development/interpreters/dzaima-apl/default.nix new file mode 100644 index 000000000000..d061a6cb9cdf --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/dzaima-apl/default.nix @@ -0,0 +1,70 @@ +{ lib +, stdenv +, fetchFromGitHub +, jdk +, makeWrapper +, buildNativeImage ? true +}: + +stdenv.mkDerivation rec { + pname = "dapl" + lib.optionalString buildNativeImage "-native"; + version = "0.2.0+date=2021-10-16"; + + src = fetchFromGitHub { + owner = "dzaima"; + repo = "APL"; + rev = "5eb0a4205e27afa6122096a25008474eec562dc0"; + hash = "sha256-UdumMytqT909JRpNqzhYPuKPw644m/vRUsEbIVF2a7U="; + }; + + nativeBuildInputs = [ + jdk + makeWrapper + ]; + + dontConfigure = true; + + postPatch = '' + patchShebangs --build ./build + ''; + + buildPhase = '' + runHook preBuild + + ./build + '' + lib.optionalString buildNativeImage '' + native-image --report-unsupported-elements-at-runtime \ + -H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \ + -jar APL.jar dapl + '' + '' + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + '' + (if buildNativeImage then '' + mv dapl $out/bin + '' else '' + mkdir -p $out/share/${pname} + mv APL.jar $out/share/${pname}/ + + makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dapl" \ + --add-flags "-jar $out/share/${pname}/APL.jar" + '') + '' + ln -s $out/bin/dapl $out/bin/apl + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/dzaima/APL"; + description = "An APL implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image"; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres ]; + inherit (jdk.meta) platforms; + }; +} +# TODO: Processing app +# TODO: minimalistic JDK diff --git a/nixpkgs/pkgs/development/interpreters/erlang/R24.nix b/nixpkgs/pkgs/development/interpreters/erlang/R24.nix index 162af7c02b9b..566e2f60afa8 100644 --- a/nixpkgs/pkgs/development/interpreters/erlang/R24.nix +++ b/nixpkgs/pkgs/development/interpreters/erlang/R24.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 = "24.0.6"; - sha256 = "0z01hkzf2y6lz20s2vkn4q874lb6n6j00jkbgk4gg60rhrmq904z"; + version = "24.1.2"; + sha256 = "sha256-P0XU+gqDyhW0QQf1UzO+CV9Yc6YP70MRf3MLgdKzeU4="; } diff --git a/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix b/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix index 3d5c692930b6..f4f7d6483545 100644 --- a/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix @@ -84,9 +84,13 @@ let in stdenv.mkDerivation ({ - name = "${baseName}-${version}" - + optionalString javacSupport "-javac" - + optionalString odbcSupport "-odbc"; + # name is used instead of pname to + # - not have to pass pnames as argument + # - have a separate pname for erlang (main module) + name = "${baseName}" + + optionalString javacSupport "_javac" + + optionalString odbcSupport "_odbc" + + "-${version}"; inherit src version; diff --git a/nixpkgs/pkgs/development/interpreters/gnudatalanguage/default.nix b/nixpkgs/pkgs/development/interpreters/gnudatalanguage/default.nix new file mode 100644 index 000000000000..38f340233017 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/gnudatalanguage/default.nix @@ -0,0 +1,203 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, wrapGAppsHook +, readline +, ncurses +, zlib +, gsl +, openmp +, graphicsmagick +, fftw +, fftwFloat +, fftwLongDouble +, proj +, shapelib +, expat +, udunits +, eigen +, pslib +, eccodes +, glpk +, libpng +, plplot +, libtiff +, libgeotiff +, libjpeg + # We enable it in hdf4 and use libtirpc as a dependency here from the passthru + # of hdf4 +, enableLibtirpc ? stdenv.isLinux +, libtirpc +, python3 +, enableMPI ? (stdenv.isLinux || stdenv.isDarwin) + # Choose MPICH over OpenMPI because it currently builds on AArch and Darwin +, mpi + # Unfree optional dependency for hdf4 and hdf5 +, enableSzip ? false +, szip +, enableHDF4 ? true +, hdf4 +, hdf4-forced ? null +, enableHDF5 ? true + # HDF5 format version (API version) 1.10 and 1.12 is not fully compatible + # Specify if the API version should default to 1.10 + # netcdf currently depends on hdf5 with `usev110Api=true` + # If you wish to use HDF5 API version 1.12 (`useHdf5v110Api=false`), + # you will need to turn NetCDF off. +, useHdf5v110Api ? true +, hdf5 +, hdf5-forced ? null +, enableNetCDF ? true +, netcdf +, netcdf-forced ? null +, plplot-forced ? null + # wxWidgets is preferred over X11 for this project but we only have it on Linux + # and Darwin. Also, we use the wxWidgets dependency here from the passthru of + # plplot. +, enableWX ? (stdenv.isLinux || stdenv.isDarwin) + # X11: OFF by default for platform consistency. Use X where WX is not available +, enableXWin ? (!stdenv.isLinux && !stdenv.isDarwin) +}: + +let + hdf4-custom = + if hdf4-forced != null + then hdf4-forced + else + hdf4.override { + uselibtirpc = enableLibtirpc; + szipSupport = enableSzip; + inherit szip; + }; + hdf5-custom = + if hdf5-forced != null + then hdf5-forced + else + hdf5.override { + usev110Api = useHdf5v110Api; + mpiSupport = enableMPI; + inherit mpi; + szipSupport = enableSzip; + inherit szip; + }; + netcdf-custom = + if netcdf-forced != null + then netcdf-forced + else + netcdf.override { + hdf5 = hdf5-custom; + }; + enablePlplotDrivers = enableWX || enableXWin; + plplot-with-drivers = + if plplot-forced != null + then plplot-forced + else + plplot.override { + inherit + enableWX + enableXWin + ; + }; +in +stdenv.mkDerivation rec { + pname = "gnudatalanguage"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = pname; + repo = "gdl"; + rev = "v${version}"; + sha256 = "sha256-Y9LVRaWjQqpWqjNngxB406PE/rl/9S8rs0u0CK5ivUA="; + }; + + buildInputs = [ + readline + ncurses + zlib + gsl + openmp + graphicsmagick + fftw + fftwFloat + fftwLongDouble + proj + shapelib + expat + mpi + udunits + eigen + pslib + eccodes + glpk + libpng + libtiff + libgeotiff + libjpeg + hdf4-custom + hdf5-custom + netcdf-custom + plplot-with-drivers + ] ++ lib.optional enableXWin plplot-with-drivers.libX11 + ++ lib.optional enableWX plplot-with-drivers.wxWidgets + ++ lib.optional enableMPI mpi + ++ lib.optional enableLibtirpc hdf4-custom.libtirpc + ++ lib.optional enableSzip szip; + + propagatedBuildInputs = [ + (python3.withPackages (ps: with ps; [ numpy ])) + ]; + + nativeBuildInputs = [ + cmake + ] ++ lib.optional enableWX wrapGAppsHook; + + cmakeFlags = lib.optional (!enableHDF4) "-DHDF=OFF" + ++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ] + ++ lib.optional (!enableNetCDF) "-DNETCDF=OFF" + ++ lib.optional (!enablePlplotDrivers) "-DINTERACTIVE_GRAPHICS=OFF" + ++ lib.optional (!enableWX) "-DWXWIDGETS=OFF" + ++ lib.optional enableSzip "-DSZIPDIR=${szip}" + ++ lib.optionals enableXWin [ "-DX11=ON" "-DX11DIR=${plplot-with-drivers.libX11}" ] + ++ lib.optionals enableMPI [ "-DMPI=ON" "-DMPIDIR=${mpi}" ]; + + doCheck = true; + + # Opt-out unstable tests + # https://github.com/gnudatalanguage/gdl/issues/482 + # https://github.com/gnudatalanguage/gdl/issues/1079 + # https://github.com/gnudatalanguage/gdl/issues/460 + preCheck = '' + checkFlagsArray+=("ARGS=-E 'test_tic_toc.pro|test_byte_conversion.pro|test_bytscl.pro|test_call_external.pro'") + ''; + + passthru = { + hdf4 = hdf4-custom; + hdf5 = hdf5-custom; + netcdf = netcdf-custom; + plplot = plplot-with-drivers; + python = python3; + inherit + enableMPI + mpi + useHdf5v110Api + enableSzip + enableWX + enableXWin + ; + }; + + meta = with lib; { + description = "Free incremental compiler of IDL"; + longDescription = '' + GDL (GNU Data Language) is a free/libre/open source incremental compiler + compatible with IDL (Interactive Data Language) and to some extent with PV-WAVE. + GDL is aimed as a drop-in replacement for IDL. + ''; + homepage = "https://github.com/gnudatalanguage/gdl"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ ShamrockLee ]; + platforms = platforms.all; + mainProgram = "gdl"; + }; +} diff --git a/nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix b/nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix index 64e872ad5f63..ff93e842eeae 100644 --- a/nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix +++ b/nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix @@ -25,7 +25,6 @@ pname # propagate build dependencies so in case we have A -> B -> C, # C can import package A propagated by B , propagatedBuildInputs ? [] -, propagatedNativeBuildInputs ? [] # used to disable derivation, useful for specific lua versions # TODO move from this setting meta.broken to a 'disabled' attribute on the @@ -50,7 +49,7 @@ pname # The latter is used to work-around luarocks having a problem with # multiple-output derivations as external deps: # https://github.com/luarocks/luarocks/issues/766<Paste> -, externalDeps ? lib.unique (lib.filter (drv: !drv ? luaModule) (propagatedBuildInputs ++ buildInputs)) +, externalDeps ? [] # Appended to the generated luarocks config , extraConfig ? "" @@ -74,7 +73,6 @@ pname let generatedRockspecFilename = "${rockspecDir}/${pname}-${version}.rockspec"; - # TODO fix warnings "Couldn't load rockspec for ..." during manifest # construction -- from initial investigation, appears it will require # upstream luarocks changes to fix cleanly (during manifest construction, @@ -82,70 +80,30 @@ let # configured trees) luarocks_config = "luarocks-config.lua"; luarocks_content = let - extraVariablesStr = lib.concatStringsSep "\n " - (lib.mapAttrsToList (k: v: "${k}='${v}';") extraVariables); - in '' - local_cache = "" - -- To prevent collisions when creating environments, we install the rock - -- files into per-package subdirectories - rocks_subdir = '${rocksSubdir}' - -- Then we need to tell luarocks where to find the rock files per - -- dependency - rocks_trees = { - ${lib.concatStringsSep "\n, " rocksTrees} - } - '' + lib.optionalString lua.pkgs.isLuaJIT '' - -- Luajit provides some additional functionality built-in; this exposes - -- that to luarock's dependency system - rocks_provided = { - jit='${lua.luaversion}-1'; - ffi='${lua.luaversion}-1'; - luaffi='${lua.luaversion}-1'; - bit='${lua.luaversion}-1'; - } - '' + '' - -- For single-output external dependencies - external_deps_dirs = { - ${lib.concatStringsSep "\n, " externalDepsDirs} - } - variables = { - -- Some needed machinery to handle multiple-output external dependencies, - -- as per https://github.com/luarocks/luarocks/issues/766 - ${lib.optionalString (lib.length depVariables > 0) '' - ${lib.concatStringsSep "\n " depVariables}''} - ${extraVariablesStr} - } - ${extraConfig} - ''; + generatedConfig = lua.pkgs.lib.generateLuarocksConfig { + externalDeps = externalDeps ++ externalDepsGenerated; + inherit extraVariables; + inherit rocksSubdir; + inherit requiredLuaRocks; + }; + in + '' + ${generatedConfig} + ${extraConfig} + ''; rocksSubdir = "${attrs.pname}-${version}-rocks"; - externalDepsDirs = map - (x: "'${builtins.toString x}'") - (lib.filter (lib.isDerivation) externalDeps); - - rocksTrees = lib.imap0 - (i: dep: "{ name = [[dep-${toString i}]], root = '${dep}', rocks_dir = '${dep}/${dep.rocksSubdir}' }") - requiredLuaRocks; - # Filter out the lua derivation itself from the Lua module dependency # closure, as it doesn't have a rock tree :) requiredLuaRocks = lib.filter (d: d ? luaModule) - (lua.pkgs.requiredLuaModules propagatedBuildInputs); - - # Explicitly point luarocks to the relevant locations for multiple-output - # derivations that are external dependencies, to work around an issue it has - # (https://github.com/luarocks/luarocks/issues/766) - depVariables = lib.concatMap ({name, dep}: [ - "${name}_INCDIR='${lib.getDev dep}/include';" - "${name}_LIBDIR='${lib.getLib dep}/lib';" - "${name}_BINDIR='${lib.getBin dep}/bin';" - ]) externalDeps'; + (lua.pkgs.requiredLuaModules luarocksDrv.propagatedBuildInputs); # example externalDeps': [ { name = "CRYPTO"; dep = pkgs.openssl; } ] + externalDepsGenerated = lib.unique (lib.filter (drv: !drv ? luaModule) (luarocksDrv.propagatedBuildInputs ++ luarocksDrv.buildInputs)); externalDeps' = lib.filter (dep: !lib.isDerivation dep) externalDeps; -in -toLuaModule ( lua.stdenv.mkDerivation ( + + luarocksDrv = toLuaModule ( lua.stdenv.mkDerivation ( builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariables"] // { name = namePrefix + pname + "-" + version; @@ -187,13 +145,12 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab runHook postConfigure ''; - # TODO could be moved to configurePhase buildPhase = '' runHook preBuild nix_debug "Using LUAROCKS_CONFIG=$LUAROCKS_CONFIG" - LUAROCKS=luarocks + LUAROCKS=${lua.pkgs.luarocks}/bin/luarocks if (( ''${NIX_DEBUG:-0} >= 1 )); then LUAROCKS="$LUAROCKS --verbose" fi @@ -236,6 +193,7 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab passthru = { inherit lua; # The lua interpreter inherit externalDeps; + inherit luarocks_content; } // passthru; meta = { @@ -244,4 +202,6 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab maintainers = (meta.maintainers or []) ++ [ ]; broken = disabled; } // meta; -})) +})); +in + luarocksDrv diff --git a/nixpkgs/pkgs/development/interpreters/lua-5/hooks/default.nix b/nixpkgs/pkgs/development/interpreters/lua-5/hooks/default.nix new file mode 100644 index 000000000000..8fd725a9b8a4 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/lua-5/hooks/default.nix @@ -0,0 +1,27 @@ +# Hooks for building lua packages. +{ lua +, lib +, makeSetupHook +, findutils +, runCommand +}: + +let + callPackage = lua.pkgs.callPackage; + luaInterpreter = lua.interpreter; +in { + + lua-setup-hook = LuaPathSearchPaths: LuaCPathSearchPaths: + let + hook = ./setup-hook.sh; + in runCommand "lua-setup-hook.sh" { + # hum doesn't seem to like caps !! BUG ? + luapathsearchpaths=lib.escapeShellArgs LuaPathSearchPaths; + luacpathsearchpaths=lib.escapeShellArgs LuaCPathSearchPaths; + } '' + cp ${hook} hook.sh + substituteAllInPlace hook.sh + mv hook.sh $out + ''; + +} diff --git a/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.sh b/nixpkgs/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh index 1c445b82afde..1c445b82afde 100644 --- a/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh diff --git a/nixpkgs/pkgs/development/interpreters/lua-5/interpreter.nix b/nixpkgs/pkgs/development/interpreters/lua-5/interpreter.nix index a780e6ba49f1..de61714f2421 100644 --- a/nixpkgs/pkgs/development/interpreters/lua-5/interpreter.nix +++ b/nixpkgs/pkgs/development/interpreters/lua-5/interpreter.nix @@ -16,7 +16,8 @@ let overrides = packageOverrides; }; -plat = if stdenv.isLinux then "linux" +plat = if (stdenv.isLinux && lib.versionOlder self.luaversion "5.4") then "linux" + else if (stdenv.isLinux && lib.versionAtLeast self.luaversion "5.4") then "linux-readline" else if stdenv.isDarwin then "macosx" else if stdenv.hostPlatform.isMinGW then "mingw" else if stdenv.isFreeBSD then "freebsd" diff --git a/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.nix b/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.nix index 62caffd8d8a0..e69de29bb2d1 100644 --- a/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.nix +++ b/nixpkgs/pkgs/development/interpreters/lua-5/setup-hook.nix @@ -1,15 +0,0 @@ -{ runCommand, lib, }: - -LuaPathSearchPaths: LuaCPathSearchPaths: - -let - hook = ./setup-hook.sh; -in runCommand "lua-setup-hook.sh" { - # hum doesn't seem to like caps !! BUG ? - luapathsearchpaths=lib.escapeShellArgs LuaPathSearchPaths; - luacpathsearchpaths=lib.escapeShellArgs LuaCPathSearchPaths; -} '' - cp ${hook} hook.sh - substituteAllInPlace hook.sh - mv hook.sh $out -'' diff --git a/nixpkgs/pkgs/development/interpreters/octave/default.nix b/nixpkgs/pkgs/development/interpreters/octave/default.nix index e8228d23b0c9..6a1d6c30cc18 100644 --- a/nixpkgs/pkgs/development/interpreters/octave/default.nix +++ b/nixpkgs/pkgs/development/interpreters/octave/default.nix @@ -114,12 +114,12 @@ let }; self = mkDerivation rec { - version = "6.2.0"; + version = "6.3.0"; pname = "octave"; src = fetchurl { url = "mirror://gnu/octave/${pname}-${version}.tar.gz"; - sha256 = "sha256-RX0f2oY0qDni/Xz8VbmL1W82tq5z0xu530Pd4wEsqnw="; + sha256 = "sha256-IyBl86cvwwE/6fF/Qpo99p1nLB9rYHcCmjHI881Ypm4="; }; buildInputs = [ diff --git a/nixpkgs/pkgs/development/interpreters/perl/default.nix b/nixpkgs/pkgs/development/interpreters/perl/default.nix index 98de7c71abca..45c12b9720c4 100644 --- a/nixpkgs/pkgs/development/interpreters/perl/default.nix +++ b/nixpkgs/pkgs/development/interpreters/perl/default.nix @@ -1,4 +1,4 @@ -{ config, lib, stdenv, fetchurl, fetchFromGitHub, pkgs, buildPackages +{ config, lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, pkgs, buildPackages , callPackage , enableThreading ? true, coreutils, makeWrapper }: @@ -41,7 +41,14 @@ let ] ++ optional stdenv.isSunOS ./ld-shared.patch ++ optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ] - ++ optional crossCompiling ./MakeMaker-cross.patch; + ++ optionals crossCompiling [ + ./MakeMaker-cross.patch + # https://github.com/arsv/perl-cross/pull/120 + (fetchpatch { + url = "https://github.com/arsv/perl-cross/commit/3c318ae6572f8b36cb077c8b49c851e2f5fe181e.patch"; + sha256 = "0cmcy8bams3c68f6xadl52z2w378wcpdjzi3qi4pcyvcfs011l6g"; + }) + ]; # This is not done for native builds because pwd may need to come from # bootstrap tools when building bootstrap perl. @@ -59,7 +66,7 @@ let unset src ''; - # Build a thread-safe Perl with a dynamic libperls.o. We need the + # Build a thread-safe Perl with a dynamic libperl.so. We need the # "installstyle" option to ensure that modules are put under # $out/lib/perl5 - this is the general default, but because $out # contains the string "perl", Configure would select $out/lib. @@ -71,13 +78,14 @@ let ++ [ "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" - "-Duseshrplib" + ] ++ lib.optional (!crossCompiling) "-Duseshrplib" ++ [ "-Dlocincpth=${libcInc}/include" "-Dloclibpth=${libcLib}/lib" ] ++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ] ++ optional stdenv.isSunOS "-Dcc=gcc" ++ optional enableThreading "-Dusethreads" + ++ optional stdenv.hostPlatform.isStatic "--all-static" ++ optionals (!crossCompiling) [ "-Dprefix=${placeholder "out"}" "-Dman1dir=${placeholder "out"}/share/man/man1" @@ -170,14 +178,14 @@ let priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl` }; } // optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec { - crossVersion = "01c176ac0f57d40cc3b6f8e441062780f073d952"; # Aug 22, 2021 + crossVersion = "393821c7cf53774233aaf130ff2c8ccec701b0a9"; # Sep 22, 2021 perl-cross-src = fetchFromGitHub { name = "perl-cross-${crossVersion}"; owner = "arsv"; repo = "perl-cross"; rev = crossVersion; - sha256 = "19mwr1snwl4156rlhn74kmpl1wyc7ahhlrjfpnfcj3n63ic0c56y"; + sha256 = "1fn35b1773aibi2z54m0mar7114737mvfyp81wkdwhakrmzr5nv1"; }; depsBuildBuild = [ buildPackages.stdenv.cc makeWrapper ]; @@ -214,7 +222,7 @@ in { perldevel = common { perl = pkgs.perldevel; buildPerl = buildPackages.perldevel; - version = "5.35.3"; - sha256 = "06442zc5rvisl120f58jpy95bkf8f1cc4n577nzihdavlbfmnyyn"; + version = "5.35.4"; + sha256 = "1ss2r0qq5li6d2qghfv1iah5nl6nraymd7b7ib1iy1395rwyhl4q"; }; } diff --git a/nixpkgs/pkgs/development/interpreters/php/7.4.nix b/nixpkgs/pkgs/development/interpreters/php/7.4.nix index d098aeb57e1b..0c8edacbae58 100644 --- a/nixpkgs/pkgs/development/interpreters/php/7.4.nix +++ b/nixpkgs/pkgs/development/interpreters/php/7.4.nix @@ -2,8 +2,8 @@ let base = callPackage ./generic.nix (_args // { - version = "7.4.23"; - sha256 = "d1e094fe6e4f832e0a64be9c69464ba5d593fb216f914efa8bbb084e0a7a5727"; + version = "7.4.24"; + sha256 = "0cigvwp469kmc27r28liq5dwdz5icp61vqqr3w24jhw6i2vk43pm"; }); in diff --git a/nixpkgs/pkgs/development/interpreters/php/8.0.nix b/nixpkgs/pkgs/development/interpreters/php/8.0.nix index 624fe1c338e7..0c8930c9c68f 100644 --- a/nixpkgs/pkgs/development/interpreters/php/8.0.nix +++ b/nixpkgs/pkgs/development/interpreters/php/8.0.nix @@ -2,8 +2,8 @@ let base = callPackage ./generic.nix (_args // { - version = "8.0.10"; - sha256 = "sha256-yUVHJxQQkAhFsITsK8s0Zq82PuypLLJL1hHcvcJvFYc="; + version = "8.0.11"; + sha256 = "0fj0yk0h0fvr9ckszp496wdyvf8kdfsvydw95qg0q0g4hm18gvbh"; }); in diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix index 353535ed6823..7bb2bb288931 100644 --- a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix @@ -45,9 +45,7 @@ # enableLTO is a subset of the enableOptimizations flag that doesn't harm reproducibility. # enabling LTO on 32bit arch causes downstream packages to fail when linking # enabling LTO on *-darwin causes python3 to fail when linking. -# enabling LTO with musl and dynamic linking fails with a linker error although it should -# be possible as alpine is doing it: https://github.com/alpinelinux/aports/blob/a8ccb04668c7729e0f0db6c6ff5f25d7519e779b/main/python3/APKBUILD#L82 -, enableLTO ? stdenv.is64bit && stdenv.isLinux && !(stdenv.hostPlatform.isMusl && !stdenv.hostPlatform.isStatic) +, enableLTO ? stdenv.is64bit && stdenv.isLinux , reproducibleBuild ? false , pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}" }: diff --git a/nixpkgs/pkgs/development/interpreters/supercollider/default.nix b/nixpkgs/pkgs/development/interpreters/supercollider/default.nix index 09e97a65e664..49cf6e095d1f 100644 --- a/nixpkgs/pkgs/development/interpreters/supercollider/default.nix +++ b/nixpkgs/pkgs/development/interpreters/supercollider/default.nix @@ -9,11 +9,11 @@ let in mkDerivation rec { pname = "supercollider"; - version = "3.12.0"; + version = "3.12.1"; src = fetchurl { url = "https://github.com/supercollider/supercollider/releases/download/Version-${version}/SuperCollider-${version}-Source.tar.bz2"; - sha256 = "sha256-RgCL50pyjNgy+H+Crvfgds86pmTao2FS+IF3gRHu5NM="; + sha256 = "sha256-neYId2hJRAMx4+ZFm+5TzYuUbMRfa9icyqm2UYac/Cs="; }; hardeningDisable = [ "stackprotector" ]; @@ -35,6 +35,6 @@ mkDerivation rec { homepage = "https://supercollider.github.io"; maintainers = with maintainers; [ mrmebelman ]; license = licenses.gpl3Plus; - platforms = [ "x686-linux" "x86_64-linux" ]; + platforms = platforms.linux; }; } |