diff options
Diffstat (limited to 'pkgs/applications/science')
40 files changed, 871 insertions, 125 deletions
diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index ee19077065e0..4de4752aefc1 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -7,13 +7,16 @@ let in stdenv.mkDerivation rec { - srcVersion = "aug18a"; - version = "20180801_a"; + srcVersion = "sep18a"; + version = "20180901_a"; name = "gildas-${version}"; src = fetchurl { - url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz"; - sha256 = "0mg3wijrj8x1p912vkgrhxbypjx7aj9b1492yxvq2y3fxban6bj1"; + # For each new release, the upstream developers of Gildas move the + # source code of the previous release to a different directory + urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz" + "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.gz" ]; + sha256 = "c9110636431a94e5b1ff5af876c25ad0a991cf62b94d4c42ce07b048eb93d956"; }; enableParallelBuilding = true; @@ -22,7 +25,9 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ]; - patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./aarch64.patch ]; + patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ./gag-font-bin-rule.patch ]; + + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out diff --git a/pkgs/applications/science/astronomy/gildas/gag-font-bin-rule.patch b/pkgs/applications/science/astronomy/gildas/gag-font-bin-rule.patch new file mode 100644 index 000000000000..61ddc37c7fd4 --- /dev/null +++ b/pkgs/applications/science/astronomy/gildas/gag-font-bin-rule.patch @@ -0,0 +1,13 @@ +diff -ruN gildas-src-aug18a/kernel/etc/Makefile gildas-src-aug18a.gag-font-bin-rule/kernel/etc/Makefile +--- gildas-src-aug18a/kernel/etc/Makefile 2016-09-09 09:39:37.000000000 +0200 ++++ gildas-src-aug18a.gag-font-bin-rule/kernel/etc/Makefile 2018-09-04 12:03:11.000000000 +0200 +@@ -29,7 +29,8 @@ + + SEDEXE=sed -e 's?source tree?executable tree?g' + +-$(datadir)/gag-font.bin: hershey-font.dat $(bindir)/hershey ++$(datadir)/gag-font.bin: hershey-font.dat $(bindir)/hershey \ ++ $(gagintdir)/etc/gag.dico.gbl $(gagintdir)/etc/gag.dico.lcl + ifeq ($(GAG_ENV_KIND)-$(GAG_TARGET_KIND),cygwin-mingw) + $(bindir)/hershey `cygpath -w $(datadir)`/gag-font.bin + else diff --git a/pkgs/applications/science/astronomy/gildas/return-error-code.patch b/pkgs/applications/science/astronomy/gildas/return-error-code.patch deleted file mode 100644 index f0bd7da9354e..000000000000 --- a/pkgs/applications/science/astronomy/gildas/return-error-code.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --new-file -r -u gildas-src-dec17a.orig/admin/gildas-env.sh gildas-src-dec17a/admin/gildas-env.sh ---- gildas-src-dec17a.orig/admin/gildas-env.sh 2017-10-24 11:39:18.000000000 +0200 -+++ gildas-src-dec17a/admin/gildas-env.sh 2017-12-01 11:17:32.051953670 +0100 -@@ -1010,6 +1010,9 @@ - gagenv_message "$gagenv_errors error(s) and $gagenv_warnings warning(s) detected" - if [ $gagenv_errors -ne 0 ]; then - gagenv_message "GILDAS will not compile" -+ gagenv_clean -+ echo -+ \return 1 - elif [ $gagenv_warnings -ne 0 ]; then - gagenv_message "GILDAS will compile with some optional features disabled" - else diff --git a/pkgs/applications/science/biology/hisat2/default.nix b/pkgs/applications/science/biology/hisat2/default.nix new file mode 100644 index 000000000000..9ccf54a81133 --- /dev/null +++ b/pkgs/applications/science/biology/hisat2/default.nix @@ -0,0 +1,49 @@ +{stdenv, fetchurl, unzip, which, python}: + +stdenv.mkDerivation rec { + name = "hisat2-${version}"; + version = "2.1.0"; + + src = fetchurl { + url = "ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-${version}-source.zip"; + sha256 = "10g73sdf6vqqfhhd92hliw7bbpkb8v4pp5012r5l21zws7p7d8l9"; + }; + + buildInputs = [ unzip which python ]; + + installPhase = '' + mkdir -p $out/bin + cp hisat2 \ + hisat2-inspect-l \ + hisat2-build-s \ + hisat2-align-l \ + hisat2-inspect \ + hisat2-align-s \ + hisat2-inspect-s \ + hisat2-build-l \ + hisat2-build \ + extract_exons.py \ + extract_splice_sites.py \ + hisat2_extract_exons.py \ + hisat2_extract_snps_haplotypes_UCSC.py \ + hisat2_extract_snps_haplotypes_VCF.py \ + hisat2_extract_splice_sites.py \ + hisat2_simulate_reads.py \ + hisatgenotype_build_genome.py \ + hisatgenotype_extract_reads.py \ + hisatgenotype_extract_vars.py \ + hisatgenotype_hla_cyp.py \ + hisatgenotype_locus.py \ + hisatgenotype.py \ + $out/bin + ''; + + meta = with stdenv.lib; { + description = "Graph based aligner"; + license = licenses.gpl3; + homepage = https://ccb.jhu.edu/software/hisat2/index.shtml; + maintainers = with maintainers; [ jbedo ]; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; + +} diff --git a/pkgs/applications/science/biology/picard-tools/default.nix b/pkgs/applications/science/biology/picard-tools/default.nix index 0ddbdab4c1b1..e825d1e8454f 100644 --- a/pkgs/applications/science/biology/picard-tools/default.nix +++ b/pkgs/applications/science/biology/picard-tools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "picard-tools-${version}"; - version = "2.18.11"; + version = "2.18.14"; src = fetchurl { url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar"; - sha256 = "03wkyz3bjx3n8bwambhz9lr09271r1wxycmx4p7m2naqs4afxb89"; + sha256 = "0xc5mqifav2j4zbln04q07wjlzpwp3w0y5iv5bkp4v5486cp2ha9"; }; buildInputs = [ jre makeWrapper ]; diff --git a/pkgs/applications/science/biology/platypus/default.nix b/pkgs/applications/science/biology/platypus/default.nix index 2947515652e2..323ca90f0a2a 100644 --- a/pkgs/applications/science/biology/platypus/default.nix +++ b/pkgs/applications/science/biology/platypus/default.nix @@ -4,13 +4,13 @@ let python = python27.withPackages (ps: with ps; [ cython ]); in stdenv.mkDerivation rec { name = "platypus-unstable-${version}"; - version = "2017-03-07"; + version = "2018-07-22"; src = fetchFromGitHub { owner = "andyrimmer"; repo = "Platypus"; - rev = "cbbd914"; - sha256 = "0xgj3pl7n4c12j5pp5qyjfk4rsvb5inwzrpcbhdf3br5f3mmdsb9"; + rev = "3e72641c69800da0cd4906b090298e654d316ee1"; + sha256 = "0nah6r54b8xm778gqyb8b7rsd76z8ji4g73sm6rvpw5s96iib1vw"; }; buildInputs = [ htslib python zlib makeWrapper ]; diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix index 87e708526ef7..c4b4bb522c40 100644 --- a/pkgs/applications/science/biology/samtools/default.nix +++ b/pkgs/applications/science/biology/samtools/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "samtools"; - version = "1.8"; + version = "1.9"; src = fetchurl { url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2"; - sha256 = "05myg7bs90i68qbqab9cdg9rqj2xh39azibrx82ipzc5kcfvqhn9"; + sha256 = "10ilqbmm7ri8z431sn90lvbjwizd0hhkf9rcqw8j823hf26nhgq8"; }; nativeBuildInputs = [ perl ]; diff --git a/pkgs/applications/science/biology/seaview/default.nix b/pkgs/applications/science/biology/seaview/default.nix new file mode 100644 index 000000000000..17cf903ae49c --- /dev/null +++ b/pkgs/applications/science/biology/seaview/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, coreutils, fltk, libjpeg }: + +stdenv.mkDerivation rec { + version = "4.7"; + name = "seaview-${version}"; + + src = fetchurl { + url = "ftp://pbil.univ-lyon1.fr/pub/mol_phylogeny/seaview/archive/seaview_${version}.tar.gz"; + sha256 = "0fhyq7dcn0izhwcfin9ajsr7kmmsqm9f1np1rmhzg4digfwqb29n"; + }; + + buildInputs = [ fltk libjpeg ]; + + patchPhase = "sed -i 's#PATH=/bin:/usr/bin rm#'${coreutils}/bin/rm'#' seaview.cxx"; + installPhase = "mkdir -p $out/bin; cp seaview $out/bin"; + + meta = with stdenv.lib; { + description = "GUI for molecular phylogeny"; + longDescription = '' + SeaView is a multiplatform, graphical user interface for multiple sequence alignment and molecular phylogeny. + - SeaView reads and writes various file formats (NEXUS, MSF, CLUSTAL, FASTA, PHYLIP, MASE, Newick) of DNA and protein sequences and of phylogenetic trees. + - SeaView drives programs muscle or Clustal Omega for multiple sequence alignment, and also allows to use any external alignment algorithm able to read and write FASTA-formatted files. + - Seaview drives the Gblocks program to select blocks of evolutionarily conserved sites. + - SeaView computes phylogenetic trees by + + parsimony, using PHYLIP's dnapars/protpars algorithm, + + distance, with NJ or BioNJ algorithms on a variety of evolutionary distances, + + maximum likelihood, driving program PhyML 3.1. + - Seaview can use the Transfer Bootstrap Expectation method to compute the bootstrap support of PhyML and distance trees. + - SeaView prints and draws phylogenetic trees on screen, SVG, PDF or PostScript files. + - SeaView allows to download sequences from EMBL/GenBank/UniProt using the Internet. + + Seaview is published in: + + Gouy M., Guindon S. & Gascuel O. (2010) SeaView version 4 : a multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular Biology and Evolution 27(2):221-224. + ''; + homepage = http://doua.prabi.fr/software/seaview; + license = licenses.gpl3; + maintainers = [ maintainers.iimog ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/science/biology/star/default.nix b/pkgs/applications/science/biology/star/default.nix index f52df902db6a..c552d9f9de35 100644 --- a/pkgs/applications/science/biology/star/default.nix +++ b/pkgs/applications/science/biology/star/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "star-${version}"; - version = "2.6.0c"; + version = "2.6.1a"; src = fetchFromGitHub { repo = "STAR"; owner = "alexdobin"; rev = version; - sha256 = "04cj6jw8d9q6lk9c78wa4fky6jdlicf1d13plq7182h8vqiz8p59"; + sha256 = "11zs32d96gpjldrylz3nr5r2qrshf0nmzh5nmcy4wrk7y5lz81xc"; }; sourceRoot = "source/source"; diff --git a/pkgs/applications/science/chemistry/jmol/default.nix b/pkgs/applications/science/chemistry/jmol/default.nix index d5dae364cc3d..b89b28ed0479 100644 --- a/pkgs/applications/science/chemistry/jmol/default.nix +++ b/pkgs/applications/science/chemistry/jmol/default.nix @@ -17,7 +17,7 @@ let }; in stdenv.mkDerivation rec { - version = "14.29.17"; + version = "14.29.22"; pname = "jmol"; name = "${pname}-${version}"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { baseVersion = "${lib.versions.major version}.${lib.versions.minor version}"; in fetchurl { url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz"; - sha256 = "1dnxbvi8ha9z2ldymkjpxydd216afv6k7fdp3j70sql10zgy0isk"; + sha256 = "1wnrrn2wza9z6bp5axg191qf32sx4q8fj4xz404zp278rc4i2fpv"; }; patchPhase = '' diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix index 5e1628a4fba7..70e79023c0ff 100644 --- a/pkgs/applications/science/chemistry/openmolcas/default.nix +++ b/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -5,8 +5,8 @@ } : let - version = "20180529"; - gitLabRev = "b6b9ceffccae0dd7f14c099468334fee0b1071fc"; + version = "18.09"; + gitLabRev = "v${version}"; python = python3.withPackages (ps : with ps; [ six pyparsing ]); @@ -17,7 +17,7 @@ in stdenv.mkDerivation { owner = "Molcas"; repo = "OpenMolcas"; rev = gitLabRev; - sha256 = "1wbjjdv07lg1x4kdnf28anyrjgy33gdgrd5d7zi1c97nz7vhdjaz"; + sha256 = "1di1ygifx7ycfpwh25mv76xlv15wqfdmqzjsg5nani2d5z0arri2"; }; nativeBuildInputs = [ perl cmake texlive.combined.scheme-minimal makeWrapper ]; diff --git a/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/pkgs/applications/science/chemistry/quantum-espresso/default.nix new file mode 100644 index 000000000000..7a7f1b3596d3 --- /dev/null +++ b/pkgs/applications/science/chemistry/quantum-espresso/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl +, gfortran, fftw, openblas +, mpi ? null +}: + +stdenv.mkDerivation rec { + version = "6.3"; + name = "quantum-espresso-${version}"; + + src = fetchurl { + url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz"; + sha256 = "1738z3nhkzcrgnhnfg1r4lipbwvcrcprwhzjbjysnylmzbzwhrs0"; + }; + + passthru = { + inherit mpi; + }; + + preConfigure = '' + patchShebangs configure + ''; + + # remove after 6.3 version: + # makefile needs to ignore install directory easier than applying patch + preInstall = '' + printf "\n.PHONY: install\n" >> Makefile + ''; + + buildInputs = [ fftw openblas gfortran ] + ++ (stdenv.lib.optionals (mpi != null) [ mpi ]); + +configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ]; + + makeFlags = [ "all" ]; + + meta = with stdenv.lib; { + description = "Electronic-structure calculations and materials modeling at the nanoscale"; + longDescription = '' + Quantum ESPRESSO is an integrated suite of Open-Source computer codes for + electronic-structure calculations and materials modeling at the + nanoscale. It is based on density-functional theory, plane waves, and + pseudopotentials. + ''; + homepage = https://www.quantum-espresso.org/; + license = licenses.gpl2; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/applications/science/chemistry/siesta/default.nix b/pkgs/applications/science/chemistry/siesta/default.nix new file mode 100644 index 000000000000..eb17a68b8aae --- /dev/null +++ b/pkgs/applications/science/chemistry/siesta/default.nix @@ -0,0 +1,69 @@ +{ stdenv, fetchurl +, gfortran, openblas +, mpi ? null, scalapack +}: + +stdenv.mkDerivation rec { + version = "4.1-b3"; + name = "siesta-${version}"; + + src = fetchurl { + url = "https://launchpad.net/siesta/4.1/4.1-b3/+download/siesta-4.1-b3.tar.gz"; + sha256 = "1450jsxj5aifa0b5fcg7mxxq242fvqnp4zxpgzgbkdp99vrp06gm"; + }; + + passthru = { + inherit mpi; + }; + + buildInputs = [ openblas gfortran ] + ++ (stdenv.lib.optionals (mpi != null) [ mpi scalapack ]); + + enableParallelBuilding = true; + + # Must do manualy becuase siesta does not do the regular + # ./configure; make; make install + configurePhase = '' + cd Obj + sh ../Src/obj_setup.sh + cp gfortran.make arch.make + ''; + + preBuild = if (mpi != null) then '' + makeFlagsArray=( + CC="mpicc" FC="mpifort" + FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="." + COMP_LIBS="" LIBS="-lopenblas -lscalapack" + ); + '' else '' + makeFlagsArray=( + COMP_LIBS="" LIBS="-lopenblas" + ); + ''; + + installPhase = '' + mkdir -p $out/bin + cp -a siesta $out/bin + ''; + + meta = with stdenv.lib; { + description = "A first-principles materials simulation code using DFT"; + longDescription = '' + SIESTA is both a method and its computer program + implementation, to perform efficient electronic structure + calculations and ab initio molecular dynamics simulations of + molecules and solids. SIESTA's efficiency stems from the use + of strictly localized basis sets and from the implementation + of linear-scaling algorithms which can be applied to suitable + systems. A very important feature of the code is that its + accuracy and cost can be tuned in a wide range, from quick + exploratory calculations to highly accurate simulations + matching the quality of other approaches, such as plane-wave + and all-electron methods. + ''; + homepage = https://www.quantum-espresso.org/; + license = licenses.gpl2; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix index c0048740193f..e4f0cb8d0b1a 100644 --- a/pkgs/applications/science/electronics/gtkwave/default.nix +++ b/pkgs/applications/science/electronics/gtkwave/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "gtkwave-${version}"; - version = "3.3.93"; + version = "3.3.94"; src = fetchurl { url = "mirror://sourceforge/gtkwave/${name}.tar.gz"; - sha256 = "0a92zlwvshp75k7cv11rc4ab11fzsy0a5qfvxkh0bjvrq1k946ys"; + sha256 = "1v14sdd4lykly6szal6ky79b0s5pv6f1xifk5mkqkg5bkpjq71fg"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index 3e783d2e177c..c92da3eeb292 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -36,8 +36,7 @@ stdenv.mkDerivation rec { ++ optional (ngspiceSupport) "-DKICAD_SPICE=ON"; nativeBuildInputs = [ - # https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html - (cmake.override {majorVersion = "3.10";}) + cmake doxygen pkgconfig wrapGAppsHook diff --git a/pkgs/applications/science/electronics/kicad/unstable.nix b/pkgs/applications/science/electronics/kicad/unstable.nix index e43fd59e0431..a9a4c32a0b45 100644 --- a/pkgs/applications/science/electronics/kicad/unstable.nix +++ b/pkgs/applications/science/electronics/kicad/unstable.nix @@ -38,8 +38,7 @@ stdenv.mkDerivation rec { "-DCMAKE_CXX_FLAGS=-I${wxPython}/include/wx-3.0" ]; - # https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html - nativeBuildInputs = [ (cmake.override {majorVersion = "3.10";}) doxygen pkgconfig ]; + nativeBuildInputs = [ cmake doxygen pkgconfig ]; buildInputs = [ libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs cairo curl openssl boost diff --git a/pkgs/applications/science/geometry/drgeo/default.nix b/pkgs/applications/science/geometry/drgeo/default.nix index 8db1beedebbb..e233b91bbc91 100644 --- a/pkgs/applications/science/geometry/drgeo/default.nix +++ b/pkgs/applications/science/geometry/drgeo/default.nix @@ -20,8 +20,10 @@ stdenv.mkDerivation rec { cp drgeo.desktop.in drgeo.desktop ''; - meta = { + meta = with stdenv.lib; { description = "Interactive geometry program"; - platforms = stdenv.lib.platforms.linux; + homepage = https://sourceforge.net/projects/ofset; + license = licenses.gpl2; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index dbfec66789a3..0ede4230aa6d 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -24,6 +24,7 @@ let "8.7.2" = "0a0657xby8wdq4aqb2xsxp3n7pmc2w4yxjmrb2l4kccs1aqvaj4w"; "8.8.0" = "13a4fka22hdxsjk11mgjb9ffzplfxyxp1sg5v1c8nk1grxlscgw8"; "8.8.1" = "1hlf58gwazywbmfa48219amid38vqdl94yz21i11b4map6jfwhbk"; + "8.8.2" = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd"; }."${version}"; coq-version = builtins.substring 0 3 version; camlp5 = ocamlPackages.camlp5_strict; diff --git a/pkgs/applications/science/logic/prooftree/default.nix b/pkgs/applications/science/logic/prooftree/default.nix index 01dfc35f6e0d..2d5fcfd2d261 100644 --- a/pkgs/applications/science/logic/prooftree/default.nix +++ b/pkgs/applications/science/logic/prooftree/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (rec { dontAddPrefix = true; configureFlags = [ "--prefix" "$(out)" ]; - meta = { + meta = with stdenv.lib; { description = "A program for proof-tree visualization"; longDescription = '' Prooftree is a program for proof-tree visualization during interactive @@ -35,7 +35,8 @@ stdenv.mkDerivation (rec { shift-click). ''; homepage = http://askra.de/software/prooftree; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.jwiegley ]; + platforms = platforms.unix; + maintainers = [ maintainers.jwiegley ]; + license = licenses.gpl3; }; }) diff --git a/pkgs/applications/science/logic/tamarin-prover/default.nix b/pkgs/applications/science/logic/tamarin-prover/default.nix index 4efc384ed227..9056eab71ea3 100644 --- a/pkgs/applications/science/logic/tamarin-prover/default.nix +++ b/pkgs/applications/science/logic/tamarin-prover/default.nix @@ -31,7 +31,8 @@ let ''; tamarin-prover-utils = mkDerivation (common "tamarin-prover-utils" (src + "/lib/utils") // { - patchPhase = replaceSymlinks; + postPatch = replaceSymlinks; + patches = [ ./ghc-8.4-support-utils.patch ]; libraryHaskellDepends = with haskellPackages; [ base base64-bytestring binary blaze-builder bytestring containers deepseq dlist fclabels mtl pretty safe SHA syb time transformers @@ -39,7 +40,8 @@ let }); tamarin-prover-term = mkDerivation (common "tamarin-prover-term" (src + "/lib/term") // { - patchPhase = replaceSymlinks; + postPatch = replaceSymlinks; + patches = [ ./ghc-8.4-support-term.patch ]; libraryHaskellDepends = (with haskellPackages; [ attoparsec base binary bytestring containers deepseq dlist HUnit mtl process safe @@ -47,7 +49,8 @@ let }); tamarin-prover-theory = mkDerivation (common "tamarin-prover-theory" (src + "/lib/theory") // { - patchPhase = replaceSymlinks; + postPatch = replaceSymlinks; + patches = [ ./ghc-8.4-support-theory.patch ]; doHaddock = false; # broken libraryHaskellDepends = (with haskellPackages; [ aeson aeson-pretty base binary bytestring containers deepseq dlist diff --git a/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-term.patch b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-term.patch new file mode 100644 index 000000000000..f93919faf54e --- /dev/null +++ b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-term.patch @@ -0,0 +1,109 @@ +From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001 +From: Felix Yan <felixonmars@archlinux.org> +Date: Fri, 18 May 2018 16:24:41 +0800 +Subject: [PATCH] GHC 8.4 support + +--- + src/Term/Maude/Signature.hs | 8 ++-- + src/Term/Rewriting/Definitions.hs | 23 ++++++---- + src/Term/Unification.hs | 4 +- + 11 files changed, 79 insertions(+), 48 deletions(-) + +diff --git a/src/Term/Maude/Signature.hs b/src/Term/Maude/Signature.hs +index 98c25d9f..1a4ce82f 100644 +--- a/src/Term/Maude/Signature.hs ++++ b/src/Term/Maude/Signature.hs +@@ -104,9 +104,9 @@ maudeSig msig@(MaudeSig {enableDH,enableBP,enableMSet,enableXor,enableDiff=_,stF + `S.union` dhReducibleFunSig `S.union` bpReducibleFunSig `S.union` xorReducibleFunSig + + -- | A monoid instance to combine maude signatures. +-instance Monoid MaudeSig where +- (MaudeSig dh1 bp1 mset1 xor1 diff1 stFunSyms1 stRules1 _ _) `mappend` +- (MaudeSig dh2 bp2 mset2 xor2 diff2 stFunSyms2 stRules2 _ _) = ++instance Semigroup MaudeSig where ++ MaudeSig dh1 bp1 mset1 xor1 diff1 stFunSyms1 stRules1 _ _ <> ++ MaudeSig dh2 bp2 mset2 xor2 diff2 stFunSyms2 stRules2 _ _ = + maudeSig (mempty {enableDH=dh1||dh2 + ,enableBP=bp1||bp2 + ,enableMSet=mset1||mset2 +@@ -114,6 +114,8 @@ instance Monoid MaudeSig where + ,enableDiff=diff1||diff2 + ,stFunSyms=S.union stFunSyms1 stFunSyms2 + ,stRules=S.union stRules1 stRules2}) ++ ++instance Monoid MaudeSig where + mempty = MaudeSig False False False False False S.empty S.empty S.empty S.empty + + -- | Non-AC function symbols. +diff --git a/src/Term/Rewriting/Definitions.hs b/src/Term/Rewriting/Definitions.hs +index bd942b6a..18562e4e 100644 +--- a/src/Term/Rewriting/Definitions.hs ++++ b/src/Term/Rewriting/Definitions.hs +@@ -44,10 +44,12 @@ evalEqual (Equal l r) = l == r + instance Functor Equal where + fmap f (Equal lhs rhs) = Equal (f lhs) (f rhs) + ++instance Semigroup a => Semigroup (Equal a) where ++ (Equal l1 r1) <> (Equal l2 r2) = ++ Equal (l1 <> l2) (r1 <> r2) ++ + instance Monoid a => Monoid (Equal a) where + mempty = Equal mempty mempty +- (Equal l1 r1) `mappend` (Equal l2 r2) = +- Equal (l1 `mappend` l2) (r1 `mappend` r2) + + instance Foldable Equal where + foldMap f (Equal l r) = f l `mappend` f r +@@ -104,14 +106,15 @@ instance Functor Match where + fmap _ NoMatch = NoMatch + fmap f (DelayedMatches ms) = DelayedMatches (fmap (f *** f) ms) + ++instance Semigroup (Match a) where ++ NoMatch <> _ = NoMatch ++ _ <> NoMatch = NoMatch ++ DelayedMatches ms1 <> DelayedMatches ms2 = ++ DelayedMatches (ms1 <> ms2) ++ + instance Monoid (Match a) where + mempty = DelayedMatches [] + +- NoMatch `mappend` _ = NoMatch +- _ `mappend` NoMatch = NoMatch +- DelayedMatches ms1 `mappend` DelayedMatches ms2 = +- DelayedMatches (ms1 `mappend` ms2) +- + + instance Foldable Match where + foldMap _ NoMatch = mempty +@@ -136,10 +139,12 @@ data RRule a = RRule a a + instance Functor RRule where + fmap f (RRule lhs rhs) = RRule (f lhs) (f rhs) + ++instance Monoid a => Semigroup (RRule a) where ++ (RRule l1 r1) <> (RRule l2 r2) = ++ RRule (l1 <> l2) (r1 <> r2) ++ + instance Monoid a => Monoid (RRule a) where + mempty = RRule mempty mempty +- (RRule l1 r1) `mappend` (RRule l2 r2) = +- RRule (l1 `mappend` l2) (r1 `mappend` r2) + + instance Foldable RRule where + foldMap f (RRule l r) = f l `mappend` f r +diff --git a/src/Term/Unification.hs b/src/Term/Unification.hs +index e1de0163..7ce6bb41 100644 +--- a/src/Term/Unification.hs ++++ b/src/Term/Unification.hs +@@ -265,9 +265,11 @@ unifyRaw l0 r0 = do + + data MatchFailure = NoMatcher | ACProblem + ++instance Semigroup MatchFailure where ++ _ <> _ = NoMatcher ++ + instance Monoid MatchFailure where + mempty = NoMatcher +- mappend _ _ = NoMatcher + + -- | Ensure that the computed substitution @sigma@ satisfies + -- @t ==_AC apply sigma p@ after the delayed equations are solved. diff --git a/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-theory.patch b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-theory.patch new file mode 100644 index 000000000000..f7393e37f1b2 --- /dev/null +++ b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-theory.patch @@ -0,0 +1,130 @@ +From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001 +From: Felix Yan <felixonmars@archlinux.org> +Date: Fri, 18 May 2018 16:24:41 +0800 +Subject: [PATCH] GHC 8.4 support + +--- + src/Theory/Proof.hs | 43 +++++++++++-------- + 11 files changed, 79 insertions(+), 48 deletions(-) + +diff --git a/src/Theory/Constraint/Solver/Reduction.hs b/src/Theory/Constraint/Solver/Reduction.hs +index ddbc965a..6daadd0d 100644 +--- a/src/Theory/Constraint/Solver/Reduction.hs ++++ b/src/Theory/Constraint/Solver/Reduction.hs +@@ -139,13 +139,14 @@ execReduction m ctxt se fs = + data ChangeIndicator = Unchanged | Changed + deriving( Eq, Ord, Show ) + ++instance Semigroup ChangeIndicator where ++ Changed <> _ = Changed ++ _ <> Changed = Changed ++ Unchanged <> Unchanged = Unchanged ++ + instance Monoid ChangeIndicator where + mempty = Unchanged + +- Changed `mappend` _ = Changed +- _ `mappend` Changed = Changed +- Unchanged `mappend` Unchanged = Unchanged +- + -- | Return 'True' iff there was a change. + wasChanged :: ChangeIndicator -> Bool + wasChanged Changed = True +diff --git a/src/Theory/Constraint/System/Guarded.hs b/src/Theory/Constraint/System/Guarded.hs +index f98fc7c2..2aac8ce2 100644 +--- a/src/Theory/Constraint/System/Guarded.hs ++++ b/src/Theory/Constraint/System/Guarded.hs +@@ -435,7 +435,7 @@ gall ss atos gf = GGuarded All ss atos gf + + -- | Local newtype to avoid orphan instance. + newtype ErrorDoc d = ErrorDoc { unErrorDoc :: d } +- deriving( Monoid, NFData, Document, HighlightDocument ) ++ deriving( Monoid, Semigroup, NFData, Document, HighlightDocument ) + + -- | @formulaToGuarded fm@ returns a guarded formula @gf@ that is + -- equivalent to @fm@ under the assumption that this is possible. +diff --git a/src/Theory/Proof.hs b/src/Theory/Proof.hs +index 74fb77b1..7971b9fc 100644 +--- a/src/Theory/Proof.hs ++++ b/src/Theory/Proof.hs +@@ -388,17 +388,19 @@ data ProofStatus = + | TraceFound -- ^ There is an annotated solved step + deriving ( Show, Generic, NFData, Binary ) + ++instance Semigroup ProofStatus where ++ TraceFound <> _ = TraceFound ++ _ <> TraceFound = TraceFound ++ IncompleteProof <> _ = IncompleteProof ++ _ <> IncompleteProof = IncompleteProof ++ _ <> CompleteProof = CompleteProof ++ CompleteProof <> _ = CompleteProof ++ UndeterminedProof <> UndeterminedProof = UndeterminedProof ++ ++ + instance Monoid ProofStatus where + mempty = CompleteProof + +- mappend TraceFound _ = TraceFound +- mappend _ TraceFound = TraceFound +- mappend IncompleteProof _ = IncompleteProof +- mappend _ IncompleteProof = IncompleteProof +- mappend _ CompleteProof = CompleteProof +- mappend CompleteProof _ = CompleteProof +- mappend UndeterminedProof UndeterminedProof = UndeterminedProof +- + -- | The status of a 'ProofStep'. + proofStepStatus :: ProofStep (Maybe a) -> ProofStatus + proofStepStatus (ProofStep _ Nothing ) = UndeterminedProof +@@ -560,10 +562,12 @@ newtype Prover = Prover + -> Maybe IncrementalProof -- resulting proof + } + ++instance Semigroup Prover where ++ p1 <> p2 = Prover $ \ctxt d se -> ++ runProver p1 ctxt d se >=> runProver p2 ctxt d se ++ + instance Monoid Prover where + mempty = Prover $ \_ _ _ -> Just +- p1 `mappend` p2 = Prover $ \ctxt d se -> +- runProver p1 ctxt d se >=> runProver p2 ctxt d se + + -- | Provers whose sequencing is handled via the 'Monoid' instance. + -- +@@ -579,10 +583,12 @@ newtype DiffProver = DiffProver + -> Maybe IncrementalDiffProof -- resulting proof + } + ++instance Semigroup DiffProver where ++ p1 <> p2 = DiffProver $ \ctxt d se -> ++ runDiffProver p1 ctxt d se >=> runDiffProver p2 ctxt d se ++ + instance Monoid DiffProver where + mempty = DiffProver $ \_ _ _ -> Just +- p1 `mappend` p2 = DiffProver $ \ctxt d se -> +- runDiffProver p1 ctxt d se >=> runDiffProver p2 ctxt d se + + -- | Map the proof generated by the prover. + mapProverProof :: (IncrementalProof -> IncrementalProof) -> Prover -> Prover +@@ -784,15 +790,16 @@ runAutoDiffProver (AutoProver heuristic bound cut) = + -- | The result of one pass of iterative deepening. + data IterDeepRes = NoSolution | MaybeNoSolution | Solution ProofPath + ++instance Semigroup IterDeepRes where ++ x@(Solution _) <> _ = x ++ _ <> y@(Solution _) = y ++ MaybeNoSolution <> _ = MaybeNoSolution ++ _ <> MaybeNoSolution = MaybeNoSolution ++ NoSolution <> NoSolution = NoSolution ++ + instance Monoid IterDeepRes where + mempty = NoSolution + +- x@(Solution _) `mappend` _ = x +- _ `mappend` y@(Solution _) = y +- MaybeNoSolution `mappend` _ = MaybeNoSolution +- _ `mappend` MaybeNoSolution = MaybeNoSolution +- NoSolution `mappend` NoSolution = NoSolution +- + -- | @cutOnSolvedDFS prf@ removes all other cases if an attack is found. The + -- attack search is performed using a parallel DFS traversal with iterative + -- deepening. diff --git a/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-utils.patch b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-utils.patch new file mode 100644 index 000000000000..d6cd6d73f99e --- /dev/null +++ b/pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-utils.patch @@ -0,0 +1,140 @@ +From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001 +From: Felix Yan <felixonmars@archlinux.org> +Date: Fri, 18 May 2018 16:24:41 +0800 +Subject: [PATCH] GHC 8.4 support + +--- + src/Extension/Data/Bounded.hs | 10 ++++- + src/Extension/Data/Monoid.hs | 14 +++--- + src/Logic/Connectives.hs | 4 +- + src/Text/PrettyPrint/Class.hs | 4 +- + src/Text/PrettyPrint/Html.hs | 6 ++- + 11 files changed, 79 insertions(+), 48 deletions(-) + + +diff --git a/src/Extension/Data/Bounded.hs b/src/Extension/Data/Bounded.hs +index 5f166006..f416a44c 100644 +--- a/src/Extension/Data/Bounded.hs ++++ b/src/Extension/Data/Bounded.hs +@@ -11,19 +11,25 @@ module Extension.Data.Bounded ( + ) where + + -- import Data.Monoid ++import Data.Semigroup + + -- | A newtype wrapper for a monoid of the maximum of a bounded type. + newtype BoundedMax a = BoundedMax {getBoundedMax :: a} + deriving( Eq, Ord, Show ) + ++instance (Ord a, Bounded a) => Semigroup (BoundedMax a) where ++ BoundedMax x <> BoundedMax y = BoundedMax (max x y) ++ + instance (Ord a, Bounded a) => Monoid (BoundedMax a) where + mempty = BoundedMax minBound +- (BoundedMax x) `mappend` (BoundedMax y) = BoundedMax (max x y) ++ mappend = (<>) + + -- | A newtype wrapper for a monoid of the minimum of a bounded type. + newtype BoundedMin a = BoundedMin {getBoundedMin :: a} + deriving( Eq, Ord, Show ) + ++instance (Ord a, Bounded a) => Semigroup (BoundedMin a) where ++ BoundedMin x <> BoundedMin y = BoundedMin (min x y) ++ + instance (Ord a, Bounded a) => Monoid (BoundedMin a) where + mempty = BoundedMin maxBound +- (BoundedMin x) `mappend` (BoundedMin y) = BoundedMin (min x y) +\ No newline at end of file +diff --git a/src/Extension/Data/Monoid.hs b/src/Extension/Data/Monoid.hs +index 83655c34..9ce2f91b 100644 +--- a/src/Extension/Data/Monoid.hs ++++ b/src/Extension/Data/Monoid.hs +@@ -18,6 +18,7 @@ module Extension.Data.Monoid ( + ) where + + import Data.Monoid ++import Data.Semigroup + + #if __GLASGOW_HASKELL__ < 704 + +@@ -38,10 +39,13 @@ newtype MinMax a = MinMax { getMinMax :: Maybe (a, a) } + minMaxSingleton :: a -> MinMax a + minMaxSingleton x = MinMax (Just (x, x)) + ++instance Ord a => Semigroup (MinMax a) where ++ MinMax Nothing <> y = y ++ x <> MinMax Nothing = x ++ MinMax (Just (xMin, xMax)) <> MinMax (Just (yMin, yMax)) = ++ MinMax (Just (min xMin yMin, max xMax yMax)) ++ ++ + instance Ord a => Monoid (MinMax a) where + mempty = MinMax Nothing +- +- MinMax Nothing `mappend` y = y +- x `mappend` MinMax Nothing = x +- MinMax (Just (xMin, xMax)) `mappend` MinMax (Just (yMin, yMax)) = +- MinMax (Just (min xMin yMin, max xMax yMax)) ++ mappend = (<>) +diff --git a/src/Logic/Connectives.hs b/src/Logic/Connectives.hs +index 2e441172..7206cc2c 100644 +--- a/src/Logic/Connectives.hs ++++ b/src/Logic/Connectives.hs +@@ -23,12 +23,12 @@ import Control.DeepSeq + + -- | A conjunction of atoms of type a. + newtype Conj a = Conj { getConj :: [a] } +- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary, ++ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary, + Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData) + + -- | A disjunction of atoms of type a. + newtype Disj a = Disj { getDisj :: [a] } +- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary, ++ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary, + Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData) + + instance MonadDisj Disj where +diff --git a/src/Text/PrettyPrint/Class.hs b/src/Text/PrettyPrint/Class.hs +index f5eb42fe..13be6515 100644 +--- a/src/Text/PrettyPrint/Class.hs ++++ b/src/Text/PrettyPrint/Class.hs +@@ -187,9 +187,11 @@ instance Document Doc where + nest i (Doc d) = Doc $ P.nest i d + caseEmptyDoc yes no (Doc d) = if P.isEmpty d then yes else no + ++instance Semigroup Doc where ++ Doc d1 <> Doc d2 = Doc $ (P.<>) d1 d2 ++ + instance Monoid Doc where + mempty = Doc $ P.empty +- mappend (Doc d1) (Doc d2) = Doc $ (P.<>) d1 d2 + + ------------------------------------------------------------------------------ + -- Additional combinators +diff --git a/src/Text/PrettyPrint/Html.hs b/src/Text/PrettyPrint/Html.hs +index 3de5e307..10103eb7 100644 +--- a/src/Text/PrettyPrint/Html.hs ++++ b/src/Text/PrettyPrint/Html.hs +@@ -90,7 +90,7 @@ attribute (key,value) = " " ++ key ++ "=\"" ++ escapeHtmlEntities value ++ "\"" + + -- | A 'Document' transformer that adds proper HTML escaping. + newtype HtmlDoc d = HtmlDoc { getHtmlDoc :: d } +- deriving( Monoid ) ++ deriving( Monoid, Semigroup ) + + -- | Wrap a document such that HTML markup can be added without disturbing the + -- layout. +@@ -182,9 +182,11 @@ getNoHtmlDoc = runIdentity . unNoHtmlDoc + instance NFData d => NFData (NoHtmlDoc d) where + rnf = rnf . getNoHtmlDoc + ++instance Semigroup d => Semigroup (NoHtmlDoc d) where ++ (<>) = liftA2 (<>) ++ + instance Monoid d => Monoid (NoHtmlDoc d) where + mempty = pure mempty +- mappend = liftA2 mappend + + instance Document d => Document (NoHtmlDoc d) where + char = pure . char diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix index 342d91cf5825..f1116a27c0be 100644 --- a/pkgs/applications/science/logic/tlaplus/toolbox.nix +++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix @@ -44,7 +44,7 @@ in stdenv.mkDerivation { --run "set -x; cd $out/toolbox" \ --add-flags "-data ~/.tla-toolbox" \ --prefix PATH : "${jre}/bin" \ - --prefix LD_LIBRARY_PATH : "${swt}/lib:${gtk}/lib:${libXtst}/lib:${glib}/lib" + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ swt gtk libXtst glib ]}" echo -e "\nCreating TLA Toolbox icons..." pushd "$src" diff --git a/pkgs/applications/science/logic/tptp/default.nix b/pkgs/applications/science/logic/tptp/default.nix index a1d613e6295e..f3c4f22eae36 100644 --- a/pkgs/applications/science/logic/tptp/default.nix +++ b/pkgs/applications/science/logic/tptp/default.nix @@ -12,7 +12,8 @@ stdenv.mkDerivation rec { sha256 = "0slqbqv4y43wz6wnh72s4n540ssapah0d12mndi0c7xr04kf2v2d"; }; - buildInputs = [ tcsh yap perl patchelf ]; + nativeBuildInputs = [ patchelf ]; + buildInputs = [ tcsh yap perl ]; installPhase = '' sharedir=$out/share/tptp diff --git a/pkgs/applications/science/math/almonds/default.nix b/pkgs/applications/science/math/almonds/default.nix index 96613f4e38a6..b5d9632c551d 100644 --- a/pkgs/applications/science/math/almonds/default.nix +++ b/pkgs/applications/science/math/almonds/default.nix @@ -20,8 +20,7 @@ with python3.pkgs; buildPythonApplication rec { meta = with stdenv.lib; { description = "Terminal Mandelbrot fractal viewer"; homepage = https://github.com/Tenchi2xh/Almonds; - # No license has been specified - license = licenses.unfree; + license = licenses.mit; maintainers = with maintainers; [ infinisil ]; }; } diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 7bc8729c3fe5..7973fa8b3efb 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, cmake, blas, liblapack, gfortran, gmm, fltk, libjpeg , zlib, libGLU_combined, libGLU, xorg }: -let version = "4.0.0"; in +let version = "4.0.1"; in stdenv.mkDerivation { name = "gmsh-${version}"; src = fetchurl { url = "http://gmsh.info/src/gmsh-${version}-source.tgz"; - sha256 = "0pqm0ippj0j07919hld3f3rgq0p1x4j32fxb2m1nyp226zx8l37v"; + sha256 = "0s9pay32kci03qx3dlpf9h2n3hihf8zpidjnn8p9vmhnn0vav7rz"; }; # The original CMakeLists tries to use some version of the Lapack lib diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix index a3043bcf6952..990d3f1a5d59 100644 --- a/pkgs/applications/science/math/mxnet/default.nix +++ b/pkgs/applications/science/math/mxnet/default.nix @@ -34,11 +34,14 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \ --replace "/bin/bash" "${bash}/bin/bash" + + # Build against the system version of OpenMP. + # https://github.com/apache/incubator-mxnet/pull/12160 + rm -rf 3rdparty/openmp ''; - installPhase = '' - install -Dm755 libmxnet.so $out/lib/libmxnet.so - cp -r ../include $out + postInstall = '' + rm "$out"/lib/*.a ''; enableParallelBuilding = true; diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix index 1a059aeb1670..9bbb695a331b 100644 --- a/pkgs/applications/science/math/pynac/default.nix +++ b/pkgs/applications/science/math/pynac/default.nix @@ -41,6 +41,7 @@ stdenv.mkDerivation rec { of the full GiNaC, and it is *only* meant to be used as a Python library. ''; homepage = http://pynac.org; + license = licenses.gpl3; maintainers = with maintainers; [ timokau ]; platforms = platforms.linux; }; diff --git a/pkgs/applications/science/math/ripser/default.nix b/pkgs/applications/science/math/ripser/default.nix index 21948a279d07..5e0b7fc300ba 100644 --- a/pkgs/applications/science/math/ripser/default.nix +++ b/pkgs/applications/science/math/ripser/default.nix @@ -8,7 +8,8 @@ with stdenv.lib; -assert elem fileFormat ["lowerTriangularCsv" "upperTriangularCsv" "dipha"]; +assert assertOneOf "fileFormat" fileFormat + ["lowerTriangularCsv" "upperTriangularCsv" "dipha"]; assert useGoogleHashmap -> sparsehash != null; let diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index 08e3a752b8b6..7e62f0cf75ee 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -21,7 +21,7 @@ let sagelib = self.callPackage ./sagelib.nix { inherit flint ecl arb; - inherit sage-src pynac singular; + inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular; linbox = nixpkgs.linbox.override { withSage = true; }; }; @@ -41,13 +41,13 @@ let }; sage-env = self.callPackage ./sage-env.nix { - inherit sage-src python rWrapper ecl singular palp flint pynac pythonEnv; + inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv; pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig }; sage-with-env = self.callPackage ./sage-with-env.nix { inherit pythonEnv; - inherit sage-src pynac singular; + inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular; pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig three = nodePackages_8_x.three; }; @@ -60,6 +60,10 @@ let }; }; + openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; }; + openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; }; + openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; }; + sage-src = callPackage ./sage-src.nix {}; pythonRuntimeDeps = with python.pkgs; [ diff --git a/pkgs/applications/science/math/sage/openblas-pc.nix b/pkgs/applications/science/math/sage/openblas-pc.nix new file mode 100644 index 000000000000..f4669a6557e9 --- /dev/null +++ b/pkgs/applications/science/math/sage/openblas-pc.nix @@ -0,0 +1,17 @@ +{ openblasCompat +, writeTextFile +, name +}: + +writeTextFile { + name = "openblas-${name}-pc-${openblasCompat.version}"; + destination = "/lib/pkgconfig/${name}.pc"; + text = '' + Name: ${name} + Version: ${openblasCompat.version} + + Description: ${name} for SageMath, provided by the OpenBLAS package. + Cflags: -I${openblasCompat}/include + Libs: -L${openblasCompat}/lib -lopenblas + ''; +} diff --git a/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch b/pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch index 5927bc116096..9e855ba4ad94 100644 --- a/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch +++ b/pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch @@ -1,5 +1,5 @@ diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst -index 79b4205fd3..9a89bd2136 100644 +index 2347a1190d..f5b0fe71a4 100644 --- a/src/doc/en/faq/faq-usage.rst +++ b/src/doc/en/faq/faq-usage.rst @@ -338,7 +338,7 @@ ints. For example:: @@ -174,7 +174,7 @@ index 5b89cd75ee..e50b2ea5d4 100644 This creates a random 5x5 matrix ``A``, and solves `Ax=b` where ``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg` diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx -index df85cce43d..34ea164be0 100644 +index 60f37f7557..4ac3dedf1d 100644 --- a/src/sage/calculus/riemann.pyx +++ b/src/sage/calculus/riemann.pyx @@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values, @@ -248,7 +248,7 @@ index df85cce43d..34ea164be0 100644 TESTS:: diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py -index 61b1003002..4baee9cbbd 100644 +index 0a9bd61267..d2193cc2d6 100644 --- a/src/sage/combinat/fully_packed_loop.py +++ b/src/sage/combinat/fully_packed_loop.py @@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False): @@ -269,10 +269,10 @@ index 61b1003002..4baee9cbbd 100644 ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue'] """ diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx -index c37700d14e..49b7298d0b 100644 +index 28779365df..3ab0282861 100644 --- a/src/sage/finance/time_series.pyx +++ b/src/sage/finance/time_series.pyx -@@ -109,8 +109,8 @@ cdef class TimeSeries: +@@ -111,8 +111,8 @@ cdef class TimeSeries: sage: import numpy sage: v = numpy.array([[1,2], [3,4]], dtype=float); v @@ -283,7 +283,7 @@ index c37700d14e..49b7298d0b 100644 sage: finance.TimeSeries(v) [1.0000, 2.0000, 3.0000, 4.0000] sage: finance.TimeSeries(v[:,0]) -@@ -2098,14 +2098,14 @@ cdef class TimeSeries: +@@ -2100,14 +2100,14 @@ cdef class TimeSeries: sage: w[0] = 20 sage: w @@ -301,7 +301,7 @@ index c37700d14e..49b7298d0b 100644 sage: v [20.0000, -3.0000, 4.5000, -2.0000] diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py -index 931a4b41e4..bf33fc483d 100644 +index aff552f450..7a6df931e7 100644 --- a/src/sage/functions/hyperbolic.py +++ b/src/sage/functions/hyperbolic.py @@ -214,7 +214,7 @@ class Function_coth(GinacFunction): @@ -341,7 +341,7 @@ index 931a4b41e4..bf33fc483d 100644 return arctanh(1.0 / x) diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py -index 017c85a96f..33fbb499c5 100644 +index ed6365bef4..99b8b04dad 100644 --- a/src/sage/functions/orthogonal_polys.py +++ b/src/sage/functions/orthogonal_polys.py @@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction): @@ -379,10 +379,10 @@ index 017c85a96f..33fbb499c5 100644 array([ 0.2 , -0.96]) """ diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py -index 679384c907..d63b295a4c 100644 +index 1883daa3e6..9885222817 100644 --- a/src/sage/functions/other.py +++ b/src/sage/functions/other.py -@@ -390,7 +390,7 @@ class Function_ceil(BuiltinFunction): +@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction): sage: import numpy sage: a = numpy.linspace(0,2,6) sage: ceil(a) @@ -391,7 +391,7 @@ index 679384c907..d63b295a4c 100644 Test pickling:: -@@ -539,7 +539,7 @@ class Function_floor(BuiltinFunction): +@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction): sage: import numpy sage: a = numpy.linspace(0,2,6) sage: floor(a) @@ -400,7 +400,7 @@ index 679384c907..d63b295a4c 100644 sage: floor(x)._sympy_() floor(x) -@@ -840,7 +840,7 @@ def sqrt(x, *args, **kwds): +@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds): sage: import numpy sage: a = numpy.arange(2,5) sage: sqrt(a) @@ -409,11 +409,35 @@ index 679384c907..d63b295a4c 100644 """ if isinstance(x, float): return math.sqrt(x) +diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py +index 1e021de3fe..56635ca98f 100644 +--- a/src/sage/functions/spike_function.py ++++ b/src/sage/functions/spike_function.py +@@ -157,7 +157,7 @@ class SpikeFunction: + sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S + A spike function with spikes at [-3.0, -1.0, 2.0] + sage: P = S.plot_fft_abs(8) +- sage: p = P[0]; p.ydata ++ sage: p = P[0]; p.ydata # abs tol 1e-8 + [5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055] + """ + w = self.vector(samples = samples, xmin=xmin, xmax=xmax) +@@ -176,8 +176,8 @@ class SpikeFunction: + sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S + A spike function with spikes at [-3.0, -1.0, 2.0] + sage: P = S.plot_fft_arg(8) +- sage: p = P[0]; p.ydata +- [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...] ++ sage: p = P[0]; p.ydata # abs tol 1e-8 ++ [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477] + """ + w = self.vector(samples = samples, xmin=xmin, xmax=xmax) + xmin, xmax = self._ranges(xmin, xmax) diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py -index e7e7a311cd..e7ff78a9de 100644 +index 501e7ff6b6..5f760912f0 100644 --- a/src/sage/functions/trig.py +++ b/src/sage/functions/trig.py -@@ -731,7 +731,7 @@ class Function_arccot(GinacFunction): +@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arccot(a) @@ -422,7 +446,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return math.pi/2 - arctan(x) -@@ -787,7 +787,7 @@ class Function_arccsc(GinacFunction): +@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arccsc(a) @@ -431,7 +455,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return arcsin(1.0/x) -@@ -845,7 +845,7 @@ class Function_arcsec(GinacFunction): +@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arcsec(a) @@ -440,7 +464,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return arccos(1.0/x) -@@ -920,13 +920,13 @@ class Function_arctan2(GinacFunction): +@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction): sage: a = numpy.linspace(1, 3, 3) sage: b = numpy.linspace(3, 6, 3) sage: atan2(a, b) @@ -458,10 +482,10 @@ index e7e7a311cd..e7ff78a9de 100644 TESTS:: diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx -index 19a1d37df0..5780dfae1c 100644 +index 12136f1773..491bf22e62 100644 --- a/src/sage/matrix/constructor.pyx +++ b/src/sage/matrix/constructor.pyx -@@ -494,8 +494,8 @@ class MatrixFactory(object): +@@ -503,8 +503,8 @@ def matrix(*args, **kwds): [7 8 9] Full MatrixSpace of 3 by 3 dense matrices over Integer Ring sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n @@ -473,10 +497,31 @@ index 19a1d37df0..5780dfae1c 100644 [ 1 1/2] [1/3 1/4] diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx -index 48e0a8a97f..1be5d35b19 100644 +index 66e54a79a4..0498334f4b 100644 --- a/src/sage/matrix/matrix_double_dense.pyx +++ b/src/sage/matrix/matrix_double_dense.pyx -@@ -2546,7 +2546,7 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense): + [ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I] + [6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I] + sage: B.condition() ++ doctest:warning ++ ... ++ ComplexWarning: Casting complex values to real discards the imaginary part + 203.851798... + sage: B.condition(p='frob') + 203.851798... +@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense): + True + sage: B = A.change_ring(CDF) + sage: B.condition() +- Traceback (most recent call last): +- ... +- LinAlgError: Singular matrix ++ +Infinity + + Improper values of ``p`` are caught. :: + +@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense): sage: P.is_unitary(algorithm='orthonormal') Traceback (most recent call last): ... @@ -485,7 +530,7 @@ index 48e0a8a97f..1be5d35b19 100644 TESTS:: -@@ -3662,8 +3662,8 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense): [0.0 1.0 2.0] [3.0 4.0 5.0] sage: m.numpy() @@ -496,7 +541,7 @@ index 48e0a8a97f..1be5d35b19 100644 Alternatively, numpy automatically calls this function (via the magic :meth:`__array__` method) to convert Sage matrices -@@ -3674,16 +3674,16 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense): [0.0 1.0 2.0] [3.0 4.0 5.0] sage: numpy.array(m) @@ -518,10 +563,10 @@ index 48e0a8a97f..1be5d35b19 100644 dtype('complex128') diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py -index c698ba5e97..b743bab354 100644 +index ccbd208810..c3f9a65093 100644 --- a/src/sage/matrix/special.py +++ b/src/sage/matrix/special.py -@@ -705,7 +705,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): +@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): sage: import numpy sage: entries = numpy.array([1.2, 5.6]); entries @@ -530,7 +575,7 @@ index c698ba5e97..b743bab354 100644 sage: A = diagonal_matrix(3, entries); A [1.2 0.0 0.0] [0.0 5.6 0.0] -@@ -715,7 +715,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): +@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): sage: j = numpy.complex(0,1) sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries @@ -540,10 +585,10 @@ index c698ba5e97..b743bab354 100644 [2.0 + 1.0*I 0.0 0.0] [ 0.0 8.1 0.0] diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx -index 230f142117..2ab1c0ae68 100644 +index 37d92c1282..955d083b34 100644 --- a/src/sage/modules/free_module_element.pyx +++ b/src/sage/modules/free_module_element.pyx -@@ -982,7 +982,7 @@ cdef class FreeModuleElement(Vector): # abstract base class +@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector): # abstract base class sage: v.numpy() array([1, 2, 5/6], dtype=object) sage: v.numpy(dtype=float) @@ -552,7 +597,7 @@ index 230f142117..2ab1c0ae68 100644 sage: v.numpy(dtype=int) array([1, 2, 0]) sage: import numpy -@@ -993,7 +993,7 @@ cdef class FreeModuleElement(Vector): # abstract base class +@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class be more efficient but may have unintended consequences:: sage: v.numpy(dtype=None) @@ -596,22 +641,6 @@ index 39fc2970de..2badf98284 100644 """ if dtype is None or dtype is self._vector_numpy.dtype: from copy import copy -diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py -index 17b5ebb84b..92ce35c502 100644 ---- a/src/sage/numerical/optimize.py -+++ b/src/sage/numerical/optimize.py -@@ -486,9 +486,9 @@ def minimize_constrained(func,cons,x0,gradient=None,algorithm='default', **args) - else: - min = optimize.fmin_tnc(f, x0, approx_grad=True, bounds=cons, messages=0, **args)[0] - elif isinstance(cons[0], function_type) or isinstance(cons[0], Expression): -- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args) -+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args) - elif isinstance(cons, function_type) or isinstance(cons, Expression): -- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args) -+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args) - return vector(RDF, min) - - diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx index ad9693da62..758fb709b7 100644 --- a/src/sage/plot/complex_plot.pyx @@ -649,6 +678,76 @@ index ad9693da62..758fb709b7 100644 """ import numpy cdef unsigned int i, j, imax, jmax +diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py +index 5d28473731..fc4b2046c0 100644 +--- a/src/sage/plot/histogram.py ++++ b/src/sage/plot/histogram.py +@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive): + """ + import numpy as np + self.datalist=np.asarray(datalist,dtype=float) ++ if 'normed' in options: ++ from sage.misc.superseded import deprecation ++ deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.") + if 'linestyle' in options: + from sage.plot.misc import get_matplotlib_linestyle + options['linestyle'] = get_matplotlib_linestyle( + options['linestyle'], return_type='long') ++ if options.get('range', None): ++ # numpy.histogram performs type checks on "range" so this must be ++ # actual floats ++ options['range'] = [float(x) for x in options['range']] + GraphicPrimitive.__init__(self, options) + + def get_minmax_data(self): +@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive): + {'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0} + + TESTS:: +- + sage: h = histogram([10,3,5], normed=True)[0] +- sage: h.get_minmax_data() # rel tol 1e-15 +- {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0} ++ doctest:warning...: ++ DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead. ++ See https://trac.sagemath.org/25260 for details. ++ sage: h.get_minmax_data() ++ doctest:warning ...: ++ VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy. ++ {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0} + """ + import numpy + +@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive): + 'rwidth': 'The relative width of the bars as a fraction of the bin width', + 'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values. Negative values give a reversed direction of accumulation.', + 'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.', +- 'normed': 'Deprecated alias for density', ++ 'normed': 'Deprecated. Use density instead.', + 'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)', + 'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.', + 'stacked': '(True or False) If True, multiple data are stacked on top of each other.', +@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive): + subplot.hist(self.datalist.transpose(), **options) + + +-@options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black') ++@options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black') + def histogram(datalist, **options): + """ + Computes and draws the histogram for list(s) of numerical data. +@@ -231,8 +242,9 @@ def histogram(datalist, **options): + - ``linewidth`` -- (float) width of the lines defining the bars + - ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid' + or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.' +- - ``density`` -- (boolean - default: False) If True, the counts are +- normalized to form a probability density. ++ - ``density`` -- (boolean - default: False) If True, the result is the ++ value of the probability density function at the bin, normalized such ++ that the integral over the range is 1. + - ``range`` -- A list [min, max] which define the range of the + histogram. Values outside of this range are treated as outliers and + omitted from counts diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py index 23f5e61446..3b1b51d7cf 100644 --- a/src/sage/plot/line.py @@ -718,7 +817,7 @@ index f3da57c370..3806f4b32f 100644 TESTS: diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx -index f66cd898b9..35995886d5 100644 +index 1b119e323f..3290b00695 100644 --- a/src/sage/probability/probability_distribution.pyx +++ b/src/sage/probability/probability_distribution.pyx @@ -130,7 +130,17 @@ cdef class ProbabilityDistribution: @@ -741,10 +840,10 @@ index f66cd898b9..35995886d5 100644 import pylab l = [float(self.get_random_element()) for _ in range(num_samples)] diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx -index a0bfe080f5..7d95e7a1a8 100644 +index 12ca1b222b..9bad7dae0c 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx -@@ -1056,7 +1056,7 @@ cdef class Rational(sage.structure.element.FieldElement): +@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement): dtype('O') sage: numpy.array([1, 1/2, 3/4]) @@ -754,10 +853,10 @@ index a0bfe080f5..7d95e7a1a8 100644 if mpz_cmp_ui(mpq_denref(self.value), 1) == 0: if mpz_fits_slong_p(mpq_numref(self.value)): diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx -index 4c630867a4..64e2187f5b 100644 +index 9b90c8833e..1ce05b937d 100644 --- a/src/sage/rings/real_mpfr.pyx +++ b/src/sage/rings/real_mpfr.pyx -@@ -1438,7 +1438,7 @@ cdef class RealNumber(sage.structure.element.RingElement): +@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement): sage: import numpy sage: numpy.arange(10.0) @@ -767,10 +866,10 @@ index 4c630867a4..64e2187f5b 100644 dtype('float64') sage: numpy.array([1.000000000000000000000000000000000000]).dtype diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py -index 3d270ebf9d..1144f168e3 100644 +index de31fe9883..7a33ea6f5b 100644 --- a/src/sage/schemes/elliptic_curves/height.py +++ b/src/sage/schemes/elliptic_curves/height.py -@@ -1623,18 +1623,18 @@ class EllipticCurveCanonicalHeight: +@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight: even:: sage: H.wp_on_grid(v,4) @@ -798,10 +897,10 @@ index 3d270ebf9d..1144f168e3 100644 tau = self.tau(v) fk, err = self.fk_intervals(v, 15, CDF) diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx -index 2dcb0492b9..2b1a06385c 100644 +index 9da38002e8..d61e74bf82 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx -@@ -1135,7 +1135,7 @@ cdef class NumpyToSRMorphism(Morphism): +@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism): sage: cos(numpy.int('2')) cos(2) sage: numpy.cos(numpy.int('2')) diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix index 74c2e0aa0360..317eb6e16c49 100644 --- a/pkgs/applications/science/math/sage/sage-env.nix +++ b/pkgs/applications/science/math/sage/sage-env.nix @@ -37,7 +37,7 @@ , lcalc , rubiks , flintqs -, openblasCompat +, openblas-cblas-pc , flint , gmp , mpfr @@ -98,9 +98,9 @@ writeTextFile rec { export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [ # This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case # for it outside of the tests. However since singular and openblas are runtime dependencies anyways - # it doesn't really hurt to include. + # and openblas-cblas-pc is tiny, it doesn't really hurt to include. singular - openblasCompat + openblas-cblas-pc ]) }' export SAGE_ROOT='${sage-src}' diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 7fd49fe205cc..f74da33f4026 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -94,9 +94,20 @@ stdenv.mkDerivation rec { stripLen = 1; }) - # Only formatting changes. + (fetchpatch { + name = "matplotlib-2.2.2"; + url = "https://git.sagemath.org/sage.git/patch?id=0d6244ed53b71aba861ce3d683d33e542c0bf0b0"; + sha256 = "15x4cadxxlsdfh2sblgagqjj6ir13fgdzixxnwnvzln60saahb34"; + }) + + (fetchpatch { + name = "scipy-1.1.0"; + url = "https://git.sagemath.org/sage.git/patch?id=e0db968a51678b34ebd8d34906c7042900272378"; + sha256 = "0kq5zxqphhrmavrmg830wdr7hwp1bkzdqlf3jfqfr8r8xq12qwf7"; + }) + # https://trac.sagemath.org/ticket/25260 - ./patches/numpy-1.14.3.patch + ./patches/numpy-1.15.1.patch # https://trac.sagemath.org/ticket/25862 ./patches/eclib-20180710.patch diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix index 8ccf8b5a4938..63b9772b8231 100644 --- a/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/pkgs/applications/science/math/sage/sage-with-env.nix @@ -4,6 +4,9 @@ , sage-env , sage-src , openblasCompat +, openblas-blas-pc +, openblas-cblas-pc +, openblas-lapack-pc , pkg-config , three , singular @@ -29,6 +32,9 @@ let makeWrapper pkg-config openblasCompat # lots of segfaults with regular (64 bit) openblas + openblas-blas-pc + openblas-cblas-pc + openblas-lapack-pc singular three pynac diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix index c1dbcf38304e..abcefba5e260 100644 --- a/pkgs/applications/science/math/sage/sagelib.nix +++ b/pkgs/applications/science/math/sage/sagelib.nix @@ -3,6 +3,9 @@ , buildPythonPackage , arb , openblasCompat +, openblas-blas-pc +, openblas-cblas-pc +, openblas-lapack-pc , brial , cliquer , cypari2 @@ -56,7 +59,9 @@ buildPythonPackage rec { nativeBuildInputs = [ iml perl - openblasCompat + openblas-blas-pc + openblas-cblas-pc + openblas-lapack-pc jupyter_core ]; diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index e966e798ae6d..2ec1ded68a26 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -67,10 +67,11 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - meta = { + meta = with stdenv.lib; { homepage = https://root.cern.ch/; description = "A data analysis framework"; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ veprbl ]; + platforms = platforms.unix; + maintainers = [ maintainers.veprbl ]; + license = licenses.lgpl21; }; } diff --git a/pkgs/applications/science/misc/snakemake/default.nix b/pkgs/applications/science/misc/snakemake/default.nix index 6b0570814f2b..6f04d436877f 100644 --- a/pkgs/applications/science/misc/snakemake/default.nix +++ b/pkgs/applications/science/misc/snakemake/default.nix @@ -37,5 +37,6 @@ python.buildPythonPackage rec { workflows are essentially Python scripts extended by declarative code to define rules. Rules describe how to create output files from input files. ''; + maintainers = with maintainers; [ helkafen renatoGarcia ]; }; } diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index 295e726c679d..1caa84a69334 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation { - name = "gromacs-2018.2"; + name = "gromacs-2018.3"; src = fetchurl { - url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2018.2.tar.gz"; - sha256 = "0mvqsg2j4h529a0vvvgpa4cb3p8zan18zcdlmx1na2si1h9fipab"; + url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2018.3.tar.gz"; + sha256 = "14d219987h98mv5xgn2846snmslwax8z3cgp5b2njacp4j9a88s4"; }; buildInputs = [cmake fftw] |