diff options
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters')
67 files changed, 1201 insertions, 480 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/acl2/0001-Fix-some-paths-for-Nix-build.patch b/nixpkgs/pkgs/development/interpreters/acl2/0001-Fix-some-paths-for-Nix-build.patch new file mode 100644 index 00000000000..2b7f8b6a53b --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/acl2/0001-Fix-some-paths-for-Nix-build.patch @@ -0,0 +1,190 @@ +From 43d23211dd7d22b5264ed06d446f89d632125da8 Mon Sep 17 00:00:00 2001 +From: Keshav Kini <keshav.kini@gmail.com> +Date: Sat, 30 May 2020 21:27:47 -0700 +Subject: [PATCH 1/2] Fix some paths for Nix build + +--- + books/build/features.sh | 1 + + .../ipasir/load-ipasir-sharedlib-raw.lsp | 16 +++---- + books/projects/smtlink/config.lisp | 2 +- + books/projects/smtlink/examples/examples.lisp | 4 +- + books/projects/smtlink/smtlink-config | 2 +- + .../cl+ssl-20181018-git/src/reload.lisp | 48 ++----------------- + .../shellpool-20150505-git/src/main.lisp | 20 +------- + 7 files changed, 15 insertions(+), 78 deletions(-) + +diff --git a/books/build/features.sh b/books/build/features.sh +index c8493d51a..def853f53 100755 +--- a/books/build/features.sh ++++ b/books/build/features.sh +@@ -84,6 +84,7 @@ fi + + + echo "Determining whether an ipasir shared library is installed" 1>&2 ++IPASIR_SHARED_LIBRARY=${IPASIR_SHARED_LIBRARY:-@libipasirglucose4@/lib/libipasirglucose4.so} + if [[ $IPASIR_SHARED_LIBRARY != '' ]]; + then + if [[ -e $IPASIR_SHARED_LIBRARY ]]; +diff --git a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp +index c6b0b3185..5ac5c675a 100644 +--- a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp ++++ b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp +@@ -28,13 +28,9 @@ + ; + ; Original authors: Sol Swords <sswords@centtech.com> + +-(er-let* ((libname (acl2::getenv$ "IPASIR_SHARED_LIBRARY" acl2::*the-live-state*))) +- (if libname +- (handler-case +- (cffi::load-foreign-library libname) +- (error () (er hard? 'load-ipasir-shardlib-raw +- "Couldn't load the specified ipasir shared library, ~s0." +- libname))) +- (er hard? 'load-ipasir-shardlib-raw +- "Couldn't load an ipasir library because the ~ +- IPASIR_SHARED_LIBRARY environment variable was unset."))) ++(let ((libname "@libipasirglucose4@/lib/libipasirglucose4.so")) ++ (handler-case ++ (cffi::load-foreign-library libname) ++ (error () (er hard? 'load-ipasir-shardlib-raw ++ "Couldn't load the specified ipasir shared library, ~s0." ++ libname)))) +diff --git a/books/projects/smtlink/config.lisp b/books/projects/smtlink/config.lisp +index c74073174..8d92355f7 100644 +--- a/books/projects/smtlink/config.lisp ++++ b/books/projects/smtlink/config.lisp +@@ -51,7 +51,7 @@ where the system books are.")) + (make-smtlink-config :interface-dir interface-dir + :smt-module "ACL2_to_Z3" + :smt-class "ACL22SMT" +- :smt-cmd "/usr/bin/env python" ++ :smt-cmd "python" + :pythonpath ""))) + + ;; ----------------------------------------------------------------- +diff --git a/books/projects/smtlink/examples/examples.lisp b/books/projects/smtlink/examples/examples.lisp +index bc66e0165..24f0d639c 100644 +--- a/books/projects/smtlink/examples/examples.lisp ++++ b/books/projects/smtlink/examples/examples.lisp +@@ -75,7 +75,7 @@ Subgoal 2 + Subgoal 2.2 + Subgoal 2.2' + Using default SMT-trusted-cp... +-; SMT solver: `/usr/bin/env python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes ++; SMT solver: `python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes + Proved! + Subgoal 2.2'' + Subgoal 2.1 +@@ -139,7 +139,7 @@ read back into ACL2. Below are the outputs from this clause processor called + + @({ + Using default SMT-trusted-cp... +-; SMT solver: `/usr/bin/env python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes ++; SMT solver: `python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes + Proved! + }) + +diff --git a/books/projects/smtlink/smtlink-config b/books/projects/smtlink/smtlink-config +index 0d2703545..0f58904ea 100644 +--- a/books/projects/smtlink/smtlink-config ++++ b/books/projects/smtlink/smtlink-config +@@ -1 +1 @@ +-smt-cmd=/usr/bin/env python ++smt-cmd=python +diff --git a/books/quicklisp/bundle/software/cl+ssl-20181018-git/src/reload.lisp b/books/quicklisp/bundle/software/cl+ssl-20181018-git/src/reload.lisp +index 3f6aa35d0..ac4012363 100644 +--- a/books/quicklisp/bundle/software/cl+ssl-20181018-git/src/reload.lisp ++++ b/books/quicklisp/bundle/software/cl+ssl-20181018-git/src/reload.lisp +@@ -20,54 +20,12 @@ + (in-package :cl+ssl) + + (cffi:define-foreign-library libcrypto +- (:openbsd "libcrypto.so") +- (:darwin (:or "/opt/local/lib/libcrypto.dylib" ;; MacPorts +- "/sw/lib/libcrypto.dylib" ;; Fink +- "/usr/local/opt/openssl/lib/libcrypto.dylib" ;; Homebrew +- "/usr/local/lib/libcrypto.dylib" ;; personalized install +- "libcrypto.dylib" ;; default system libcrypto, which may have insufficient crypto +- "/usr/lib/libcrypto.dylib"))) ++ (t "@openssl@/lib/libcrypto.so")) + + (cffi:define-foreign-library libssl +- (:windows (:or "libssl32.dll" "ssleay32.dll")) +- ;; The default OS-X libssl seems have had insufficient crypto algos +- ;; (missing TLSv1_[1,2]_XXX methods, +- ;; see https://github.com/cl-plus-ssl/cl-plus-ssl/issues/56) +- ;; so first try to load possible custom installations of libssl +- (:darwin (:or "/opt/local/lib/libssl.dylib" ;; MacPorts +- "/sw/lib/libssl.dylib" ;; Fink +- "/usr/local/opt/openssl/lib/libssl.dylib" ;; Homebrew +- "/usr/local/lib/libssl.dylib" ;; personalized install +- "libssl.dylib" ;; default system libssl, which may have insufficient crypto +- "/usr/lib/libssl.dylib")) +- (:solaris (:or "/lib/64/libssl.so" +- "libssl.so.0.9.8" "libssl.so" "libssl.so.4")) +- ;; Unlike some other systems, OpenBSD linker, +- ;; when passed library name without versions at the end, +- ;; will locate the library with highest macro.minor version, +- ;; so we can just use just "libssl.so". +- ;; More info at https://github.com/cl-plus-ssl/cl-plus-ssl/pull/2. +- (:openbsd "libssl.so") +- ((and :unix (not :cygwin)) (:or "libssl.so.1.0.2m" +- "libssl.so.1.0.2k" +- "libssl.so.1.0.2" +- "libssl.so.1.0.1l" +- "libssl.so.1.0.1j" +- "libssl.so.1.0.1e" +- "libssl.so.1.0.1" +- "libssl.so.1.0.0q" +- "libssl.so.1.0.0" +- "libssl.so.0.9.8ze" +- "libssl.so.0.9.8" +- "libssl.so.10" +- "libssl.so.4" +- "libssl.so")) +- (:cygwin "cygssl-1.0.0.dll") +- (t (:default "libssl3"))) +- +-(cffi:define-foreign-library libeay32 +- (:windows "libeay32.dll")) ++ (t "@openssl@/lib/libssl.so")) + ++(cffi:define-foreign-library libeay32) + + (unless (member :cl+ssl-foreign-libs-already-loaded + *features*) +diff --git a/books/quicklisp/bundle/software/shellpool-20150505-git/src/main.lisp b/books/quicklisp/bundle/software/shellpool-20150505-git/src/main.lisp +index cda8dc94c..11035ea09 100644 +--- a/books/quicklisp/bundle/software/shellpool-20150505-git/src/main.lisp ++++ b/books/quicklisp/bundle/software/shellpool-20150505-git/src/main.lisp +@@ -106,26 +106,8 @@ + ; Glue + + +-#-sbcl + (defun find-bash () +- #+windows "bash.exe" +- #-windows "bash") +- +-#+sbcl +-;; SBCL (on Linux, at least) won't successfully run "bash" all by itself. So, +-;; on SBCL, try to find a likely bash. BOZO this probably isn't great. It +-;; would be better to search the user's PATH for which bash to use. +-(let ((found-bash)) +- (defun find-bash () +- (or found-bash +- (let ((paths-to-try '("/bin/bash" +- "/usr/bin/bash" +- "/usr/local/bin/bash"))) +- (loop for path in paths-to-try do +- (when (cl-fad::file-exists-p path) +- (setq found-bash path) +- (return-from find-bash path))) +- (error "Bash not found among ~s" paths-to-try))))) ++ "@bash@/bin/bash") + + #+(or allegro lispworks) + (defstruct bashprocess +-- +2.25.4 + diff --git a/nixpkgs/pkgs/development/interpreters/acl2/0002-Restrict-RDTSC-to-x86.patch b/nixpkgs/pkgs/development/interpreters/acl2/0002-Restrict-RDTSC-to-x86.patch new file mode 100644 index 00000000000..74af5adef64 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/acl2/0002-Restrict-RDTSC-to-x86.patch @@ -0,0 +1,29 @@ +From b0ccf68f277d0bd5e6fc9d41742f31ddda99a955 Mon Sep 17 00:00:00 2001 +From: Keshav Kini <keshav.kini@gmail.com> +Date: Mon, 1 Jun 2020 21:42:24 -0700 +Subject: [PATCH 2/2] Restrict RDTSC to x86 + +Backported from [1]. According to Curtis Dunham, this should fix the ACL2 base +system build on ARM. + +[1]: https://github.com/acl2/acl2/commit/292fa2ccc6217e6307d7bb8373eb90f5d258ea5e +--- + memoize-raw.lisp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memoize-raw.lisp b/memoize-raw.lisp +index 205e78653..478198dee 100644 +--- a/memoize-raw.lisp ++++ b/memoize-raw.lisp +@@ -189,7 +189,7 @@ + ;; RDTSC nonsense, but we still can report mysterious results since we have no + ;; clue about which core we are running on in CCL (or, presumably, SBCL). + +-#+(or ccl sbcl) ++#+(and (or ccl sbcl) x86-64) + (eval-when + (:execute :compile-toplevel :load-toplevel) + (when #+ccl (fboundp 'ccl::rdtsc) +-- +2.25.4 + diff --git a/nixpkgs/pkgs/development/interpreters/acl2/default.nix b/nixpkgs/pkgs/development/interpreters/acl2/default.nix index 39b243a0ce6..e3c62aae983 100644 --- a/nixpkgs/pkgs/development/interpreters/acl2/default.nix +++ b/nixpkgs/pkgs/development/interpreters/acl2/default.nix @@ -1,15 +1,19 @@ -{ stdenv, fetchFromGitHub, - # perl, which, nettools, - sbcl }: - -let hashes = { - "8.0" = "1x1giy2c1y6krg3kf8pf9wrmvk981shv0pxcwi483yjqm90xng4r"; - "8.3" = "0c0wimaf16nrr3d6cxq6p7nr7rxffvpmn66hkpwc1m6zpcipf0y5"; -}; -revs = { - "8.0" = "8.0"; - "8.3" = "8.3"; -}; +{ stdenv, callPackage, fetchFromGitHub, writeShellScriptBin, substituteAll +, sbcl, bash, which, perl, nettools +, openssl, glucose, minisat, abc-verifier, z3, python2 +, certifyBooks ? true +} @ args: + +let + # Disable immobile space so we don't run out of memory on large books; see + # http://www.cs.utexas.edu/users/moore/acl2/current/HTML/installation/requirements.html#Obtaining-SBCL + sbcl = args.sbcl.override { disableImmobileSpace = true; }; + + # Wrap to add `-model` argument because some of the books in 8.3 need this. + # Fixed upstream (https://github.com/acl2/acl2/commit/0359538a), so this can + # be removed in ACL2 8.4. + glucose = writeShellScriptBin "glucose" ''exec ${args.glucose}/bin/glucose -model "$@"''; + in stdenv.mkDerivation rec { pname = "acl2"; version = "8.3"; @@ -17,62 +21,117 @@ in stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "acl2-devel"; repo = "acl2-devel"; - rev = revs.${version}; - sha256 = hashes.${version}; + rev = "${version}"; + sha256 = "0c0wimaf16nrr3d6cxq6p7nr7rxffvpmn66hkpwc1m6zpcipf0y5"; }; - buildInputs = [ sbcl - # which perl nettools + libipasirglucose4 = callPackage ./libipasirglucose4 { }; + + patches = [ + (substituteAll { + src = ./0001-Fix-some-paths-for-Nix-build.patch; + inherit bash libipasirglucose4; + openssl = openssl.out; + }) + ./0002-Restrict-RDTSC-to-x86.patch ]; + buildInputs = [ + # ACL2 itself only needs a Common Lisp compiler/interpreter: + sbcl + ] ++ stdenv.lib.optionals certifyBooks [ + # To build community books, we need Perl and a couple of utilities: + which perl nettools + # Some of the books require one or more of these external tools: + openssl.out glucose minisat abc-verifier libipasirglucose4 + z3 (python2.withPackages (ps: [ ps.z3 ])) + ]; + + # NOTE: Parallel building can be memory-intensive depending on the number of + # concurrent jobs. For example, this build has been seen to use >120GB of + # RAM on an 85 core machine. enableParallelBuilding = true; - phases = "unpackPhase installPhase"; + preConfigure = '' + # When certifying books, ACL2 doesn't like $HOME not existing. + export HOME=$(pwd)/fake-home + '' + stdenv.lib.optionalString certifyBooks '' + # Some books also care about $USER being nonempty. + export USER=nobody + ''; - installSuffix = "acl2"; + postConfigure = '' + # ACL2 and its books need to be built in place in the out directory because + # the proof artifacts are not relocatable. Since ACL2 mostly expects + # everything to exist in the original source tree layout, we put it in + # $out/share/${pname} and create symlinks in $out/bin as necessary. + mkdir -p $out/share/${pname} + cp -pR . $out/share/${pname} + cd $out/share/${pname} + ''; + + preBuild = "mkdir -p $HOME"; + makeFlags="LISP=${sbcl}/bin/sbcl"; + + doCheck = true; + checkTarget = "mini-proveall"; installPhase = '' - mkdir -p $out/share/${installSuffix} mkdir -p $out/bin - cp -R . $out/share/${installSuffix} - cd $out/share/${installSuffix} + ln -s $out/share/${pname}/saved_acl2 $out/bin/${pname} + '' + stdenv.lib.optionalString certifyBooks '' + ln -s $out/share/${pname}/books/build/cert.pl $out/bin/${pname}-cert + ln -s $out/share/${pname}/books/build/clean.pl $out/bin/${pname}-clean + ''; - # make ACL2 image - make LISP=${sbcl}/bin/sbcl + preDistPhases = [ (if certifyBooks then "certifyBooksPhase" else "removeBooksPhase") ]; - # The community books don't build properly under Nix yet. - rm -rf books - #make ACL2=$out/share/saved_acl2 USE_QUICKLISP=1 regression-everything + certifyBooksPhase = '' + # Certify the community books + pushd $out/share/${pname}/books + makeFlags="ACL2=$out/share/${pname}/saved_acl2" + buildFlags="everything" + buildPhase + popd + ''; - cp saved_acl2 $out/bin/acl2 + removeBooksPhase = '' + # Delete the community books + rm -rf $out/share/${pname}/books ''; - meta = { + meta = with stdenv.lib; { description = "An interpreter and a prover for a Lisp dialect"; longDescription = '' - ACL2 is a logic and programming language in which you can model - computer systems, together with a tool to help you prove - properties of those models. "ACL2" denotes "A Computational - Logic for Applicative Common Lisp". - - ACL2 is part of the Boyer-Moore family of provers, for which its - authors have received the 2005 ACM Software System Award. - - NOTE: In nixpkgs, the community books that usually ship with - ACL2 have been removed because it is not currently possible to - build them with Nix. - ''; + ACL2 is a logic and programming language in which you can model computer + systems, together with a tool to help you prove properties of those + models. "ACL2" denotes "A Computational Logic for Applicative Common + Lisp". + + ACL2 is part of the Boyer-Moore family of provers, for which its authors + have received the 2005 ACM Software System Award. + + This package installs the main ACL2 executable ${pname}, as well as the + build tools cert.pl and clean.pl, renamed to ${pname}-cert and + ${pname}-clean. + + '' + (if certifyBooks then '' + The community books are also included and certified with the `make + everything` target. + '' else '' + The community books are not included in this package. + ''); homepage = "http://www.cs.utexas.edu/users/moore/acl2/"; downloadPage = "https://github.com/acl2-devel/acl2-devel/releases"; - # There are a bunch of licenses in the community books, but since - # they currently get deleted during the build, we don't mention - # their licenses here. ACL2 proper is released under a BSD - # 3-clause license. - #license = with stdenv.lib.licenses; - #[ free bsd3 mit gpl2 llgpl21 cc0 publicDomain ]; - license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [ kini raskin ]; - platforms = stdenv.lib.platforms.all; - broken = stdenv.isAarch64 && stdenv.isLinux; + license = with licenses; [ + # ACL2 itself is bsd3 + bsd3 + ] ++ optionals certifyBooks [ + # The community books are mostly bsd3 or mit but with a few + # other things thrown in. + mit gpl2 llgpl21 cc0 publicDomain unfreeRedistributable + ]; + maintainers = with maintainers; [ kini raskin ]; + platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/0001-Support-shared-library-build.patch b/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/0001-Support-shared-library-build.patch new file mode 100644 index 00000000000..c78fa1ab925 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/0001-Support-shared-library-build.patch @@ -0,0 +1,46 @@ +From 0f48e046f44624f4d4d8255ac5bd26397a38f16c Mon Sep 17 00:00:00 2001 +From: Keshav Kini <keshav.kini@gmail.com> +Date: Sun, 23 Feb 2020 14:09:30 -0800 +Subject: [PATCH] Support shared library build + +Patch taken from [the ACL2 Books documentation][1]. + +- Add " -fPIC" to the CXXFLAGS to build position-independent code, + required for shared libraries. + +- Add the line "export CXXFLAGS" below the setting of CXXFLAGS, so that + those flags apply to the recursive make of the core solver library. + +- Fix a typo: replace the occurrence of "CXXLAGS" with "CXXFLAGS". + +[1]: http://www.cs.utexas.edu/users/moore/acl2/v8-2/combined-manual/index.html?topic=IPASIR____BUILDING-AN-IPASIR-SOLVER-LIBRARY +--- + makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/makefile b/makefile +index 07121de..4e85c4b 100755 +--- a/makefile ++++ b/makefile +@@ -29,7 +29,8 @@ TARGET=libipasir$(SIG).a + + CXX=g++ + +-CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3 ++CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3 -fPIC ++export CXXFLAGS + + #-----------------------------------------------------------------------# + #- REQUIRED TOP RULES --------------------------------------------------# +@@ -67,7 +68,7 @@ libipasir$(SIG).a: .FORCE + #-----------------------------------------------------------------------# + + ipasir$(NAME)glue.o: ipasir$(NAME)glue.cc ipasir.h makefile +- $(CXX) -g -std=c++11 $(CXXLAGS) \ ++ $(CXX) -g -std=c++11 $(CXXFLAGS) \ + -DVERSION=\"$(VERSION)\" \ + -I$(DIR) -I$(DIR)/core -c ipasir$(NAME)glue.cc + +-- +2.23.1 + diff --git a/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix b/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix new file mode 100644 index 00000000000..5186cd69584 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/acl2/libipasirglucose4/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, zlib, unzip }: + +stdenv.mkDerivation rec { + pname = "libipasirglucose4"; + # This library has no version number AFAICT (beyond generally being based on + # Glucose 4.x), but it was submitted to the 2017 SAT competition so let's use + # that as the version number, I guess. + version = "2017"; + + src = fetchurl { + url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip"; + sha256 = "0xchgady9vwdh8frmc8swz6va53igp2wj1y9sshd0g7549n87wdj"; + }; + nativeBuildInputs = [ unzip ]; + + buildInputs = [ zlib ]; + + sourceRoot = "sat/glucose4"; + patches = [ ./0001-Support-shared-library-build.patch ]; + + postBuild = '' + g++ -shared -Wl,-soname,libipasirglucose4.so -o libipasirglucose4.so \ + ipasirglucoseglue.o libipasirglucose4.a + ''; + + installPhase = '' + install -D libipasirglucose4.so $out/lib/libipasirglucose4.so + ''; + + meta = with stdenv.lib; { + description = "Shared library providing IPASIR interface to the Glucose SAT solver"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ kini ]; + }; +} diff --git a/nixpkgs/pkgs/development/interpreters/alda/default.nix b/nixpkgs/pkgs/development/interpreters/alda/default.nix new file mode 100644 index 00000000000..3e5273d6329 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/alda/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, jre }: + +stdenv.mkDerivation rec { + pname = "alda"; + version = "1.4.2"; + + src = fetchurl { + url = "https://github.com/alda-lang/alda/releases/download/${version}/alda"; + sha256 = "1d0412jw37gh1y7i8cmaml8r4sn516i6pxmm8m16yprqmz6glx28"; + }; + + dontUnpack = true; + + installPhase = '' + install -Dm755 $src $out/bin/alda + sed -i -e '1 s!java!${jre}/bin/java!' $out/bin/alda + ''; + + meta = with stdenv.lib; { + description = "A music programming language for musicians."; + homepage = "https://alda.io"; + license = licenses.epl10; + maintainers = [ maintainers.ericdallo ]; + platforms = jre.meta.platforms; + }; + +} diff --git a/nixpkgs/pkgs/development/interpreters/chibi/default.nix b/nixpkgs/pkgs/development/interpreters/chibi/default.nix index f0de3f64091..7bf4c0fd52d 100644 --- a/nixpkgs/pkgs/development/interpreters/chibi/default.nix +++ b/nixpkgs/pkgs/development/interpreters/chibi/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, makeWrapper }: let - version = "0.8"; + version = "0.9.1"; name = "chibi-scheme-${version}"; in stdenv.mkDerivation { @@ -18,7 +18,7 @@ stdenv.mkDerivation { owner = "ashinn"; repo = "chibi-scheme"; rev = version; - sha256 = "0269d5fhaz7nqjb41vh7yz63mp5s4z08fn4sspwc06z32xksigw9"; + sha256 = "0nd63i924ifh39cba1hd4sbi6vh1cb73v97nrn4bf8rrjh3k8pdi"; }; buildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/development/interpreters/clojure/TDEPS-150.patch b/nixpkgs/pkgs/development/interpreters/clojure/TDEPS-150.patch deleted file mode 100644 index 611134e8e3f..00000000000 --- a/nixpkgs/pkgs/development/interpreters/clojure/TDEPS-150.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/clojure -+++ b/clojure -@@ -317,17 +317,17 @@ if "$stale" || "$pom"; then - tools_args+=("--threads" "$threads") - fi - if "$trace"; then - tools_args+=("--trace") - fi - fi - - # If stale, run make-classpath to refresh cached classpath --if [[ "$stale" = true && "$describe" = false ]]; then -+if [[ "$stale" = true && "$describe" = false && -z "$force_cp" ]]; then - if "$verbose"; then - echo "Refreshing classpath" - fi - - "$JAVA_CMD" -classpath "$tools_cp" clojure.main -m clojure.tools.deps.alpha.script.make-classpath2 --config-user "$config_user" --config-project "$config_project" --libs-file "$libs_file" --cp-file "$cp_file" --jvm-file "$jvm_file" --main-file "$main_file" "${tools_args[@]}" - fi - - if "$describe"; then --- -2.25.0 diff --git a/nixpkgs/pkgs/development/interpreters/clojure/default.nix b/nixpkgs/pkgs/development/interpreters/clojure/default.nix index e8c3e7b098a..53cef387ae4 100644 --- a/nixpkgs/pkgs/development/interpreters/clojure/default.nix +++ b/nixpkgs/pkgs/development/interpreters/clojure/default.nix @@ -1,34 +1,38 @@ -{ stdenv, fetchurl, jdk11, rlwrap, makeWrapper }: +{ stdenv, fetchurl, installShellFiles, jdk11, rlwrap, makeWrapper }: stdenv.mkDerivation rec { pname = "clojure"; - version = "1.10.1.507"; + version = "1.10.1.645"; src = fetchurl { url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; - sha256 = "1k0jwa3481g3mkalwlb9gkcz9aq9zjpwmzckv823fr2d8djp41cc"; + sha256 = "1z6a9an8ls992y4japmzdxay7c5d2z9s2q1xl4g615r23jwpcsf9"; }; - patches = [ ./TDEPS-150.patch ]; - - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; installPhase = let binPath = stdenv.lib.makeBinPath [ rlwrap jdk11 ]; in - '' - mkdir -p $out/libexec - cp clojure-tools-${version}.jar $out/libexec - cp example-deps.edn $out - cp deps.edn $out + '' + mkdir -p $out/libexec + cp clojure-tools-${version}.jar $out/libexec + cp example-deps.edn $out + cp deps.edn $out + cp clj_exec.clj $out + + substituteInPlace clojure --replace PREFIX $out - substituteInPlace clojure --replace PREFIX $out + install -Dt $out/bin clj clojure + wrapProgram $out/bin/clj --prefix PATH : $out/bin:${binPath} + wrapProgram $out/bin/clojure --prefix PATH : $out/bin:${binPath} - install -Dt $out/bin clj clojure - wrapProgram $out/bin/clj --prefix PATH : $out/bin:${binPath} - wrapProgram $out/bin/clojure --prefix PATH : $out/bin:${binPath} - ''; + installManPage clj.1 clojure.1 + ''; doInstallCheck = true; installCheckPhase = '' diff --git a/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-directory-package.nix b/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-directory-package.nix new file mode 100644 index 00000000000..b4401a85d14 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-directory-package.nix @@ -0,0 +1,25 @@ +{ buildDhallPackage, lib }: + +# This is a minor variation on `buildDhallPackage` that splits the `code` +# argument into `src` and `file` in such a way that you can easily override +# the `file` +# +# This function is used by `dhall-to-nixpkgs` when given a directory +lib.makeOverridable + ( { # Arguments passed through to `buildDhallPackage` + name + , dependencies ? [] + , source ? false + + , src + , # The file to import, relative to the root directory + file ? "package.dhall" + }: + + buildDhallPackage { + inherit name dependencies source; + + code = "${src}/${file}"; + } + ) + diff --git a/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-github-package.nix b/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-github-package.nix new file mode 100644 index 00000000000..9289e9b656d --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/dhall/build-dhall-github-package.nix @@ -0,0 +1,50 @@ +{ buildDhallPackage, fetchFromGitHub, lib }: + +# This function is used by `dhall-to-nixpkgs` when given a GitHub repository +lib.makeOverridable + ( { # Arguments passed through to `buildDhallPackage` + name + , dependencies ? [] + , source ? false + + , # The directory containing the Dhall files, if other than the root of the + # repository + directory ? "" + , # The file to import, relative to the above directory + file ? "package.dhall" + + # Arguments passed through to `fetchFromGitHub` + , owner + , repo + , rev + # Extra arguments passed through to `fetchFromGitHub`, such as the hash + # or `fetchSubmodules` + , ... + }@args: + + buildDhallPackage { + inherit name dependencies source; + + code = + let + src = fetchFromGitHub ({ + name = "${name}-source"; + + inherit owner repo rev; + } // removeAttrs args [ + "name" + "dependencies" + "source" + "directory" + "file" + "owner" + "repo" + "rev" + ]); + + prefix = lib.optionalString (directory != "") "${directory}/"; + + in + "${src}/${prefix}${file}"; + } + ) diff --git a/nixpkgs/pkgs/development/interpreters/eff/default.nix b/nixpkgs/pkgs/development/interpreters/eff/default.nix index c848ebc6047..cfd3bbbda4c 100644 --- a/nixpkgs/pkgs/development/interpreters/eff/default.nix +++ b/nixpkgs/pkgs/development/interpreters/eff/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation { sha256 = "1fslfj5d7fhj3f7kh558b8mk5wllwyq4rnhfkyd96fpy144sdcka"; }; + postPatch = '' + substituteInPlace setup.ml --replace js_of_ocaml.ocamlbuild js_of_ocaml-ocamlbuild + ''; + buildInputs = [ which ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild menhir js_of_ocaml js_of_ocaml-ocamlbuild ]); diff --git a/nixpkgs/pkgs/development/interpreters/elixir/1.10.nix b/nixpkgs/pkgs/development/interpreters/elixir/1.10.nix index d63a94d98d6..04f4b5af240 100644 --- a/nixpkgs/pkgs/development/interpreters/elixir/1.10.nix +++ b/nixpkgs/pkgs/development/interpreters/elixir/1.10.nix @@ -3,7 +3,7 @@ # How to obtain `sha256`: # nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz mkDerivation { - version = "1.10.3"; - sha256 = "18bqqqzvhr1zj491wc3d36a310mg1wcs12npp70zfmgqrc60q65a"; + version = "1.10.4"; + sha256 = "16j4rmm3ix088fvxhvyjqf1hnfg7wiwa87gml3b2mrwirdycbinv"; minimumOTPVersion = "21"; } diff --git a/nixpkgs/pkgs/development/interpreters/erlang/R23.nix b/nixpkgs/pkgs/development/interpreters/erlang/R23.nix new file mode 100644 index 00000000000..d42508c2ef9 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/erlang/R23.nix @@ -0,0 +1,13 @@ +{ mkDerivation }: + +# How to obtain `sha256`: +# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz +mkDerivation { + version = "23.0.3"; + sha256 = "133aw1ffkxdf38na3smmvn5qwwlalh4r4a51793h1wkhdzkyl6mv"; + + prePatch = '' + substituteInPlace make/configure.in --replace '`sw_vers -productVersion`' "''${MACOSX_DEPLOYMENT_TARGET:-10.12}" + substituteInPlace erts/configure.in --replace '-Wl,-no_weak_imports' "" + ''; +} diff --git a/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix b/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix index f80e1f344f7..a53a917b7b3 100644 --- a/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/nixpkgs/pkgs/development/interpreters/erlang/generic-builder.nix @@ -3,6 +3,7 @@ , openjdk ? null # javacSupport , unixODBC ? null # odbcSupport , libGL ? null, libGLU ? null, wxGTK ? null, wxmac ? null, xorg ? null # wxSupport +, parallelBuild ? false , withSystemd ? stdenv.isLinux, systemd # systemd support in epmd }: @@ -60,7 +61,7 @@ in stdenv.mkDerivation ({ debugInfo = enableDebugInfo; # On some machines, parallel build reliably crashes on `GEN asn1ct_eval_ext.erl` step - enableParallelBuilding = false; + enableParallelBuilding = parallelBuild; # Clang 4 (rightfully) thinks signed comparisons of pointers with NULL are nonsense prePatch = '' @@ -88,7 +89,8 @@ in stdenv.mkDerivation ({ ++ optional odbcSupport "--with-odbc=${unixODBC}" ++ optional wxSupport "--enable-wx" ++ optional withSystemd "--enable-systemd" - ++ optional stdenv.isDarwin "--enable-darwin-64bit"; + ++ optional stdenv.isDarwin "--enable-darwin-64bit" + ++ configureFlags; # install-docs will generate and install manpages and html docs # (PDFs are generated only when fop is available). @@ -130,7 +132,6 @@ in stdenv.mkDerivation ({ // optionalAttrs (postUnpack != "") { inherit postUnpack; } // optionalAttrs (patches != []) { inherit patches; } // optionalAttrs (patchPhase != "") { inherit patchPhase; } -// optionalAttrs (configureFlags != []) { inherit configureFlags; } // optionalAttrs (configurePhase != "") { inherit configurePhase; } // optionalAttrs (preConfigure != "") { inherit preConfigure; } // optionalAttrs (postConfigure != "") { inherit postConfigure; } diff --git a/nixpkgs/pkgs/development/interpreters/evcxr/default.nix b/nixpkgs/pkgs/development/interpreters/evcxr/default.nix index 4430298beb5..11b9cd1ba50 100644 --- a/nixpkgs/pkgs/development/interpreters/evcxr/default.nix +++ b/nixpkgs/pkgs/development/interpreters/evcxr/default.nix @@ -2,21 +2,22 @@ rustPlatform.buildRustPackage rec { pname = "evcxr"; - version = "0.5.1"; + version = "0.5.3"; src = fetchFromGitHub { owner = "google"; repo = "evcxr"; - rev = "582ce09f216d4812f7d152f6eedf0b034fc4dbbd"; - sha256 = "12hlqgh74z8vmd7fkxh4vk3dqp8hlhzkxnbyywk6nphi562n6w5w"; + rev = "v${version}"; + sha256 = "144xqi19d2nj9qgmhpx6d1kfhx9vfkmk7rnq6nzybpx4mbbl3ki2"; }; - cargoSha256 = "0yr8vwlpfsg47sg0032yrsdcgxyky0hy4963zkh0pmjykbyqkb3h"; + cargoSha256 = "07lzxh0wh6azrlzfaacg29zmkn8jdnkdqbwgd5ajy79y8nii3c7z"; nativeBuildInputs = [ pkgconfig makeWrapper cmake ]; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; postInstall = '' wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]} + wrapProgram $out/bin/evcxr_jupyter --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]} rm $out/bin/testing_runtime ''; @@ -25,6 +26,5 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/google/evcxr"; license = licenses.asl20; maintainers = with maintainers; [ protoben ma27 ]; - platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/development/interpreters/gauche/default.nix b/nixpkgs/pkgs/development/interpreters/gauche/default.nix index 26a30ef2cd3..58653fae890 100644 --- a/nixpkgs/pkgs/development/interpreters/gauche/default.nix +++ b/nixpkgs/pkgs/development/interpreters/gauche/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "--with-iconv=${libiconv}" "--with-dbm=gdbm" "--with-zlib=${zlib}" - "--with-ca-bundle=$NIX_SSL_CERT_FILE" + "--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt" # TODO: Enable slib # Current slib in nixpkgs is specialized to Guile # "--with-slib=${slibGuile}/lib/slib" diff --git a/nixpkgs/pkgs/development/interpreters/groovy/default.nix b/nixpkgs/pkgs/development/interpreters/groovy/default.nix index 1572f5e4be2..97e997bdd69 100644 --- a/nixpkgs/pkgs/development/interpreters/groovy/default.nix +++ b/nixpkgs/pkgs/development/interpreters/groovy/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "groovy"; - version = "3.0.2"; + version = "3.0.3"; src = fetchurl { url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip"; - sha256 = "1ddw3fqrmwh4w6z6xgck4jhmq33rwgbmpjw07g12ri1vgw4xks9w"; + sha256 = "0xdm70b61pdj8z3g08az16y9b6cpz5hv7iwvwfyfyxrjdi47h419"; }; buildInputs = [ unzip makeWrapper ]; diff --git a/nixpkgs/pkgs/development/interpreters/guile/2.0.nix b/nixpkgs/pkgs/development/interpreters/guile/2.0.nix index b5b83e18025..5b26b38dbd4 100644 --- a/nixpkgs/pkgs/development/interpreters/guile/2.0.nix +++ b/nixpkgs/pkgs/development/interpreters/guile/2.0.nix @@ -59,7 +59,7 @@ # "libgcc_s.so.1 must be installed for pthread_cancel to work". # don't have "libgcc_s.so.1" on darwin - LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "-lgcc_s"; configureFlags = [ "--with-libreadline-prefix" ] ++ stdenv.lib.optionals stdenv.isSunOS [ diff --git a/nixpkgs/pkgs/development/interpreters/hy/default.nix b/nixpkgs/pkgs/development/interpreters/hy/default.nix index a3aca532b0f..a8890b048fb 100644 --- a/nixpkgs/pkgs/development/interpreters/hy/default.nix +++ b/nixpkgs/pkgs/development/interpreters/hy/default.nix @@ -2,11 +2,11 @@ python3Packages.buildPythonApplication rec { pname = "hy"; - version = "0.18.0"; + version = "0.19.0"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"; + sha256 = "05k05qmiiysiwdc05sxmanwhv1crfwbb3l8swxfisbzbvmv1snis"; }; checkInputs = with python3Packages; [ flake8 pytest ]; diff --git a/nixpkgs/pkgs/development/interpreters/j/default.nix b/nixpkgs/pkgs/development/interpreters/j/default.nix index 8e6b434281e..b7f8b63d54a 100644 --- a/nixpkgs/pkgs/development/interpreters/j/default.nix +++ b/nixpkgs/pkgs/development/interpreters/j/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchFromGitHub, readline, libedit, bc -, avxSupport ? false +, avxSupport ? stdenv.hostPlatform.avxSupport }: stdenv.mkDerivation rec { pname = "j"; version = "901"; - jtype = "release-e"; + jtype = "release-f"; src = fetchFromGitHub { owner = "jsoftware"; repo = "jsource"; rev = "j${version}-${jtype}"; - sha256 = "13ky37rrl6mc66fckrdnrw64gmvq1qlv6skzd513lab4d0wigshw"; + sha256 = "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p"; name = "jsource"; }; @@ -27,6 +27,9 @@ stdenv.mkDerivation rec { doCheck = true; + # Causes build failure due to warning + hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "strictoverflow"; + buildPhase = '' export SOURCE_DIR=$(pwd) export HOME=$TMPDIR diff --git a/nixpkgs/pkgs/development/interpreters/janet/default.nix b/nixpkgs/pkgs/development/interpreters/janet/default.nix index f6f4e36532e..52d0b371915 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.9.1"; + version = "1.10.1"; src = fetchFromGitHub { owner = "janet-lang"; repo = pname; rev = "v${version}"; - sha256 = "1zdiwddnppwg5zrizy2ypd449zj4mivib76h73xhvr1syl7dk7sc"; + sha256 = "18k6dzxzr149p0bby4r0z6kybylig87rwj7gk3z6a98zf6k4xmsw"; }; nativeBuildInputs = [ meson ninja ]; diff --git a/nixpkgs/pkgs/development/interpreters/joker/default.nix b/nixpkgs/pkgs/development/interpreters/joker/default.nix index 789816c34d0..7f773882d8f 100644 --- a/nixpkgs/pkgs/development/interpreters/joker/default.nix +++ b/nixpkgs/pkgs/development/interpreters/joker/default.nix @@ -2,16 +2,18 @@ buildGoModule rec { pname = "joker"; - version = "0.15.3"; + version = "0.15.6"; src = fetchFromGitHub { rev = "v${version}"; owner = "candid82"; repo = "joker"; - sha256 = "1pxj6flyhf522zjab1dfvxfajyx3v3rzs7l8ma7ma6b8zmwp2wdn"; + sha256 = "1yi9q8ibia6gz6s30i3bjrbmlhj6knrb3d73113dxrs8abi1mkbh"; }; - vendorSha256 = "1rn8ijq3v3fzlbyvm7g4i3qpwcl3vrl4rbcvlbzv05wxrgcw9iqb"; + vendorSha256 = "031ban30kx84r54fj9aq96pwkz9nqh4p9yzs4l8i1wqmy52rldvl"; + + doCheck = false; preBuild = '' go generate ./... @@ -23,7 +25,6 @@ buildGoModule rec { homepage = "https://github.com/candid82/joker"; description = "A small Clojure interpreter and linter written in Go"; license = licenses.epl10; - platforms = platforms.all; maintainers = with maintainers; [ andrestylianos ]; }; -}
\ No newline at end of file +} diff --git a/nixpkgs/pkgs/development/interpreters/jruby/default.nix b/nixpkgs/pkgs/development/interpreters/jruby/default.nix index 79cb1c7154b..e4511da498c 100644 --- a/nixpkgs/pkgs/development/interpreters/jruby/default.nix +++ b/nixpkgs/pkgs/development/interpreters/jruby/default.nix @@ -2,15 +2,15 @@ let # The version number here is whatever is reported by the RUBY_VERSION string -rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "3" "3" ""; +rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "5" "7" ""; jruby = stdenv.mkDerivation rec { pname = "jruby"; - version = "9.2.11.1"; + version = "9.2.13.0"; src = fetchurl { url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz"; - sha256 = "1p4ml5rqidqllc7z85zn2q4pyyih71j0gb71wl43j4v74p44j17i"; + sha256 = "0n5glz6xm3skrfihzn3g5awdxpjsqn2k8k46gv449rk2l50w5a3k"; }; buildInputs = [ makeWrapper ]; @@ -46,11 +46,12 @@ jruby = stdenv.mkDerivation rec { libPath = "lib/${rubyEngine}/${rubyVersion.libDir}"; }; - meta = { + meta = with stdenv.lib; { description = "Ruby interpreter written in Java"; homepage = "http://jruby.org/"; - license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ]; - platforms = stdenv.lib.platforms.unix; + license = with licenses; [ cpl10 gpl2 lgpl21 ]; + platforms = platforms.unix; + maintainers = [ maintainers.fzakaria ]; }; }; in jruby.overrideAttrs (oldAttrs: { diff --git a/nixpkgs/pkgs/development/interpreters/luajit/2.0.nix b/nixpkgs/pkgs/development/interpreters/luajit/2.0.nix index 3f0fa7303eb..afb5dd9c5b6 100644 --- a/nixpkgs/pkgs/development/interpreters/luajit/2.0.nix +++ b/nixpkgs/pkgs/development/interpreters/luajit/2.0.nix @@ -1,10 +1,10 @@ { self, callPackage, lib }: callPackage ./default.nix { inherit self; - version = "2.0.5-2020-03-20"; - rev = "e613105"; + version = "2.0.5-2020-08-09"; + rev = "e296f56"; isStable = true; - sha256 = "0k843z90s4hi0qhri6ixy8sv21nig8jwbznpqgqg845ji530kqj7"; + sha256 = "0g4wvpmmrxj8ir6yi86gg93khy8ri7x4w091jihpxsmn670da21f"; extraMeta = { # this isn't precise but it at least stops the useless Hydra build platforms = with lib; filter (p: p != "aarch64-linux") (platforms.linux ++ platforms.darwin); diff --git a/nixpkgs/pkgs/development/interpreters/luajit/2.1.nix b/nixpkgs/pkgs/development/interpreters/luajit/2.1.nix index b5a7894e98d..cb0320c7c7c 100644 --- a/nixpkgs/pkgs/development/interpreters/luajit/2.1.nix +++ b/nixpkgs/pkgs/development/interpreters/luajit/2.1.nix @@ -1,8 +1,8 @@ { self, callPackage }: callPackage ./default.nix { inherit self; - version = "2.1.0-2020-03-20"; - rev = "9143e86"; + version = "2.1.0-2020-08-27"; + rev = "ff1e72a"; isStable = false; - sha256 = "1zw1yr0375d6jr5x20zvkvk76hkaqamjynbswpl604w6r6id070b"; + sha256 = "0rlh5y48jbxnamr3a5i3szzh7y9ycvq052rw6m82gdhrb1jlamdz"; } diff --git a/nixpkgs/pkgs/development/interpreters/luajit/default.nix b/nixpkgs/pkgs/development/interpreters/luajit/default.nix index 9bc76c44937..9658186b9c0 100644 --- a/nixpkgs/pkgs/development/interpreters/luajit/default.nix +++ b/nixpkgs/pkgs/development/interpreters/luajit/default.nix @@ -104,6 +104,6 @@ stdenv.mkDerivation rec { homepage = "http://luajit.org"; license = licenses.mit; platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ thoughtpolice smironov vcunat andir ]; + maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ]; } // extraMeta; } diff --git a/nixpkgs/pkgs/development/interpreters/perl/default.nix b/nixpkgs/pkgs/development/interpreters/perl/default.nix index cc43a7d2f85..7fad936260c 100644 --- a/nixpkgs/pkgs/development/interpreters/perl/default.nix +++ b/nixpkgs/pkgs/development/interpreters/perl/default.nix @@ -2,6 +2,11 @@ , enableThreading ? true, coreutils, makeWrapper }: +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + with lib; let @@ -23,7 +28,7 @@ let # TODO: Add a "dev" output containing the header files. outputs = [ "out" "man" "devdoc" ] ++ - optional crossCompiling "dev"; + optional crossCompiling "mini"; setOutputFlags = false; disallowedReferences = [ stdenv.cc ]; @@ -139,13 +144,13 @@ let --replace "$man" /no-such-path '' + optionalString crossCompiling '' - mkdir -p $dev/lib/perl5/cross_perl/${version} + mkdir -p $mini/lib/perl5/cross_perl/${version} for dir in cnf/{stub,cpan}; do - cp -r $dir/* $dev/lib/perl5/cross_perl/${version} + cp -r $dir/* $mini/lib/perl5/cross_perl/${version} done - mkdir -p $dev/bin - install -m755 miniperl $dev/bin/perl + mkdir -p $mini/bin + install -m755 miniperl $mini/bin/perl export runtimeArch="$(ls $out/lib/perl5/site_perl/${version})" # wrapProgram should use a runtime-native SHELL by default, but @@ -156,9 +161,9 @@ let # miniperl can't load the native modules there. However, it can # (and sometimes needs to) load and run some of the pure perl # code there, so we add it anyway. When needed, stubs can be put - # into $dev/lib/perl5/cross_perl/${version}. - wrapProgram $dev/bin/perl --prefix PERL5LIB : \ - "$dev/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch" + # into $mini/lib/perl5/cross_perl/${version}. + wrapProgram $mini/bin/perl --prefix PERL5LIB : \ + "$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch" ''; # */ meta = { @@ -170,11 +175,11 @@ 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 = "1.3.2"; # Mar 21, 2020 + crossVersion = "15ca5359f99698ef0a199bc307b7956c08907abc"; # Aug 27, 2020 perl-cross-src = fetchurl { url = "https://github.com/arsv/perl-cross/archive/${crossVersion}.tar.gz"; - sha256 = "1283crdjsyi45mgdiak4jmy907mqn09frxzxp21b18hvxmfn4smq"; + sha256 = "0pcwv2ac02i2l0fjc8drdw70q6gwbypj2c5a53x2449m919v37h9"; }; depsBuildBuild = [ buildPackages.stdenv.cc makeWrapper ]; @@ -191,26 +196,26 @@ let }); in { # Maint version - perl528 = common { - perl = pkgs.perl528; - buildPerl = buildPackages.perl528; - version = "5.28.2"; - sha256 = "1iynpsxdym4h76kgndmn3ykvwxhqz444xvaz8z2irsxkvmnlb5da"; - }; - - # Maint version perl530 = common { perl = pkgs.perl530; buildPerl = buildPackages.perl530; - version = "5.30.2"; - sha256 = "128nfdxcvxfn5kq55qcfrx2851ys8hv794dcdxbyny8rm7w7vnv6"; + version = "5.30.3"; + sha256 = "0vs0wwwlw47sswxaflkk4hw0y45cmc7arxx788kwpbminy5lrq1j"; + }; + + # Maint version + perl532 = common { + perl = pkgs.perl532; + buildPerl = buildPackages.perl532; + version = "5.32.0"; + sha256 = "1d6001cjnpxfv79000bx00vmv2nvdz7wrnyas451j908y7hirszg"; }; # the latest Devel version perldevel = common { perl = pkgs.perldevel; buildPerl = buildPackages.perldevel; - version = "5.31.10"; - sha256 = "1gvv5zs54gzb947x7ryjkaalm9rbqf8l8hwjwdm9lbfgkpg07kny"; + version = "5.33.1"; + sha256 = "1rlnqqqzyhal79ys5dv7fwm3mg81s43dwks28b74x2gcmsngjnw9"; }; } diff --git a/nixpkgs/pkgs/development/interpreters/perl/setup-hook-cross.sh b/nixpkgs/pkgs/development/interpreters/perl/setup-hook-cross.sh index 95aae0b2670..a7aad6f2453 100644 --- a/nixpkgs/pkgs/development/interpreters/perl/setup-hook-cross.sh +++ b/nixpkgs/pkgs/development/interpreters/perl/setup-hook-cross.sh @@ -9,4 +9,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/lib/perl5/site_perl/@version@/@runtimeArch@ } -addEnvHooks "$targetOffset" addPerlLibPath +addEnvHooks "$hostOffset" addPerlLibPath diff --git a/nixpkgs/pkgs/development/interpreters/php/default.nix b/nixpkgs/pkgs/development/interpreters/php/default.nix index 6ab682d97e6..8921cf78aa8 100644 --- a/nixpkgs/pkgs/development/interpreters/php/default.nix +++ b/nixpkgs/pkgs/development/interpreters/php/default.nix @@ -8,7 +8,7 @@ let { callPackage, lib, stdenv, nixosTests, config, fetchurl, makeWrapper , symlinkJoin, writeText, autoconf, automake, bison, flex, libtool , pkgconfig, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2 - , systemd, valgrind + , systemd, system-sendmail, valgrind, xcbuild , version , sha256 @@ -143,7 +143,8 @@ let enableParallelBuilding = true; - nativeBuildInputs = [ autoconf automake bison flex libtool pkgconfig re2c ]; + nativeBuildInputs = [ autoconf automake bison flex libtool pkgconfig re2c ] + ++ lib.optional stdenv.isDarwin xcbuild; buildInputs = # PCRE extension @@ -177,7 +178,10 @@ let ++ lib.optional (!cliSupport) "--disable-cli" ++ lib.optional fpmSupport "--enable-fpm" ++ lib.optional pearSupport [ "--with-pear=$(out)/lib/php/pear" "--enable-xml" "--with-libxml" ] - ++ lib.optional (pearSupport && (lib.versionOlder version "7.4")) "--enable-libxml" + ++ lib.optionals (pearSupport && (lib.versionOlder version "7.4")) [ + "--enable-libxml" + "--with-libxml-dir=${libxml2.dev}" + ] ++ lib.optional pharSupport "--enable-phar" ++ lib.optional phpdbgSupport "--enable-phpdbg" @@ -191,13 +195,18 @@ let ++ lib.optional systemdSupport "--with-fpm-systemd" ++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}" ++ lib.optional ztsSupport "--enable-maintainer-zts" + + + # Sendmail + ++ [ "PROG_SENDMAIL=${system-sendmail}/bin/sendmail" ] ; hardeningDisable = [ "bindnow" ]; - preConfigure = '' - # Don't record the configure flags since this causes unnecessary - # runtime dependencies + preConfigure = + # Don't record the configure flags since this causes unnecessary + # runtime dependencies + '' for i in main/build-defs.h.in scripts/php-config.in; do substituteInPlace $i \ --replace '@CONFIGURE_COMMAND@' '(omitted)' \ @@ -206,7 +215,14 @@ let done export EXTENSION_DIR=$out/lib/php/extensions - + '' + # PKG_CONFIG need not be a relative path + + lib.optionalString (! lib.versionAtLeast version "7.4") '' + for i in $(find . -type f -name "*.m4"); do + substituteInPlace $i \ + --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null' + done + '' + '' ./buildconf --copy --force if test -f $src/genfiles; then @@ -255,25 +271,17 @@ let }; }; - php72base = callPackage generic (_args // { - version = "7.2.29"; - sha256 = "08xry2fgqgg8s0ym1hh11wkbr36av3zq1bn4krbciw1b7x8gb8ga"; - - # https://bugs.php.net/bug.php?id=76826 - extraPatches = lib.optional stdenv.isDarwin ./php72-darwin-isfinite.patch; - }); - php73base = callPackage generic (_args // { - version = "7.3.16"; - sha256 = "0bh499v9dfgh9k51w4rird1slb9rh9whp5h37fb84c98d992s1xq"; + version = "7.3.20"; + sha256 = "1pl9bjwvdva2yx4sh465z9cr4bnr8mvv008w71sy1kqsj6a7ivf6"; # https://bugs.php.net/bug.php?id=76826 extraPatches = lib.optional stdenv.isDarwin ./php73-darwin-isfinite.patch; }); php74base = callPackage generic (_args // { - version = "7.4.6"; - sha256 = "0j133pfwa823d4jhx2hkrrzjl4hswvz00b1z58r5c82xd5sr9vd6"; + version = "7.4.8"; + sha256 = "0ql01sfg8l7y2bfwmnjxnfw9irpibnz57ssck24b00y00nkd6j3a"; }); defaultPhpExtensions = { all, ... }: with all; ([ @@ -289,8 +297,7 @@ let php74 = php74base.withExtensions defaultPhpExtensions; php73 = php73base.withExtensions defaultPhpExtensionsWithHash; - php72 = php72base.withExtensions defaultPhpExtensionsWithHash; in { - inherit php72 php73 php74; + inherit php73 php74; } diff --git a/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch b/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch deleted file mode 100644 index ea2e3e28f2c..00000000000 --- a/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/Zend/configure.ac b/Zend/configure.ac -index b95c1360b8..fe16c86007 100644 ---- a/Zend/configure.ac -+++ b/Zend/configure.ac -@@ -60,7 +60,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #include <math.h> - - #ifndef zend_isnan --#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isnan(a) isnan(a) - #elif defined(HAVE_FPCLASS) - #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) -@@ -69,7 +69,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #endif - #endif - --#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isinf(a) isinf(a) - #elif defined(INFINITY) - /* Might not work, but is required by ISO C99 */ -@@ -80,7 +80,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #define zend_isinf(a) 0 - #endif - --#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_finite(a) isfinite(a) - #elif defined(HAVE_FINITE) - #define zend_finite(a) finite(a) -diff --git a/configure.ac b/configure.ac -index d3f3cacd07..ddbf712ba2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -68,7 +68,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #include <math.h> - - #ifndef zend_isnan --#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isnan(a) isnan(a) - #elif defined(HAVE_FPCLASS) - #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) -@@ -77,7 +77,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #endif - #endif - --#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isinf(a) isinf(a) - #elif defined(INFINITY) - /* Might not work, but is required by ISO C99 */ -@@ -88,7 +88,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #define zend_isinf(a) 0 - #endif - --#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_finite(a) isfinite(a) - #elif defined(HAVE_FINITE) - #define zend_finite(a) finite(a) diff --git a/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch b/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch new file mode 100644 index 00000000000..ef61f0a8784 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch @@ -0,0 +1,44 @@ +diff --git a/ext/zlib/tests/bug55544.phpt b/ext/zlib/tests/bug55544.phpt +index a0d22f4fcebf4846da6781f424f87821626de5ea..e650fe6909f555d04834f4c08f7fd0d354b783e2 100644 +--- a/ext/zlib/tests/bug55544.phpt ++++ b/ext/zlib/tests/bug55544.phpt +@@ -6,6 +6,9 @@ extension_loaded("zlib") or die("skip"); + if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip not for windows"); + } ++if (PHP_OS == "Darwin") { ++ die("skip not for darwin"); ++} + ?> + --INI-- + output_handler=ob_gzhandler +diff --git a/ext/zlib/tests/gzencode_variation1.phpt b/ext/zlib/tests/gzencode_variation1.phpt +index c966b2cbc5b7..2f953168fa22 100644 +--- a/ext/zlib/tests/gzencode_variation1.phpt ++++ b/ext/zlib/tests/gzencode_variation1.phpt +@@ -10,6 +10,10 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) { + if (!extension_loaded("zlib")) { + print "skip - ZLIB extension not loaded"; + } ++ ++if (PHP_OS == "Darwin") { ++ print "skip - OS is encoded in headers, tested header is non Darwin"; ++} + ?> + --FILE-- + <?php +diff --git a/ext/zlib/tests/gzencode_variation2.phpt b/ext/zlib/tests/gzencode_variation2.phpt +index 94ac42a5f1cd..9160cf519751 100644 +--- a/ext/zlib/tests/gzencode_variation2.phpt ++++ b/ext/zlib/tests/gzencode_variation2.phpt +@@ -10,6 +10,10 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) { + if (!extension_loaded("zlib")) { + print "skip - ZLIB extension not loaded"; + } ++ ++if (PHP_OS == "Darwin") { ++ print "skip - OS is encoded in headers, tested header is non Darwin"; ++} + ?> + --FILE-- + <?php diff --git a/nixpkgs/pkgs/development/interpreters/picolisp/default.nix b/nixpkgs/pkgs/development/interpreters/picolisp/default.nix index c49437717c1..1511698c921 100644 --- a/nixpkgs/pkgs/development/interpreters/picolisp/default.nix +++ b/nixpkgs/pkgs/development/interpreters/picolisp/default.nix @@ -3,10 +3,10 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "picoLisp"; - version = "19.12"; + version = "20.6"; src = fetchurl { url = "https://www.software-lab.de/${pname}-${version}.tgz"; - sha256 = "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j"; + sha256 = "0l51x98bn1hh6kv40sdgp0x09pzg5i8yxbcjvm9n5bxsd6bbk5w2"; }; buildInputs = [makeWrapper openssl] ++ optional stdenv.is64bit jdk; patchPhase = '' diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/CVE-2019-20907.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/CVE-2019-20907.patch new file mode 100644 index 00000000000..cf67ae2b51b --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/CVE-2019-20907.patch @@ -0,0 +1,24 @@ +From 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4 Mon Sep 17 00:00:00 2001 +From: Rishi <rishi_devan@mail.com> +Date: Wed, 15 Jul 2020 13:51:00 +0200 +Subject: [PATCH] bpo-39017: Avoid infinite loop in the tarfile module + (GH-21454) + +Avoid infinite loop when reading specially crafted TAR files using the tarfile module +(CVE-2019-20907). +--- + Lib/tarfile.py | 2 ++ + +diff --git a/Lib/tarfile.py b/Lib/tarfile.py +index e2b60532f6..6769066cab 100755 +--- a/Lib/tarfile.py ++++ b/Lib/tarfile.py +@@ -1249,6 +1249,8 @@ class TarInfo(object): + + length, keyword = match.groups() + length = int(length) ++ if length == 0: ++ raise InvalidHeaderError("invalid header") + value = buf[match.end(2) + 1:match.start(1) + length - 1] + + # Normally, we could just use "utf-8" as the encoding and "strict" diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/default.nix b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/default.nix index 696be2136ec..2cfaa69a4c8 100644 --- a/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -12,6 +12,7 @@ , zlib , self , configd, coreutils +, autoreconfHook , python-setup-hook # Some proprietary libs assume UCS2 unicode, especially on darwin :( , ucsEncoding ? 4 @@ -22,6 +23,7 @@ , sha256 , passthruFun , static ? false +, enableOptimizations ? (!stdenv.isDarwin) }: assert x11Support -> tcl != null @@ -85,6 +87,12 @@ let # backported in debian since 2013. # https://bugs.python.org/issue13146 ./atomic_pyc.patch + + # Backport from CPython 3.8 of a good list of tests to run for PGO. + ./profile-task.patch + + # Patch is likely to go away in the next release (if there is any) + ./CVE-2019-20907.patch ] ++ optionals (x11Support && stdenv.isDarwin) [ ./use-correct-tcl-tk-on-darwin.patch ] ++ optionals stdenv.isLinux [ @@ -134,7 +142,9 @@ let --replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")' ''; - configureFlags = [ + configureFlags = optionals enableOptimizations [ + "--enable-optimizations" + ] ++ [ "--enable-shared" "--with-threads" "--enable-unicode=ucs${toString ucsEncoding}" @@ -182,8 +192,9 @@ let ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] ++ optional (stdenv.isDarwin && configd != null) configd; nativeBuildInputs = - optionals (stdenv.hostPlatform != stdenv.buildPlatform) - [ buildPackages.stdenv.cc buildPackages.python ]; + [ autoreconfHook ] + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) + [ buildPackages.stdenv.cc buildPackages.python ]; mkPaths = paths: { C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths; diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/profile-task.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/profile-task.patch new file mode 100644 index 00000000000..9c085657ac9 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/profile-task.patch @@ -0,0 +1,21 @@ +Backport from CPython 3.8 of a good list of tests to run for PGO. + +Upstream commit: + https://github.com/python/cpython/commit/4e16a4a31 + +Upstream discussion: + https://bugs.python.org/issue36044 + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 00fdd21ce..713dc1e53 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -259,7 +259,7 @@ TCLTK_LIBS= + # The task to run while instrumented when building the profile-opt target. + # We exclude unittests with -x that take a rediculious amount of time to + # run in the instrumented training build or do not provide much value. +-PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing test_subprocess ++PROFILE_TASK=-m test.regrtest --pgo test_array test_base64 test_binascii test_binop test_bisect test_bytes test_bz2 test_cmath test_codecs test_collections test_complex test_dataclasses test_datetime test_decimal test_difflib test_embed test_float test_fstring test_functools test_generators test_hashlib test_heapq test_int test_itertools test_json test_long test_lzma test_math test_memoryview test_operator test_ordered_dict test_pickle test_pprint test_re test_set test_sqlite test_statistics test_struct test_tabnanny test_time test_unicode test_xml_etree test_xml_etree_c + + # report files for gcov / lcov coverage report + COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch new file mode 100644 index 00000000000..39d5587379c --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch @@ -0,0 +1,21 @@ +Backport from CPython 3.8 of a good list of tests to run for PGO. + +Upstream commit: + https://github.com/python/cpython/commit/4e16a4a31 + +Upstream discussion: + https://bugs.python.org/issue36044 + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 00fdd21ce..713dc1e53 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -259,7 +259,7 @@ TCLTK_LIBS= + # The task to run while instrumented when building the profile-opt target. + # We exclude unittests with -x that take a rediculious amount of time to + # run in the instrumented training build or do not provide much value. +-PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess ++PROFILE_TASK=-m test.regrtest --pgo test_array test_base64 test_binascii test_binop test_bisect test_bytes test_bz2 test_cmath test_codecs test_collections test_complex test_dataclasses test_datetime test_decimal test_difflib test_embed test_float test_fstring test_functools test_generators test_hashlib test_heapq test_int test_itertools test_json test_long test_lzma test_math test_memoryview test_operator test_ordered_dict test_pickle test_pprint test_re test_set test_sqlite test_statistics test_struct test_tabnanny test_time test_unicode test_xml_etree test_xml_etree_c + + # report files for gcov / lcov coverage report + COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/3.6/profile-task.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/3.6/profile-task.patch new file mode 100644 index 00000000000..df55da3a413 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/3.6/profile-task.patch @@ -0,0 +1,21 @@ +Backport from CPython 3.8 of a good list of tests to run for PGO. + +Upstream commit: + https://github.com/python/cpython/commit/4e16a4a31 + +Upstream discussion: + https://bugs.python.org/issue36044 + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 00fdd21ce..713dc1e53 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -259,7 +259,7 @@ TCLTK_LIBS= + # The task to run while instrumented when building the profile-opt target. + # We exclude unittests with -x that take a rediculious amount of time to + # run in the instrumented training build or do not provide much value. +-PROFILE_TASK=-m test.regrtest --pgo ++PROFILE_TASK=-m test.regrtest --pgo test_array test_base64 test_binascii test_binop test_bisect test_bytes test_bz2 test_cmath test_codecs test_collections test_complex test_dataclasses test_datetime test_decimal test_difflib test_embed test_float test_fstring test_functools test_generators test_hashlib test_heapq test_int test_itertools test_json test_long test_lzma test_math test_memoryview test_operator test_ordered_dict test_pickle test_pprint test_re test_set test_sqlite test_statistics test_struct test_tabnanny test_time test_unicode test_xml_etree test_xml_etree_c + + # report files for gcov / lcov coverage report + COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch new file mode 100644 index 00000000000..0c26300d9c0 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch @@ -0,0 +1,33 @@ +From 1911995b1a1252d80bf2b9651840e185a1a6baf5 Mon Sep 17 00:00:00 2001 +From: Hong Xu <hong@topbug.net> +Date: Thu, 25 Jul 2019 10:25:55 -0700 +Subject: [PATCH] On all posix systems, not just Darwin, set LDSHARED (if not + set) according to CC + +This patch is slightly different from https://bugs.python.org/issue24935 +, except that we now handle LDSHARED according to CC on all posix +systems, not just Darwin or Linux. +--- + Lib/distutils/sysconfig.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 37feae5df7..9fdce6896d 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -199,10 +199,10 @@ def customize_compiler(compiler): + + if 'CC' in os.environ: + newcc = os.environ['CC'] +- if (sys.platform == 'darwin' ++ if (os.name == 'posix' + and 'LDSHARED' not in os.environ + and ldshared.startswith(cc)): +- # On OS X, if CC is overridden, use that as the default ++ # On POSIX systems, if CC is overridden, use that as the default + # command for LDSHARED as well + ldshared = newcc + ldshared[len(cc):] + cc = newcc +-- +2.25.1 + diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix index 3ad4021d6df..b25d613eb7f 100644 --- a/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/cpython/default.nix @@ -9,9 +9,11 @@ , readline , sqlite , tcl ? null, tk ? null, tix ? null, libX11 ? null, xorgproto ? null, x11Support ? false +, bluez ? null, bluezSupport ? false , zlib , self , configd +, autoreconfHook , python-setup-hook , nukeReferences # For the Python package set @@ -30,12 +32,23 @@ , stripBytecode ? false , includeSiteCustomize ? true , static ? false +# Not using optimizations on Darwin +# configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found. +, enableOptimizations ? (!stdenv.isDarwin) }: +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + assert x11Support -> tcl != null && tk != null && xorgproto != null && libX11 != null; + +assert bluezSupport -> bluez != null; + with stdenv.lib; let @@ -52,7 +65,9 @@ let version = with sourceVersion; "${major}.${minor}.${patch}${suffix}"; - nativeBuildInputs = [ + nativeBuildInputs = optionals (!stdenv.isDarwin) [ + autoreconfHook + ] ++ [ nukeReferences ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc @@ -62,6 +77,7 @@ let buildInputs = filter (p: p != null) ([ zlib bzip2 expat lzma libffi gdbm sqlite readline ncurses openssl ] ++ optionals x11Support [ tcl tk libX11 xorgproto ] + ++ optionals (bluezSupport && stdenv.isLinux) [ bluez ] ++ optionals stdenv.isDarwin [ configd ]); hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); @@ -107,9 +123,17 @@ in with passthru; stdenv.mkDerivation { # Backport a fix for discovering `rpmbuild` command when doing `python setup.py bdist_rpm` to 3.5, 3.6, 3.7. # See: https://bugs.python.org/issue11122 ./3.7/fix-hardcoded-path-checking-for-rpmbuild.patch - ] ++ optionals (isPy37 || isPy38) [ + ] ++ optionals (isPy37 || isPy38 || isPy39) [ # Fix darwin build https://bugs.python.org/issue34027 ./3.7/darwin-libutil.patch + ] ++ optionals (pythonOlder "3.8") [ + # Backport from CPython 3.8 of a good list of tests to run for PGO. + ( + if isPy36 || isPy37 then + ./3.6/profile-task.patch + else + ./3.5/profile-task.patch + ) ] ++ optionals (isPy3k && hasDistutilsCxxPatch) [ # Fix for http://bugs.python.org/issue1222585 # Upstream distutils is calling C compiler to compile C++ code, which @@ -118,7 +142,7 @@ in with passthru; stdenv.mkDerivation { ( if isPy35 then ./3.5/python-3.x-distutils-C++.patch - else if isPy37 || isPy38 then + else if isPy37 || isPy38 || isPy39 then ./3.7/python-3.x-distutils-C++.patch else fetchpatch { @@ -126,9 +150,14 @@ in with passthru; stdenv.mkDerivation { sha256 = "1h18lnpx539h5lfxyk379dxwr8m2raigcjixkf133l4xy3f4bzi2"; } ) + ] ++ [ + # LDSHARED now uses $CC instead of gcc. Fixes cross-compilation of extension modules. + ./3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch ]; postPatch = '' + substituteInPlace Lib/subprocess.py \ + --replace "'/bin/sh'" "'${bash}/bin/sh'" '' + optionalString (x11Support && (tix != null)) '' substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" ''; @@ -142,10 +171,14 @@ in with passthru; stdenv.mkDerivation { configureFlags = [ "--enable-shared" - "--with-threads" "--without-ensurepip" "--with-system-expat" "--with-system-ffi" + ] ++ optionals enableOptimizations [ + "--enable-optimizations" + ] ++ optionals (pythonOlder "3.7") [ + # This is unconditionally true starting in CPython 3.7. + "--with-threads" ] ++ optionals (sqlite != null && isPy3k) [ "--enable-loadable-sqlite-extensions" ] ++ optionals (openssl != null) [ @@ -258,6 +291,13 @@ in with passthru; stdenv.mkDerivation { find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i - '' + optionalString stripBytecode '' find $out -type d -name __pycache__ -print0 | xargs -0 -I {} rm -rf "{}" + '' + '' + # *strip* shebang from libpython gdb script - it should be dual-syntax and + # interpretable by whatever python the gdb in question is using, which may + # not even match the major version of this python. doing this after the + # bytecode compilations for the same reason. + mkdir -p $out/share/gdb + sed '/^#!/d' Tools/gdb/libpython.py > $out/share/gdb/libpython.py ''; preFixup = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' @@ -275,6 +315,8 @@ in with passthru; stdenv.mkDerivation { pythonForBuild buildPackages.bash ]; + separateDebugInfo = true; + inherit passthru; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/development/interpreters/python/default.nix b/nixpkgs/pkgs/development/interpreters/python/default.nix index 2def54de12d..e4230093e9c 100644 --- a/nixpkgs/pkgs/development/interpreters/python/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/default.nix @@ -63,28 +63,15 @@ in { inherit passthruFun; }; - python35 = callPackage ./cpython { - self = python35; - sourceVersion = { - major = "3"; - minor = "5"; - patch = "9"; - suffix = ""; - }; - sha256 = "0jdh9pvx6m6lfz2liwvvhn7vks7qrysqgwn517fkpxb77b33fjn2"; - inherit (darwin) configd; - inherit passthruFun; - }; - python36 = callPackage ./cpython { self = python36; sourceVersion = { major = "3"; minor = "6"; - patch = "10"; + patch = "12"; suffix = ""; }; - sha256 = "1pj0mz1xl27khi250p29c0y99vxg662js8zp71aprkf8i8wkr0qa"; + sha256 = "cJU6m11okdkuZdGEw1EhJqFYFL7hXh7/LdzOBDNOmpk="; inherit (darwin) configd; inherit passthruFun; }; @@ -94,10 +81,10 @@ in { sourceVersion = { major = "3"; minor = "7"; - patch = "7"; + patch = "9"; suffix = ""; }; - sha256 = "0di1y2cna823qgk6sd2lvpjdm3g2qikdd50i2bjd330dpzqsk806"; + sha256 = "008v6g1jkrjrdmiqlgjlq6msbbj848bvkws6ppwva1ahn03k14li"; inherit (darwin) configd; inherit passthruFun; }; @@ -107,10 +94,10 @@ in { sourceVersion = { major = "3"; minor = "8"; - patch = "2"; + patch = "5"; suffix = ""; }; - sha256 = "1ps5v323cp5czfshqjmbsqw7nvrdpcbk06f62jbzaqik4gfffii6"; + sha256 = "1c43dbv9lvlp3ynqmgdi4rh8q94swanhqarqrdx62zmigpakw073"; inherit (darwin) configd; inherit passthruFun; }; @@ -121,15 +108,15 @@ in { major = "3"; minor = "9"; patch = "0"; - suffix = "a4"; + suffix = "rc1"; }; - sha256 = "0qzy0wlq0izxk8ii28gy70v138g6xnz9sgsxpyayls2j04l6b5vz"; + sha256 = "0w6wvyy9fbvfvrmhvmlb5gq18haagywk9hjkp1knjdarfczag9zv"; inherit (darwin) configd; inherit passthruFun; }; # Minimal versions of Python (built without optional dependencies) - python3Minimal = (python37.override { + python3Minimal = (python38.override { self = python3Minimal; pythonForBuild = pkgs.buildPackages.python3Minimal; # strip down that python version as much as possible @@ -146,6 +133,7 @@ in { rebuildBytecode = false; stripBytecode = true; includeSiteCustomize = false; + enableOptimizations = false; }).overrideAttrs(old: { pname = "python3-minimal"; meta = old.meta // { @@ -157,10 +145,10 @@ in { self = pypy27; sourceVersion = { major = "7"; - minor = "1"; + minor = "3"; patch = "1"; }; - sha256 = "0yq6ln1ic476sasp8zs4mg5i9524l1p96qwanp486rr1yza1grlg"; + sha256 = "08ckkhd0ix6j9873a7gr507c72d4cmnv5lwvprlljdca9i8p2dzs"; pythonVersion = "2.7"; db = db.override { dbmSupport = !stdenv.isDarwin; }; python = python27; @@ -173,10 +161,10 @@ in { self = pypy36; sourceVersion = { major = "7"; - minor = "1"; + minor = "3"; patch = "1"; }; - sha256 = "1hqvnran7d2dzj5555n7q680dyzhmbklz04pvkxgb5j604v7kkx1"; + sha256 = "10zsk8jby8j6visk5mzikpb1cidvz27qq4pfpa26jv53klic6b0c"; pythonVersion = "3.6"; db = db.override { dbmSupport = !stdenv.isDarwin; }; python = python27; @@ -190,13 +178,12 @@ in { self = pythonInterpreters.pypy27_prebuilt; sourceVersion = { major = "7"; - minor = "1"; + minor = "3"; patch = "1"; }; - sha256 = "0rlx4x9xy9h989w6sy4h7lknm00956r30c5gjxwsvf8fhvq9xc3k"; # linux64 + sha256 = "18xc5kwidj5hjwbr0w8v1nfpg5l4lk01z8cn804zfyyz8xjqhx5y"; # linux64 pythonVersion = "2.7"; inherit passthruFun; - ncurses = ncurses5; }; pypy36_prebuilt = callPackage ./pypy/prebuilt.nix { @@ -204,13 +191,12 @@ in { self = pythonInterpreters.pypy36_prebuilt; sourceVersion = { major = "7"; - minor = "1"; + minor = "3"; patch = "1"; }; - sha256 = "1c1xx6dm1n4xvh1vd3rcvyyixm5jm9rvzisji1a5bc9l38xzc540"; # linux64 + sha256 = "04nv0mkalaliphbjw7y0pmb372bxwjzwmcsqkf9kwsik99kg2z7n"; # linux64 pythonVersion = "3.6"; inherit passthruFun; - ncurses = ncurses5; }; graalpython37 = callPackage ./graalpython/default.nix { diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/default.nix b/nixpkgs/pkgs/development/interpreters/python/hooks/default.nix index 4d736426f3b..d14eb9cbb09 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/default.nix @@ -1,5 +1,6 @@ # Hooks for building Python packages. { python +, lib , callPackage , makeSetupHook , disabledIf @@ -97,6 +98,16 @@ in rec { }; } ./python-namespaces-hook.sh) {}; + pythonRecompileBytecodeHook = callPackage ({ }: + makeSetupHook { + name = "python-recompile-bytecode-hook"; + substitutions = { + inherit pythonInterpreter pythonSitePackages; + compileArgs = lib.concatStringsSep " " (["-q" "-f" "-i -"] ++ lib.optionals isPy3k ["-j $NIX_BUILD_CORES"]); + bytecodeName = if isPy3k then "__pycache__" else "*.pyc"; + }; + } ./python-recompile-bytecode-hook.sh ) {}; + pythonRemoveBinBytecodeHook = callPackage ({ }: makeSetupHook { name = "python-remove-bin-bytecode-hook"; 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 292f13d3015..6dd384b4847 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/pip-build-hook.sh @@ -24,7 +24,8 @@ pipShellHook() { export PATH="$tmp_path/bin:$PATH" export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH" mkdir -p "$tmp_path/@pythonSitePackages@" - @pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" >&2 + @pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" \ + --no-build-isolation >&2 fi runHook postShellHook diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/pip-install-hook.sh b/nixpkgs/pkgs/development/interpreters/python/hooks/pip-install-hook.sh index 4eefe22d3f2..770739b36bd 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/pip-install-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/pip-install-hook.sh @@ -11,7 +11,9 @@ pipInstallPhase() { export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH" pushd dist || return 1 - @pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild + mkdir tmpbuild + NIX_PIP_INSTALL_TMPDIR=tmpbuild @pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags + rm -rf tmpbuild popd || return 1 runHook postInstall diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/python-recompile-bytecode-hook.sh b/nixpkgs/pkgs/development/interpreters/python/hooks/python-recompile-bytecode-hook.sh new file mode 100644 index 00000000000..649d0c17ea0 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/python-recompile-bytecode-hook.sh @@ -0,0 +1,24 @@ +# Setup hook for recompiling bytecode. +# https://github.com/NixOS/nixpkgs/issues/81441 +echo "Sourcing python-recompile-bytecode-hook.sh" + +# Remove all bytecode from the $out output. Then, recompile only site packages folder +# Note this effectively duplicates `python-remove-bin-bytecode`, but long-term +# this hook should be removed again. + +pythonRecompileBytecodePhase () { + # TODO: consider other outputs than $out + + items="$(find "$out" -name "@bytecodeName@")" + if [[ -n $items ]]; then + for pycache in $items; do + rm -rf "$pycache" + done + fi + + find "$out"/@pythonSitePackages@ -name "*.py" -exec @pythonInterpreter@ -OO -m compileall @compileArgs@ {} + +} + +if [ -z "${dontUsePythonRecompileBytecode-}" ]; then + postPhases+=" pythonRecompileBytecodePhase" +fi diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/python-remove-bin-bytecode-hook.sh b/nixpkgs/pkgs/development/interpreters/python/hooks/python-remove-bin-bytecode-hook.sh index 2add23f2316..1180694294d 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/python-remove-bin-bytecode-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/python-remove-bin-bytecode-hook.sh @@ -1,9 +1,9 @@ -# Setup hook for detecting conflicts in Python packages +# Setup hook for removing bytecode from the bin folder echo "Sourcing python-remove-bin-bytecode-hook.sh" -# Check if we have two packages with the same name in the closure and fail. -# If this happens, something went wrong with the dependencies specs. -# Intentionally kept in a subdirectory, see catch_conflicts/README.md. +# The bin folder is added to $PATH and should only contain executables. +# It may happen there are executables with a .py extension for which +# bytecode is generated. This hook removes that bytecode. pythonRemoveBinBytecodePhase () { if [ -d "$out/bin" ]; then diff --git a/nixpkgs/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh b/nixpkgs/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh index 2aec9279382..311590425e6 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh @@ -29,7 +29,8 @@ setuptoolsShellHook() { export PATH="$tmp_path/bin:$PATH" export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH" mkdir -p "$tmp_path/@pythonSitePackages@" - eval "@pythonInterpreter@ -m pip install -e . --prefix $tmp_path >&2" + eval "@pythonInterpreter@ -m pip install -e . --prefix $tmp_path \ + --no-build-isolation >&2" fi runHook postShellHook diff --git a/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix b/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix index 22938a45585..df945c645a8 100644 --- a/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -17,6 +17,7 @@ , pythonCatchConflictsHook , pythonImportsCheckHook , pythonNamespacesHook +, pythonRecompileBytecodeHook , pythonRemoveBinBytecodeHook , pythonRemoveTestsDirHook , setuptoolsBuildHook @@ -104,77 +105,81 @@ let "disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format" ]) // { - name = namePrefix + name; - - nativeBuildInputs = [ - python - wrapPython - ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)? - pythonRemoveTestsDirHook - ] ++ lib.optionals catchConflicts [ - setuptools pythonCatchConflictsHook - ] ++ lib.optionals removeBinBytecode [ - pythonRemoveBinBytecodeHook - ] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [ - unzip - ] ++ lib.optionals (format == "setuptools") [ - setuptoolsBuildHook - ] ++ lib.optionals (format == "flit") [ - flitBuildHook - ] ++ lib.optionals (format == "pyproject") [ - pipBuildHook - ] ++ lib.optionals (format == "wheel") [ - wheelUnpackHook - ] ++ lib.optionals (format == "egg") [ - eggUnpackHook eggBuildHook eggInstallHook - ] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [ - pipInstallHook - ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ - # This is a test, however, it should be ran independent of the checkPhase and checkInputs - pythonImportsCheckHook - ] ++ lib.optionals (python.pythonAtLeast "3.3") [ - # Optionally enforce PEP420 for python3 - pythonNamespacesHook - ] ++ nativeBuildInputs; - - buildInputs = buildInputs ++ pythonPath; - - propagatedBuildInputs = propagatedBuildInputs ++ [ python ]; - - inherit strictDeps; - - LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; - - # Python packages don't have a checkPhase, only an installCheckPhase - doCheck = false; - doInstallCheck = attrs.doCheck or true; - installCheckInputs = [ - ] ++ lib.optionals (format == "setuptools") [ - # Longer-term we should get rid of this and require - # users of this function to set the `installCheckPhase` or - # pass in a hook that sets it. - setuptoolsCheckHook - ] ++ checkInputs; - - postFixup = lib.optionalString (!dontWrapPythonPrograms) '' - wrapPythonPrograms - '' + attrs.postFixup or ''''; - - # Python packages built through cross-compilation are always for the host platform. - disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ]; - - meta = { - # default to python's platforms - platforms = python.meta.platforms; - isBuildPythonPackage = python.meta.platforms; - } // meta; -} // lib.optionalAttrs (attrs?checkPhase) { - # If given use the specified checkPhase, otherwise use the setup hook. - # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`. - installCheckPhase = attrs.checkPhase; -})); - -passthru.updateScript = let - filename = builtins.head (lib.splitString ":" self.meta.position); - in attrs.passthru.updateScript or [ update-python-libraries filename ]; + name = namePrefix + name; + + nativeBuildInputs = [ + python + wrapPython + ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)? + pythonRecompileBytecodeHook # Remove when solved https://github.com/NixOS/nixpkgs/issues/81441 + pythonRemoveTestsDirHook + ] ++ lib.optionals catchConflicts [ + setuptools pythonCatchConflictsHook + ] ++ lib.optionals removeBinBytecode [ + pythonRemoveBinBytecodeHook + ] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [ + unzip + ] ++ lib.optionals (format == "setuptools") [ + setuptoolsBuildHook + ] ++ lib.optionals (format == "flit") [ + flitBuildHook + ] ++ lib.optionals (format == "pyproject") [ + pipBuildHook + ] ++ lib.optionals (format == "wheel") [ + wheelUnpackHook + ] ++ lib.optionals (format == "egg") [ + eggUnpackHook eggBuildHook eggInstallHook + ] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [ + pipInstallHook + ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + # This is a test, however, it should be ran independent of the checkPhase and checkInputs + pythonImportsCheckHook + ] ++ lib.optionals (python.pythonAtLeast "3.3") [ + # Optionally enforce PEP420 for python3 + pythonNamespacesHook + ] ++ nativeBuildInputs; + + buildInputs = buildInputs ++ pythonPath; + + propagatedBuildInputs = propagatedBuildInputs ++ [ python ]; + + inherit strictDeps; + + LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; + + # Python packages don't have a checkPhase, only an installCheckPhase + doCheck = false; + doInstallCheck = attrs.doCheck or true; + installCheckInputs = [ + ] ++ lib.optionals (format == "setuptools") [ + # Longer-term we should get rid of this and require + # users of this function to set the `installCheckPhase` or + # pass in a hook that sets it. + setuptoolsCheckHook + ] ++ checkInputs; + + postFixup = lib.optionalString (!dontWrapPythonPrograms) '' + wrapPythonPrograms + '' + attrs.postFixup or ''''; + + # Python packages built through cross-compilation are always for the host platform. + disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ]; + + # For now, revert recompilation of bytecode. + dontUsePythonRecompileBytecode = true; + + meta = { + # default to python's platforms + platforms = python.meta.platforms; + isBuildPythonPackage = python.meta.platforms; + } // meta; + } // lib.optionalAttrs (attrs?checkPhase) { + # If given use the specified checkPhase, otherwise use the setup hook. + # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`. + installCheckPhase = attrs.checkPhase; + })); + + passthru.updateScript = let + filename = builtins.head (lib.splitString ":" self.meta.position); + in attrs.passthru.updateScript or [ update-python-libraries filename ]; in lib.extendDerivation true passthru self diff --git a/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix b/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix index e5828fdd374..10073602071 100644 --- a/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix +++ b/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix @@ -34,7 +34,7 @@ in with passthru; stdenv.mkDerivation rec { inherit pname version; src = fetchurl { - url = "https://bitbucket.org/pypy/pypy/get/release-pypy${pythonVersion}-v${version}.tar.bz2"; + url = "https://bitbucket.org/pypy/pypy/downloads/pypy${pythonVersion}-v${version}-src.tar.bz2"; inherit sha256; }; @@ -75,13 +75,6 @@ in with passthru; stdenv.mkDerivation rec { postPatch = '' substituteInPlace "lib-python/${if isPy3k then "3/tkinter/tix.py" else "2.7/lib-tk/Tix.py"}" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" - # hint pypy to find nix ncurses - substituteInPlace pypy/module/_minimal_curses/fficurses.py \ - --replace "/usr/include/ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ - --replace "ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ - --replace "ncurses/term.h" "${ncurses.dev}/include/term.h" \ - --replace "libraries=['curses']" "libraries=['ncurses']" - sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py ''; @@ -137,7 +130,7 @@ in with passthru; stdenv.mkDerivation rec { ln -s $out/${executable}-c/${executable}-c $out/bin/${executable} # other packages expect to find stuff according to libPrefix - ln -s $out/${executable}/include $out/include/${libPrefix} + ln -s $out/${executable}-c/include $out/include/${libPrefix} ln -s $out/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix} ${stdenv.lib.optionalString stdenv.isDarwin '' diff --git a/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix b/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix index 0ebd3364834..1522047a380 100644 --- a/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -8,10 +8,9 @@ , zlib , openssl_1_0_2 , expat -, libffi -, ncurses -, tcl -, tk +, ncurses6 +, tcl-8_5 +, tk-8_5 # For the Python package set , packageOverrides ? (self: super: {}) , sourceVersion @@ -46,10 +45,9 @@ let zlib openssl_1_0_2 expat - libffi - ncurses - tcl - tk + ncurses6 + tcl-8_5 + tk-8_5 ]; in with passthru; stdenv.mkDerivation { @@ -66,6 +64,7 @@ in with passthru; stdenv.mkDerivation { mkdir -p $out/lib echo "Moving files to $out" mv -t $out bin include lib-python lib_pypy site-packages + mv lib/libffi.so.6* $out/lib/ mv $out/bin/libpypy*-c.so $out/lib/ @@ -78,8 +77,8 @@ in with passthru; stdenv.mkDerivation { $out/bin/pypy* pushd $out - find {lib,lib_pypy*} -name "*.so" -exec patchelf --replace-needed "libbz2.so.1.0" "libbz2.so.1" {} \; - find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps} {} \; + find {lib,lib_pypy*} -name "*.so" -exec patchelf --remove-needed libncursesw.so.6 --replace-needed libtinfow.so.6 libncursesw.so.6 {} \; + find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps}:$out/lib {} \; echo "Removing bytecode" find . -name "__pycache__" -type d -depth -exec rm -rf {} \; diff --git a/nixpkgs/pkgs/development/interpreters/python/sitecustomize.py b/nixpkgs/pkgs/development/interpreters/python/sitecustomize.py index 72ce951328f..d79a4696d8e 100644 --- a/nixpkgs/pkgs/development/interpreters/python/sitecustomize.py +++ b/nixpkgs/pkgs/development/interpreters/python/sitecustomize.py @@ -21,9 +21,11 @@ paths = os.environ.pop('NIX_PYTHONPATH', None) if paths: functools.reduce(lambda k, p: site.addsitedir(p, k), paths.split(':'), site._init_pathinfo()) -# Check whether we are in a venv. -# Note Python 2 does not support base_prefix so we assume we are not in a venv. -in_venv = sys.version_info.major == 3 and sys.prefix != sys.base_prefix +# Check whether we are in a venv or virtualenv. +# For Python 3 we check whether our `base_prefix` is different from our current `prefix`. +# For Python 2 we check whether the non-standard `real_prefix` is set. +# https://stackoverflow.com/questions/1871549/determine-if-python-is-running-inside-virtualenv +in_venv = (sys.version_info.major == 3 and sys.prefix != sys.base_prefix) or (sys.version_info.major == 2 and hasattr(sys, "real_prefix")) if not in_venv: executable = os.environ.pop('NIX_PYTHONEXECUTABLE', None) @@ -32,8 +34,6 @@ if not in_venv: if 'PYTHONEXECUTABLE' not in os.environ and executable is not None: sys.executable = executable if prefix is not None: - # Because we cannot check with Python 2 whether we are in a venv, - # creating a venv from a Nix env won't work as well with Python 2. - # Also, note that sysconfig does not like it when sys.prefix is set to None + # Sysconfig does not like it when sys.prefix is set to None sys.prefix = sys.exec_prefix = prefix site.PREFIXES.insert(0, prefix) diff --git a/nixpkgs/pkgs/development/interpreters/python/tests.nix b/nixpkgs/pkgs/development/interpreters/python/tests.nix index 6c4a6ae8e21..dcfa41cc308 100644 --- a/nixpkgs/pkgs/development/interpreters/python/tests.nix +++ b/nixpkgs/pkgs/development/interpreters/python/tests.nix @@ -6,69 +6,81 @@ }: let - envs = let - inherit python; - pythonEnv = python.withPackages(ps: with ps; [ ]); - pythonVirtualEnv = python.withPackages(ps: with ps; [ virtualenv ]); - in { - # Plain Python interpreter - plain = rec { - env = python; - interpreter = env.interpreter; - is_venv = "False"; - is_nixenv = "False"; - is_virtualenv = "False"; - }; - } // lib.optionalAttrs (python.isPy3k && !python.isPyPy) { - # Use virtualenv from a Nix env. - # Does not function with Python 2 - # ValueError: source and destination is the same /nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/os.py - nixenv-virtualenv = rec { - env = runCommand "${python.name}-virtualenv" {} '' - ${pythonVirtualEnv.interpreter} -m virtualenv $out - ''; - interpreter = "${env}/bin/${python.executable}"; - is_venv = "False"; - is_nixenv = "True"; - is_virtualenv = "True"; - }; - } // lib.optionalAttrs (python.implementation != "graal") { - # Python Nix environment (python.buildEnv) - nixenv = rec { - env = pythonEnv; - interpreter = env.interpreter; - is_venv = "False"; - is_nixenv = "True"; - is_virtualenv = "True"; - }; - } // lib.optionalAttrs (python.isPy3k && (!python.isPyPy)) rec { - # Venv built using plain Python - # Python 2 does not support venv - # TODO: PyPy executable name is incorrect, it should be pypy-c or pypy-3c instead of pypy and pypy3. - plain-venv = rec { - env = runCommand "${python.name}-venv" {} '' - ${python.interpreter} -m venv $out - ''; - interpreter = "${env}/bin/${python.executable}"; - is_venv = "True"; - is_nixenv = "False"; - is_virtualenv = "True"; - }; + environmentTests = let + envs = let + inherit python; + pythonEnv = python.withPackages(ps: with ps; [ ]); + pythonVirtualEnv = python.withPackages(ps: with ps; [ virtualenv ]); + in { + # Plain Python interpreter + plain = rec { + env = python; + interpreter = env.interpreter; + is_venv = "False"; + is_nixenv = "False"; + is_virtualenv = "False"; + }; + } // lib.optionalAttrs (!python.isPyPy) { + # Use virtualenv from a Nix env. + nixenv-virtualenv = rec { + env = runCommand "${python.name}-virtualenv" {} '' + ${pythonVirtualEnv.interpreter} -m virtualenv $out + ''; + interpreter = "${env}/bin/${python.executable}"; + is_venv = "False"; + is_nixenv = "True"; + is_virtualenv = "True"; + }; + } // lib.optionalAttrs (python.implementation != "graal") { + # Python Nix environment (python.buildEnv) + nixenv = rec { + env = pythonEnv; + interpreter = env.interpreter; + is_venv = "False"; + is_nixenv = "True"; + is_virtualenv = "False"; + }; + } // lib.optionalAttrs (python.isPy3k && (!python.isPyPy)) rec { + # Venv built using plain Python + # Python 2 does not support venv + # TODO: PyPy executable name is incorrect, it should be pypy-c or pypy-3c instead of pypy and pypy3. + plain-venv = rec { + env = runCommand "${python.name}-venv" {} '' + ${python.interpreter} -m venv $out + ''; + interpreter = "${env}/bin/${python.executable}"; + is_venv = "True"; + is_nixenv = "False"; + is_virtualenv = "False"; + }; - } // lib.optionalAttrs (python.pythonAtLeast "3.8") { - # Venv built using Python Nix environment (python.buildEnv) - # TODO: Cannot create venv from a nix env - # Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. - nixenv-venv = rec { - env = runCommand "${python.name}-venv" {} '' - ${pythonEnv.interpreter} -m venv $out - ''; - interpreter = "${env}/bin/${pythonEnv.executable}"; - is_venv = "True"; - is_nixenv = "True"; - is_virtualenv = "True"; + } // lib.optionalAttrs (python.pythonAtLeast "3.8") { + # Venv built using Python Nix environment (python.buildEnv) + # TODO: Cannot create venv from a nix env + # Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. + nixenv-venv = rec { + env = runCommand "${python.name}-venv" {} '' + ${pythonEnv.interpreter} -m venv $out + ''; + interpreter = "${env}/bin/${pythonEnv.executable}"; + is_venv = "True"; + is_nixenv = "True"; + is_virtualenv = "False"; + }; }; - }; + + testfun = name: attrs: runCommand "${python.name}-tests-${name}" ({ + inherit (python) pythonVersion; + } // attrs) '' + cp -r ${./tests/test_environments} tests + chmod -R +w tests + substituteAllInPlace tests/test_python.py + ${attrs.interpreter} -m unittest discover --verbose tests #/test_python.py + mkdir $out + touch $out/success + ''; + + in lib.mapAttrs testfun envs; # All PyPy package builds are broken at the moment integrationTests = lib.optionalAttrs (python.pythonAtLeast "3.7" && (!python.isPyPy)) rec { @@ -78,15 +90,6 @@ let }; }; - testfun = name: attrs: runCommand "${python.name}-tests-${name}" ({ - inherit (python) pythonVersion; - } // attrs) '' - cp -r ${./tests} tests - chmod -R +w tests - substituteAllInPlace tests/test_python.py - ${attrs.interpreter} -m unittest discover --verbose tests #/test_python.py - mkdir $out - touch $out/success - ''; -in lib.mapAttrs testfun envs // integrationTests + +in environmentTests // integrationTests diff --git a/nixpkgs/pkgs/development/interpreters/python/tests/test_python.py b/nixpkgs/pkgs/development/interpreters/python/tests/test_environments/test_python.py index 41a7e687d26..0fc4b8a9e91 100644 --- a/nixpkgs/pkgs/development/interpreters/python/tests/test_python.py +++ b/nixpkgs/pkgs/development/interpreters/python/tests/test_environments/test_python.py @@ -43,6 +43,10 @@ class TestCasePython(unittest.TestCase): else: self.assertEqual(sys.prefix, sys.base_prefix) + @unittest.skipIf(sys.version_info.major==3, "sys.real_prefix is only set by virtualenv in case of Python 2.") + def test_real_prefix(self): + self.assertTrue(hasattr(sys, "real_prefix") == IS_VIRTUALENV) + def test_python_version(self): self.assertTrue(platform.python_version().startswith(PYTHON_VERSION)) diff --git a/nixpkgs/pkgs/development/interpreters/racket/default.nix b/nixpkgs/pkgs/development/interpreters/racket/default.nix index 1db01c0d775..b62df6e837b 100644 --- a/nixpkgs/pkgs/development/interpreters/racket/default.nix +++ b/nixpkgs/pkgs/development/interpreters/racket/default.nix @@ -46,7 +46,7 @@ in stdenv.mkDerivation rec { pname = "racket"; - version = "7.7"; # always change at once with ./minimal.nix + version = "7.8"; # always change at once with ./minimal.nix src = (stdenv.lib.makeOverridable ({ name, sha256 }: fetchurl { @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { } )) { name = "${pname}-${version}"; - sha256 = "0cx5h3k0n58cb442qzp3jlc7n1b9dbaxv9blg2rjil2rn119yrb2"; + sha256 = "19z3dayybcra277s4gk2mppalwawd93f2b16xyrb6d7rbbfz7j9j"; }; FONTCONFIG_FILE = fontsConf; diff --git a/nixpkgs/pkgs/development/interpreters/racket/minimal.nix b/nixpkgs/pkgs/development/interpreters/racket/minimal.nix index a4a7a5c12cd..02aed6e8929 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 = "1lxcd4ix8q3089xql48hwccxvcpkinfxwxnc6fhcjdgzqcyxh3ln"; + sha256 = "0bbglf9vfacpm2hn3lskhvc8cpg6z088fbnzpqsn17z8qdk8yvb3"; }; meta = oldAttrs.meta // { diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/default.nix b/nixpkgs/pkgs/development/interpreters/rakudo/default.nix index 2833a4d5673..0c708cd3171 100644 --- a/nixpkgs/pkgs/development/interpreters/rakudo/default.nix +++ b/nixpkgs/pkgs/development/interpreters/rakudo/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "rakudo"; - version = "2020.05.1"; + version = "2020.08.2"; src = fetchurl { url = "https://www.rakudo.org/dl/rakudo/rakudo-${version}.tar.gz"; - sha256 = "1m4xpghhgi7iijbzvr7bzkay7k93bwpvdg58jp31csrwdzz4q5z1"; + sha256 = "16qsq6alvk2x44x39j2fzxigvm5cvmz85i0nkjcw0wz29yyf8lch"; }; buildInputs = [ icu zlib gmp perl ]; diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix b/nixpkgs/pkgs/development/interpreters/rakudo/moarvm.nix index a7b57c9287a..702fccd7b6b 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 = "2020.05"; + version = "2020.08"; src = fetchurl { url = "https://www.moarvm.org/releases/MoarVM-${version}.tar.gz"; - sha256 = "0jw29846nky7gz129knjcx58qr7nbn8j7hs8k92i11zaj73d4s4k"; + sha256 = "1gq7z4z5lnkai01721waawkkal82sdmyra05nnbfb1986mq5xpiy"; }; buildInputs = [ perl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]; diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix b/nixpkgs/pkgs/development/interpreters/rakudo/nqp.nix index 40133287f9e..3f5f7afcfed 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 = "2020.05"; + version = "2020.08.2"; src = fetchurl { - url = "https://github.com/perl6/nqp/releases/download/${version}/nqp-${version}.tar.gz"; - sha256 = "0xxm0vlra1g467cxc5v65p8pc46w7r9wkcddjl8nk2lnvgcr46r9"; + url = "https://github.com/raku/nqp/releases/download/${version}/nqp-${version}.tar.gz"; + sha256 = "14zr1swprxl284k0h1w72pcypj24sga15170ylaqjb8wxy8h1mqw"; }; buildInputs = [ perl ]; diff --git a/nixpkgs/pkgs/development/interpreters/rakudo/zef.nix b/nixpkgs/pkgs/development/interpreters/rakudo/zef.nix index 5c8fe16408b..c8205344693 100644 --- a/nixpkgs/pkgs/development/interpreters/rakudo/zef.nix +++ b/nixpkgs/pkgs/development/interpreters/rakudo/zef.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "zef"; - version = "0.8.4"; + version = "0.8.5"; src = fetchFromGitHub { owner = "ugexe"; repo = "zef"; rev = "v${version}"; - sha256 = "02a3awnjr1mgb9275xvp3xms80vcxkq55ffi8sbjzxpwyadj5y5k"; + sha256 = "17a5ns0ph8626q3b4wv9v2n0zqmhqbqyzjzxa387kr19qs933yy6"; }; buildInputs = [ rakudo makeWrapper ]; diff --git a/nixpkgs/pkgs/development/interpreters/red/default.nix b/nixpkgs/pkgs/development/interpreters/red/default.nix index e1460ec51a2..554dc81bffb 100644 --- a/nixpkgs/pkgs/development/interpreters/red/default.nix +++ b/nixpkgs/pkgs/development/interpreters/red/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "red"; - version = "0.6.3"; + version = "0.6.4"; src = fetchFromGitHub { - rev = "6a43c767fa2e85d668b83f749158a18e62c30f70"; + rev = "755eb943ccea9e78c2cab0f20b313a52404355cb"; owner = "red"; repo = "red"; - sha256 = "1zh6xc728bs7r4v5jz1jjrdk0xd838xsxmvy9gfg75a3zffm0slr"; + sha256 = "sha256:045rrg9666zczgrwyyyglivzdzja103s52b0fzj7hqmr1fz68q37"; }; rebol = fetchurl { @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { ${r2} -qw red.r tests/hello.red # Compiling the Red console... - ${r2} -qw red.r -r environment/console/console.red + ${r2} -qw red.r -r environment/console/CLI/console.red # Generating docs... cd docs diff --git a/nixpkgs/pkgs/development/interpreters/renpy/default.nix b/nixpkgs/pkgs/development/interpreters/renpy/default.nix index d09d150bd79..41cf4c221c6 100644 --- a/nixpkgs/pkgs/development/interpreters/renpy/default.nix +++ b/nixpkgs/pkgs/development/interpreters/renpy/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, python2Packages, pkgconfig, SDL2 -, libpng, ffmpeg, freetype, glew, libGL, libGLU, fribidi, zlib +, libpng, ffmpeg_3, freetype, glew, libGL, libGLU, fribidi, zlib , glib }: @@ -32,13 +32,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ python cython wrapPython tkinter - SDL2 libpng ffmpeg freetype glew libGLU libGL fribidi zlib pygame_sdl2 glib + SDL2 libpng ffmpeg_3 freetype glew libGLU libGL fribidi zlib pygame_sdl2 glib ]; pythonPath = [ pygame_sdl2 tkinter ]; RENPY_DEPS_INSTALL = stdenv.lib.concatStringsSep "::" (map (path: path) [ - SDL2 SDL2.dev libpng ffmpeg ffmpeg.out freetype glew.dev glew.out libGLU libGL fribidi zlib + SDL2 SDL2.dev libpng ffmpeg_3 ffmpeg_3.out freetype glew.dev glew.out libGLU libGL fribidi zlib ]); buildPhase = '' diff --git a/nixpkgs/pkgs/development/interpreters/ruby/default.nix b/nixpkgs/pkgs/development/interpreters/ruby/default.nix index 1756c13b53d..dbfea17437d 100644 --- a/nixpkgs/pkgs/development/interpreters/ruby/default.nix +++ b/nixpkgs/pkgs/development/interpreters/ruby/default.nix @@ -116,7 +116,7 @@ let # https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae buildFlags = lib.optionals atLeast27 [ "REVISION_LATEST=0" ]; - configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby_${tag}"] + configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby-${version}"] ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby" ++ op (!docSupport) "--disable-install-doc" ++ ops stdenv.isDarwin [ diff --git a/nixpkgs/pkgs/development/interpreters/shen-sbcl/default.nix b/nixpkgs/pkgs/development/interpreters/shen-sbcl/default.nix new file mode 100644 index 00000000000..6d10669d20d --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/shen-sbcl/default.nix @@ -0,0 +1,32 @@ +{ stdenv +, fetchurl +, shen-sources +, sbcl +}: + +stdenv.mkDerivation rec { + name = "shen-sbcl-${version}"; + version = "3.0.3"; + src = fetchurl { + url = "https://github.com/Shen-Language/shen-cl/releases/download/v${version}/shen-cl-v${version}-sources.tar.gz"; + sha256 = "0mc10jlrxqi337m6ngwbr547zi4qgk69g1flz5dsddjy5x41j0yz"; + }; + buildInputs = [ + sbcl shen-sources + ]; + buildPhase = '' + ln -s ${shen-sources} kernel + make sbcl + ''; + installPhase = '' + mkdir -p $out + install -m755 -D bin/sbcl/shen $out/bin/shen-sbcl + ''; + meta = with stdenv.lib; { + homepage = https://shenlanguage.org; + description = "Port of Shen running on Steel Bank Common Lisp"; + platforms = sbcl.meta.platforms; + maintainers = with maintainers; [ bsima ]; + license = licenses.bsd3; + }; +} diff --git a/nixpkgs/pkgs/development/interpreters/shen-sources/default.nix b/nixpkgs/pkgs/development/interpreters/shen-sources/default.nix new file mode 100644 index 00000000000..f35631daa28 --- /dev/null +++ b/nixpkgs/pkgs/development/interpreters/shen-sources/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, fetchurl +}: + +stdenv.mkDerivation rec { + name = "shen-sources-${version}"; + version = "22.3"; + + src = fetchurl { + url = "https://github.com/Shen-Language/shen-sources/releases/download/shen-${version}/ShenOSKernel-${version}.tar.gz"; + sha256 = "16jaliga3bia0f8c8ja1y22wanbnbriv31qfqdc87a4p4dx9c77q"; + }; + + buildInputs = []; + buildPhase = ""; + installPhase = '' + mkdir -p $out + cp . $out -R + ''; + + meta = with stdenv.lib; { + homepage = https://shenlanguage.org; + description = "Source code for the Shen Language"; + platforms = platforms.all; + maintainers = with maintainers; [ bsima ]; + license = licenses.bsd3; + }; +} diff --git a/nixpkgs/pkgs/development/interpreters/spidermonkey/68.nix b/nixpkgs/pkgs/development/interpreters/spidermonkey/68.nix index 7100a730a61..36d28f62e2e 100644 --- a/nixpkgs/pkgs/development/interpreters/spidermonkey/68.nix +++ b/nixpkgs/pkgs/development/interpreters/spidermonkey/68.nix @@ -7,11 +7,11 @@ let python3Env = buildPackages.python3.withPackages (p: [p.six]); in stdenv.mkDerivation rec { pname = "spidermonkey"; - version = "68.7.0"; + version = "68.10.0"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"; - sha256 = "0w3mad0r4khcd7hfmm3xix9x6mp5yp8g8kyh18vanfnjqdls0gmd"; + sha256 = "0azdinwqjfv2q37gqpxmfvzsk86pvsi6cjaq1310zs26gric5j1f"; }; outputs = [ "out" "dev" ]; diff --git a/nixpkgs/pkgs/development/interpreters/wasmer/default.nix b/nixpkgs/pkgs/development/interpreters/wasmer/default.nix index 404c0731c34..c620b1686ea 100644 --- a/nixpkgs/pkgs/development/interpreters/wasmer/default.nix +++ b/nixpkgs/pkgs/development/interpreters/wasmer/default.nix @@ -35,6 +35,5 @@ rustPlatform.buildRustPackage rec { homepage = "https://wasmer.io/"; license = licenses.mit; maintainers = with maintainers; [ filalex77 ]; - platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/development/interpreters/wasmtime/default.nix b/nixpkgs/pkgs/development/interpreters/wasmtime/default.nix index dd6e3eb4a7f..f7ef111bc66 100644 --- a/nixpkgs/pkgs/development/interpreters/wasmtime/default.nix +++ b/nixpkgs/pkgs/development/interpreters/wasmtime/default.nix @@ -2,17 +2,17 @@ rustPlatform.buildRustPackage rec { pname = "wasmtime"; - version = "0.16.0"; + version = "0.19.0"; src = fetchFromGitHub { owner = "bytecodealliance"; repo = "${pname}"; rev = "v${version}"; - sha256 = "1zlljqkkcw8h94ff1w47sqn9pn0zal06s06i8nciv5i2d1xaqg5n"; + sha256 = "0gb8xk27ych553b7knflbbks9q64m39v40sdirycm6prqfnfrnm8"; fetchSubmodules = true; }; - cargoSha256 = "1hb7l7a76lgbji0qm9qd80m35cp346hyi4rphfk6p80v142cw8hh"; + cargoSha256 = "1dqaxpwfm234yjwrhglzvsqhh2fr5nsx7bpk7bmycyk6lml8vxy7"; nativeBuildInputs = [ python cmake clang ]; buildInputs = [ llvmPackages.libclang ] ++ |