diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science')
170 files changed, 2404 insertions, 1540 deletions
diff --git a/nixpkgs/pkgs/applications/science/astronomy/astrolabe-generator/default.nix b/nixpkgs/pkgs/applications/science/astronomy/astrolabe-generator/default.nix index cb3f3131ea14..4a6bdd9d1e9c 100644 --- a/nixpkgs/pkgs/applications/science/astronomy/astrolabe-generator/default.nix +++ b/nixpkgs/pkgs/applications/science/astronomy/astrolabe-generator/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { homepage = "https://www.astrolabeproject.com"; description = "A Java-based tool for generating EPS files for constructing astrolabes and related tools"; license = licenses.gpl3; - maintainers = [ maintainers.genesis ]; + maintainers = [ ]; platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix b/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix index 0b53e3e85ac3..c32d671cb05d 100644 --- a/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix +++ b/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix @@ -1,36 +1,48 @@ { - mkDerivation, lib, fetchgit, - extra-cmake-modules, + lib, mkDerivation, extra-cmake-modules, fetchurl, kconfig, kdoctools, kguiaddons, ki18n, kinit, kiconthemes, kio, - knewstuff, kplotting, kwidgetsaddons, kxmlgui, + knewstuff, kplotting, kwidgetsaddons, kxmlgui, knotifyconfig, - qtx11extras, qtwebsockets, + + qtx11extras, qtwebsockets, qtkeychain, libsecret, eigen, zlib, - cfitsio, indilib, xplanet + cfitsio, indilib, xplanet, libnova, libraw, gsl, wcslib, stellarsolver }: -mkDerivation { - name = "kstars"; - - src = fetchgit { - url = "https://anongit.kde.org/kstars.git"; - rev = "7acc527939280edd22823371dc4e22494c6c626a"; - sha256 = "1n1lgi7p3dj893fdnzjbnrha40p4apl0dy8zppcabxwrb1khb84v"; +mkDerivation rec { + pname = "kstars"; + version = "3.5.0"; + + src = fetchurl { + url = "mirror://kde/stable/kstars/kstars-${version}.tar.xz"; + sha256 = "0fpkm75abn0hhdhfyvpfl6n0fr7gvw63xhb4hvwdrglhkf2nxam1"; }; - + + patches = [ + # Patches ksutils.cpp to use nix store prefixes to find program binaries of + # indilib and xplanet dependencies. Without the patch, Ekos is unable to spawn + # indi servers for local telescope/camera control. + ./fs-fixes.patch + ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; buildInputs = [ kconfig kdoctools kguiaddons ki18n kinit kiconthemes kio - knewstuff kplotting kwidgetsaddons kxmlgui + knewstuff kplotting kwidgetsaddons kxmlgui knotifyconfig - qtx11extras qtwebsockets + qtx11extras qtwebsockets qtkeychain libsecret eigen zlib - cfitsio indilib xplanet + cfitsio indilib xplanet libnova libraw gsl wcslib stellarsolver + ]; + + cmakeFlags = [ + "-DINDI_NIX_ROOT=${indilib}" + "-DXPLANET_NIX_ROOT=${xplanet}" ]; meta = with lib; { @@ -43,6 +55,6 @@ mkDerivation { ''; license = licenses.gpl2; platforms = platforms.linux; - maintainers = with maintainers; [ timput ]; + maintainers = with maintainers; [ timput hjones2199 ]; }; } diff --git a/nixpkgs/pkgs/applications/science/astronomy/kstars/fs-fixes.patch b/nixpkgs/pkgs/applications/science/astronomy/kstars/fs-fixes.patch new file mode 100644 index 000000000000..b9bdfc0c5dea --- /dev/null +++ b/nixpkgs/pkgs/applications/science/astronomy/kstars/fs-fixes.patch @@ -0,0 +1,59 @@ +--- kstars-3.5.0/CMakeLists.txt.old 2020-11-24 12:36:37.967433937 -0600 ++++ kstars-3.5.0/CMakeLists.txt 2020-11-24 13:36:56.275263691 -0600 +@@ -5,6 +5,9 @@ + set (KSTARS_BUILD_RELEASE "Stable") + set (CMAKE_CXX_STANDARD 11) + ++add_definitions(-DINDI_NIX_ROOT=${INDI_NIX_ROOT}) ++add_definitions(-DXPLANET_NIX_ROOT=${XPLANET_NIX_ROOT}) ++ + # Build KStars Lite with -DBUILD_KSTARS_LITE=ON + option(BUILD_KSTARS_LITE "Build KStars Lite" OFF) + +--- kstars-3.5.0/kstars/auxiliary/ksutils.old.cpp 2020-11-24 12:22:14.397319680 -0600 ++++ kstars-3.5.0/kstars/auxiliary/ksutils.cpp 2020-11-24 13:32:22.946477798 -0600 +@@ -1081,6 +1081,10 @@ + // We support running within Snaps, Flatpaks, and AppImage + // The path should accomodate the differences between the different + // packaging solutions ++ #define STR_EXPAND(x) #x ++ #define STR(x) STR_EXPAND(x) ++ QString indi_prefix = QString(STR(INDI_NIX_ROOT)); ++ QString xplanet_prefix = QString(STR(XPLANET_NIX_ROOT)); + QString snap = QProcessEnvironment::systemEnvironment().value("SNAP"); + QString flat = QProcessEnvironment::systemEnvironment().value("FLATPAK_DEST"); + QString appimg = QProcessEnvironment::systemEnvironment().value("APPDIR"); +@@ -1110,21 +1114,21 @@ + #if defined(Q_OS_OSX) + return "/usr/local/bin/indiserver"; + #endif +- return prefix + "/bin/indiserver"; ++ return indi_prefix + "/bin/indiserver"; + } + else if (option == "INDIHubAgent") + { + #if defined(Q_OS_OSX) + return "/usr/local/bin/indihub-agent"; + #endif +- return prefix + "/bin/indihub-agent"; ++ return indi_prefix + "/bin/indihub-agent"; + } + else if (option == "indiDriversDir") + { + #if defined(Q_OS_OSX) + return "/usr/local/share/indi"; + #elif defined(Q_OS_LINUX) +- return prefix + "/share/indi"; ++ return indi_prefix + "/share/indi"; + #else + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, "indi", QStandardPaths::LocateDirectory); + #endif +@@ -1181,7 +1185,7 @@ + #if defined(Q_OS_OSX) + return "/usr/local/bin/xplanet"; + #endif +- return prefix + "/bin/xplanet"; ++ return xplanet_prefix + "/bin/xplanet"; + } + else if (option == "ASTAP") + { diff --git a/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix b/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix new file mode 100644 index 000000000000..98afba77c4f0 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, + wxGTK30-gtk3, curl, gettext, glib, indilib, libnova }: + +stdenv.mkDerivation rec { + pname = "phd2"; + version = "2.6.9dev1"; + + src = fetchFromGitHub { + owner = "OpenPHDGuiding"; + repo = "phd2"; + rev = "v${version}"; + sha256 = "1ih7m9lilh12xbhmwm9kkicaqy72mi3firl6df7m5x38n2zj3zm4"; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ gtk3 wxGTK30-gtk3 curl gettext glib indilib libnova ]; + + cmakeFlags = [ + "-DOPENSOURCE_ONLY=1" + ]; + + meta = with stdenv.lib; { + homepage = "https://openphdguiding.org/"; + description = "Telescope auto-guidance application"; + license = licenses.bsd3; + maintainers = with maintainers; [ hjones2199 ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix b/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix new file mode 100644 index 000000000000..7ae3e011973e --- /dev/null +++ b/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchFromGitLab, fetchFromGitHub, pkg-config, meson, ninja, + git, criterion, wrapGAppsHook, gtk3, libconfig, gnuplot, opencv, + fftwFloat, cfitsio, gsl, exiv2, curl, librtprocess, ffmpeg, + libraw, libtiff, libpng, libjpeg, libheif, ffms +}: + +stdenv.mkDerivation rec { + pname = "siril"; + version = "0.99.6"; + + src = fetchFromGitLab { + owner = "free-astro"; + repo = pname; + rev = version; + sha256 = "06vh8x45gv0gwlnqjwxglf12jmpdaxkiv5sixkqh20420wabx3ha"; + }; + + nativeBuildInputs = [ + meson ninja pkg-config git criterion wrapGAppsHook + ]; + + buildInputs = [ + gtk3 cfitsio gsl exiv2 gnuplot curl opencv fftwFloat librtprocess + libconfig libraw libtiff libpng libjpeg libheif ffms ffmpeg + ]; + + # Necessary because project uses default build dir for flatpaks/snaps + dontUseMesonConfigure = true; + + configureScript = '' + ${meson}/bin/meson --buildtype release nixbld . + ''; + + postConfigure = '' + cd nixbld + ''; + + meta = with stdenv.lib; { + homepage = "https://www.siril.org/"; + description = "Astronomical image processing tool"; + license = licenses.gpl3; + maintainers = with maintainers; [ hjones2199 ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix b/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix index 78a7f7421748..4c773208d560 100644 --- a/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub +{ stdenv, lib, mkDerivation, fetchFromGitHub , cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv , qtscript, qtserialport, qttools , qtmultimedia, qtlocation, qtbase, wrapQtAppsHook @@ -6,13 +6,13 @@ mkDerivation rec { pname = "stellarium"; - version = "0.20.2"; + version = "0.20.3"; src = fetchFromGitHub { owner = "Stellarium"; repo = "stellarium"; rev = "v${version}"; - sha256 = "0bpxv781chx5acjh9ni5l9dlnvn6jgkqylq09885g6j4gi3q56br"; + sha256 = "08abrshrzhdfcg3b2vzfmnq8fhzrasadg1ajs81kcw96yjc59vak"; }; nativeBuildInputs = [ cmake perl wrapQtAppsHook ]; @@ -22,12 +22,21 @@ mkDerivation rec { qtmultimedia qtlocation qtbase ]; + preConfigure = lib.optionalString stdenv.isDarwin '' + substituteInPlace CMakeLists.txt \ + --replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \ + 'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")' + ''; + + postFixup = lib.optionalString stdenv.isDarwin '' + wrapQtApp "$out"/Stellarium.app/Contents/MacOS/stellarium + ''; + meta = with lib; { description = "Free open-source planetarium"; homepage = "http://stellarium.org/"; license = licenses.gpl2; - - platforms = platforms.linux; # should be mesaPlatforms, but we don't have qt on darwin + platforms = platforms.unix; maintainers = with maintainers; [ peti ma27 ]; }; } diff --git a/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix index 7502a4ffd2ab..a9661ee2db78 100644 --- a/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "EZminc"; - name = "${pname}-unstable-2019-03-12"; + version = "unstable-2019-03-12"; src = fetchFromGitHub { owner = "BIC-MNI"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ itk4 libminc bicpl fftwFloat gsl ]; - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEZMINC_BUILD_TOOLS=TRUE" "-DEZMINC_BUILD_MRFSEG=TRUE" "-DEZMINC_BUILD_DD=TRUE" ]; diff --git a/nixpkgs/pkgs/applications/science/biology/N3/default.nix b/nixpkgs/pkgs/applications/science/biology/N3/default.nix index d2dbcf185330..13ffc305d392 100644 --- a/nixpkgs/pkgs/applications/science/biology/N3/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/N3/default.nix @@ -4,20 +4,20 @@ stdenv.mkDerivation rec { pname = "N3"; - name = "${pname}-2017-09-18"; + version = "unstable-2018-08-09"; src = fetchFromGitHub { owner = "BIC-MNI"; repo = pname; - rev = "2fdd939f0f2b24a4039bc6a8ade4a190a1d8e75d"; - sha256 = "13z21c4r09hna3q1csvcn4i7ws5ixbdaja6ch421xv6nydjh2w5g"; + rev = "010fc2ac58ce1d67b8e6a863fac0809d3203cb9b"; + sha256 = "06hci7gzhy8p34ggvx7gah2k9yxpwhgmq1cgw8pcd1r82g4rg6kd"; }; nativeBuildInputs = [ cmake makeWrapper ]; buildInputs = [ libminc EBTKS ]; propagatedBuildInputs = with perlPackages; [ perl MNI-Perllib GetoptTabular ]; - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ]; + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${EBTKS}/lib/" ]; postFixup = '' for p in $out/bin/*; do @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = "https://github.com/BIC-MNI/${pname}"; + homepage = "https://github.com/BIC-MNI/N3"; description = "MRI non-uniformity correction for MINC files"; maintainers = with maintainers; [ bcdarwin ]; platforms = platforms.unix; diff --git a/nixpkgs/pkgs/applications/science/biology/ants/default.nix b/nixpkgs/pkgs/applications/science/biology/ants/default.nix index cb88e92fe1cb..ece218eea37d 100644 --- a/nixpkgs/pkgs/applications/science/biology/ants/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/ants/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk4, vtk_7 }: +{ stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk4, vtk_7, Cocoa }: stdenv.mkDerivation rec { pname = "ANTs"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake makeWrapper ]; - buildInputs = [ itk4 vtk_7 ]; + buildInputs = [ itk4 vtk_7 ] ++ stdenv.lib.optional stdenv.isDarwin [ Cocoa ]; cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ]; diff --git a/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix index b847fd8b5fe4..d1b033dc4e23 100644 --- a/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "bcftools"; - version = "1.10.2"; + version = "1.11"; src = fetchurl { url = "https://github.com/samtools/bcftools/releases/download/${version}/${pname}-${version}.tar.bz2"; - sha256 = "0b2f6lqhxdlrvfjqxv7a4nzqj68c1j4avn16iqxwwm80kn302wzm"; + sha256 = "0r508mp15pqzf8r1269kb4v5naw9zsvbwd3cz8s1yj7carsf9viw"; }; buildInputs = [ htslib zlib bzip2 lzma curl perl python ]; diff --git a/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix index 332e06ea0cf5..f92e912f6800 100644 --- a/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { installPhase = "make prefix=$out SHELL=${stdenv.shell} CXX=${cxx} CC=${cc} install"; meta = with stdenv.lib; { - description = "A powerful toolset for genome arithmetic."; + description = "A powerful toolset for genome arithmetic"; license = licenses.gpl2; homepage = "https://bedtools.readthedocs.io/en/latest/"; maintainers = with maintainers; [ jbedo ]; diff --git a/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix b/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix new file mode 100644 index 000000000000..964eeddb461d --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, zlib }: + +stdenv.mkDerivation rec { + pname = "bowtie"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "BenLangmead"; + repo = pname; + rev = "v${version}"; + sha256 = "0da2kzyfsn6xv8mlqsv2vv7k8g0c9d2vgqzq8yqk888yljdzcrjp"; + }; + + buildInputs = [ zlib ]; + + installFlags = [ "prefix=$(out)" ]; + + meta = with stdenv.lib; { + description = "An ultrafast memory-efficient short read aligner"; + license = licenses.artistic2; + homepage = "http://bowtie-bio.sf.net/bowtie"; + maintainers = with maintainers; [ prusnak ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix index dc818e2fb868..603e5892ff11 100644 --- a/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchFromGitHub, zlib, tbb, python, perl }: +{ stdenv, fetchFromGitHub, cmake, tbb, zlib }: stdenv.mkDerivation rec { pname = "bowtie2"; - version = "2.3.5.1"; + version = "2.4.2"; src = fetchFromGitHub { owner = "BenLangmead"; repo = pname; rev = "v${version}"; - sha256 = "1l1f0yhjqqvy4lpxfml1xwv7ayimwbpzazvp0281gb4jb5f5mr1a"; + sha256 = "11apzq7l1lk3yxw97g9dfr0gwnvfh58x6apifcblgd66gbip3y1y"; }; - buildInputs = [ zlib tbb python perl ]; + nativeBuildInputs = [ cmake ]; - installFlags = [ "prefix=$(out)" ]; + buildInputs = [ tbb zlib ]; meta = with stdenv.lib; { description = "An ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences"; @@ -21,6 +21,6 @@ stdenv.mkDerivation rec { homepage = "http://bowtie-bio.sf.net/bowtie2"; maintainers = with maintainers; [ rybern ]; platforms = platforms.all; - broken = stdenv.isAarch64; + broken = stdenv.isAarch64; # only x86 is supported }; } diff --git a/nixpkgs/pkgs/applications/science/biology/bwa/default.nix b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix index 7212b42198c4..10859d9e8c13 100644 --- a/nixpkgs/pkgs/applications/science/biology/bwa/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { buildInputs = [ zlib ]; + # Avoid hardcoding gcc to allow environments with a different + # C compiler to build + preConfigure = '' + sed -i '/^CC/d' Makefile + ''; + # it's unclear which headers are intended to be part of the public interface # so we may find ourselves having to add more here over time installPhase = '' @@ -27,6 +33,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3; homepage = "http://bio-bwa.sourceforge.net/"; maintainers = with maintainers; [ luispedro ]; - platforms = [ "x86_64-linux" ]; + platforms = platforms.x86_64; }; } diff --git a/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix b/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix index 971e2f23055b..8fb8e17eef86 100644 --- a/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation rec { pname = "conglomerate"; - name = "${pname}-2017-09-10"; + version = "unstable-2017-09-10"; src = fetchFromGitHub { owner = "BIC-MNI"; @@ -16,7 +16,10 @@ stdenv.mkDerivation rec { buildInputs = [ libminc zlib bicpl ]; propagatedBuildInputs = [ coreutils minc_tools ] ++ (with perlPackages; [ perl GetoptTabular MNI-Perllib ]); - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DBICPL_DIR=${bicpl}/lib/" ]; + cmakeFlags = [ + "-DLIBMINC_DIR=${libminc}/lib/cmake" + "-DBICPL_DIR=${bicpl}/lib" + ]; postFixup = '' for p in $out/bin/*; do diff --git a/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix index 59b173ac98cd..cfd1206f2314 100644 --- a/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ libyamlcpp ]; meta = with stdenv.lib; { - description = "dcm2niix DICOM to NIfTI converter"; + description = "DICOM to NIfTI converter"; longDescription = '' dcm2niix is a designed to convert neuroimaging data from the DICOM format to the NIfTI format. diff --git a/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix index 8787c96e5b03..2621c5bbf037 100644 --- a/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix @@ -1,14 +1,14 @@ -{ lib -, python -}: +{ lib, python, fetchFromGitHub }: with python.pkgs; buildPythonApplication rec { pname = "deepTools"; - version = "3.4.1"; + version = "3.5.0"; - src = fetchPypi { - inherit pname version; - sha256 = "05zw9gk17hz08hns5lnhn7l13idg9jdz4gdba6m6gbr84yz149gs"; + src = fetchFromGitHub { + owner = "deeptools"; + repo = "deepTools"; + rev = version; + sha256 = "1bz8ln32mfc9k8l9wgp034vw80dxh6f92dfqxhcrpggk4akwj6ml"; }; propagatedBuildInputs = [ @@ -23,7 +23,7 @@ buildPythonApplication rec { deeptoolsintervals ]; - checkInputs = [ pytest ]; + checkInputs = [ nose ]; meta = with lib; { homepage = "https://deeptools.readthedocs.io/en/develop"; diff --git a/nixpkgs/pkgs/applications/science/biology/delly/default.nix b/nixpkgs/pkgs/applications/science/biology/delly/default.nix index a6c45f8aa44e..8f4dd7745269 100644 --- a/nixpkgs/pkgs/applications/science/biology/delly/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/delly/default.nix @@ -1,25 +1,16 @@ { stdenv, fetchpatch, fetchFromGitHub, htslib, zlib, bzip2, lzma, ncurses, boost }: -let - htslibPatch = fetchpatch { - url = "https://github.com/dellytools/delly/commit/0e5c710b0c5ea790bb39699d4cbd49cf4fb86f14.diff"; - sha256 = "09bz1qqvzhdzm99hf9zgrv80kq9jlr1m2mdvx96p2hk5lpnbdl7y"; - excludes = [ "src/htslib" ]; - }; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "delly"; - version = "0.8.2"; + version = "0.8.6"; src = fetchFromGitHub { owner = "dellytools"; repo = pname; rev = "v${version}"; - sha256 = "14bkmixz7737xj192ww96s3a20zc7xs7r04db8avw3ggi3i1s1cs"; + sha256 = "sha256-j9klZ8qq1GQS7+zZ+vHwAwLHBYMBrWfbwqeD8QJeCuk="; }; - patches = [ htslibPatch ]; - buildInputs = [ zlib htslib bzip2 lzma ncurses boost ]; EBROOTHTSLIB = htslib; @@ -34,7 +25,7 @@ in stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Structural variant caller for mapped DNA sequenced data"; - license = licenses.gpl3; + license = licenses.bsd3; maintainers = with maintainers; [ scalavision ]; platforms = platforms.linux; longDescription = '' diff --git a/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix b/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix index 6ee7cd609c42..3b1420a18819 100644 --- a/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - version = "3.3.1"; + version = "3.3.2"; pname = "hmmer"; src = fetchurl { url = "http://eddylab.org/software/hmmer/${pname}-${version}.tar.gz"; - sha256 = "1mcvr74w6ffd5z0p8v3jss473mbgard9lz5whjnk95c661lnmrlc"; + sha256 = "0s9wf6n0qanbx8qs6igfl3vyjikwbrvh4d9d6mv54yp3xysykzlj"; }; meta = with stdenv.lib; { diff --git a/nixpkgs/pkgs/applications/science/biology/igv/default.nix b/nixpkgs/pkgs/applications/science/biology/igv/default.nix index bc4f1677fc98..3f9cb1a288b3 100644 --- a/nixpkgs/pkgs/applications/science/biology/igv/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/igv/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { pname = "igv"; - version = "2.8.9"; + version = "2.8.13"; src = fetchzip { url = "https://data.broadinstitute.org/igv/projects/downloads/2.8/IGV_${version}.zip"; - sha256 = "1874w1xprv91caz1ymfxilq6inhj36xzx8j9m0mcyp0qfvfvyjp7"; + sha256 = "0sab478jq96iw3fv0560hrrj8qbh40r8m4ncypdb7991j9haxl09"; }; installPhase = '' diff --git a/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix index 9e63b92b24ed..e6293bb90ef3 100644 --- a/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ libminc EBTKS ]; propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ]; - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ]; + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${EBTKS}/lib/" ]; postFixup = '' for p in $out/bin/*; do diff --git a/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix b/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix index 5a1bb187886b..014ae14cc794 100644 --- a/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; meta = with stdenv.lib; { - description = "Kallisto is a program for quantifying abundances of transcripts from RNA-Seq data"; + description = "Program for quantifying abundances of transcripts from RNA-Seq data"; homepage = "https://pachterlab.github.io/kallisto"; license = licenses.bsd2; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/applications/science/biology/kent/default.nix b/nixpkgs/pkgs/applications/science/biology/kent/default.nix new file mode 100644 index 000000000000..2ca5ad191d92 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/kent/default.nix @@ -0,0 +1,75 @@ +{ stdenv +, libpng +, libuuid +, zlib +, bzip2 +, lzma +, openssl +, curl +, libmysqlclient +, bash +, fetchFromGitHub +, which +}: +stdenv.mkDerivation rec { + pname = "kent"; + version = "404"; + + src = fetchFromGitHub { + owner = "ucscGenomeBrowser"; + repo = pname; + rev = "v${version}_base"; + sha256 = "0l5lmqqc6sqkf4hyk3z4825ly0vdlj5xdfad6zd0708cb1v81nbx"; + }; + + buildInputs = [ libpng libuuid zlib bzip2 lzma openssl curl libmysqlclient ]; + + patchPhase = '' + substituteInPlace ./src/checkUmask.sh \ + --replace "/bin/bash" "${bash}/bin/bash" + + substituteInPlace ./src/hg/sqlEnvTest.sh \ + --replace "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config" + ''; + + buildPhase = '' + export MACHTYPE=$(uname -m) + export CFLAGS="-fPIC" + export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g') + export MYSQLLIBS=$(mysql_config --libs) + export DESTBINDIR=$NIX_BUILD_TOP/bin + export HOME=$NIX_BUILD_TOP + + cd ./src + chmod +x ./checkUmask.sh + ./checkUmask.sh + + mkdir -p $NIX_BUILD_TOP/lib + mkdir -p $NIX_BUILD_TOP/bin/x86_64 + + make libs + cd jkOwnLib + make + + cp ../lib/x86_64/jkOwnLib.a $NIX_BUILD_TOP/lib + cp ../lib/x86_64/jkweb.a $NIX_BUILD_TOP/lib + + cd ../utils + make + ''; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/lib + cp $NIX_BUILD_TOP/lib/jkOwnLib.a $out/lib + cp $NIX_BUILD_TOP/lib/jkweb.a $out/lib + cp $NIX_BUILD_TOP/bin/x86_64/* $out/bin + ''; + + meta = with stdenv.lib; { + description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities"; + license = licenses.unfree; + maintainers = with maintainers; [ scalavision ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/science/biology/last/default.nix b/nixpkgs/pkgs/applications/science/biology/last/default.nix index 13f6a23913fc..0976e5a10802 100644 --- a/nixpkgs/pkgs/applications/science/biology/last/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/last/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "last"; - version = "1066"; + version = "1145"; src = fetchurl { url = "http://last.cbrc.jp/last-${version}.zip"; - sha256 = "098j3f3a80rmhd01ds7rnb9y1xykmll2yh5ivpnvskssd8z2vc4r"; + sha256 = "0g54nmxxrirgid1i1k5i6rf7vnjpk9548sy06yqb4fj7vdzqgq99"; }; nativeBuildInputs = [ unzip ]; diff --git a/nixpkgs/pkgs/applications/science/biology/lumpy/default.nix b/nixpkgs/pkgs/applications/science/biology/lumpy/default.nix new file mode 100644 index 000000000000..f6267a2e017f --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/lumpy/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchFromGitHub, htslib, zlib, curl, openssl, samblaster, sambamba +, samtools, hexdump, python2Packages, which }: + +let + python = + python2Packages.python.withPackages (pkgs: with pkgs; [ pysam numpy ]); + +in stdenv.mkDerivation rec { + pname = "lumpy"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "arq5x"; + repo = "lumpy-sv"; + rev = "v${version}"; + sha256 = "0r71sg7qch8r6p6dw995znrqdj6q49hjdylhzbib2qmv8nvglhs9"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ which ]; + buildInputs = + [ htslib zlib curl openssl python samblaster sambamba samtools hexdump ]; + + preConfigure = '' + patchShebangs ./. + + # Use Nix htslib over bundled version + sed -i 's/lumpy_filter: htslib/lumpy_filter:/' Makefile + sed -i 's|../../lib/htslib/libhts.a|-lhts|' src/filter/Makefile + # Also make sure we use the includes from Nix's htslib + sed -i 's|../../lib/htslib/|${htslib}|' src/filter/Makefile + ''; + + # Upstream's makefile doesn't have an install target + installPhase = '' + mkdir -p $out + cp -r bin $out + cp -r scripts $out + sed -i 's|/build/source|'$out'|' $out/bin/lumpyexpress.config + ''; + + meta = with stdenv.lib; { + description = "Probabilistic structural variant caller"; + homepage = "https://github.com/arq5x/lumpy-sv"; + maintainers = with maintainers; [ jbedo ]; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + }; + +} diff --git a/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix index b2029842bbba..c594897f4b6f 100644 --- a/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix @@ -3,28 +3,20 @@ stdenv.mkDerivation rec { pname = "minc-tools"; - version = "unstable-2019-12-04"; + version = "unstable-2020-07-25"; src = fetchFromGitHub { owner = "BIC-MNI"; repo = pname; - rev = "d4dddfdb4e4fa0cea389b8fdce51cfc076565d94"; - sha256 = "1wwdss59qq4hz1jp35qylfswzzv0d37if23al0srnxkkgc5f8zng"; + rev = "fb0a68a07d281e4e099c5d54df29925240de14c1"; + sha256 = "0zcv2sdj3k6k0xjqdq8j5bxq8smm48dzai90vwsmz8znmbbm6kvw"; }; - patches = [ ./fix-netcdf-header.patch ]; - - # add missing CMake module to build NIFTI support - # (the maintainers normally build libminc and minc-tools in a meta-project) - postPatch = '' - cp ${libminc.src}/cmake-modules/FindNIFTI.cmake cmake-modules - ''; - nativeBuildInputs = [ cmake flex bison makeWrapper ]; buildInputs = [ libminc libjpeg nifticlib zlib ]; propagatedBuildInputs = [ perl TextFormat ]; - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DZNZ_INCLUDE_DIR=${nifticlib}/include/nifti" "-DNIFTI_INCLUDE_DIR=${nifticlib}/include/nifti" ]; diff --git a/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch b/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch deleted file mode 100644 index 89c7564f8b62..000000000000 --- a/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/progs/mincdump/mincdump.h b/progs/mincdump/mincdump.h -index 14c95cd..117ab26 100644 ---- a/progs/mincdump/mincdump.h -+++ b/progs/mincdump/mincdump.h -@@ -3,6 +3,7 @@ - * See netcdf/COPYRIGHT file for copying and redistribution conditions. - * $Header: /private-cvsroot/minc/progs/mincdump/mincdump.h,v 1.1 2004-04-27 15:35:15 bert Exp $ - *********************************************************************/ -+#include <netcdf_meta.h> - - - /* error checking macro */ diff --git a/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix b/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix index 254d874f9d91..40ec9e0de6d2 100644 --- a/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "mni_autoreg"; - name = "${pname}-2017-09-22"; + version = "unstable-2017-09-22"; src = fetchFromGitHub { owner = "BIC-MNI"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ libminc ]; propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ]; - cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" ]; + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" ]; # testing broken: './minc_wrapper: Permission denied' from Testing/ellipse0.mnc postFixup = '' diff --git a/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix b/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix index 1ce6357d2e81..d2b05943f7ce 100644 --- a/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix @@ -17,13 +17,13 @@ let in stdenv.mkDerivation rec { pname = "mosdepth"; - version = "0.2.9"; + version = "0.3.1"; src = fetchFromGitHub { owner = "brentp"; repo = "mosdepth"; rev = "v${version}"; - sha256 = "01gm9gj2x2zs4yx6wk761fi1papi7qr3gp4ln1kkn8n2f9y9h849"; + sha256 = "1kcrvamrafz1m0s7mlbhaay8jyg97l1w37p6syl36r2m1plmwxjd"; }; nativeBuildInputs = [ nim ]; @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { installPhase = "install -Dt $out/bin mosdepth"; meta = with stdenv.lib; { - description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing."; + description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing"; license = licenses.mit; homepage = "https://github.com/brentp/mosdepth"; maintainers = with maintainers; [ jbedo ]; diff --git a/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix index 528277e05e38..e0b122778d1b 100644 --- a/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "mrtrix"; - version = "3.0.0"; + version = "3.0.2"; src = fetchFromGitHub { owner = "MRtrix3"; repo = "mrtrix3"; rev = version; - sha256 = "1vvmmbw3m0bdfwp4szr62ygzsvkj0ss91cx5zlkspsr1rff05f9b"; + sha256 = "0p4d1230j6664rnb9l65cpyfj9ncbcm39yv1r9y77br9rkkv1za3"; fetchSubmodules = true; }; diff --git a/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix index d496e78748d9..af29dd77ac28 100644 --- a/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "picard-tools"; - version = "2.23.4"; + version = "2.23.9"; src = fetchurl { url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar"; - sha256 = "0xg4nbx02a2kckr6p8pqjpv5rmp95bkmglgm1bma6f77s7hkab7q"; + sha256 = "1ygdl590sbcsxpk0qwr0bx163nx51h0545n1xxkbc3pk2r6n51lk"; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/biology/plink/default.nix b/nixpkgs/pkgs/applications/science/biology/plink/default.nix deleted file mode 100644 index 009e12aa02f0..000000000000 --- a/nixpkgs/pkgs/applications/science/biology/plink/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, fetchurl, zlib, unzip }: - -stdenv.mkDerivation { - name = "plink-1.07"; - - src = fetchurl { - url = "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-src.zip"; - sha256 = "4af56348443d0c6a1db64950a071b1fcb49cc74154875a7b43cccb4b6a7f482b"; - }; - - buildInputs = [ zlib unzip ] ; - - installPhase = '' - mkdir -p $out/bin - cp plink $out/bin - ''; - - meta = { - description = "Whole genome association toolkit"; - homepage = "http://pngu.mgh.harvard.edu/~purcell/plink/"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.all; - broken = true; - }; -} diff --git a/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix b/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix new file mode 100644 index 000000000000..7e33a6612189 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, python3, which, dmd, ldc, zlib }: + +stdenv.mkDerivation rec { + pname = "sambamba"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "biod"; + repo = "sambamba"; + rev = "v${version}"; + sha256 = "0k5wy06zrbsc40x6answgz7rz2phadyqwlhi9nqxbfqanbg9kq20"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ which python3 dmd ldc ]; + buildInputs = [ zlib ]; + + # Upstream's install target is broken; copy manually + installPhase = '' + mkdir -p $out/bin + cp bin/sambamba-${version} $out/bin/sambamba + ''; + + meta = with stdenv.lib; { + description = "SAM/BAM processing tool"; + homepage = "https://lomereiter.github.io/sambamba/"; + maintainers = with maintainers; [ jbedo ]; + license = with licenses; gpl2; + platforms = platforms.x86_64; + }; +} diff --git a/nixpkgs/pkgs/applications/science/biology/samblaster/default.nix b/nixpkgs/pkgs/applications/science/biology/samblaster/default.nix new file mode 100644 index 000000000000..6846e3c84fae --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/samblaster/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "samblaster"; + version = "0.1.26"; + + src = fetchFromGitHub { + owner = "GregoryFaust"; + repo = "samblaster"; + rev = "v.${version}"; + sha256 = "0g24fq5hplnfgqkh3xqpg3lgx3wmxwnh9c7m6yw7pbi40lmgl1jv"; + }; + + installPhase = '' + mkdir -p $out/bin + cp samblaster $out/bin + ''; + + meta = with stdenv.lib; { + description = "Tool for marking duplicates and extracting discordant/split reads from SAM/BAM files"; + maintainers = with maintainers; [ jbedo ]; + license = licenses.mit; + homepage = "https://github.com/GregoryFaust/samblaster"; + platforms = platforms.x86_64; + }; +} diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/default.nix b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix index e750eea89ac9..27ed79a1f6ca 100644 --- a/nixpkgs/pkgs/applications/science/biology/samtools/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "samtools"; - version = "1.10"; + version = "1.11"; src = fetchurl { url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2"; - sha256 = "119ms0dpydw8dkh3zc4yyw9zhdzgv12px4l2kayigv31bpqcb7kv"; + sha256 = "1dp5wknak4arnw5ghhif9mmljlfnw5bgm91wib7z0j8wdjywx0z2"; }; nativeBuildInputs = [ perl ]; @@ -29,6 +29,6 @@ stdenv.mkDerivation rec { license = licenses.mit; homepage = "http://www.htslib.org/"; platforms = platforms.unix; - maintainers = [ maintainers.mimame ]; + maintainers = with maintainers; [ mimame unode ]; }; } diff --git a/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix index c68fcfada332..941f107a580f 100644 --- a/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Genetic variant annotation and effect prediction toolbox."; + description = "Genetic variant annotation and effect prediction toolbox"; license = licenses.lgpl3; homepage = "http://snpeff.sourceforge.net/"; maintainers = with maintainers; [ jbedo ]; diff --git a/nixpkgs/pkgs/applications/science/biology/spades/default.nix b/nixpkgs/pkgs/applications/science/biology/spades/default.nix index d555f2873a67..776719579d97 100644 --- a/nixpkgs/pkgs/applications/science/biology/spades/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/spades/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, bzip2, cmake }: +{ stdenv, fetchurl, zlib, bzip2, cmake, python3 }: stdenv.mkDerivation rec { pname = "SPAdes"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = [ zlib bzip2 ]; + buildInputs = [ zlib bzip2 python3 ]; doCheck = true; diff --git a/nixpkgs/pkgs/applications/science/biology/star/default.nix b/nixpkgs/pkgs/applications/science/biology/star/default.nix index c331acbfe705..f2e1a2a8fee5 100644 --- a/nixpkgs/pkgs/applications/science/biology/star/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/star/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "star"; - version = "2.7.5c"; + version = "2.7.6a"; src = fetchFromGitHub { repo = "STAR"; owner = "alexdobin"; rev = version; - sha256 = "1plx9akrzwjk7f2j94l9ss0apg0asqmrf2bp0728d4bvlhnzmjyy"; + sha256 = "1zw9f4jbhz0y51namnmid42pa7pviviy94q9db8w0774nksdf8is"; }; sourceRoot = "source/source"; diff --git a/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix b/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix index 07669d097a44..82c624ba7cd9 100644 --- a/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix +++ b/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, last, exonerate, minia, python3Packages, bwa -, samtools, findutils }: +, samtools, findutils, python }: python3Packages.buildPythonApplication rec { pname = "tebreak"; @@ -32,6 +32,12 @@ python3Packages.buildPythonApplication rec { done ''; + checkPhase = '' + $out/bin/tebreak -b test/data/example.ins.bam -r test/data/Homo_sapiens_chr4_50000000-60000000_assembly19.fasta -p 4 --pickle test/example.pickle --detail_out test/example.tebreak.detail.out -i lib/teref.human.fa + pushd test + ${python.interpreter} checktest.py + ''; + meta = with stdenv.lib; { description = "Find and characterise transposable element insertions"; homepage = "https://github.com/adamewing/tebreak"; diff --git a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix index 6545472a5295..e09abccad121 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix @@ -17,14 +17,14 @@ let }; in stdenv.mkDerivation rec { - version = "14.31.3"; + version = "14.31.18"; pname = "jmol"; src = let 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 = "067051wp9kgkgcy3mvqwxhim0h1qfcf4jk8vrbzd3y9pwmjismzy"; + sha256 = "0hkc7c08azbw3k91ygwz6r5y4yw6k8l7h4gcq5p71knd5k1fa5jd"; }; patchPhase = '' @@ -48,6 +48,6 @@ stdenv.mkDerivation rec { homepage = "https://sourceforge.net/projects/jmol"; license = licenses.lgpl2; platforms = platforms.all; - maintainers = with maintainers; [ timokau mounium ]; + maintainers = with maintainers; [ mounium ] ++ teams.sage.members; }; } diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix index e8cd077afd20..ddab526ebe79 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix @@ -4,12 +4,12 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "marvin"; - version = "20.17.0"; + version = "20.20.0"; src = fetchurl { name = "marvin-${version}.deb"; url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb"; - sha256 = "0ip6ma9ivk5b74s9najn2rrkiha7hya1rjhgyrc71kwsj5gqgli0"; + sha256 = "1a8b0drb0c95c8arm3aa0z0sbdm9ilj4h1g90i0qyn4g2wk2xsal"; }; nativeBuildInputs = [ dpkg makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix index 0d74e784d772..317a83371adb 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -1,13 +1,11 @@ { stdenv, fetchFromGitLab, cmake, gfortran, perl -, openblas, blas, lapack, hdf5-cpp, python3, texlive +, openblas, hdf5-cpp, python3, texlive , armadillo, openmpi, globalarrays, openssh , makeWrapper, fetchpatch } : -assert blas.implementation == "openblas" && lapack.implementation == "openblas"; - let - version = "19.11"; + version = "20.10"; gitLabRev = "v${version}"; python = python3.withPackages (ps : with ps; [ six pyparsing ]); @@ -20,18 +18,13 @@ in stdenv.mkDerivation { owner = "Molcas"; repo = "OpenMolcas"; rev = gitLabRev; - sha256 = "1wwqhkyyi7pw5x1ghnp83ir17zl5jsj7phhqxapybyi3bmg0i00q"; + sha256 = "0xr9plgb0cfmxxqmd3wrhvl0hv2jqqfqzxwzs1jysq2m9cxl314v"; }; - patches = [ (fetchpatch { - name = "Fix-MPI-INT-size"; # upstream patch, fixes a Fortran compiler error - url = "https://gitlab.com/Molcas/OpenMolcas/commit/860e3350523f05ab18e49a428febac8a4297b6e4.patch"; - sha256 = "0h96h5ikbi5l6ky41nkxmxfhjiykkiifq7vc2s3fdy1r1siv09sb"; - }) (fetchpatch { - name = "fix-cisandbox"; # upstream patch, fixes a Fortran compiler error - url = "https://gitlab.com/Molcas/OpenMolcas/commit/d871590c8ce4689cd94cdbbc618954c65589393d.patch"; - sha256 = "0dgz1w2rkglnis76spai3m51qa72j4bz6ppnk5zmzrr6ql7gwpgg"; - })]; + patches = [ + # Required to handle openblas multiple outputs + ./openblasPath.patch +]; nativeBuildInputs = [ perl cmake texlive.combined.scheme-minimal makeWrapper ]; buildInputs = [ @@ -55,7 +48,7 @@ in stdenv.mkDerivation { "-DTOOLS=ON" "-DHDF5=ON" "-DFDE=ON" - "-DOPENBLASROOT=${openblas}" + "-DOPENBLASROOT=${openblas.dev}" ]; GAROOT=globalarrays; @@ -79,7 +72,7 @@ in stdenv.mkDerivation { homepage = "https://gitlab.com/Molcas/OpenMolcas"; maintainers = [ maintainers.markuskowa ]; license = licenses.lgpl21; - platforms = platforms.linux; + platforms = [ "x86_64-linux" ]; }; } diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch new file mode 100644 index 000000000000..e47adcc3e9a3 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 276ae4e2..db13e6e3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1507,7 +1507,6 @@ if (LINALG STREQUAL "OpenBLAS") + NAMES openblas + PATHS ${OPENBLASROOT} + PATH_SUFFIXES lib +- NO_DEFAULT_PATH + ) + + if (NOT LIBOPENBLAS) diff --git a/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix index 2443e6b23aba..071091f2ecf2 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix @@ -4,12 +4,12 @@ }: stdenv.mkDerivation rec { - version = "6.5"; + version = "6.6"; pname = "quantum-espresso"; src = fetchurl { url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz"; - sha256 = "00nnsq1vq579xsmkvwrgs6bdqdcbdlsmcp4yfynnvs40ca52m2r5"; + sha256 = "0b3718bwdqfyssyz25jknijar79qh5cf1bbizv9faliz135mcilj"; }; passthru = { diff --git a/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix b/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix index d2b7c0d66a15..c2d7cefec9b8 100644 --- a/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix @@ -27,7 +27,6 @@ mkDerivation { nativeBuildInputs = [ cmake - wrapQtAppsHook ]; buildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix b/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix index 4d3acb331d5d..e61017ea330d 100644 --- a/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix @@ -1,42 +1,46 @@ -{ stdenv, fetchFromGitHub, pkgconfig, cmake, -libzip, boost, fftw, qtbase, -libusb1, wrapQtAppsHook, libsigrok4dsl, libsigrokdecode4dsl +{ lib, mkDerivation, fetchFromGitHub, pkgconfig, cmake +, libzip, boost, fftw, qtbase, libusb1, libsigrok4dsl +, libsigrokdecode4dsl, python3, fetchpatch }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "dsview"; - version = "0.99"; + version = "1.12"; src = fetchFromGitHub { owner = "DreamSourceLab"; repo = "DSView"; - rev = version; - sha256 = "189i3baqgn8k3aypalayss0g489xi0an9hmvyggvxmgg1cvcwka2"; + rev = "v${version}"; + sha256 = "q7F4FuK/moKkouXTNPZDVon/W/ZmgtNHJka4MiTxA0U="; }; - postUnpack = '' - export sourceRoot=$sourceRoot/DSView - ''; + sourceRoot = "source/DSView"; patches = [ # Fix absolute install paths ./install.patch + + # Fix buld with Qt5.15 already merged upstream for future release + # Using local file instead of content of commit #33e3d896a47 because + # sourceRoot make it unappliable + ./qt515.patch ]; - nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ]; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl + boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl + python3 ]; enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc"; homepage = "https://www.dreamsourcelab.com/"; license = licenses.gpl3Plus; platforms = platforms.linux; - maintainers = [ maintainers.bachp ]; + maintainers = with maintainers; [ bachp ]; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch b/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch index e30a28d80fa3..75c3e9628656 100644 --- a/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch +++ b/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch @@ -2,10 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index c1c33e1..208a184 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -403,8 +403,8 @@ install(DIRECTORY res DESTINATION share/${PROJECT_NAME}) - install(FILES icons/logo.png DESTINATION share/${PROJECT_NAME} RENAME logo.png) - install(FILES ../NEWS DESTINATION share/${PROJECT_NAME} RENAME NEWS) - install(FILES ../ug.pdf DESTINATION share/${PROJECT_NAME} RENAME ug.pdf) +@@ -427,8 +427,8 @@ + install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31) + install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf) + install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf) -install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/) -install(FILES DSView.desktop DESTINATION /usr/share/applications/) +install(FILES DreamSourceLab.rules DESTINATION etc/udev/rules.d/) diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch b/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch new file mode 100644 index 000000000000..552f2062ec57 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch @@ -0,0 +1,13 @@ +diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp +index 921d3db..16cdce9 100755 +--- a/pv/view/viewport.cpp ++++ b/pv/view/viewport.cpp +@@ -37,7 +37,7 @@ + + #include <QMouseEvent> + #include <QStyleOption> +- ++#include <QPainterPath> + + #include <math.h> + diff --git a/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix b/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix index 247f99485bb4..b8a80c5e9c11 100644 --- a/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix @@ -10,7 +10,7 @@ python3Packages.buildPythonApplication rec { src = fetchFromBitbucket { owner = "jpcgt"; - repo = "${pname}"; + repo = pname; rev = "533afd6a1772857cb633c011b5e0a15b60b1e92e"; # 8.5 with Red Hat packaging. sha256 = "199kiiml18k34z1zhk2hbhibphmnv0kb11kxiajq52alps0mjb3m"; }; @@ -48,7 +48,7 @@ python3Packages.buildPythonApplication rec { ''; meta = with lib; { - description = "2-D post processing for PCB fabrication on CNC routers."; + description = "2-D post processing for PCB fabrication on CNC routers"; homepage = "https://bitbucket.org/jpcgt/flatcam"; license = licenses.mit; maintainers = with maintainers; [ trepetti ]; diff --git a/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix b/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix index 275100ac7fd4..f8a0adea482b 100644 --- a/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix @@ -1,44 +1,84 @@ { mkDerivation, stdenv, fetchpatch, fetchFromGitHub, qmake, pkgconfig -, qtbase, qtsvg, qtserialport, boost, libgit2 +, qtbase, qtsvg, qttools, qtserialport, boost, libgit2 }: +let + # build number corresponding to a release, has no further relation + # see https://github.com/fritzing/fritzing-app/releases/tag/CD-498 + fritzingBuild = "498"; + # SHA256 of the fritzing-parts HEAD on the master branch, + # which contains the latest stable parts definitions + partsSha = "e79a69765026f3fda8aab1b3e7a4952c28047a62"; +in + mkDerivation rec { pname = "fritzing"; - version = "0.9.3b"; + version = "0.9.4-${fritzingBuild}"; src = fetchFromGitHub { owner = "fritzing"; repo = "fritzing-app"; - rev = version; - sha256 = "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"; + rev = "CD-${fritzingBuild}"; + sha256 = "0aljj2wbmm1vd64nhj6lh9qy856pd5avlgydsznya2vylyz20p34"; }; parts = fetchFromGitHub { owner = "fritzing"; repo = "fritzing-parts"; - rev = version; - sha256 = "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"; + name = "fritzing-parts"; + rev = partsSha; + sha256 = "0spka33a5qq34aq79j01arw1aly4vh0hzv7mahryhdlcdk22qqvc"; }; + buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ]; + + nativeBuildInputs = [ qmake pkgconfig qttools ]; + patches = [(fetchpatch { - name = "0001-Squashed-commit-of-the-following.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Squashed-commit-of-the-following.patch?h=fritzing"; - sha256 = "1cv6myidxhy28i8m8v13ghzkvx5978p9dcd8v7885y0l1h3108mf"; + name = "fix-libgit2-version.patch"; + url = "https://github.com/fritzing/fritzing-app/commit/472951243d70eeb40a53b1f7e16e6eab0588d079.patch"; + sha256 = "0v1zi609cjnqac80xgnk23n54z08g1lia37hbzfl8jcq9sn9adak"; })]; - buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ]; + postPatch = '' + substituteInPlace phoenix.pro \ + --replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false' - nativeBuildInputs = [ qmake pkgconfig ]; + substituteInPlace tools/linux_release_script/release.sh \ + --replace 'git status' 'echo >/dev/null' \ + --replace 'git clean' 'echo >/dev/null' \ + --replace 'git clone' 'echo >/dev/null' \ + --replace 'release_folder="' 'release_folder="$out" #' \ + --replace './Fritzing -db' '# run after fixup' - qmakeFlags = [ "phoenix.pro" ]; + substituteInPlace src/fapplication.cpp \ + --replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";' + ''; - preConfigure = '' - ln -s "$parts" parts + buildPhase = '' + bash tools/linux_release_script/release.sh ${version} ''; + installPhase = '' + rm "$out/Fritzing" # remove script file + mkdir "$out/bin" + mv "$out/lib/Fritzing" "$out/bin/Fritzing" + mkdir --parents "$out/share/applications" "$out/share/metainfo" + mv --target-directory="$out/share/applications" "$out/org.fritzing.Fritzing.desktop" + mv --target-directory="$out/share/metainfo" "$out/org.fritzing.Fritzing.appdata.xml" + cp --recursive --no-target-directory "$parts" "$out/fritzing-parts" + ''; + + postFixup = '' + # generate the parts.db file + QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" -db "$out/fritzing-parts/parts.db" -pp "$out/fritzing-parts" -folder "$out" + ''; + + qmakeFlags = [ "phoenix.pro" ]; + meta = { description = "An open source prototyping tool for Arduino-based projects"; - homepage = "http://fritzing.org/"; + homepage = "https://fritzing.org/"; license = stdenv.lib.licenses.gpl3; maintainers = [ stdenv.lib.maintainers.robberer ]; platforms = stdenv.lib.platforms.linux; diff --git a/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix b/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix index 36cc19142d19..ad5e9e55c575 100644 --- a/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "gtkwave"; - version = "3.3.106"; + version = "3.3.107"; src = fetchurl { url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz"; - sha256 = "0ma53s27735x16dq5qi91kvlypkiwkxh2jhw0gziyccnk1mkdsji"; + sha256 = "0ma30jyc94iid3v3m8aw4i2lyiqfxkpsdvdmmaibynk400cbzivl"; }; nativeBuildInputs = [ pkgconfig wrapGAppsHook ]; diff --git a/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix b/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix index 06053a8f356b..896a2a010844 100644 --- a/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix @@ -1,28 +1,28 @@ { stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, python3Packages , boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook -, llvmPackages ? null +, fmt, graphviz, llvmPackages ? null }: stdenv.mkDerivation rec { - version = "2.0.0"; + version = "3.1.9"; pname = "hal-hardware-analyzer"; src = fetchFromGitHub { owner = "emsec"; repo = "hal"; rev = "v${version}"; - sha256 = "11xmqxnryksl645wmm1d69k1b5zwvxxf0admk4iblzaa3ggf7cv1"; + sha256 = "0yvvlx0hq73x20va4csa8kyx3x4z648s6l6qqirzjpmxa1w91xc6"; }; # make sure bundled dependencies don't get in the way - install also otherwise # copies them in full to the output, bloating the package postPatch = '' - rm -rf deps/*/* - substituteInPlace cmake/detect_dependencies.cmake \ - --replace 'spdlog 1.4.2 EXACT' 'spdlog 1.4.2 REQUIRED' + shopt -s extglob + rm -rf deps/!(sanitizers-cmake)/* + shopt -u extglob ''; nativeBuildInputs = [ cmake ninja pkgconfig ]; - buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog wrapQtAppsHook ] + buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog fmt graphviz wrapQtAppsHook ] ++ (with python3Packages; [ python pybind11 ]) ++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp; @@ -42,11 +42,11 @@ stdenv.mkDerivation rec { # the qt mkDerivation - the latter forcibly overrides this. cmakeBuildType = "MinSizeRel"; - meta = { + meta = with stdenv.lib; { description = "A comprehensive reverse engineering and manipulation framework for gate-level netlists"; homepage = "https://github.com/emsec/hal"; - license = stdenv.lib.licenses.mit; - platforms = with stdenv.lib.platforms; unix; - maintainers = with stdenv.lib.maintainers; [ ris ]; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ ris shamilton ]; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix b/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix new file mode 100644 index 000000000000..6b9f07ee68f1 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix @@ -0,0 +1,75 @@ +{ stdenv +, boost +, coreutils +, cppzmq +, curl +, epoxy +, fetchFromGitHub +, glm +, gnome3 +, lib +, libgit2 +, librsvg +, libuuid +, libzip +, opencascade +, pkgconfig +, podofo +, python3 +, sqlite +, wrapGAppsHook +, zeromq +}: + +stdenv.mkDerivation rec { + pname = "horizon-eda"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "horizon-eda"; + repo = "horizon"; + rev = "v${version}"; + sha256 = "13c4p60vrmwmnrv2jcr2gc1cxnimy7j8yp1p6434pbbk2py9k8mx"; + }; + + buildInputs = [ + cppzmq + curl + epoxy + glm + gnome3.gtkmm + libgit2 + librsvg + libuuid + libzip + opencascade + podofo + python3 + sqlite + zeromq + ]; + + nativeBuildInputs = [ + boost.dev + pkgconfig + wrapGAppsHook + ]; + + CASROOT = opencascade; + + installFlags = [ + "INSTALL=${coreutils}/bin/install" + "DESTDIR=$(out)" + "PREFIX=" + ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "A free EDA software to develop printed circuit boards"; + homepage = "https://horizon-eda.org"; + maintainers = with maintainers; [ guserav ]; + license = licenses.gpl3; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix index 2fd4c122041c..7f11f483a9d0 100644 --- a/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix @@ -1,57 +1,59 @@ -{ lib, stdenv, fetchFromGitLab, cmake, libGLU, libGL, zlib, wxGTK -, libX11, gettext, glew, glm, cairo, curl, openssl, boost, pkgconfig -, doxygen, pcre, libpthreadstubs, libXdmcp, fetchpatch, lndir, callPackages - -, stable ? true -, baseName ? "kicad" -, versions ? { } -, oceSupport ? false, opencascade -, withOCCT ? true, opencascade-occt -, ngspiceSupport ? true, libngspice -, scriptingSupport ? true, swig, python, wxPython -, debug ? false, valgrind -, withI18n ? true +{ stdenv +, fetchFromGitLab +, cmake +, libGLU +, libGL +, zlib +, wxGTK +, libX11 +, gettext +, glew +, glm +, cairo +, curl +, openssl +, boost +, pkgconfig +, doxygen +, pcre +, libpthreadstubs +, libXdmcp +, fetchpatch +, lndir +, callPackage + +, stable +, baseName +, kicadSrc +, kicadVersion +, i18n +, withOCE +, opencascade +, withOCC +, opencascade-occt +, withNgspice +, libngspice +, withScripting +, swig +, python +, wxPython +, debug +, valgrind +, withI18n +, gtk3 }: -assert ngspiceSupport -> libngspice != null; - -with lib; +assert stdenv.lib.asserts.assertMsg (!(withOCE && stdenv.isAarch64)) "OCE fails a test on Aarch64"; +assert stdenv.lib.asserts.assertMsg (!(withOCC && withOCE)) + "Only one of OCC and OCE may be enabled"; let - - versionConfig = versions.${baseName}; - - # oce on aarch64 fails a test - withOCE = oceSupport && !stdenv.isAarch64; - withOCC = (withOCCT && !withOCE) || (oceSupport && stdenv.isAarch64); - - libraries = callPackages ./libraries.nix versionConfig.libVersion; - + inherit (stdenv.lib) optional optionals; in stdenv.mkDerivation rec { - - i18n = libraries.i18n; - pname = "kicad-base"; - version = "${builtins.substring 0 10 versions.${baseName}.kicadVersion.src.rev}"; - - src = fetchFromGitLab ( - { - group = "kicad"; - owner = "code"; - repo = "kicad"; - } // versionConfig.kicadVersion.src - ); + version = kicadVersion; - # quick fix for #72248 - # should be removed if a a more permanent fix is published - patches = [ - ( - fetchpatch { - url = "https://github.com/johnbeard/kicad/commit/dfb1318a3989e3d6f9f2ac33c924ca5030ea273b.patch"; - sha256 = "00ifd3fas8lid8svzh1w67xc8kyx89qidp7gm633r014j3kjkgcd"; - } - ) - ]; + src = kicadSrc; # tagged releases don't have "unknown" # kicad nightlies use git describe --dirty @@ -66,15 +68,15 @@ stdenv.mkDerivation rec { makeFlags = optional (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ]; cmakeFlags = - optionals (scriptingSupport) [ + optionals (withScripting) [ "-DKICAD_SCRIPTING=ON" "-DKICAD_SCRIPTING_MODULES=ON" "-DKICAD_SCRIPTING_PYTHON3=ON" "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON" ] - ++ optional (!scriptingSupport) + ++ optional (!withScripting) "-DKICAD_SCRIPTING=OFF" - ++ optional (ngspiceSupport) "-DKICAD_SPICE=ON" + ++ optional (withNgspice) "-DKICAD_SPICE=ON" ++ optional (!withOCE) "-DKICAD_USE_OCE=OFF" ++ optional (!withOCC) "-DKICAD_USE_OCC=OFF" ++ optionals (withOCE) [ @@ -95,11 +97,25 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake doxygen pkgconfig lndir ]; buildInputs = [ - libGLU libGL zlib libX11 wxGTK pcre libXdmcp gettext - glew glm libpthreadstubs cairo curl openssl boost + libGLU + libGL + zlib + libX11 + wxGTK + pcre + libXdmcp + gettext + glew + glm + libpthreadstubs + cairo + curl + openssl + boost + gtk3 ] - ++ optionals (scriptingSupport) [ swig python wxPython ] - ++ optional (ngspiceSupport) libngspice + ++ optionals (withScripting) [ swig python wxPython ] + ++ optional (withNgspice) libngspice ++ optional (withOCE) opencascade ++ optional (withOCC) opencascade-occt ++ optional (debug) valgrind @@ -124,7 +140,7 @@ stdenv.mkDerivation rec { the libraries are passed via an env var in the wrapper, default.nix ''; homepage = "https://www.kicad-pcb.org/"; - license = licenses.agpl3; - platforms = platforms.all; + license = stdenv.lib.licenses.agpl3; + platforms = stdenv.lib.platforms.all; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix index e5ce1f0092e2..48a5779d207a 100644 --- a/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix @@ -1,52 +1,176 @@ -{ lib, stdenv, gnome3, wxGTK30, wxGTK31 +{ stdenv +, fetchFromGitLab +, gnome3 +, wxGTK30 +, wxGTK31 , makeWrapper -, gsettings-desktop-schemas, hicolor-icon-theme -, callPackage, callPackages -, librsvg, cups +, gsettings-desktop-schemas +, hicolor-icon-theme +, callPackage +, callPackages +, librsvg +, cups , pname ? "kicad" , stable ? true -, oceSupport ? false, opencascade -, withOCCT ? true, opencascade-occt -, ngspiceSupport ? true, libngspice -, scriptingSupport ? true, swig, python3 -, debug ? false, valgrind +, oceSupport ? false +, withOCE ? false +, opencascade +, withOCCT ? false +, withOCC ? true +, opencascade-occt +, ngspiceSupport ? false +, withNgspice ? true +, libngspice +, scriptingSupport ? false +, withScripting ? true +, swig +, python3 +, debug ? false +, valgrind , with3d ? true , withI18n ? true +, srcs ? { } }: -assert ngspiceSupport -> libngspice != null; +# The `srcs` parameter can be used to override the kicad source code +# and all libraries (including i18n), which are otherwise inaccessible +# to overlays since most of the kicad build expression has been +# refactored into base.nix, most of the library build expressions have +# been refactored into libraries.nix, and most the i18n build +# expression has been refactored into i18n.nix. Overrides are only +# applied when building `kicad-unstable`. The `srcs` parameter has no +# effect for stable `kicad`. `srcs` takes an attribute set in which +# any of the following attributes are meaningful (though none are +# mandatory): "kicad", "kicadVersion", "i18n", "symbols", "templates", +# "footprints", "packages3d", and "libVersion". "kicadVersion" and +# "libVersion" should be set to a string with the desired value for +# the version attribute in kicad's `mkDerivation` and the version +# attribute in any of the library's or i18n's `mkDerivation`, +# respectively. "kicad", "i18n", "symbols", "templates", "footprints", +# and "packages3d" should be set to an appropriate fetcher (e.g., +# `fetchFromGitLab`). So, for example, a possible overlay for kicad +# is: +# +# final: prev: -with lib; -let +# { +# kicad-unstable = (prev.kicad-unstable.override { +# srcs = { +# kicadVersion = "2020-10-08"; +# kicad = prev.fetchFromGitLab { +# group = "kicad"; +# owner = "code"; +# repo = "kicad"; +# rev = "fd22fe8e374ce71d57e9f683ba996651aa69fa4e"; +# sha256 = "sha256-F8qugru/jU3DgZSpQXQhRGNFSk0ybFRkpyWb7HAGBdc="; +# }; +# }; +# }); +# } +assert withNgspice -> libngspice != null; +assert stdenv.lib.assertMsg (!ngspiceSupport) + "`nspiceSupport` was renamed to `withNgspice` for the sake of consistency with other kicad nix arguments."; +assert stdenv.lib.assertMsg (!oceSupport) + "`oceSupport` was renamed to `withOCE` for the sake of consistency with other kicad nix arguments."; +assert stdenv.lib.assertMsg (!scriptingSupport) + "`scriptingSupport` was renamed to `withScripting` for the sake of consistency with other kicad nix arguments."; +assert stdenv.lib.assertMsg (!withOCCT) + "`withOCCT` was renamed to `withOCC` for the sake of consistency with upstream cmake options."; +let baseName = if (stable) then "kicad" else "kicad-unstable"; + versionsImport = import ./versions.nix; + + # versions.nix does not provide us with version, src and rev. We + # need to turn this into approprate fetcher calls. + kicadSrcFetch = fetchFromGitLab { + group = "kicad"; + owner = "code"; + repo = "kicad"; + rev = versionsImport.${baseName}.kicadVersion.src.rev; + sha256 = versionsImport.${baseName}.kicadVersion.src.sha256; + }; + + i18nSrcFetch = fetchFromGitLab { + group = "kicad"; + owner = "code"; + repo = "kicad-i18n"; + rev = versionsImport.${baseName}.libVersion.libSources.i18n.rev; + sha256 = versionsImport.${baseName}.libVersion.libSources.i18n.sha256; + }; - versions = import ./versions.nix; - versionConfig = versions.${baseName}; + libSrcFetch = name: fetchFromGitLab { + group = "kicad"; + owner = "libraries"; + repo = "kicad-${name}"; + rev = versionsImport.${baseName}.libVersion.libSources.${name}.rev; + sha256 = versionsImport.${baseName}.libVersion.libSources.${name}.sha256; + }; + + # only override `src` or `version` if building `kicad-unstable` with + # the appropriate attribute defined in `srcs`. + srcOverridep = attr: (!stable && builtins.hasAttr attr srcs); + + # use default source and version (as defined in versions.nix) by + # default, or use the appropriate attribute from `srcs` if building + # unstable with `srcs` properly defined. + kicadSrc = + if srcOverridep "kicad" then srcs.kicad + else kicadSrcFetch; + kicadVersion = + if srcOverridep "kicadVersion" then srcs.kicadVersion + else versionsImport.${baseName}.kicadVersion.version; - wxGTK = if (stable) + i18nSrc = if srcOverridep "i18n" then srcs.i18n else i18nSrcFetch; + i18nVersion = + if srcOverridep "i18nVersion" then srcs.i18nVersion + else versionsImport.${baseName}.libVersion.version; + + libSrc = name: if srcOverridep name then srcs.${name} else libSrcFetch name; + # TODO does it make sense to only have one version for all libs? + libVersion = + if srcOverridep "libVersion" then srcs.libVersion + else versionsImport.${baseName}.libVersion.version; + + wxGTK = + if (stable) # wxGTK3x may default to withGtk2 = false, see #73145 - then wxGTK30.override { withGtk2 = false; } + then + wxGTK30.override + { + withGtk2 = false; + } # wxGTK31 currently introduces an issue with opening the python interpreter in pcbnew # but brings high DPI support? - else wxGTK31.override { withGtk2 = false; }; + else + wxGTK31.override { + withGtk2 = false; + }; python = python3; wxPython = python.pkgs.wxPython_4_0; + inherit (stdenv.lib) concatStringsSep flatten optionalString optionals; in stdenv.mkDerivation rec { - passthru.libraries = callPackages ./libraries.nix versionConfig.libVersion; + # Common libraries, referenced during runtime, via the wrapper. + passthru.libraries = callPackages ./libraries.nix { inherit libSrc libVersion; }; + passthru.i18n = callPackage ./i18n.nix { + src = i18nSrc; + version = i18nVersion; + }; base = callPackage ./base.nix { - inherit versions stable baseName; + inherit stable baseName; + inherit kicadSrc kicadVersion; + inherit (passthru) i18n; inherit wxGTK python wxPython; - inherit debug withI18n withOCCT oceSupport ngspiceSupport scriptingSupport; + inherit debug withI18n withOCC withOCE withNgspice withScripting; }; inherit pname; - version = versions.${baseName}.kicadVersion.version; + version = kicadVersion; src = base; dontUnpack = true; @@ -54,15 +178,15 @@ stdenv.mkDerivation rec { dontBuild = true; dontFixup = true; - pythonPath = optionals (scriptingSupport) + pythonPath = optionals (withScripting) [ wxPython python.pkgs.six ]; nativeBuildInputs = [ makeWrapper ] - ++ optionals (scriptingSupport) - [ python.pkgs.wrapPython ]; + ++ optionals (withScripting) + [ python.pkgs.wrapPython ]; - # wrapGAppsHook added the equivalent to ${base}/share - # though i noticed no difference without it + # We are emulating wrapGAppsHook, along with other variables to the + # wrapper makeWrapperArgs = with passthru.libraries; [ "--prefix XDG_DATA_DIRS : ${base}/share" "--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share" @@ -73,14 +197,14 @@ stdenv.mkDerivation rec { "--prefix XDG_DATA_DIRS : ${cups}/share" "--prefix GIO_EXTRA_MODULES : ${gnome3.dconf}/lib/gio/modules" - "--set KISYSMOD ${footprints}/share/kicad/modules" - "--set KICAD_SYMBOL_DIR ${symbols}/share/kicad/library" - "--set KICAD_TEMPLATE_DIR ${templates}/share/kicad/template" + "--set-default KISYSMOD ${footprints}/share/kicad/modules" + "--set-default KICAD_SYMBOL_DIR ${symbols}/share/kicad/library" + "--set-default KICAD_TEMPLATE_DIR ${templates}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${symbols}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${footprints}/share/kicad/template" ] - ++ optionals (with3d) [ "--set KISYS3DMOD ${packages3d}/share/kicad/modules/packages3d" ] - ++ optionals (ngspiceSupport) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] + ++ optionals (with3d) [ "--set-default KISYS3DMOD ${packages3d}/share/kicad/modules/packages3d" ] + ++ optionals (withNgspice) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] # infinisil's workaround for #39493 ++ [ "--set GDK_PIXBUF_MODULE_FILE ${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" ] @@ -88,23 +212,24 @@ stdenv.mkDerivation rec { # why does $makeWrapperArgs have to be added explicitly? # $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set? - # kicad-ogltest's source seems to indicate that crashing is expected behaviour... - installPhase = with lib; + installPhase = let tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ]; - utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" "kicad-ogltest" ]; + utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" ]; in - ( concatStringsSep "\n" - ( flatten [ - ( optionalString (scriptingSupport) "buildPythonPath \"${base} $pythonPath\" \n" ) + (concatStringsSep "\n" + (flatten [ + (optionalString (withScripting) "buildPythonPath \"${base} $pythonPath\" \n") # wrap each of the directly usable tools - ( map ( tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs" - + optionalString (scriptingSupport) " --set PYTHONPATH \"$program_PYTHONPATH\"" - ) tools ) + (map + (tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs" + + optionalString (withScripting) " --set PYTHONPATH \"$program_PYTHONPATH\"" + ) + tools) # link in the CLI utils - ( map ( util: "ln -s ${base}/bin/${util} $out/bin/${util}" ) utils ) + (map (util: "ln -s ${base}/bin/${util} $out/bin/${util}") utils) ]) ) ; @@ -118,15 +243,15 @@ stdenv.mkDerivation rec { meta = rec { description = (if (stable) - then "Open Source Electronics Design Automation suite" - else "Open Source EDA suite, development build") - + (if (!with3d) then ", without 3D models" else ""); + then "Open Source Electronics Design Automation suite" + else "Open Source EDA suite, development build") + + (if (!with3d) then ", without 3D models" else ""); homepage = "https://www.kicad-pcb.org/"; longDescription = '' KiCad is an open source software suite for Electronic Design Automation. The Programs handle Schematic Capture, and PCB Layout with Gerber output. ''; - license = licenses.agpl3; + license = stdenv.lib.licenses.agpl3; # berce seems inactive... maintainers = with stdenv.lib.maintainers; [ evils kiwi berce ]; # kicad is cross platform diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/i18n.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/i18n.nix new file mode 100644 index 000000000000..95cea4fd7fc4 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/i18n.nix @@ -0,0 +1,18 @@ +{ stdenv +, cmake +, gettext +, src +, version +}: + +stdenv.mkDerivation { + inherit src version; + + pname = "kicad-i18n"; + + nativeBuildInputs = [ cmake gettext ]; + meta = with stdenv.lib; { + license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3 + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/libraries.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/libraries.nix index 057bc15bf5f3..b045a7d1068b 100644 --- a/nixpkgs/pkgs/applications/science/electronics/kicad/libraries.nix +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/libraries.nix @@ -1,39 +1,25 @@ -{ lib, stdenv, cmake, gettext -, fetchFromGitHub, fetchFromGitLab -, version, libSources +{ stdenv +, cmake +, gettext +, libSrc +, libVersion }: - -# callPackage libraries { -# version = "unstable"; -# libs.symbols = { -# rev = "09f9.."; -# sha256 = "..."; -# }; -# }; -with lib; let mkLib = name: stdenv.mkDerivation { pname = "kicad-${name}"; - # Use the revision instead of `version` (which is an ISO 8601 date) - # to prevent duplicating the library when just the date changed - version = "${builtins.substring 0 10 libSources.${name}.rev}"; - src = fetchFromGitHub ( - { - owner = "KiCad"; - repo = "kicad-${name}"; - rev = version; - inherit name; - } // (libSources.${name} or { }) - ); + version = libVersion; + + src = libSrc name; + nativeBuildInputs = [ cmake ]; meta = rec { - license = licenses.cc-by-sa-40; + license = stdenv.lib.licenses.cc-by-sa-40; platforms = stdenv.lib.platforms.all; # the 3d models are a ~1 GiB download and occupy ~5 GiB in store. # this would exceed the hydra output limit - hydraPlatforms = if (name == "packages3d" ) then [ ] else platforms; + hydraPlatforms = if (name == "packages3d") then [ ] else platforms; }; }; in @@ -42,30 +28,4 @@ in templates = mkLib "templates"; footprints = mkLib "footprints"; packages3d = mkLib "packages3d"; - - # i18n is a special case, not actually a library - # more a part of kicad proper, but also optional and separate - # since their move to gitlab they're keeping it in a separate path - # kicad has no way to find i18n except through a path relative to its install path - # therefore this is being linked into ${kicad-base}/share/ - # and defined here to make use of the rev & sha256's brought here for the libs - i18n = let name = "i18n"; in - stdenv.mkDerivation { - pname = "kicad-${name}"; - version = "${builtins.substring 0 10 libSources.${name}.rev}"; - src = fetchFromGitLab ( - { - group = "kicad"; - owner = "code"; - repo = "kicad-${name}"; - rev = version; - inherit name; - } // (libSources.${name} or { }) - ); - nativeBuildInputs = [ cmake gettext ]; - meta = { - license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3 - platforms = stdenv.lib.platforms.all; - }; - }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh b/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh index f048ccde4ec8..cfd78323b77a 100755 --- a/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh @@ -58,7 +58,6 @@ file="${here}/versions.nix" # just in case this runs in parallel tmp="${here}/,versions.nix.${RANDOM}" -# libraries currently on github, move to $gitlab/libraries planned libs=( symbols templates footprints packages3d ) get_rev="git ls-remote --heads --tags" @@ -67,9 +66,6 @@ gitlab="https://gitlab.com/kicad" # append commit hash or tag gitlab_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/archive.tar.gz?sha=" -# append "-$lib/archive/[hash or tag].tar.gz -github="https://github.com/kicad/kicad" - # not a lib, but separate and already moved to gitlab i18n="${gitlab}/code/kicad-i18n.git" i18n_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad-i18n/repository/archive.tar.gz?sha=" @@ -114,7 +110,7 @@ for version in "${all_versions[@]}"; do echo "Checking src" >&2 src_rev="$(${get_rev} "${gitlab}"/code/kicad.git "${version}" | cut -f1)" has_rev="$(grep -sm 1 "\"${pname}\"" -A 4 "${file}" | grep -sm 1 "${src_rev}" || true)" - has_hash="$(grep -sm 1 "\"${pname}\"" -A 5 "${file}" | grep -sm 1 "sha256")" + has_hash="$(grep -sm 1 "\"${pname}\"" -A 5 "${file}" | grep -sm 1 "sha256" || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then echo "Reusing old ${pname}.src.sha256, already latest .rev" >&2 grep -sm 1 "\"${pname}\"" -A 5 "${file}" | grep -sm 1 "rev" -A 1 @@ -134,7 +130,7 @@ for version in "${all_versions[@]}"; do echo "Checking i18n" >&2 i18n_rev="$(${get_rev} "${i18n}" "${version}" | cut -f1)" has_rev="$(grep -sm 1 "\"${pname}\"" -A 11 "${file}" | grep -sm 1 "${i18n_rev}" || true)" - has_hash="$(grep -sm 1 "\"${pname}\"" -A 12 "${file}" | grep -sm 1 "i18n.sha256")" + has_hash="$(grep -sm 1 "\"${pname}\"" -A 12 "${file}" | grep -sm 1 "i18n.sha256" || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then echo "Reusing old kicad-i18n-${today}.src.sha256, already latest .rev" >&2 grep -sm 1 "\"${pname}\"" -A 12 "${file}" | grep -sm 1 "i18n" -A 1 @@ -147,10 +143,10 @@ for version in "${all_versions[@]}"; do for lib in "${libs[@]}"; do echo "Checking ${lib}" >&2 - url="${github}-${lib}.git" - lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1)" + url="${gitlab}/libraries/kicad-${lib}.git" + lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1 | head -n1)" has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)" - has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256")" + has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256" || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then echo "Reusing old kicad-${lib}-${today}.src.sha256, already latest .rev" >&2 grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}" -A 1 @@ -161,7 +157,7 @@ for version in "${all_versions[@]}"; do esac printf "\"%s\";\n" "${lib_rev}" printf "%8s%s.sha256 =\t\"%s\";\n" "" \ - "${lib}" "$(${prefetch} "${github}-${lib}/archive/${lib_rev}.tar.gz")" + "${lib}" "$(${prefetch} "https://gitlab.com/api/v4/projects/kicad%2Flibraries%2Fkicad-${lib}/repository/archive.tar.gz?sha=${lib_rev}")" count=$((count+1)) fi done @@ -172,7 +168,7 @@ for version in "${all_versions[@]}"; do printf "\nReusing old %s\n" "${pname}" >&2 grep -sm 1 "\"${pname}\"" -A 23 "${file}" fi -done +done printf "}\n" } > "${tmp}" diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix index d001cc433672..9f00f3fa8ba8 100644 --- a/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix +++ b/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix @@ -3,49 +3,49 @@ { "kicad" = { kicadVersion = { - version = "5.1.6"; + version = "5.1.8"; src = { - rev = "c6e7f7de7df655fd59b57823499efc443009de6b"; - sha256 = "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"; + rev = "db9833491010954bc27fac92c83d2864bd95c23c"; + sha256 = "08ni9j2lw2hjc1csk6rkydcxwdal6da17ch60zkjij5vfsif2hix"; }; }; libVersion = { - version = "5.1.6"; + version = "5.1.8"; libSources = { - i18n.rev = "5ad171ce5c8d90f4740517c2adecb310d8be51bd"; - i18n.sha256 = "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"; - symbols.rev = "5150eaa2a7d15cfc6bb1459c527c4ebaa66d7708"; - symbols.sha256 = "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"; - templates.rev = "9213d439f757e6049b7e54f3ea08272a0d0f44a9"; - templates.sha256 = "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"; - footprints.rev = "a61b4e49762fb355f654e65a1c7db1aaf7bb2332"; - footprints.sha256 = "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"; - packages3d.rev = "150ff1caf0b01dc04c84f4f966f4f88fedfa8f8c"; - packages3d.sha256 = "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"; + i18n.rev = "78adcd19e7ed53f4889d6db65a33dd8ec2d323e9"; + i18n.sha256 = "0x0w2m6d3xfm22y4anp5j2j67iwzby149ynj6qjlw2kcsi8kwk1j"; + symbols.rev = "bf475af94877e8fd9cf80e667578ff61835e02bb"; + symbols.sha256 = "1ii3r813653ng2ycggnknqx4g3ja7dbm4qyxrf9aq48ws0xkvhx3"; + templates.rev = "1ccbaf3704e8ff4030d0915f71e051af621ef7d7"; + templates.sha256 = "1a8xfcbdbb4ylrb5m7n2jjk9kwvgmlx1pmnn2cwj327a2b3m4jjs"; + footprints.rev = "302ac78bac21825532f970fb92714fa5973ad79b"; + footprints.sha256 = "0gyqxryda273hjn2rv8dha461j9bjh054y5dlpiw1wiha65lrf9i"; + packages3d.rev = "7abe02f30fd79b8f4f66c01589861df7f8f72f04"; + packages3d.sha256 = "1szcin52fcsyb55bj7xq7lz6ig187dpz3lk7blwab7b9c4dn3c3y"; }; }; }; "kicad-unstable" = { kicadVersion = { - version = "2020-08-22"; + version = "2020-12-01"; src = { - rev = "a2341f0f335b0abb9fc8cb86d19cbe6f9b38fade"; - sha256 = "0167yb39f800xarq3khn7sbdkgcx9j2ayhy8c7lhhks6kh7459g0"; + rev = "3c521942ed52e83482c82d426170b4fbf327f846"; + sha256 = "sha256:09qab69sy3n44kjlzxxx7gbksyr1kg8n14kz0zf8n71zfcqagci4"; }; }; libVersion = { - version = "2020-08-22"; + version = "2020-12-01"; libSources = { - i18n.rev = "cbbb1efd940094bf0c3168280698b2b059a8c509"; - i18n.sha256 = "1q4jakn6m8smnr2mg7jgb520nrb6fag9mdvlcpx3smp3qbxka818"; - symbols.rev = "9ca6a5348cdeb88e699582d4ed051ff7303b44d3"; - symbols.sha256 = "13w6pb34rhz96rnar25z7kiscy6q1fm8l39hq1bpb8g9yn86ssz4"; - templates.rev = "ae16953b81055855bcede4a33305413599d86a15"; - templates.sha256 = "1pkv90p3liy3bj4nklxsvpzh9m56p0k5ldr22armvgqfaqaadx9v"; - footprints.rev = "f94c2d5d619d16033f69a555b449f59604d97865"; - footprints.sha256 = "1g71sk77jvqaf9xvgq6dkyvd9pij2lb4n0bn0dqnwddhwam935db"; - packages3d.rev = "f699b0e3c13fe75618086913e39279c85da14cc7"; - packages3d.sha256 = "0m5rb5axa946v729z35ga84in76y4zpk32qzi0hwqx957zy72hs9"; + i18n.rev = "e89d9a89bec59199c1ade56ee2556591412ab7b0"; + i18n.sha256 = "sha256:04zaqyhj3qr4ymyd3k5vjpcna64j8klpsygcgjcv29s3rdi8glfl"; + symbols.rev = "e538abb015b4f289910a6f26b2f1b9cb8bf2efdb"; + symbols.sha256 = "sha256:117y4cm46anlrnw6y6mdjgl1a5gab6h6m7cwx3q7qb284m9bs5gi"; + templates.rev = "32a4f6fab863976fdcfa232e3e08fdcf3323a954"; + templates.sha256 = "sha256:13r94dghrh9slpj7nkzv0zqv5hk49s6pxm4q5ndqx0y8037ivmhk"; + footprints.rev = "15ffd67e01257d4d8134dbd6708cb58977eeccbe"; + footprints.sha256 = "sha256:1ad5k3wh2zqfibrar7pd3g363jk2q51dvraxnq3zlxa2x4znh7mw"; + packages3d.rev = "d8b7e8c56d535f4d7e46373bf24c754a8403da1f"; + packages3d.sha256 = "sha256:0dh8ixg0w43wzj5h3164dz6l1vl4llwxhi3qcdgj1lgvrs28aywd"; }; }; }; diff --git a/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix b/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix index de01b095e381..4b0a4108ab22 100644 --- a/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix @@ -1,39 +1,47 @@ -{ lib, mkDerivation, fetchFromGitHub, qtbase, qttools, qmake, wrapQtAppsHook }: +{ stdenv, lib, fetchFromGitHub +, qtbase, qttools, qmake, wrapQtAppsHook +}: -mkDerivation { +stdenv.mkDerivation rec { pname = "librepcb"; - version = "0.1.4"; + version = "0.1.5"; src = fetchFromGitHub { - owner = "LibrePCB"; - repo = "LibrePCB"; + owner = pname; + repo = pname; + rev = version; + sha256 = "0ag8h3id2c1k9ds22rfrvyhf2vjhkv82xnrdrz4n1hnlr9566vcx"; fetchSubmodules = true; - rev = "ae04eef5a71b5ba66ae2cee6b631c1c933ace535"; - sha256 = "0wk5qny1jb6n4mwyyrs7syir3hmwxlwazcd80bpxharmsj7p0rzc"; }; - enableParallelBuilding = true; - nativeBuildInputs = [ qmake qttools wrapQtAppsHook ]; - buildInputs = [ qtbase ]; qmakeFlags = ["-r"]; + enableParallelBuilding = true; postInstall = '' - mkdir -p $out/share/librepcb/fontobene - cp share/librepcb/fontobene/newstroke.bene $out/share/librepcb/fontobene/ - ''; + mkdir -p $out/share/librepcb/fontobene + cp share/librepcb/fontobene/newstroke.bene $out/share/librepcb/fontobene/ + ''; + + # the build system tries to use 'git' at build time to find the HEAD hash. + # that's a no-no, so replace it with a quick hack. NOTE: the # adds a comment + # at the end of the line to remove the git call. + patchPhase = '' + substituteInPlace ./libs/librepcb/common/common.pro \ + --replace 'GIT_COMMIT_SHA' 'GIT_COMMIT_SHA="\\\"${src.rev}\\\"" # ' + ''; preFixup = '' wrapQtApp $out/bin/librepcb ''; - meta = with lib; { + meta = with stdenv.lib; { description = "A free EDA software to develop printed circuit boards"; - homepage = "https://librepcb.org/"; - maintainers = with maintainers; [ luz ]; - license = licenses.gpl3; - platforms = platforms.linux; + homepage = "https://librepcb.org/"; + maintainers = with maintainers; [ luz thoughtpolice ]; + license = licenses.gpl3; + platforms = platforms.linux; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix b/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix index 96849c300298..6667f2be9c3d 100644 --- a/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix @@ -1,16 +1,20 @@ -{ stdenv, fetchurl, m4, tcsh, libX11, tcl, tk, cairo, ncurses, mesa_glu, python3 }: +{ stdenv, fetchurl +, m4, tcsh, libX11, tcl, tk +, cairo, ncurses, mesa_glu, python3 +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "magic-vlsi"; - version = "8.3.5"; + version = "8.3.80"; src = fetchurl { - url = "http://opencircuitdesign.com/magic/archive/magic-8.3.5.tgz"; - sha256 = "0wv4zmxlqjfaakgp802icn0cd9f8ylkz2sppix83axq8p5cg90yq"; + url = "http://opencircuitdesign.com/magic/archive/magic-${version}.tgz"; + sha256 = "0a5x4sh5xsr79pqbgv6221jc4fvaxkg2pvrdhy1cs4bmsc1sbm9j"; }; buildInputs = [ m4 tcsh libX11 tcl tk cairo ncurses mesa_glu ]; nativeBuildInputs = [ python3 ]; + enableParallelBuilding = true; configureFlags = [ "--with-tcl=${tcl}" @@ -22,6 +26,8 @@ stdenv.mkDerivation { patchShebangs scripts/* ''; + NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration"; + patches = [ ./0001-strip-bin-prefix.patch ./0002-fix-format-security.patch @@ -29,8 +35,8 @@ stdenv.mkDerivation { meta = with stdenv.lib; { description = "VLSI layout tool written in Tcl"; - homepage = "http://opencircuitdesign.com/magic/"; - license = licenses.mit; - maintainers = [ maintainers.anna328p ]; + homepage = "http://opencircuitdesign.com/magic/"; + license = licenses.mit; + maintainers = with maintainers; [ anna328p thoughtpolice ]; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix b/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix new file mode 100644 index 000000000000..9f959bddf2d2 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix @@ -0,0 +1,51 @@ +{ lib, mkDerivationWith, wrapQtAppsHook, python3Packages, fetchFromGitHub +, qtbase }: + +let + version = "0.3.8"; + pname = "nanovna-saver"; + +in mkDerivationWith python3Packages.buildPythonApplication { + inherit pname version; + + src = fetchFromGitHub { + owner = "NanoVNA-Saver"; + repo = pname; + rev = "v${version}"; + sha256 = "0z83rwpnbbs1n74mx8dgh1d1crp90mannj9vfy161dmy4wzc5kpv"; + }; + + nativeBuildInputs = [ wrapQtAppsHook ]; + + propagatedBuildInputs = with python3Packages; [ + cython + scipy_1_4 + pyqt5 + pyserial + numpy + ]; + + doCheck = false; + + dontWrapGApps = true; + dontWrapQtApps = true; + + postFixup = '' + wrapProgram $out/bin/NanoVNASaver \ + "''${gappsWrapperArgs[@]}" \ + "''${qtWrapperArgs[@]}" + ''; + + meta = with lib; { + homepage = "https://github.com/NanoVNA-Saver/nanovna-saver"; + description = + "A tool for reading, displaying and saving data from the NanoVNA"; + longDescription = '' + A multiplatform tool to save Touchstone files from the NanoVNA, sweep + frequency spans in segments to gain more than 101 data points, and + generally display and analyze the resulting data. + ''; + license = licenses.gpl3Only; + maintainers = with maintainers; [ zaninime ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix b/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix index 951e5f66f6ee..5113dc778f62 100644 --- a/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix @@ -1,13 +1,24 @@ -{stdenv, fetchurl, bison, flex -, readline, libX11, libICE, libXaw, libXmu, libXext, libXt, fftw }: +{ stdenv +, fetchurl +, bison +, flex +, readline +, libX11 +, libICE +, libXaw +, libXmu +, libXext +, libXt +, fftw +}: stdenv.mkDerivation rec { pname = "ngspice"; - version = "31"; + version = "33"; src = fetchurl { url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz"; - sha256 = "10n2lnfrpsv4vyrirkphr4jwjjhy7i617g6za78dwirfjq63npw4"; + sha256 = "1wa1hmpn13spmxqgbb1m7vgy32mwvjqwrxhymzll8z65q5nbd7dr"; }; nativeBuildInputs = [ flex bison ]; diff --git a/nixpkgs/pkgs/applications/science/electronics/openems/default.nix b/nixpkgs/pkgs/applications/science/electronics/openems/default.nix new file mode 100644 index 000000000000..f7c8dd7467a3 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/electronics/openems/default.nix @@ -0,0 +1,76 @@ +{ stdenv +, lib +, fetchFromGitHub +, csxcad +, fparser +, tinyxml +, hdf5 +, vtk +, boost +, zlib +, cmake +, octave +, gl2ps +, withQcsxcad ? true +, withMPI ? false +, withHyp2mat ? true +, qcsxcad ? null +, openmpi ? null +, hyp2mat ? null +}: + +assert withQcsxcad -> qcsxcad != null; +assert withMPI -> openmpi != null; +assert withHyp2mat -> hyp2mat != null; + +stdenv.mkDerivation { + pname = "openems"; + version = "unstable-2020-02-15"; + + src = fetchFromGitHub { + owner = "thliebig"; + repo = "openEMS"; + rev = "ba793ac84e2f78f254d6d690bb5a4c626326bbfd"; + sha256 = "1dca6b6ccy771irxzsj075zvpa3dlzv4mjb8xyg9d889dqlgyl45"; + }; + + nativeBuildInputs = [ + cmake + ]; + + cmakeFlags = lib.optionals withMPI [ "-DWITH_MPI=ON" ]; + + buildInputs = [ + fparser + tinyxml + hdf5 + vtk + boost + zlib + csxcad + (octave.override { inherit hdf5; }) ] + ++ lib.optionals withQcsxcad [ qcsxcad ] + ++ lib.optionals withMPI [ openmpi ] + ++ lib.optionals withHyp2mat [ hyp2mat ]; + + postFixup = '' + substituteInPlace $out/share/openEMS/matlab/setup.m \ + --replace /usr/lib ${hdf5}/lib \ + --replace /usr/include ${hdf5}/include + + ${octave}/bin/mkoctfile -L${hdf5}/lib -I${hdf5}/include \ + -lhdf5 $out/share/openEMS/matlab/h5readatt_octave.cc \ + -o $out/share/openEMS/matlab/h5readatt_octave.oct + ''; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Open Source Electromagnetic Field Solver"; + homepage = "http://openems.de/index.php/Main_Page.html"; + license = licenses.gpl3; + maintainers = with maintainers; [ matthuszagh ]; + platforms = platforms.linux; + badPlatforms = platforms.aarch64; + }; +} diff --git a/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix b/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix index ad8fa3c7a7ae..acdac346fd3b 100644 --- a/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "openhantek6022"; - version = "3.1.2"; + version = "3.1.3"; src = fetchFromGitHub { owner = "OpenHantek"; repo = "OpenHantek6022"; rev = version; - sha256 = "104j7d3i5y6jd20c2z3l10sr6sgdy8iki3g9mlwhddnr8x6nzc03"; + sha256 = "1n4l8ks5808d99zj1vj0ck0v1lb9s7iv3ahww7ximbf9iha39pbm"; }; nativeBuildInputs = [ cmake makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/electronics/qcsxcad/default.nix b/nixpkgs/pkgs/applications/science/electronics/qcsxcad/default.nix deleted file mode 100644 index c12678c0047d..000000000000 --- a/nixpkgs/pkgs/applications/science/electronics/qcsxcad/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ stdenv -, mkDerivation -, fetchFromGitHub -, cmake -, csxcad -, tinyxml -, vtkWithQt5 -, wrapQtAppsHook -, qtbase -}: - -mkDerivation { - pname = "qcsxcad"; - version = "unstable-2020-01-04"; - - src = fetchFromGitHub { - owner = "thliebig"; - repo = "QCSXCAD"; - rev = "0dabbaf2bc1190adec300871cf309791af842c8e"; - sha256 = "11kbh0mxbdfh7s5azqin3i2alic5ihmdfj0jwgnrhlpjk4cbf9rn"; - }; - - nativeBuildInputs = [ - cmake - wrapQtAppsHook - ]; - - cmakeFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCSXCAD_ROOT_DIR=${csxcad}" - "-DENABLE_RPATH=OFF" - ]; - - buildInputs = [ - csxcad - tinyxml - vtkWithQt5 - qtbase - ]; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Qt library for CSXCAD"; - homepage = "https://github.com/thliebig/QCSXCAD"; - license = licenses.gpl3; - maintainers = with maintainers; [ matthuszagh ]; - platforms = platforms.linux; - }; -} diff --git a/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix b/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix index df1ce7b7235f..6217df2db8f8 100644 --- a/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix @@ -1,43 +1,45 @@ -{ stdenv, fetchFromGitHub, autoconf, gperf, flex, bison, readline, ncurses -, bzip2, zlib -# Test inputs +{ stdenv +, fetchFromGitHub +, autoconf +, bison +, bzip2 +, flex +, gperf +, ncurses , perl +, readline +, zlib }: let iverilog-test = fetchFromGitHub { - owner = "steveicarus"; - repo = "ivtest"; - rev = "6882cb8ec08926c4e356c6092f0c5f8c23328d5c"; - sha256 = "04sj5nqzwls1y760kgnd9c2whkcrr8kvj9lisd5rvk0w580kjb2x"; + owner = "steveicarus"; + repo = "ivtest"; + rev = "253609b89576355b3bef2f91e90db62223ecf2be"; + sha256 = "18i7jlr2csp7mplcrwjhllwvb6w3v7x7mnx7vdw48nd3g5scrydx"; }; in stdenv.mkDerivation rec { - pname = "iverilog"; - version = "unstable-2020-08-24"; + pname = "iverilog"; + version = "11.0"; src = fetchFromGitHub { - owner = "steveicarus"; - repo = pname; - rev = "d8556e4c86e1465b68bdc8d5ba2056ba95a42dfd"; - sha256 = "sha256-sT9j/0Q2FD5MOGpH/quMGvAuM7t7QavRHKD9lX7Elfs="; + owner = "steveicarus"; + repo = pname; + rev = "v${stdenv.lib.replaceStrings ["."] ["_"] version}"; + sha256 = "0nzcyi6l2zv9wxzsv9i963p3igyjds0n55x0ph561mc3pfbc7aqp"; }; - enableParallelBuilding = true; + nativeBuildInputs = [ autoconf bison flex gperf ]; - preConfigure = '' - chmod +x $PWD/autoconf.sh - $PWD/autoconf.sh - ''; + buildInputs = [ bzip2 ncurses readline zlib ]; - nativeBuildInputs = [ autoconf gperf flex bison ]; + preConfigure = "sh autoconf.sh"; + + enableParallelBuilding = true; - buildInputs = [ readline ncurses bzip2 zlib ]; + doCheck = true; - # tests from .travis.yml - doCheck = true; # runs ``make check`` - # most tests pass, but some that rely on exact text of floating-point numbers fail on aarch64. - doInstallCheck = !stdenv.isAarch64; installCheckInputs = [ perl ]; installCheckPhase = '' @@ -58,9 +60,9 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Icarus Verilog compiler"; - homepage = "http://iverilog.icarus.com/"; - license = with licenses; [ gpl2Plus lgpl21Plus] ; - maintainers = with maintainers; [ winden ]; - platforms = platforms.all; + homepage = "http://iverilog.icarus.com/"; # https does not work + license = with licenses; [ gpl2Plus lgpl21Plus ]; + maintainers = with maintainers; [ winden thoughtpolice ]; + platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix b/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix index 43dfdcabd02f..be9e890fc8d5 100644 --- a/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix +++ b/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchFromGitHub +, fetchpatch , bison , flex , verilog @@ -16,6 +17,15 @@ stdenv.mkDerivation rec { sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n"; }; + patches = stdenv.lib.optionals (!stdenv.isAarch64) [ + # fix build with verilog 11.0 - https://github.com/ldoolitt/vhd2vl/pull/15 + # for some strange reason, this is not needed for aarch64 + (fetchpatch { + url = "https://github.com/ldoolitt/vhd2vl/commit/ce9b8343ffd004dfe8779a309f4b5a594dbec45e.patch"; + sha256 = "1qaqhm2mk66spb2dir9n91b385rarglc067js1g6pcg8mg5v3hhf"; + }) + ]; + nativeBuildInputs = [ bison flex diff --git a/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix b/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix new file mode 100644 index 000000000000..4691291a4257 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, fetchFromGitHub +, autoreconfHook +, libX11 +, libGL +, libGLU +, freeglut }: + +stdenv.mkDerivation rec { + pname = "antiprism"; + version = "0.26"; + + src = fetchFromGitHub { + owner = "antiprism"; + repo = pname; + rev = version; + sha256 = "sha256-5FE6IbYKk7eMT985R9NCX3GDXE8SrdVHFcCpKeJvKtQ="; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ libX11 libGLU libGL.dev freeglut.dev ]; + + meta = with stdenv.lib; { + homepage = "https://www.antiprism.com"; + description = "A collection of programs for generating, manipulating, transforming and viewing polyhedra"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ AndersonTorres ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/geometry/gama/default.nix b/nixpkgs/pkgs/applications/science/geometry/gama/default.nix index fe606125c552..c5e95d37b510 100644 --- a/nixpkgs/pkgs/applications/science/geometry/gama/default.nix +++ b/nixpkgs/pkgs/applications/science/geometry/gama/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, lib, expat, octave, libxml2, texinfo }: +{ stdenv, fetchurl, lib, expat, octave, libxml2, texinfo, zip }: stdenv.mkDerivation rec { pname = "gama"; - version = "2.09"; + version = "2.12"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0c1b28frl6109arj09v4zr1xs859krn8871mkvis517g5pb55dc9"; + sha256 = "0zfilasalsy29b7viw0iwgnl9bkvp0l87gpxl1hx7379l8agwqyj"; }; buildInputs = [ expat ]; - nativeBuildInputs = [ texinfo ]; + nativeBuildInputs = [ texinfo zip ]; checkInputs = [ octave libxml2 ]; doCheck = true; diff --git a/nixpkgs/pkgs/applications/science/logic/abc/default.nix b/nixpkgs/pkgs/applications/science/logic/abc/default.nix index 29d727d988e7..426c5a9df323 100644 --- a/nixpkgs/pkgs/applications/science/logic/abc/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/abc/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "abc-verifier"; - version = "2020.06.22"; + version = "2020.11.24"; src = fetchFromGitHub { - owner = "berkeley-abc"; + owner = "yosyshq"; repo = "abc"; - rev = "341db25668f3054c87aa3372c794e180f629af5d"; - sha256 = "14cgv34vz5ljkcms6nrv19vqws2hs8bgjgffk5q03cbxnm2jxv5s"; + rev = "4f5f73d18b137930fb3048c0b385c82fa078db38"; + sha256 = "0z1kp223kix7i4r7mbj2bzawkdzc55nsgc41m85dmbajl9fsj1m0"; }; nativeBuildInputs = [ cmake ]; diff --git a/nixpkgs/pkgs/applications/science/logic/boolector/default.nix b/nixpkgs/pkgs/applications/science/logic/boolector/default.nix index aedc8e3484a9..0364a76639aa 100644 --- a/nixpkgs/pkgs/applications/science/logic/boolector/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/boolector/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, lib, python3 +{ stdenv, fetchFromGitHub, fetchpatch, lib, python3 , cmake, lingeling, btor2tools, gtest, gmp }: @@ -13,6 +13,14 @@ stdenv.mkDerivation rec { sha256 = "0jkmaw678njqgkflzj9g374yk1mci8yqvsxkrqzlifn6bwhwb7ci"; }; + # excludes development artifacts from install, will be included in next release + patches = [ + (fetchpatch { + url = "https://github.com/Boolector/boolector/commit/4d240436e34e65096671099766344dd9126145b1.patch"; + sha256 = "1girsbvlhkkl1hldl2gsjynwc3m92jskn798qhx0ydg6whrfgcgw"; + }) + ]; + postPatch = '' sed s@REPLACEME@file://${gtest.src}@ ${./cmake-gtest.patch} | patch -p1 ''; @@ -23,39 +31,39 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DUSE_LINGELING=YES" - "-DBtor2Tools_INCLUDE_DIR=${btor2tools.dev}/include" - "-DBtor2Tools_LIBRARIES=${btor2tools.lib}/lib/libbtor2parser.so" ] ++ (lib.optional (gmp != null) "-DUSE_GMP=YES"); - installPhase = '' - mkdir -p $out/bin $lib/lib $dev/include - - cp -vr bin/* $out/bin - cp -vr lib/* $lib/lib - - rm -rf $out/bin/{examples,tests} - # we don't care about gtest related libs - rm -rf $lib/lib/libg* - - cd ../src - find . -iname '*.h' -exec cp --parents '{}' $dev/include \; - rm -rf $dev/include/tests - ''; - checkInputs = [ python3 ]; doCheck = true; - preCheck = '' - export LD_LIBRARY_PATH=$(readlink -f lib) - patchShebangs .. + preCheck = + let var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + in + # tests modelgen and modelgensmt2 spawn boolector in another processes and + # macOS strips DYLD_LIBRARY_PATH, hardcode it for testing + stdenv.lib.optionalString stdenv.isDarwin '' + cp -r bin bin.back + install_name_tool -change libboolector.dylib $(pwd)/lib/libboolector.dylib bin/boolector + '' + '' + export ${var}=$(readlink -f lib) + patchShebangs .. + ''; + + postCheck = stdenv.lib.optionalString stdenv.isDarwin '' + rm -rf bin + mv bin.back bin ''; - outputs = [ "out" "dev" "lib" ]; + # this is what haskellPackages.boolector expects + postInstall = '' + cp $out/include/boolector/boolector.h $out/include/boolector.h + cp $out/include/boolector/btortypes.h $out/include/btortypes.h + ''; meta = with stdenv.lib; { description = "An extremely fast SMT solver for bit-vectors and arrays"; homepage = "https://boolector.github.io"; license = licenses.mit; - platforms = platforms.linux; + platforms = with platforms; linux ++ darwin; maintainers = with maintainers; [ thoughtpolice ]; }; } diff --git a/nixpkgs/pkgs/applications/science/logic/btor2tools/default.nix b/nixpkgs/pkgs/applications/science/logic/btor2tools/default.nix index 714ab49524b0..7d2aed7596e8 100644 --- a/nixpkgs/pkgs/applications/science/logic/btor2tools/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/btor2tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, cmake, fetchFromGitHub }: +{ stdenv, cmake, fetchFromGitHub, fixDarwinDylibNames }: stdenv.mkDerivation rec { pname = "btor2tools"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0mfqmkgvyw8fa2c09kww107dmk180ch1hp98r5kv41vnc04iqb0s"; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; installPhase = '' mkdir -p $out $dev/include/btor2parser/ $lib/lib @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { description = "A generic parser and tool package for the BTOR2 format"; homepage = "https://github.com/Boolector/btor2tools"; license = licenses.mit; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice ]; }; } diff --git a/nixpkgs/pkgs/applications/science/logic/cedille/Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch b/nixpkgs/pkgs/applications/science/logic/cedille/Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch new file mode 100644 index 000000000000..51f1478987eb --- /dev/null +++ b/nixpkgs/pkgs/applications/science/logic/cedille/Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch @@ -0,0 +1,31 @@ +From 563f023aba1034f4f433f412302b825b059ef5a5 Mon Sep 17 00:00:00 2001 +From: Mark Barbone <mark.l.barbone@gmail.com> +Date: Sun, 19 Jul 2020 17:24:30 -0400 +Subject: [PATCH] Fix to-string.agda to compile with Agda 2.6.1 + +--- +Adapted from https://github.com/cedille/cedille/pull/156. + + src/to-string.agda | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/to-string.agda b/src/to-string.agda +index 2505942..051a2da 100644 +--- a/src/to-string.agda ++++ b/src/to-string.agda +@@ -100,9 +100,9 @@ no-parens {TK} _ _ _ = tt + no-parens {QUALIF} _ _ _ = tt + no-parens {ARG} _ _ _ = tt + +-pattern ced-ops-drop-spine = cedille-options.options.mk-options _ _ _ _ ff _ _ _ ff _ +-pattern ced-ops-conv-arr = cedille-options.options.mk-options _ _ _ _ _ _ _ _ ff _ +-pattern ced-ops-conv-abs = cedille-options.options.mk-options _ _ _ _ _ _ _ _ tt _ ++pattern ced-ops-drop-spine = cedille-options.mk-options _ _ _ _ ff _ _ _ ff _ ++pattern ced-ops-conv-arr = cedille-options.mk-options _ _ _ _ _ _ _ _ ff _ ++pattern ced-ops-conv-abs = cedille-options.mk-options _ _ _ _ _ _ _ _ tt _ + + drop-spine : cedille-options.options → {ed : exprd} → ctxt → ⟦ ed ⟧ → ⟦ ed ⟧ + drop-spine ops @ ced-ops-drop-spine = h +-- +2.27.0 + diff --git a/nixpkgs/pkgs/applications/science/logic/cedille/default.nix b/nixpkgs/pkgs/applications/science/logic/cedille/default.nix index 2ac96df66a68..7b181790f140 100644 --- a/nixpkgs/pkgs/applications/science/logic/cedille/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/cedille/default.nix @@ -10,17 +10,21 @@ }: stdenv.mkDerivation rec { - version = "1.1.1"; + version = "1.1.2"; pname = "cedille"; src = fetchFromGitHub { owner = "cedille"; repo = "cedille"; rev = "v${version}"; - sha256 = "16pc72wz6kclq9yv2r8hx85mkp0s125h12snrhcjxkbl41xx2ynb"; + sha256 = "1j745q9sd32fhcb96wjq6xvyqq1k6imppjnya6x0n99fyfnqzvg9"; fetchSubmodules = true; }; + patches = [ + ./Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch + ]; + nativeBuildInputs = [ alex happy ]; buildInputs = [ Agda (ghcWithPackages (ps: [ps.ieee])) ]; diff --git a/nixpkgs/pkgs/applications/science/logic/coq/default.nix b/nixpkgs/pkgs/applications/science/logic/coq/default.nix index 946cba41b143..2ebe75d3bc50 100644 --- a/nixpkgs/pkgs/applications/science/logic/coq/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/coq/default.nix @@ -35,6 +35,9 @@ let "8.11.1" = "0qriy9dy36dajsv5qmli8gd6v55mah02ya334nw49ky19v7518m0"; "8.11.2" = "0f77ccyxdgbf1nrj5fa8qvrk1cyfy06fv8gj9kzfvlcgn0cf48sa"; "8.12.0" = "18dc7k0piv6v064zgdadpw6mkkxk7j663hb3svgj5236fihjr0cz"; + "8.12.1" = "1rkcyjjrzcqw9xk93hsq0vvji4f8r5iq0f739mghk60bghkpnb7q"; + "8.12.2" = "18gscfm039pqhq4msq01nraig5dm9ab98bjca94zldf8jvdv0x2n"; + "8.13+beta1" = "1v4a6dpj41flspa4ihcr7m5ahqz10kbn62fmrldmv7gzq6jsyfyq"; }.${version}; coq-version = stdenv.lib.versions.majorMinor version; versionAtLeast = stdenv.lib.versionAtLeast coq-version; @@ -117,7 +120,9 @@ self = stdenv.mkDerivation { then [ ocamlPackages.lablgtk3-sourceview3 glib gnome3.defaultIconTheme wrapGAppsHook ] else [ ocamlPackages.lablgtk ]); - propagatedBuildInputs = stdenv.lib.optional (versionAtLeast "8.12") ocamlPackages.num; + propagatedBuildInputs = + stdenv.lib.optional (versionAtLeast "8.13") ocamlPackages.zarith + ++ stdenv.lib.optional (coq-version == "8.12") ocamlPackages.num; postPatch = '' UNAME=$(type -tp uname) diff --git a/nixpkgs/pkgs/applications/science/logic/coq2html/default.nix b/nixpkgs/pkgs/applications/science/logic/coq2html/default.nix index 2e56eda893e9..e53e8e7392c0 100644 --- a/nixpkgs/pkgs/applications/science/logic/coq2html/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/coq2html/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, ocaml }: -let +let version = "20170720"; in @@ -22,7 +22,7 @@ stdenv.mkDerivation { ''; meta = with stdenv.lib; { - description = "coq2html is an HTML documentation generator for Coq source files"; + description = "HTML documentation generator for Coq source files"; longDescription = '' coq2html is an HTML documentation generator for Coq source files. It is an alternative to the standard coqdoc documentation generator diff --git a/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix b/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix index 6877060d36d6..78861786defa 100644 --- a/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cryptoverif"; - version = "2.01pl1"; + version = "2.04"; src = fetchurl { url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${version}.tar.gz"; - sha256 = "1bkmrv3wsy8mwhrxd3z3br9zgv37c2w6443rm4s9jl0aphcgnbiw"; + sha256 = "1mzk6n0g2vdsv38y493zg85lxrpz72b92cmsray3g970xzanqd6s"; }; buildInputs = [ ocaml ]; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ** from under $out/libexec. By default, it expects to find the files ** in $CWD which doesn't work. */ patchPhase = '' - substituteInPlace ./src/settings.ml \ + substituteInPlace ./src/syntax.ml \ --replace \"default\" \"$out/libexec/default\" ''; diff --git a/nixpkgs/pkgs/applications/science/logic/key/default.nix b/nixpkgs/pkgs/applications/science/logic/key/default.nix new file mode 100644 index 000000000000..b08c4d84d1fc --- /dev/null +++ b/nixpkgs/pkgs/applications/science/logic/key/default.nix @@ -0,0 +1,74 @@ +{ stdenv +, fetchurl +, unzip +, jdk +, ant +, jre +, makeWrapper +, runCommand +, key +}: + +# get this from the download URL when changing version +let gitRevision = "7d3deab0763c88edee4f7a08e604661e0dbdd450"; + +in stdenv.mkDerivation rec { + pname = "key"; + version = "2.6.3"; + + src = fetchurl { + url = "https://formal.iti.kit.edu/key/releases/${version}/key-src-${version}_${gitRevision}.zip"; + sha256 = "1dr5jmrqs0iy76wdsfiv5hx929i24yzm1xypzqqvx7afc7apyawy"; + }; + + sourceRoot = "key"; + + nativeBuildInputs = [ + unzip + jdk + ant + makeWrapper + ]; + + buildPhase = '' + ant -buildfile scripts/build.xml \ + -Dgit.revision=${gitRevision} \ + compileAll deployAll + ''; + + postCheck = '' + ant -buildfile scripts/build.xml \ + -Dgit.revision=${gitRevision} \ + compileAllTests runAllTests test-deploy-all + ''; + + installPhase = '' + mkdir -p $out/share/java + # Wrong version in the code. On next version change 2.5 to ${version}: + unzip deployment/key-2.5_${gitRevision}.zip -d $out/share/java + mkdir -p $out/bin + makeWrapper ${jre}/bin/java $out/bin/KeY \ + --add-flags "-cp $out/share/java/KeY.jar de.uka.ilkd.key.core.Main" + ''; + + passthru.tests.check-version = runCommand "key-help" {} '' + ${key}/bin/KeY --help | grep 2.5 # Wrong version in the code. On next version change to ${version} + touch $out + ''; + + meta = with stdenv.lib; { + description = "Java formal verification tool"; + homepage = "https://www.key-project.org"; # also https://formal.iti.kit.edu/key/ + longDescription = '' + The KeY System is a formal software development tool that aims to + integrate design, implementation, formal specification, and formal + verification of object-oriented software as seamlessly as possible. + At the core of the system is a novel theorem prover for the first-order + Dynamic Logic for Java with a user-friendly graphical interface. + ''; + license = licenses.gpl2; + maintainers = with maintainers; [ fgaz ]; + platforms = platforms.all; + }; +} + diff --git a/nixpkgs/pkgs/applications/science/logic/lean/default.nix b/nixpkgs/pkgs/applications/science/logic/lean/default.nix index 32a75cabc13f..88e1b4fbc0e1 100644 --- a/nixpkgs/pkgs/applications/science/logic/lean/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/lean/default.nix @@ -2,22 +2,26 @@ stdenv.mkDerivation rec { pname = "lean"; - version = "3.19.0"; + version = "3.23.0"; src = fetchFromGitHub { owner = "leanprover-community"; repo = "lean"; rev = "v${version}"; - sha256 = "1dybq6104vc62x620izgblfd8dqc4ynaiw8ml07km78lq38anm6v"; + sha256 = "09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx"; }; nativeBuildInputs = [ cmake ]; buildInputs = [ gmp ]; enableParallelBuilding = true; - preConfigure = '' - cd src - ''; + cmakeDir = "../src"; + + # Running the tests is required to build the *.olean files for the core + # library. + doCheck = true; + + postPatch = "patchShebangs ."; postInstall = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace $out/bin/leanpkg \ diff --git a/nixpkgs/pkgs/applications/science/logic/ott/default.nix b/nixpkgs/pkgs/applications/science/logic/ott/default.nix index ecc253a64d98..48ad63eaa993 100644 --- a/nixpkgs/pkgs/applications/science/logic/ott/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/ott/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { postInstall = "opaline -prefix $out"; meta = { - description = "Ott: tool for the working semanticist"; + description = "A tool for the working semanticist"; longDescription = '' Ott is a tool for writing definitions of programming languages and calculi. It takes as input a definition of a language syntax and diff --git a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix b/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix index 1203822d86e9..b74583ca1a2c 100644 --- a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix +++ b/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "potassco"; - repo = "${pname}"; + repo = pname; rev = "v${version}"; fetchSubmodules = true; sha256 = "1q7517h10jfvjdk2czq8d6y57r8kr1j1jj2k2ip2qxkpyfigk4rs"; diff --git a/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix b/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix index 7c1ee8099e2c..fd6b2c8d14cd 100644 --- a/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix +++ b/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "clingo"; - version = "5.4.0"; + version = "5.4.1"; src = fetchzip { url = "https://github.com/potassco/clingo/archive/v${version}.tar.gz"; - sha256 = "0gfqlgwg3qx042w6hdc9qpmr50n4vci3p0ddk28f3kqacf6q9q7m"; + sha256 = "1f0q5f71s696ywxcjlfz7z134m1h7i39j9sfdv8hlw2w3g5nppc3"; }; nativeBuildInputs = [ cmake ]; diff --git a/nixpkgs/pkgs/applications/science/logic/proverif/default.nix b/nixpkgs/pkgs/applications/science/logic/proverif/default.nix index 6acae2bcb766..4242bb0599e9 100644 --- a/nixpkgs/pkgs/applications/science/logic/proverif/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/proverif/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp ./proverif $out/bin cp ./proveriftotex $out/bin + install -D -t $out/share/emacs/site-lisp/ emacs/proverif.el ''; meta = { diff --git a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix b/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix index 857aba5a2607..d217e2b9b505 100644 --- a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix @@ -1,15 +1,15 @@ { haskellPackages, mkDerivation, fetchFromGitHub, lib # the following are non-haskell dependencies -, makeWrapper, which, maude, graphviz, ocaml +, makeWrapper, which, maude, graphviz }: let - version = "1.4.1"; + version = "1.6.0"; src = fetchFromGitHub { owner = "tamarin-prover"; repo = "tamarin-prover"; - rev = "d2e1c57311ce4ed0ef46d0372c4995b8fdc25323"; - sha256 = "1bf2qvb646jg3qxd6jgp9ja3wlr888wchxi9mfr3kg7hfn63vxbq"; + rev = version; + sha256 = "1pl3kz7gyw9g6s4x5j90z4snd10vq6296g3ajlr8d4n53p3c9i3w"; }; # tamarin has its own dependencies, but they're kept inside the repo, @@ -33,16 +33,15 @@ let tamarin-prover-utils = mkDerivation (common "tamarin-prover-utils" (src + "/lib/utils") // { postPatch = replaceSymlinks; libraryHaskellDepends = with haskellPackages; [ - base base64-bytestring binary blaze-builder bytestring containers - deepseq dlist fclabels mtl pretty safe SHA syb time transformers + base64-bytestring blaze-builder + dlist exceptions fclabels safe SHA syb ]; }); tamarin-prover-term = mkDerivation (common "tamarin-prover-term" (src + "/lib/term") // { postPatch = replaceSymlinks; libraryHaskellDepends = (with haskellPackages; [ - attoparsec base binary bytestring containers deepseq dlist HUnit - mtl process safe + attoparsec HUnit ]) ++ [ tamarin-prover-utils ]; }); @@ -50,11 +49,18 @@ let postPatch = replaceSymlinks; doHaddock = false; # broken libraryHaskellDepends = (with haskellPackages; [ - aeson aeson-pretty base binary bytestring containers deepseq dlist - fclabels mtl parallel parsec process safe text transformers uniplate + aeson aeson-pretty parallel uniplate ]) ++ [ tamarin-prover-utils tamarin-prover-term ]; }); + tamarin-prover-sapic = mkDerivation (common "tamarin-prover-sapic" (src + "/lib/sapic") // { + postPatch = "cp --remove-destination ${src}/LICENSE ."; + doHaddock = false; # broken + libraryHaskellDepends = (with haskellPackages; [ + raw-strings-qq + ]) ++ [ tamarin-prover-theory ]; + }); + in mkDerivation (common "tamarin-prover" src // { isLibrary = false; @@ -65,45 +71,25 @@ mkDerivation (common "tamarin-prover" src // { enableSharedExecutables = false; postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc"; - # Fix problem with MonadBaseControl not being found - patchPhase = '' - sed -ie 's,\(import *\)Control\.Monad$,&\ - \1Control.Monad.Trans.Control,' src/Web/Handler.hs - - sed -ie 's~\( *, \)mtl~&\ - \1monad-control~' tamarin-prover.cabal - - patch -p1 < ${./sapic-native.patch} - ''; - - postBuild = '' - cd plugins/sapic && make sapic && cd ../.. - ''; - # wrap the prover to be sure it can find maude, sapic, etc executableToolDepends = [ makeWrapper which maude graphviz ]; postInstall = '' wrapProgram $out/bin/tamarin-prover \ --prefix PATH : ${lib.makeBinPath [ which maude graphviz ]} # so that the package can be used as a vim plugin to install syntax coloration - install -Dt $out/share/vim-plugins/tamarin-prover/syntax/ etc/{spthy,sapic}.vim + install -Dt $out/share/vim-plugins/tamarin-prover/syntax/ etc/syntax/spthy.vim install etc/filetype.vim -D $out/share/vim-plugins/tamarin-prover/ftdetect/tamarin.vim - install -m0755 ./plugins/sapic/sapic $out/bin/sapic ''; checkPhase = "./dist/build/tamarin-prover/tamarin-prover test"; - executableSystemDepends = [ ocaml ]; executableHaskellDepends = (with haskellPackages; [ - base binary binary-orphans blaze-builder blaze-html bytestring - cmdargs conduit containers monad-control deepseq directory fclabels file-embed - filepath gitrev http-types HUnit lifted-base mtl monad-unlift parsec process - resourcet safe shakespeare tamarin-prover-term - template-haskell text threads time wai warp yesod-core yesod-static + binary-instances binary-orphans blaze-html conduit file-embed + gitrev http-types lifted-base monad-control monad-unlift + resourcet shakespeare threads wai warp yesod-core yesod-static ]) ++ [ tamarin-prover-utils + tamarin-prover-sapic tamarin-prover-term tamarin-prover-theory ]; - - broken = true; }) diff --git a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/sapic-native.patch b/nixpkgs/pkgs/applications/science/logic/tamarin-prover/sapic-native.patch deleted file mode 100644 index 6ab7e4e7594f..000000000000 --- a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/sapic-native.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/plugins/sapic/Makefile b/plugins/sapic/Makefile -index 8f1b1866..678accbe 100644 ---- a/plugins/sapic/Makefile -+++ b/plugins/sapic/Makefile -@@ -1,18 +1,18 @@ - TARGET = sapic --OBJS= color.cmo exceptions.cmo btree.cmo position.cmo positionplusinit.cmo var.cmo term.cmo fact.cmo atomformulaaction.cmo action.cmo atom.cmo formula.cmo tamarin.cmo sapicterm.cmo sapicvar.cmo sapicaction.cmo lexer.cmo sapic.cmo annotatedsapicaction.cmo annotatedsapictree.cmo progressfunction.cmo restrictions.cmo annotatedrule.cmo translationhelper.cmo basetranslation.cmo firsttranslation.cmo main.cmo -+OBJS= color.cmx exceptions.cmx btree.cmx position.cmx positionplusinit.cmx var.cmx term.cmx fact.cmx atomformulaaction.cmx action.cmx atom.cmx formula.cmx tamarin.cmx sapicterm.cmx sapicvar.cmx sapicaction.cmx lexer.cmx sapic.cmx annotatedsapicaction.cmx annotatedsapictree.cmx progressfunction.cmx restrictions.cmx annotatedrule.cmx translationhelper.cmx basetranslation.cmx firsttranslation.cmx main.cmx - FLAGS=-g - --OCAMLC := $(shell command -v ocamlc 2> /dev/null) -+OCAMLOPT := $(shell command -v ocamlopt 2> /dev/null) - OCAMLLEX := $(shell command -v ocamllex 2> /dev/null) - OCAMLYACC := $(shell command -v ocamlyacc 2> /dev/null) - OCAMLDEP := $(shell command -v ocamldep 2> /dev/null) --OCAMLC_GTEQ_402 := $(shell expr `ocamlc -version | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40200) -+OCAMLC_GTEQ_402 := $(shell expr `ocamlopt -version | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40200) - - default: sapic - - sapic: --ifdef OCAMLC -- @echo "Found ocamlc." -+ifdef OCAMLOPT -+ @echo "Found ocamlopt." - ifdef OCAMLLEX - @echo "Found ocamllex." - ifdef OCAMLYACC -@@ -22,9 +22,9 @@ ifdef OCAMLDEP - ifeq "$(OCAMLC_GTEQ_402)" "1" - @echo "Building SAPIC." - $(MAKE) $(OBJS) -- ocamlc $(FLAGS) -o $@ str.cma $(OBJS) -- @echo "Installing SAPIC into ~/.local/bin/" -- cp sapic ~/.local/bin -+ ocamlopt $(FLAGS) -o $@ str.cmxa $(OBJS) -+# @echo "Installing SAPIC into ~/.local/bin/" -+# cp sapic ~/.local/bin - else - @echo "Found OCAML version < 4.02. SAPIC will not be installed." - endif -@@ -38,7 +38,7 @@ else - @echo "ocamllex not found. SAPIC will not be installed." - endif - else -- @echo "ocamlc not found. SAPIC will not be installed." -+ @echo "ocamlopt not found. SAPIC will not be installed." - endif - - depend: -@@ -48,20 +48,20 @@ lexer.ml: sapic.cmi - - .PHONY: clean - clean: -- rm -rf *.cmi *.cmo $(TARGET) -+ rm -rf *.cmi **.cmx $(TARGET) - rm -rf sapic.ml sapic.mli lexer.ml lexer.mli - --.SUFFIXES: .ml .mli .mll .mly .cmo .cmi -+.SUFFIXES: .ml .mli .mll .mly .cmx .cmi - --.ml.cmo: -- ocamlc $(FLAGS) -c $< -+.ml.cmx: -+ ocamlopt $(FLAGS) -c $< - .mli.cmi: -- ocamlc $(FLAGS) -c $< -+ ocamlopt $(FLAGS) -c $< - .mll.ml: - ocamllex $< - .mly.ml: - ocamlyacc $< - .ml.mli: -- ocamlc -i $< > $@ -+ ocamlopt -i $< > $@ - - -include .depend diff --git a/nixpkgs/pkgs/applications/science/logic/tlaplus/toolbox.nix b/nixpkgs/pkgs/applications/science/logic/tlaplus/toolbox.nix index 5c445459a36a..c9e97375b6c7 100644 --- a/nixpkgs/pkgs/applications/science/logic/tlaplus/toolbox.nix +++ b/nixpkgs/pkgs/applications/science/logic/tlaplus/toolbox.nix @@ -3,7 +3,7 @@ }: let - version = "1.6.0"; + version = "1.7.0"; arch = "x86_64"; desktopItem = makeDesktopItem rec { @@ -25,7 +25,7 @@ in stdenv.mkDerivation { inherit version; src = fetchzip { url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.${arch}.zip"; - sha256 = "1mgx4p5qykf9q0p4cp6kcpc7fx8g5f2w1g40kdgas24hqwrgs3cm"; + sha256 = "0v15wscawair5bghr5ixb4i062kmh9by1m0hnz2r1sawlqyafz02"; }; buildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix b/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix index 4038db17f938..9ce6592d9989 100644 --- a/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "workcraft"; - version = "3.3.0"; + version = "3.3.2"; src = fetchurl { url = "https://github.com/workcraft/workcraft/releases/download/v${version}/workcraft-v${version}-linux.tar.gz"; - sha256 = "072i7kan2c9f4s9jxwqr4ccsi9979c12xhwr385sbq06rwyrna85"; + sha256 = "0v71x3fph2j3xrnysvkm7zsgnbxisfbdfgxzvzxxfdg59a6l3xid"; }; buildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix b/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix new file mode 100644 index 000000000000..a5388572db61 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, python }: + +stdenv.mkDerivation rec { + name = "z3-${version}"; + version = "4.4.0"; + + src = fetchFromGitHub { + owner = "Z3Prover"; + repo = "z3"; + rev = "7f6ef0b6c0813f2e9e8f993d45722c0e5b99e152"; + sha256 = "1xllvq9fcj4cz34biq2a9dn2sj33bdgrzyzkj26hqw70wkzv1kzx"; + }; + + buildInputs = [ python ]; + enableParallelBuilding = true; + + configurePhase = "python scripts/mk_make.py --prefix=$out && cd build"; + + # z3's install phase is stupid because it tries to calculate the + # python package store location itself, meaning it'll attempt to + # write files into the nix store, and fail. + soext = if stdenv.system == "x86_64-darwin" then ".dylib" else ".so"; + installPhase = '' + mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include + cp ../src/api/z3*.h $out/include + cp ../src/api/c++/z3*.h $out/include + cp z3 $out/bin + cp libz3${soext} $out/lib + cp libz3${soext} $out/lib/${python.libPrefix}/site-packages + cp z3*.pyc $out/lib/${python.libPrefix}/site-packages + cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages + ''; + + meta = { + description = "A high-performance theorem prover and SMT solver"; + homepage = "https://github.com/Z3Prover/z3"; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.x86_64; + maintainers = with stdenv.lib.maintainers; [ thoughtpolice ttuegel ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/logic/z3/default.nix b/nixpkgs/pkgs/applications/science/logic/z3/default.nix index 84c1544071ff..48512eff5300 100644 --- a/nixpkgs/pkgs/applications/science/logic/z3/default.nix +++ b/nixpkgs/pkgs/applications/science/logic/z3/default.nix @@ -1,10 +1,13 @@ { stdenv, fetchFromGitHub, python, fixDarwinDylibNames , javaBindings ? false +, ocamlBindings ? false , pythonBindings ? true , jdk ? null +, ocaml ? null, findlib ? null, zarith ? null }: assert javaBindings -> jdk != null; +assert ocamlBindings -> ocaml != null && findlib != null && zarith != null; with stdenv.lib; @@ -19,13 +22,23 @@ stdenv.mkDerivation rec { sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx"; }; - buildInputs = [ python fixDarwinDylibNames ] ++ optional javaBindings jdk; + nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = [ python ] + ++ optional javaBindings jdk + ++ optionals ocamlBindings [ ocaml findlib zarith ] + ; propagatedBuildInputs = [ python.pkgs.setuptools ]; enableParallelBuilding = true; + postPatch = optionalString ocamlBindings '' + export OCAMLFIND_DESTDIR=$ocaml/lib/ocaml/${ocaml.version}/site-lib + mkdir -p $OCAMLFIND_DESTDIR/stublibs + ''; + configurePhase = concatStringsSep " " ( [ "${python.interpreter} scripts/mk_make.py --prefix=$out" ] ++ optional javaBindings "--java" + ++ optional ocamlBindings "--ml" ++ optional pythonBindings "--python --pypkgdir=$out/${python.sitePackages}" ) + "\n" + "cd build"; @@ -39,13 +52,15 @@ stdenv.mkDerivation rec { ln -sf $lib/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary} $python/${python.sitePackages}/z3/lib/libz3${stdenv.hostPlatform.extensions.sharedLibrary} ''; - outputs = [ "out" "lib" "dev" "python" ]; + outputs = [ "out" "lib" "dev" "python" ] + ++ optional ocamlBindings "ocaml" + ; meta = { description = "A high-performance theorem prover and SMT solver"; homepage = "https://github.com/Z3Prover/z3"; license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.x86_64; + platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ thoughtpolice ttuegel ]; }; } diff --git a/nixpkgs/pkgs/applications/science/machine-learning/labelimg/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/labelimg/default.nix index 05c56b0b0958..18c304e83165 100644 --- a/nixpkgs/pkgs/applications/science/machine-learning/labelimg/default.nix +++ b/nixpkgs/pkgs/applications/science/machine-learning/labelimg/default.nix @@ -28,7 +28,7 @@ makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; meta = with stdenv.lib; { - description = "LabelImg is a graphical image annotation tool and label object bounding boxes in images"; + description = "A graphical image annotation tool and label object bounding boxes in images"; homepage = "https://github.com/tzutalin/labelImg"; license = licenses.mit; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/applications/science/math/R/default.nix b/nixpkgs/pkgs/applications/science/math/R/default.nix index 717b240c1cce..e4fbe8a7f2de 100644 --- a/nixpkgs/pkgs/applications/science/math/R/default.nix +++ b/nixpkgs/pkgs/applications/science/math/R/default.nix @@ -12,11 +12,11 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { - name = "R-4.0.2"; + name = "R-4.0.3"; src = fetchurl { url = "https://cran.r-project.org/src/base/R-4/${name}.tar.gz"; - sha256 = "0xdy3dy2bzdiba8z94hjykyra8si8a5q15s0bri7c26scjrymg6k"; + sha256 = "03cypg2qf7v9mq9mr9alz9w5y9m5kdgwbc97bp26pyymg253m609"; }; dontUseImakeConfigure = true; @@ -113,6 +113,6 @@ stdenv.mkDerivation rec { platforms = platforms.all; hydraPlatforms = platforms.linux; - maintainers = with maintainers; [ peti timokau ]; + maintainers = with maintainers; [ peti ] ++ teams.sage.members; }; } diff --git a/nixpkgs/pkgs/applications/science/math/bcal/default.nix b/nixpkgs/pkgs/applications/science/math/bcal/default.nix index 18b6e051b3f2..5df2d20549c2 100644 --- a/nixpkgs/pkgs/applications/science/math/bcal/default.nix +++ b/nixpkgs/pkgs/applications/science/math/bcal/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchFromGitHub, python3Packages, readline }: +{ stdenv, fetchFromGitHub, python3Packages, readline, bc }: with stdenv.lib; stdenv.mkDerivation rec { pname = "bcal"; - version = "1.9"; + version = "2.2"; src = fetchFromGitHub { owner = "jarun"; repo = "bcal"; rev = "v${version}"; - sha256 = "0h6qi5rvzl6c6fsfdpdb3l4jcgip03l18i0b1x08z1y89i56y8mm"; + sha256 = "4vR5rcbNkoEdSRNoMH9qMHP3iWFxejkVfXNiYfwbo/A="; }; nativeBuildInputs = [ python3Packages.pytest ]; @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; doCheck = true; + checkInputs = [ bc ]; checkPhase = '' python3 -m pytest test.py ''; @@ -27,7 +28,7 @@ stdenv.mkDerivation rec { meta = { description = "Storage conversion and expression calculator"; homepage = "https://github.com/jarun/bcal"; - license = licenses.gpl3; + license = licenses.gpl3Only; platforms = [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; maintainers = with maintainers; [ jfrankenau ]; }; diff --git a/nixpkgs/pkgs/applications/science/math/bliss/default.nix b/nixpkgs/pkgs/applications/science/math/bliss/default.nix index 361b08846626..9ab90134aad4 100644 --- a/nixpkgs/pkgs/applications/science/math/bliss/default.nix +++ b/nixpkgs/pkgs/applications/science/math/bliss/default.nix @@ -22,14 +22,14 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin $out/share/doc/bliss $out/lib $out/include/bliss - mv bliss $out/bin + mv bliss $out/bin mv html/* COPYING* $out/share/doc/bliss mv *.a $out/lib mv *.h *.hh $out/include/bliss ''; meta = with stdenv.lib; { - description = "bliss is an open source tool for computing automorphism groups and canonical forms of graphs. It has both a command line user interface as well as C++ and C programming language APIs."; + description = "An open source tool for computing automorphism groups and canonical forms of graphs. It has both a command line user interface as well as C++ and C programming language APIs"; homepage = "http://www.tcs.hut.fi/Software/bliss/"; license = licenses.lgpl3; platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/nixpkgs/pkgs/applications/science/math/calc/default.nix b/nixpkgs/pkgs/applications/science/math/calc/default.nix index 8e50f48b286b..e770cff2da9c 100644 --- a/nixpkgs/pkgs/applications/science/math/calc/default.nix +++ b/nixpkgs/pkgs/applications/science/math/calc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, utillinux, makeWrapper +{ stdenv, lib, fetchurl, util-linux, makeWrapper , enableReadline ? true, readline, ncurses }: stdenv.mkDerivation rec { @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { --replace '-install_name ''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}' '-install_name ''${T}''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}' ''; - buildInputs = [ utillinux makeWrapper ] + buildInputs = [ util-linux makeWrapper ] ++ lib.optionals enableReadline [ readline ncurses ]; makeFlags = [ diff --git a/nixpkgs/pkgs/applications/science/math/geogebra/default.nix b/nixpkgs/pkgs/applications/science/math/geogebra/default.nix index 5cebef83a4a9..a0548ffb232b 100644 --- a/nixpkgs/pkgs/applications/science/math/geogebra/default.nix +++ b/nixpkgs/pkgs/applications/science/math/geogebra/default.nix @@ -1,18 +1,7 @@ -{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, language ? "en_US" }: - -stdenv.mkDerivation rec { +{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }: +let pname = "geogebra"; - version = "5-0-593-0"; - - preferLocalBuild = true; - - src = fetchurl { - urls = [ - "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" - "http://web.archive.org/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" - ]; - sha256 = "d84c27a3299e6df08881733d22215a18decedcba4c2d97a9e5424c39cd57db35"; - }; + version = "5-0-609-0"; srcIcon = fetchurl { url = "http://static.geogebra.org/images/geogebra-logo.svg"; @@ -30,23 +19,6 @@ stdenv.mkDerivation rec { mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;"; }; - buildInputs = [ makeWrapper ]; - - installPhase = '' - install -D geogebra/* -t "$out/libexec/geogebra/" - - makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \ - --set JAVACMD "${jre}/bin/java" \ - --set GG_PATH "$out/libexec/geogebra" \ - --add-flags "--language=${language}" - - install -Dm644 "${desktopItem}/share/applications/"* \ - -t $out/share/applications/ - - install -Dm644 "${srcIcon}" \ - "$out/share/icons/hicolor/scalable/apps/geogebra.svg" - ''; - meta = with stdenv.lib; { description = "Dynamic mathematics software with graphics, algebra and spreadsheets"; longDescription = '' @@ -55,9 +27,63 @@ stdenv.mkDerivation rec { calculus in one easy-to-use package. ''; homepage = "https://www.geogebra.org/"; - maintainers = with maintainers; [ ma27 ]; + maintainers = with maintainers; [ ]; license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ]; - platforms = platforms.all; + platforms = with platforms; linux ++ darwin; hydraPlatforms = []; }; -} + + linuxPkg = stdenv.mkDerivation { + inherit pname version meta srcIcon desktopItem; + + preferLocalBuild = true; + + src = fetchurl { + urls = [ + "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" + "http://web.archive.org/web/20201022200454/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" + ]; + sha256 = "0xbhg8hm3dqm3qkraj48pqwslrnjyxpq9mcgylr2m8i1gmqw7xwf"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + install -D geogebra/* -t "$out/libexec/geogebra/" + + makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \ + --set JAVACMD "${jre}/bin/java" \ + --set GG_PATH "$out/libexec/geogebra" \ + --add-flags "--language=${language}" + + install -Dm644 "${desktopItem}/share/applications/"* \ + -t $out/share/applications/ + + install -Dm644 "${srcIcon}" \ + "$out/share/icons/hicolor/scalable/apps/geogebra.svg" + ''; + }; + + darwinPkg = stdenv.mkDerivation { + inherit pname version meta; + + preferLocalBuild = true; + + src = fetchurl { + url = "https://download.geogebra.org/installers/5.0/GeoGebra-MacOS-Installer-withJava-${version}.zip"; + sha256 = "16fgqwxz31cfmia0pyzpk05aqzrqr11sjbw37q9zb3xfh3p1r4gz"; + }; + + dontUnpack = true; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + install -dm755 $out/Applications + unzip $src -d $out/Applications + ''; + }; +in +if stdenv.isDarwin +then darwinPkg +else linuxPkg diff --git a/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix b/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix index 65caff82ead1..7bd582648937 100644 --- a/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix +++ b/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix @@ -1,46 +1,70 @@ { stdenv, unzip, fetchurl, electron_6, makeWrapper, geogebra }: -stdenv.mkDerivation rec{ +let + pname = "geogebra"; + version = "6-0-609-0"; - name = "geogebra-${version}"; - version = "6-0-600-0"; + srcIcon = geogebra.srcIcon; + desktopItem = geogebra.desktopItem; - src = fetchurl { - urls = [ - "https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip" - "https://web.archive.org/web/20200904093945/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip" - ]; - sha256 = "1l49rvfkil2cz6r7sa2mi0p6hvb6p66jv3x6xj8hjqls4l3sfhkm"; + meta = with stdenv.lib; geogebra.meta // { + license = licenses.geogebra; + maintainers = with maintainers; [ voidless ]; + platforms = with platforms; linux ++ darwin; }; - dontConfigure = true; - dontBuild = true; + linuxPkg = stdenv.mkDerivation { + inherit pname version meta; - nativeBuildInputs = [ - unzip - makeWrapper - ]; + src = fetchurl { + urls = [ + "https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip" + "https://web.archive.org/web/20201022200156/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip" + ]; + sha256 = "0rzcbq587x8827g9v03awa9hz27vyfjc0cz45ymbchqp31lsx49b"; + }; - unpackPhase = '' - unzip $src - ''; + dontConfigure = true; + dontBuild = true; - installPhase = '' - mkdir -p $out/libexec/geogebra/ $out/bin - cp -r GeoGebra-linux-x64/{resources,locales} "$out/" - makeWrapper ${stdenv.lib.getBin electron_6}/bin/electron $out/bin/geogebra --add-flags "$out/resources/app" - install -Dm644 "${desktopItem}/share/applications/"* \ - -t $out/share/applications/ + nativeBuildInputs = [ + unzip + makeWrapper + ]; - install -Dm644 "${srcIcon}" \ - "$out/share/icons/hicolor/scalable/apps/geogebra.svg" - ''; + unpackPhase = '' + unzip $src + ''; - srcIcon = geogebra.srcIcon; + installPhase = '' + mkdir -p $out/libexec/geogebra/ $out/bin + cp -r GeoGebra-linux-x64/{resources,locales} "$out/" + makeWrapper ${stdenv.lib.getBin electron_6}/bin/electron $out/bin/geogebra --add-flags "$out/resources/app" + install -Dm644 "${desktopItem}/share/applications/"* \ + -t $out/share/applications/ - desktopItem = geogebra.desktopItem; - meta = with stdenv.lib; geogebra.meta // { - license = licenses.geogebra; - maintainers = with maintainers; [ voidless ]; - platforms = platforms.linux; + install -Dm644 "${srcIcon}" \ + "$out/share/icons/hicolor/scalable/apps/geogebra.svg" + ''; + }; + + darwinPkg = stdenv.mkDerivation { + inherit pname version meta; + + src = fetchurl { + url = "https://download.geogebra.org/installers/6.0/GeoGebra-Classic-6-MacOS-Portable-${version}.zip"; + sha256 = "0275869zgwbl1qjj593q6629hnxbwk9c15rkm29a3lh10pinb099"; + }; + + dontUnpack = true; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + install -dm755 $out/Applications + unzip $src -d $out/Applications + ''; }; -} +in +if stdenv.isDarwin +then darwinPkg +else linuxPkg diff --git a/nixpkgs/pkgs/applications/science/math/gfan/default.nix b/nixpkgs/pkgs/applications/science/math/gfan/default.nix index adac92f376c8..7e2a4625d301 100644 --- a/nixpkgs/pkgs/applications/science/math/gfan/default.nix +++ b/nixpkgs/pkgs/applications/science/math/gfan/default.nix @@ -8,11 +8,15 @@ stdenv.mkDerivation rec { sha256 = "02pihqb1lb76a0xbfwjzs1cd6ay3ldfxsm8dvsbl6qs3vkjxax56"; }; - patchPhase = stdenv.lib.optionalString stdenv.cc.isClang '' + patches = [ + ./gfan-0.6.2-cddlib-prefix.patch + ]; + + postPatch = stdenv.lib.optionalString stdenv.cc.isClang '' substituteInPlace Makefile --replace "-fno-guess-branch-probability" "" ''; - buildFlags = [ "CC=cc" "CXX=c++" "cddnoprefix=1" ]; + buildFlags = [ "CC=cc" "CXX=c++" ]; installFlags = [ ''PREFIX=$(out)'' ]; buildInputs = [ gmp mpir cddlib ]; diff --git a/nixpkgs/pkgs/applications/science/math/gfan/gfan-0.6.2-cddlib-prefix.patch b/nixpkgs/pkgs/applications/science/math/gfan/gfan-0.6.2-cddlib-prefix.patch new file mode 100644 index 000000000000..8a96a991cf75 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/gfan/gfan-0.6.2-cddlib-prefix.patch @@ -0,0 +1,55 @@ +diff -ru gfan0.6.2.orig/src/app_librarytest.cpp gfan0.6.2/src/app_librarytest.cpp +--- gfan0.6.2.orig/src/app_librarytest.cpp 2020-10-19 08:41:27.981863500 +0900 ++++ gfan0.6.2/src/app_librarytest.cpp 2020-10-19 08:42:44.551863500 +0900 +@@ -12,8 +12,8 @@ + #include "setoper.h" + #include "cdd.h" + #else +-#include "cdd/setoper.h" +-#include "cdd/cdd.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" + #endif + #include <iostream> + #include <fstream> +diff -ru gfan0.6.2.orig/src/gfanlib_zcone.cpp gfan0.6.2/src/gfanlib_zcone.cpp +--- gfan0.6.2.orig/src/gfanlib_zcone.cpp 2020-10-19 08:41:27.981863500 +0900 ++++ gfan0.6.2/src/gfanlib_zcone.cpp 2020-10-19 08:42:44.571863500 +0900 +@@ -16,8 +16,8 @@ + #include "setoper.h" + #include "cdd.h" + #else +-#include "cdd/setoper.h" +-#include "cdd/cdd.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" + #endif + //} + +@@ -52,8 +52,8 @@ + "dd_free_global_constants()\n" + "in your deinitialisation code (only available for cddlib version>=094d).\n" + "This requires the header includes:\n" +- "#include \"cdd/setoper.h\"\n" +- "#include \"cdd/cdd.h\"\n" ++ "#include \"cddlib/setoper.h\"\n" ++ "#include \"cddlib/cdd.h\"\n" + "\n" + "Alternatively, you may call gfan:initializeCddlibIfRequired() and deinitializeCddlibIfRequired()\n" + "if gfanlib is the only code using cddlib. If at some point cddlib is no longer required by gfanlib\n" +diff -ru gfan0.6.2.orig/src/lp_cdd.cpp gfan0.6.2/src/lp_cdd.cpp +--- gfan0.6.2.orig/src/lp_cdd.cpp 2020-10-19 08:41:27.991863500 +0900 ++++ gfan0.6.2/src/lp_cdd.cpp 2020-10-19 08:42:44.571863500 +0900 +@@ -5,9 +5,9 @@ + #include "cdd.h" + #include "cdd_f.h" + #else +-#include "cdd/setoper.h" +-#include "cdd/cdd.h" +-#include "cdd/cdd_f.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" ++#include "cddlib/cdd_f.h" + #endif + //} + #include "termorder.h" diff --git a/nixpkgs/pkgs/applications/science/math/giac/default.nix b/nixpkgs/pkgs/applications/science/math/giac/default.nix index ea9c921f19e1..b090274919bd 100644 --- a/nixpkgs/pkgs/applications/science/math/giac/default.nix +++ b/nixpkgs/pkgs/applications/science/math/giac/default.nix @@ -9,11 +9,11 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { pname = "giac${lib.optionalString enableGUI "-with-xcas"}"; - version = "1.5.0-21"; # TODO try to remove preCheck phase on upgrade + version = "1.5.0-87"; # TODO try to remove preCheck phase on upgrade src = fetchurl { url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz"; - sha256 = "1b9khiv0mk2xzw1rblm2jy6qsf8y6f9k7qy15sxpb21d72hzzbl2"; + sha256 = "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"; }; patches = stdenv.lib.optionals (!enableGUI) [ diff --git a/nixpkgs/pkgs/applications/science/math/ginac/default.nix b/nixpkgs/pkgs/applications/science/math/ginac/default.nix index 701445f90100..3c129e8033bd 100644 --- a/nixpkgs/pkgs/applications/science/math/ginac/default.nix +++ b/nixpkgs/pkgs/applications/science/math/ginac/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, cln, pkgconfig, readline, gmp, python }: stdenv.mkDerivation rec { - name = "ginac-1.7.9"; + name = "ginac-1.8.0"; src = fetchurl { url = "${meta.homepage}/${name}.tar.bz2"; - sha256 = "08cqc87qq4w6z3l053x5gfqsa4zkgkicq8skxsbsj39nli1zzkb7"; + sha256 = "0l9byzfxq3f9az5pcdldnl95ws8mpirkqky46f973mvxi5541d24"; }; propagatedBuildInputs = [ cln ]; diff --git a/nixpkgs/pkgs/applications/science/math/gmsh/default.nix b/nixpkgs/pkgs/applications/science/math/gmsh/default.nix index db7e238e8ded..1b6dc2ae0076 100644 --- a/nixpkgs/pkgs/applications/science/math/gmsh/default.nix +++ b/nixpkgs/pkgs/applications/science/math/gmsh/default.nix @@ -5,11 +5,11 @@ assert (!blas.isILP64) && (!lapack.isILP64); stdenv.mkDerivation rec { pname = "gmsh"; - version = "4.6.0"; + version = "4.7.1"; src = fetchurl { url = "http://gmsh.info/src/gmsh-${version}-source.tgz"; - sha256 = "075dyblmlfdlhgbb1dwk6jzlqx93q90n6zwpr3mpii5n1zjmab0g"; + sha256 = "0shwi41van3k0z6rnpl3sz5nh46xbyyljwfpcp8pwxbc26aw5169"; }; buildInputs = [ blas lapack gmm fltk libjpeg zlib libGLU libGL diff --git a/nixpkgs/pkgs/applications/science/math/gretl/default.nix b/nixpkgs/pkgs/applications/science/math/gretl/default.nix new file mode 100644 index 000000000000..7d77453cbab0 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/gretl/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, curl, fftw, gmp, gnuplot, gtk3, gtksourceview3, json-glib +, lapack, libxml2, mpfr, openblas, pkg-config, readline }: + +stdenv.mkDerivation rec { + pname = "gretl"; + version = "2020e"; + + src = fetchurl { + url = "mirror://sourceforge/gretl/${pname}-${version}.tar.xz"; + sha256 = "105y5hkzgyvad6wc3y7nn327bvrsch6jp03ckkn0w0hpnhiywzx7"; + }; + + buildInputs = [ + curl + fftw + gmp + gnuplot + gtk3 + gtksourceview3 + json-glib + lapack + libxml2 + mpfr + openblas + readline + ]; + + nativeBuildInputs = [ pkg-config ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A software package for econometric analysis"; + longDescription = '' + gretl is a cross-platform software package for econometric analysis, + written in the C programming language. + ''; + homepage = "http://gretl.sourceforge.net"; + license = licenses.gpl3; + maintainers = with maintainers; [ dmrauh ]; + platforms = with platforms; all; + }; +} diff --git a/nixpkgs/pkgs/applications/science/math/lrcalc/default.nix b/nixpkgs/pkgs/applications/science/math/lrcalc/default.nix index 438a84c0e0be..ddd470e621a0 100644 --- a/nixpkgs/pkgs/applications/science/math/lrcalc/default.nix +++ b/nixpkgs/pkgs/applications/science/math/lrcalc/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { description = "Littlewood-Richardson calculator"; homepage = "http://math.rutgers.edu/~asbuch/lrcalc/"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ timokau ]; + maintainers = teams.sage.members; platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/default.nix b/nixpkgs/pkgs/applications/science/math/mathematica/default.nix index 94d72eec6ae4..ea9a9c1b7554 100644 --- a/nixpkgs/pkgs/applications/science/math/mathematica/default.nix +++ b/nixpkgs/pkgs/applications/science/math/mathematica/default.nix @@ -3,6 +3,7 @@ , patchelf , requireFile , callPackage +, makeWrapper , alsaLib , dbus , fontconfig @@ -11,7 +12,7 @@ , glib , libssh2 , ncurses -, opencv2 +, opencv4 , openssl , unixODBC , xkeyboard_config @@ -37,6 +38,7 @@ stdenv.mkDerivation rec { buildInputs = [ coreutils patchelf + makeWrapper alsaLib coreutils dbus @@ -47,7 +49,7 @@ stdenv.mkDerivation rec { glib libssh2 ncurses - opencv2 + opencv4 openssl stdenv.cc.cc.lib unixODBC @@ -106,6 +108,9 @@ stdenv.mkDerivation rec { # Remove some broken libraries rm -f $out/libexec/Mathematica/SystemFiles/Libraries/Linux-x86-64/libz.so* + + # Set environment variable to fix libQt errors - see https://github.com/NixOS/nixpkgs/issues/96490 + wrapProgram $out/bin/mathematica --set USE_WOLFRAM_LD_LIBRARY_PATH 1 ''; preFixup = '' @@ -139,6 +144,9 @@ stdenv.mkDerivation rec { ''; dontBuild = true; + + # This is primarily an IO bound build; there's little benefit to building remotely. + preferLocalBuild = true; # all binaries are already stripped dontStrip = true; diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/l10ns.nix b/nixpkgs/pkgs/applications/science/math/mathematica/l10ns.nix index 8ec6ac5048d5..896983ce1563 100644 --- a/nixpkgs/pkgs/applications/science/math/mathematica/l10ns.nix +++ b/nixpkgs/pkgs/applications/science/math/mathematica/l10ns.nix @@ -8,22 +8,10 @@ let allVersions = with lib; flip map # N.B. Versions in this list should be ordered from newest to oldest. [ { - version = "12.1.1"; + version = "12.2.0"; lang = "en"; language = "English"; - sha256 = "02mk8gmv8idnakva1nc7r7mx8ld02lk7jgsj1zbn962aps3bhixd"; - } - { - version = "12.1.0"; - lang = "en"; - language = "English"; - sha256 = "15m9l20jvkxh5w6mbp81ys7mx2lx5j8acw5gz0il89lklclgb8z7"; - } - { - version = "12.0.0"; - lang = "en"; - language = "English"; - sha256 = "b9fb71e1afcc1d72c200196ffa434512d208fa2920e207878433f504e58ae9d7"; + sha256 = "3b6676a203c6adb7e9c418a5484b037974287b5be09c64e7dfea74ddc0e400d7"; } { version = "11.3.0"; diff --git a/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix b/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix deleted file mode 100644 index 829dffc6116e..000000000000 --- a/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null -, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false -}: - -let - name = "maxima"; - # old version temporarily kept for sage, see discussion at - # https://github.com/NixOS/nixpkgs/commit/82254747af35f3e0e0d6f78023ded3a81e25331b - version = "5.41.0"; - - searchPath = - stdenv.lib.makeBinPath - (stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]); -in -stdenv.mkDerivation ({ - inherit version; - name = "${name}-${version}"; - - src = fetchurl { - url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz"; - sha256 = "0x0n81z0s4pl8nwpf7ivlsbvsdphm9w42250g7qdkizl0132by6s"; - }; - - buildInputs = stdenv.lib.filter (x: x != null) [ - sbcl ecl texinfo perl python makeWrapper - ]; - - postInstall = '' - # Make sure that maxima can find its runtime dependencies. - for prog in "$out/bin/"*; do - wrapProgram "$prog" --prefix PATH ":" "$out/bin:${searchPath}" - done - # Move emacs modules and documentation into the right place. - mkdir -p $out/share/emacs $out/share/doc - ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp - ln -s ../maxima/${version}/doc $out/share/doc/maxima - '' - + (stdenv.lib.optionalString ecl-fasl '' - cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/" - '') - ; - - patches = [ - # fix path to info dir (see https://trac.sagemath.org/ticket/11348) - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/infodir.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "09v64n60f7i6frzryrj0zd056lvdpms3ajky4f9p6kankhbiv21x"; - }) - - # fix https://sourceforge.net/p/maxima/bugs/2596/ - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/matrixexp.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "06961hn66rhjijfvyym21h39wk98sfxhp051da6gz0n9byhwc6zg"; - }) - - # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca, see see https://trac.sagemath.org/ticket/13364#comment:93 - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx"; - }) - - # upstream bug https://sourceforge.net/p/maxima/bugs/2520/ (not fixed) - # introduced in https://trac.sagemath.org/ticket/13364 - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "0xa0b6cr458zp7lc7qi0flv5ar0r3ivsqhjl0c3clv86di2y522d"; - }) - ] ++ stdenv.lib.optionals ecl-fasl [ - # build fasl, needed for ECL support - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "18zafig8vflhkr80jq2ivk46k92dkszqlyq8cfmj0b2vcfjwwbar"; - }) - # There are some transient test failures. I hope this disables all those tests. - # If those test failures ever happen in the non-ecl version, that should be - # reportetd upstream. - ./known-ecl-failures.patch - ]; - - # Failures in the regression test suite won't abort the build process. We run - # the suite only so that potential errors show up in the build log. See also: - # https://sourceforge.net/tracker/?func=detail&aid=3365831&group_id=4933&atid=104933. - doCheck = true; - - enableParallelBuilding = true; - - meta = { - description = "Computer algebra system"; - homepage = "http://maxima.sourceforge.net"; - license = stdenv.lib.licenses.gpl2; - - longDescription = '' - Maxima is a fairly complete computer algebra system written in - lisp with an emphasis on symbolic computation. It is based on - DOE-MACSYMA and licensed under the GPL. Its abilities include - symbolic integration, 3D plotting, and an ODE solver. - ''; - - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.peti ]; - }; -}) diff --git a/nixpkgs/pkgs/applications/science/math/maxima/default.nix b/nixpkgs/pkgs/applications/science/math/maxima/default.nix index 49ff0d5d5a05..cdc81a876465 100644 --- a/nixpkgs/pkgs/applications/science/math/maxima/default.nix +++ b/nixpkgs/pkgs/applications/science/math/maxima/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null -, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false +{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, autoreconfHook +, rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false }: let name = "maxima"; - version = "5.42.2"; + version = "5.44.0"; searchPath = stdenv.lib.makeBinPath @@ -16,14 +16,20 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz"; - sha256 = "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn"; + sha256 = "1v6jr5s6hhj6r18gfk6hgxk2qd6z1dxkrjq9ss2z1y6sqi45wgyr"; }; + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = stdenv.lib.filter (x: x != null) [ sbcl ecl texinfo perl python makeWrapper gnuplot # required in the test suite ]; + postPatch = '' + substituteInPlace doc/info/Makefile.am --replace "/usr/bin/env perl" "${perl}/bin/perl" + ''; + postInstall = '' # Make sure that maxima can find its runtime dependencies. for prog in "$out/bin/"*; do @@ -57,13 +63,6 @@ stdenv.mkDerivation ({ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx"; }) - - # upstream bug https://sourceforge.net/p/maxima/bugs/2520/ (not fixed) - # introduced in https://trac.sagemath.org/ticket/13364 - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "0xa0b6cr458zp7lc7qi0flv5ar0r3ivsqhjl0c3clv86di2y522d"; - }) ] ++ stdenv.lib.optionals ecl-fasl [ # build fasl, needed for ECL support (fetchpatch { @@ -74,11 +73,13 @@ stdenv.mkDerivation ({ # The test suite is disabled since 5.42.2 because of the following issues: # - # Errors found in /build/maxima-5.42.2/share/linearalgebra/rtest_matrixexp.mac, problems: + # Error(s) found: + # /build/maxima-5.44.0/share/linearalgebra/rtest_matrixexp.mac problems: # (20 21 22) - # Error found in rtest_arag, problem: - # (error break) - # 3 tests failed out of 3,881 total tests. + # Tests that were expected to fail but passed: + # /build/maxima-5.44.0/share/vector/rtest_vect.mac problem: + # (19) + # 3 tests failed out of 16,184 total tests. # # These failures don't look serious. It would be nice to fix them, but I # don't know how and probably won't have the time to find out. @@ -86,6 +87,10 @@ stdenv.mkDerivation ({ enableParallelBuilding = true; + passthru = { + ecl = ecl; + }; + meta = { description = "Computer algebra system"; homepage = "http://maxima.sourceforge.net"; diff --git a/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch b/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch deleted file mode 100644 index f1d612d993e6..000000000000 --- a/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/tests/testsuite.lisp b/tests/testsuite.lisp -index 45a81f4..36c35b8 100644 ---- a/tests/testsuite.lisp -+++ b/tests/testsuite.lisp -@@ -25,13 +25,14 @@ - ((mlist simp) "rtest10" 24 25) - ((mlist) "rtest11" #+(or gcl cmucl ccl64) 158 #+(or gcl cmucl ccl64) 174 #+gcl 175) - "rtest13" "rtest13s" -- "rtest14" -+ ;; "rtest14" ;; some tests sometimes fail with ecl, hard to reproduce. Observed failing: 250, 267, 297, 307, 310, 312, 315, 319 - "rtest15" - ;; ccl versions 1.11 and earlier fail test 50. Mark it as a - ;; known failure. Presumably 1.12 will have this fixed. - ((mlist simp) "rtest16" #+ccl 50) - "rtestode" "rtestode_zp" -- "rtest3" "rtest8" -+ "rtest3" -+ ((mlist simp) "rtest8" 104) ;; fails with ecl - ((mlist simp) "rtest12" 76 78) - "rexamples" - ((mlist simp) "rtesthyp" 105 112 113 123 124 128) diff --git a/nixpkgs/pkgs/applications/science/math/nauty/default.nix b/nixpkgs/pkgs/applications/science/math/nauty/default.nix index d75fc9731cdf..94b7ad266c45 100644 --- a/nixpkgs/pkgs/applications/science/math/nauty/default.nix +++ b/nixpkgs/pkgs/applications/science/math/nauty/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { version = "27r1"; src = fetchurl { url = "http://pallini.di.uniroma1.it/nauty${version}.tar.gz"; - sha256 = "1nym0p2djws8ylkpr0kgpxfa6fxdlh46cmvz0gn5vd02jzgs0aww"; + sha256 = "0xsfqfcknbd6g6wzpa5l7crmmk3bf3zjh37rhylq6b20dqcmvjkn"; }; outputs = [ "out" "dev" ]; configureFlags = [ @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { inherit version; description = ''Programs for computing automorphism groups of graphs and digraphs''; license = licenses.asl20; - maintainers = with maintainers; [ raskin timokau ]; + maintainers = teams.sage.members; platforms = platforms.unix; # I'm not sure if the filename will remain the same for future changelog or # if it will track changes to minor releases. Lets see. Better than nothing diff --git a/nixpkgs/pkgs/applications/science/math/palp/default.nix b/nixpkgs/pkgs/applications/science/math/palp/default.nix index c383438002f4..9ae4fe1ba920 100644 --- a/nixpkgs/pkgs/applications/science/math/palp/default.nix +++ b/nixpkgs/pkgs/applications/science/math/palp/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { # version was released that pointed to gplv2 however, so thats probably # the right license. license = licenses.gpl2; - maintainers = with maintainers; [ timokau ]; + maintainers = teams.sage.members; platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/applications/science/math/pari/default.nix b/nixpkgs/pkgs/applications/science/math/pari/default.nix index 8b5176c94f69..7ec42d11ab14 100644 --- a/nixpkgs/pkgs/applications/science/math/pari/default.nix +++ b/nixpkgs/pkgs/applications/science/math/pari/default.nix @@ -1,6 +1,5 @@ { stdenv , fetchurl -, fetchpatch , gmp , readline , libX11 @@ -13,22 +12,14 @@ assert withThread -> libpthreadstubs != null; stdenv.mkDerivation rec { pname = "pari"; - version = "2.11.3"; + version = "2.11.4"; src = fetchurl { - url = "https://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz"; - sha256 = "1jd65h2psrmba2dx7rkf5qidf9ka0cwbsg20pd18k45ggr30l467"; + # Versions with current majorMinor values are at http://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz + url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.gz"; + sha256 = "sha256-v8iPxPc1L0hA5uNSxy8DacvqikVAOxg0piafNwmXCxw="; }; - patches = [ - # https://trac.sagemath.org/ticket/29313#comment:1 - (fetchpatch { - name = "backport-bug-fix.patch"; - url = "https://git.archlinux.org/svntogit/community.git/plain/repos/community-x86_64/c7a1d35f.patch?h=packages/pari&id=27893d227290dc3821d68aa25877d9765c204dad"; - sha256 = "0vm0fwyzj66cr32imip6srksd47s2s2sjl1rb26ph8gpfi3nalii"; - }) - ]; - buildInputs = [ gmp readline @@ -72,20 +63,20 @@ stdenv.mkDerivation rec { Belabas with the help of many volunteer contributors. - PARI is a C library, allowing fast computations. - - gp is an easy-to-use interactive shell giving access to the - PARI functions. + - gp is an easy-to-use interactive shell giving access to the PARI + functions. - GP is the name of gp's scripting language. - - gp2c, the GP-to-C compiler, combines the best of both worlds - by compiling GP scripts to the C language and transparently loading - the resulting functions into gp. (gp2c-compiled scripts will typically - run 3 or 4 times faster.) gp2c currently only understands a subset - of the GP language. + - gp2c, the GP-to-C compiler, combines the best of both worlds by + compiling GP scripts to the C language and transparently loading the + resulting functions into gp. (gp2c-compiled scripts will typically run + 3 or 4 times faster.) gp2c currently only understands a subset of the + GP language. ''; - homepage = "http://pari.math.u-bordeaux.fr"; + homepage = "http://pari.math.u-bordeaux.fr"; downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ ertes raskin AndersonTorres timokau ]; - platforms = platforms.linux ++ platforms.darwin; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members; + platforms = platforms.linux ++ platforms.darwin; updateWalker = true; }; } diff --git a/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix b/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix index 4fa63e8edabd..082ff60c3e8d 100644 --- a/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix +++ b/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix @@ -1,14 +1,15 @@ -{ stdenv, fetchurl -, pari, perl }: +{ stdenv +, pari +, fetchurl +, perl }: stdenv.mkDerivation rec { - pname = "gp2c"; - version = "0.0.11pl3"; + version = "0.0.12"; src = fetchurl { url = "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/${pname}-${version}.tar.gz"; - sha256 = "0yymbrgyjw500hqgmkj5m4nmscd7c9rs9w2c96lxgrcyab8krhrm"; + sha256 = "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"; }; buildInputs = [ pari perl ]; @@ -19,9 +20,9 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "A compiler to translate GP scripts to PARI programs"; - homepage = "http://pari.math.u-bordeaux.fr/"; + homepage = "http://pari.math.u-bordeaux.fr/"; downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; - license = licenses.gpl2Plus; + license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres ]; }; } diff --git a/nixpkgs/pkgs/applications/science/math/pspp/default.nix b/nixpkgs/pkgs/applications/science/math/pspp/default.nix index 95c2c3931b3c..d6c5b58f0d56 100644 --- a/nixpkgs/pkgs/applications/science/math/pspp/default.nix +++ b/nixpkgs/pkgs/applications/science/math/pspp/default.nix @@ -1,19 +1,19 @@ { stdenv, fetchurl, libxml2, readline, zlib, perl, cairo, gtk3, gsl , pkgconfig, gtksourceview, pango, gettext, dconf , makeWrapper, gsettings-desktop-schemas, hicolor-icon-theme -, texinfo, ssw +, texinfo, ssw, python3 }: stdenv.mkDerivation rec { pname = "pspp"; - version = "1.2.0"; + version = "1.4.1"; src = fetchurl { url = "mirror://gnu/pspp/${pname}-${version}.tar.gz"; - sha256 = "07pp27zycrb5x927jwaj9r3q7hy915jh51xs85zxby6gfiwl63m5"; + sha256 = "0lqrash677b09zxdlxp89z6k02y4i23mbqg83956dwl69wc53dan"; }; - nativeBuildInputs = [ pkgconfig texinfo ]; + nativeBuildInputs = [ pkgconfig texinfo python3 ]; buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl gtksourceview pango gettext makeWrapper gsettings-desktop-schemas hicolor-icon-theme ssw diff --git a/nixpkgs/pkgs/applications/science/math/pynac/default.nix b/nixpkgs/pkgs/applications/science/math/pynac/default.nix index 82e331216712..e3474d865e2d 100644 --- a/nixpkgs/pkgs/applications/science/math/pynac/default.nix +++ b/nixpkgs/pkgs/applications/science/math/pynac/default.nix @@ -1,11 +1,13 @@ { stdenv , fetchFromGitHub +, fetchurl , autoreconfHook , pkgconfig , flint , gmp -, python2 +, python3 , singular +, ncurses }: stdenv.mkDerivation rec { @@ -23,8 +25,8 @@ stdenv.mkDerivation rec { flint gmp singular - singular - python2 + python3 + ncurses ]; nativeBuildInputs = [ @@ -32,6 +34,14 @@ stdenv.mkDerivation rec { pkgconfig ]; + patches = [ + (fetchurl { + name = "py_ssize_t_clean.patch"; + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/py_ssize_t_clean.patch?h=9.2"; + sha256 = "0l3gbg9hc4v671zf4w376krnk3wh8hj3649610nlvzzxckcryzab"; + }) + ]; + meta = with stdenv.lib; { description = "Python is Not a CAS -- modified version of Ginac"; longDescription = '' @@ -42,7 +52,7 @@ stdenv.mkDerivation rec { ''; homepage = "http://pynac.org"; license = licenses.gpl3; - maintainers = with maintainers; [ timokau ]; + maintainers = teams.sage.members; platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix index df622e7303d4..09ead07dc09d 100644 --- a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix +++ b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix @@ -2,27 +2,15 @@ stdenv.mkDerivation rec { pname = "qalculate-gtk"; - version = "3.12.1"; + version = "3.15.0"; src = fetchFromGitHub { owner = "qalculate"; repo = "qalculate-gtk"; rev = "v${version}"; - sha256 = "0ylsxj9rn3dc1grn9w6jisci3ak0hxgbwzqp54azs3aj5cmvkfgg"; + sha256 = "1w0r9vv1h3zbfdvk8965g5plfkz5clf81riil5b394ms9vsw0bx5"; }; - patchPhase = '' - # The gnome-search-provider2.c file generated by gdbus-codegen depends - # on gio-unix-2.0, which is a Requires.private of gtk+-3.0, - # and private dependencies are dropped in our default patched pkg-config. - # https://github.com/Qalculate/qalculate-gtk/pull/178 - # https://github.com/NixOS/nixpkgs/issues/292 - substituteInPlace configure.ac --replace 'libxml-2.0' 'libxml-2.0 gio-unix-2.0' - - # https://github.com/Qalculate/qalculate-gtk/pull/179 - echo searchprovider.o: gnome-search-provider2.c >>src/Makefile.am - ''; - hardeningDisable = [ "format" ]; nativeBuildInputs = [ intltool pkgconfig autoreconfHook wrapGAppsHook ]; diff --git a/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix b/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix index 40b2711ff65a..ebf2d2f0475d 100644 --- a/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix +++ b/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "rofi-calc"; - version = "1.8"; + version = "1.9"; src = fetchFromGitHub { owner = "svenstaro"; repo = pname; rev = "v${version}"; - sha256 = "0vwb9c3xvd2cms6cw8j8parg7w4bsxvvrd1wgggr8sz2p8rrvy5p"; + sha256 = "ZGY4ZtAG/ZnEnC80modZBV4RdRQElbkjeoKCEFVrncE="; }; nativeBuildInputs = [ @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/svenstaro/rofi-calc"; license = licenses.mit; maintainers = with maintainers; [ luc65r albakham ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; + platforms = with platforms; linux; }; } diff --git a/nixpkgs/pkgs/applications/science/math/sage/default.nix b/nixpkgs/pkgs/applications/science/math/sage/default.nix index caf51c3da251..416f2b957b7b 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/default.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/default.nix @@ -9,31 +9,13 @@ let inherit (pkgs) symlinkJoin callPackage nodePackages; - # https://trac.sagemath.org/ticket/15980 for tracking of python3 support - python = pkgs.python2.override { + python3 = pkgs.python3.override { packageOverrides = self: super: { - # python packages that appear unmaintained and were not accepted into the nixpkgs - # tree because of that. These packages are only dependencies of the more-or-less - # deprecated sagenb. However sagenb is still a default dependency and the doctests - # depend on it. - # See https://github.com/NixOS/nixpkgs/pull/38787 for a discussion. - # The dependency on the sage notebook (and therefore these packages) will be - # removed in the future: - # https://trac.sagemath.org/ticket/25837 - flask-oldsessions = self.callPackage ./flask-oldsessions.nix {}; - flask-openid = self.callPackage ./flask-openid.nix {}; - python-openid = self.callPackage ./python-openid.nix {}; - sagenb = self.callPackage ./sagenb.nix { - mathjax = nodePackages.mathjax; - }; - - # Package with a cyclic dependency with sage - pybrial = self.callPackage ./pybrial.nix {}; - # `sagelib`, i.e. all of sage except some wrappers and runtime dependencies sagelib = self.callPackage ./sagelib.nix { - inherit flint ecl arb; + inherit flint arb; inherit sage-src env-locations pynac singular; + ecl = maxima-ecl.ecl; linbox = pkgs.linbox.override { withSage = true; }; pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig }; @@ -59,9 +41,10 @@ let # A bash script setting various environment variables to tell sage where # the files its looking fore are located. Also see `sage-env`. env-locations = callPackage ./env-locations.nix { - inherit pari_data ecl; + inherit pari_data; inherit singular maxima-ecl; - cysignals = python.pkgs.cysignals; + ecl = maxima-ecl.ecl; + cysignals = python3.pkgs.cysignals; three = nodePackages.three; mathjax = nodePackages.mathjax; }; @@ -69,21 +52,22 @@ let # The shell file that gets sourced on every sage start. Will also source # the env-locations file. sage-env = callPackage ./sage-env.nix { - sagelib = python.pkgs.sagelib; + sagelib = python3.pkgs.sagelib; inherit env-locations; - inherit python ecl singular palp flint pynac pythonEnv maxima-ecl; + inherit python3 singular palp flint pynac pythonEnv maxima-ecl; + ecl = maxima-ecl.ecl; pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig }; # The documentation for sage, building it takes a lot of ram. sagedoc = callPackage ./sagedoc.nix { inherit sage-with-env; - inherit python maxima-ecl; + inherit python3 maxima-ecl; }; # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run. sage-with-env = callPackage ./sage-with-env.nix { - inherit pythonEnv; + inherit python3 pythonEnv; inherit sage-env; inherit pynac singular maxima-ecl; pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig @@ -100,10 +84,8 @@ let sage-src = callPackage ./sage-src.nix {}; - pythonRuntimeDeps = with python.pkgs; [ + pythonRuntimeDeps = with python3.pkgs; [ sagelib - pybrial - sagenb cvxopt networkx service-identity @@ -116,11 +98,10 @@ let ipywidgets rpy2 sphinx - typing pillow ]; - pythonEnv = python.buildEnv.override { + pythonEnv = python3.buildEnv.override { extraLibs = pythonRuntimeDeps; ignoreCollisions = true; } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible @@ -129,8 +110,21 @@ let singular = pkgs.singular.override { inherit flint; }; - # https://trac.sagemath.org/ticket/26625 - maxima-ecl = pkgs.maxima-ecl; + maxima-ecl = pkgs.maxima-ecl.override { + ecl = pkgs.ecl.override { + # "echo syntax error | ecl > /dev/full 2>&1" segfaults in + # ECL. We apply a patch to fix it (write_error.patch), but it + # only works if threads are disabled. sage 9.2 tests this + # (src/sage/interfaces/tests.py) and ships ecl like so. + # https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1#note_1657275 + threadSupport = false; + + # if we don't use the system boehmgc, sending a SIGINT to ecl + # can segfault if we it happens during memory allocation. + # src/sage/libs/ecl.pyx would intermittently fail in this case. + useBoehmgc = true; + }; + }; # *not* to confuse with the python package "pynac" pynac = pkgs.pynac.override { inherit singular flint; }; @@ -161,9 +155,6 @@ let pari-seadata-small ]; }; - - # https://trac.sagemath.org/ticket/22191 - ecl = pkgs.ecl_16_1_2; in # A wrapper around sage that makes sure sage finds its docs (if they were build). callPackage ./sage.nix { diff --git a/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix b/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix index bda2d23b9e52..b1ad0aad9c76 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix @@ -44,6 +44,6 @@ writeTextFile rec { export JSMOL_DIR="${jmol}/share/jsmol" export MATHJAX_DIR="${mathjax}/lib/node_modules/mathjax" export THREEJS_DIR="${three}/lib/node_modules/three" - export SAGE_INCLUDE_DIRECTORIES="${cysignals}/lib/python2.7/site-packages" + export SAGE_INCLUDE_DIRECTORIES="${cysignals}/${cysignals.pythonModule.sitePackages}" ''; } diff --git a/nixpkgs/pkgs/applications/science/math/sage/flask-oldsessions.nix b/nixpkgs/pkgs/applications/science/math/sage/flask-oldsessions.nix deleted file mode 100644 index 403dc8708fab..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/flask-oldsessions.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchFromGitHub -, python -, flask -}: - -buildPythonPackage rec { - pname = "Flask-OldSessions"; - version = "0.10"; - - # no artifact on pypi: https://github.com/mitsuhiko/flask-oldsessions/issues/1 - src = fetchFromGitHub { - owner = "mitsuhiko"; - repo = "flask-oldsessions"; - rev = version; - sha256 = "04b5m8njjiwld9a0zw55iqwvyjgwcpdbhz1cic8nyhgcmypbicqn"; - }; - - propagatedBuildInputs = [ - flask - ]; - - # missing module flask.testsuite, probably assumes an old version of flask - doCheck = false; - checkPhase = '' - ${python.interpreter} run-tests.py - ''; - - meta = with stdenv.lib; { - description = "Provides a session class that works like the one in Flask before 0.10."; - license = licenses.bsd2; - maintainers = with maintainers; [ timokau ]; - homepage = "https://github.com/mitsuhiko/flask-oldsessions"; - }; -} diff --git a/nixpkgs/pkgs/applications/science/math/sage/flask-openid.nix b/nixpkgs/pkgs/applications/science/math/sage/flask-openid.nix deleted file mode 100644 index 527173dec80a..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/flask-openid.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -, flask -, python-openid -}: - -buildPythonPackage rec { - pname = "Flask-OpenID"; - version = "1.2.5"; - - src = fetchPypi { - inherit pname version; - sha256 = "1aycwmwi7ilcaa5ab8hm0bp6323zl8z25q9ha0gwrl8aihfgx3ss"; - }; - - propagatedBuildInputs = [ - flask - python-openid - ]; - - meta = with stdenv.lib; { - description = "Adds openid support to flask applications"; - license = licenses.bsd2; - maintainers = with maintainers; [ timokau ]; - homepage = "https://pythonhosted.org/Flask-OpenID/"; - }; -} diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch index 8cd80281d0e4..d5c19a54fd96 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch @@ -1,17 +1,17 @@ -From 8218bd4fdeb4c92de8af0d3aabec55980fc4fb3d Mon Sep 17 00:00:00 2001 +From f5ea42a7aaed7611fb55b65897b9fcf2b7bcf97e Mon Sep 17 00:00:00 2001 From: Timo Kaufmann <timokau@zoho.com> Date: Sun, 21 Oct 2018 17:52:40 +0200 Subject: [PATCH] Only test py2/py3 optional tests when all of sage is tested --- - src/sage/doctest/control.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + src/sage/doctest/control.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py -index bf18df8b2b..935c67abf7 100644 +index 2d93841e50..6d156e29a1 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py -@@ -362,7 +362,8 @@ class DocTestController(SageObject): +@@ -375,7 +375,8 @@ class DocTestController(SageObject): if not optionaltag_regex.search(o): raise ValueError('invalid optional tag {!r}'.format(o)) @@ -21,15 +21,6 @@ index bf18df8b2b..935c67abf7 100644 self.options = options -@@ -765,7 +766,7 @@ class DocTestController(SageObject): - sage: DC = DocTestController(DD, [dirname]) - sage: DC.expand_files_into_sources() - sage: sorted(DC.sources[0].options.optional) # abs tol 1 -- ['guava', 'magma', 'py2'] -+ ['guava', 'magma'] - - We check that files are skipped appropriately:: - -- -2.18.1 +2.28.0 diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch index 3f844e1b1ef5..981759202386 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch @@ -1,17 +1,17 @@ diff --git a/src/sage/env.py b/src/sage/env.py -index 061b94f3f1..67cd091540 100644 +index 1ddfc7cfb9..45033d6328 100644 --- a/src/sage/env.py +++ b/src/sage/env.py -@@ -189,88 +189,13 @@ var('MAXIMA_FAS') +@@ -203,97 +203,13 @@ var('ARB_LIBRARY', 'arb') var('SAGE_BANNER', '') var('SAGE_IMPORTALL', 'yes') - -def _get_shared_lib_filename(libname, *additional_libnames): - """ -- Return the full path to a shared library file installed in the standard -- location for the system within the ``LIBDIR`` prefix (or -- ``$SAGE_LOCAL/lib`` in the case of manual build of Sage). +- Return the full path to a shared library file installed in +- ``$SAGE_LOCAL/lib`` or the directories associated with the +- Python sysconfig. - - This can also be passed more than one library name (e.g. for cases where - some library may have multiple names depending on the platform) in which @@ -25,7 +25,7 @@ index 061b94f3f1..67cd091540 100644 - For distributions like Debian that use a multiarch layout, we also try the - multiarch lib paths (i.e. ``/usr/lib/<arch>/``). - -- Returns ``None`` if the file does not exist. +- This returns ``None`` if the file does not exist. - - EXAMPLES:: - @@ -48,11 +48,17 @@ index 061b94f3f1..67cd091540 100644 - - for libname in (libname,) + additional_libnames: - if sys.platform == 'cygwin': -- bindir = sysconfig.get_config_var('BINDIR') +- # Later down we take the last matching DLL found, so search +- # SAGE_LOCAL second so that it takes precedence +- bindirs = [ +- sysconfig.get_config_var('BINDIR'), +- os.path.join(SAGE_LOCAL, 'bin') +- ] - pats = ['cyg{}.dll'.format(libname), 'cyg{}-*.dll'.format(libname)] - filenames = [] -- for pat in pats: -- filenames += glob.glob(os.path.join(bindir, pat)) +- for bindir in bindirs: +- for pat in pats: +- filenames += glob.glob(os.path.join(bindir, pat)) - - # Note: This is not very robust, since if there are multi DLL - # versions for the same library this just selects one more or less @@ -66,10 +72,13 @@ index 061b94f3f1..67cd091540 100644 - else: - ext = 'so' - -- libdirs = [sysconfig.get_config_var('LIBDIR')] +- libdirs = [ +- os.path.join(SAGE_LOCAL, 'lib'), +- sysconfig.get_config_var('LIBDIR') +- ] - multilib = sysconfig.get_config_var('MULTILIB') - if multilib: -- libdirs.insert(0, os.path.join(libdirs[0], multilib)) +- libdirs.insert(1, os.path.join(libdirs[0], multilib)) - - for libdir in libdirs: - basename = 'lib{}.{}'.format(libname, ext) @@ -89,7 +98,7 @@ index 061b94f3f1..67cd091540 100644 # locate libgap shared object -GAP_SO= _get_shared_lib_filename('gap','') -+GAP_SO= '/default' ++GAP_SO = '/default' var('GAP_SO', GAP_SO) # post process diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/docutils-0.15.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/docutils-0.15.patch deleted file mode 100644 index 63f5d2e146dd..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/docutils-0.15.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py -index 4849c2bffa..76b7bc8602 100644 ---- a/src/sage/misc/sphinxify.py -+++ b/src/sage/misc/sphinxify.py -@@ -25,6 +25,7 @@ from __future__ import absolute_import, print_function - import os - import re - import shutil -+import warnings - from tempfile import mkdtemp - from sphinx.application import Sphinx - -@@ -120,7 +121,10 @@ smart_quotes = no""") - # buildername, confoverrides, status, warning, freshenv). - sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format, - confoverrides, None, None, True) -- sphinx_app.build(None, [rst_name]) -+ with warnings.catch_warnings(): -+ # Quick and dirty workaround for https://trac.sagemath.org/ticket/28856#comment:19 -+ warnings.simplefilter("ignore") -+ sphinx_app.build(None, [rst_name]) - sys.path = old_sys_path - - # We need to remove "_" from __builtin__ that the gettext module installs diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch index 11ca74819615..a91ee319b8f0 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch @@ -1,24 +1,24 @@ diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py -index bd6b76ab82..ccf1203dec 100644 +index 6e034dcb5a..8ec60ec72b 100644 --- a/src/sage/tests/cmdline.py +++ b/src/sage/tests/cmdline.py -@@ -837,8 +837,6 @@ def test_executable(args, input="", timeout=100.0, **kwds): +@@ -660,8 +660,8 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False + sage: with open(input, 'w') as F: + ....: _ = F.write(s) + sage: L = ["sage", "--rst2ipynb", input, output] +- sage: test_executable(L) # optional - rst2ipynb +- ('', '', 0) ++ sage: test_executable(L)[2] # optional - rst2ipynb ++ 0 + sage: import json # optional - rst2ipynb + sage: d = json.load(open(output,'r')) # optional - rst2ipynb + sage: type(d) # optional - rst2ipynb +@@ -757,8 +757,6 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False /// 4 }}} -- sage: err # py2 +- sage: err # py2 # optional -- sagenb - '' - sage: ret + sage: ret # py2 # optional -- sagenb 0 -@@ -871,8 +869,8 @@ def test_executable(args, input="", timeout=100.0, **kwds): - sage: output = tmp_filename(ext='.sws') - sage: with open(input, 'w') as F: - ....: _ = F.write(s) -- sage: test_executable(["sage", "--rst2sws", input, output]) # py2 -- ('', '', 0) -+ sage: test_executable(["sage", "--rst2sws", input, output])[2] # py2 -+ 0 - sage: import tarfile # py2 - sage: f = tarfile.open(output, 'r') # py2 - sage: print(f.extractfile('sage_worksheet/worksheet.html').read()) # py2 diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch deleted file mode 100644 index c5f95b498d53..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/sage/all.py b/src/sage/all.py -index c87c9372e9..862fca4fcc 100644 ---- a/src/sage/all.py -+++ b/src/sage/all.py -@@ -306,6 +306,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0)) - # Ignore all deprecations from IPython etc. - warnings.filterwarnings('ignore', category=DeprecationWarning, - module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)') -+warnings.filterwarnings('ignore', category=DeprecationWarning, message=r".*The import 'werkzeug.ImmutableDict' is deprecated") - # Ignore collections.abc warnings, there are a lot of them but they are - # harmless. - warnings.filterwarnings('ignore', category=DeprecationWarning, diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/pari-stackwarn.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/pari-stackwarn.patch deleted file mode 100644 index 49cdfd189b92..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/pari-stackwarn.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py -index 6bdc9a0..31fc780 100644 ---- a/src/sage/doctest/parsing.py -+++ b/src/sage/doctest/parsing.py -@@ -40,6 +40,7 @@ from .external import available_software - - float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)') - optional_regex = re.compile(r'(py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))') -+pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.') - find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M) - find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M) - random_marker = re.compile('.*random', re.I) -@@ -935,6 +936,7 @@ class SageOutputChecker(doctest.OutputChecker): - <type 'float'> - """ - got = self.human_readable_escape_sequences(got) -+ got = pari_stack_warning_regex.sub('', got) - if isinstance(want, MarkedOutput): - if want.random: - return True diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/pillow-update.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/pillow-update.patch new file mode 100644 index 000000000000..19d615522626 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/pillow-update.patch @@ -0,0 +1,39 @@ +diff --git a/src/sage/repl/image.py b/src/sage/repl/image.py +index d7d00b0..cd1607a 100644 +--- a/src/sage/repl/image.py ++++ b/src/sage/repl/image.py +@@ -77,7 +77,7 @@ class Image(SageObject): + + - ``size`` -- 2-tuple, containing (width, height) in pixels. + +- - ``color`` -- string or tuple of numeric. What colour to use ++ - ``color`` -- string, numeric or tuple of numeric. What colour to use + for the image. Default is black. If given, this should be a + a tuple with one value per band. When creating RGB images, + you can also use colour strings as supported by the +@@ -91,9 +91,15 @@ class Image(SageObject): + EXAMPLES:: + + sage: from sage.repl.image import Image +- sage: Image('P', (16, 16), (13,)) ++ sage: Image('P', (16, 16), 13) + 16x16px 8-bit Color image + """ ++ # pillow does not support Sage integers as color ++ from sage.rings.integer import Integer ++ if isinstance(color, Integer): ++ color = int(color) ++ elif isinstance(color, tuple): ++ color = tuple(int(i) if isinstance(i, Integer) else i for i in color) + self._pil = PIL.Image.new(mode, size, color) + + @property +@@ -233,7 +239,7 @@ class Image(SageObject): + EXAMPLES:: + + sage: from sage.repl.image import Image +- sage: img = Image('P', (12, 34), (13,)) ++ sage: img = Image('P', (12, 34), 13) + sage: filename = tmp_filename(ext='.png') + sage: img.save(filename) + sage: with open(filename, 'rb') as f: diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch deleted file mode 100644 index 1b64f39fe60f..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/sage/all.py b/src/sage/all.py -index ca309ef..be3186b 100644 ---- a/src/sage/all.py -+++ b/src/sage/all.py -@@ -298,6 +298,23 @@ warnings.filterwarnings('ignore', module='matplotlib[.]font_manager') - warnings.filterwarnings('default', - '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.') - -+# Hotpatch around https://bugs.python.org/issue5755 which won't be fixed for -+# python 2.7. Idea by https://stackoverflow.com/a/36293331. -+from distutils.command.build_ext import build_ext -+from distutils.sysconfig import customize_compiler -+ -+_build_extensions = build_ext.build_extensions -+ -+def build_extensions_patched(self): -+ customize_compiler(self.compiler) -+ try: -+ self.compiler.compiler_so.remove("-Wstrict-prototypes") -+ except (AttributeError, ValueError): -+ pass -+ _build_extensions(self) -+ -+build_ext.build_extensions = build_extensions_patched -+ - - # Set a new random number seed as the very last thing - # (so that printing initial_seed() and using that seed diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/register-pretty-printer-earlier.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/register-pretty-printer-earlier.patch new file mode 100644 index 000000000000..83bd83a6d33b --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/register-pretty-printer-earlier.patch @@ -0,0 +1,36 @@ +diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py +index cb3667659e..867f547d71 100644 +--- a/src/sage/doctest/forker.py ++++ b/src/sage/doctest/forker.py +@@ -200,6 +200,15 @@ def init_sage(controller=None): + from sage.cpython._py2_random import Random + sage.misc.randstate.DEFAULT_PYTHON_RANDOM = Random + ++ # IPython's pretty printer sorts the repr of dicts by their keys by default ++ # (or their keys' str() if they are not otherwise orderable). However, it ++ # disables this for CPython 3.6+ opting to instead display dicts' "natural" ++ # insertion order, which is preserved in those versions). ++ # However, this order is random in some instances. ++ # Also modifications of code may affect the order. ++ # So here we fore sorted dict printing. ++ IPython.lib.pretty.for_type(dict, _sorted_dict_pprinter_factory('{', '}')) ++ + if controller is None: + import sage.repl.ipython_kernel.all_jupyter + else: +@@ -222,15 +231,6 @@ def init_sage(controller=None): + from sage.repl.rich_output.backend_doctest import BackendDoctest + dm.switch_backend(BackendDoctest()) + +- # IPython's pretty printer sorts the repr of dicts by their keys by default +- # (or their keys' str() if they are not otherwise orderable). However, it +- # disables this for CPython 3.6+ opting to instead display dicts' "natural" +- # insertion order, which is preserved in those versions). +- # However, this order is random in some instances. +- # Also modifications of code may affect the order. +- # So here we fore sorted dict printing. +- IPython.lib.pretty.for_type(dict, _sorted_dict_pprinter_factory('{', '}')) +- + # Switch on extra debugging + from sage.structure.debug_options import debug + debug.refine_category_hash_check = True diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch deleted file mode 100644 index 9f502a669517..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sagenb/__init__.py b/sagenb/__init__.py -index 4db0d2cb..2fc5f01e 100644 ---- a/sagenb/__init__.py -+++ b/sagenb/__init__.py -@@ -1,3 +1,8 @@ - # -*- coding: utf-8 -* - # init -+import warnings - from . import storage -+ -+# deprecation in attrs, needs to be fixed in twisted -+warnings.filterwarnings('ignore', category=DeprecationWarning, -+ message=r'The usage of `cmp` is deprecated and will be removed.*') diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sagespawn-implicit-casting.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sagespawn-implicit-casting.patch new file mode 100644 index 000000000000..2ee5db3e29c0 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/sagespawn-implicit-casting.patch @@ -0,0 +1,13 @@ +diff --git a/src/sage/interfaces/sagespawn.pyx b/src/sage/interfaces/sagespawn.pyx +index 9041238f1d..469befbc66 100644 +--- a/src/sage/interfaces/sagespawn.pyx ++++ b/src/sage/interfaces/sagespawn.pyx +@@ -228,7 +228,7 @@ class SagePtyProcess(PtyProcess): + Check that the process eventually dies after calling + ``terminate_async``:: + +- sage: s.ptyproc.terminate_async(interval=0.2) ++ sage: s.ptyproc.terminate_async(interval=float(0.2)) + sage: while True: + ....: try: + ....: os.kill(s.pid, 0) diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch index 56f092796229..661077cfa8cd 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch @@ -36,7 +36,7 @@ index 73a078e619..059125c59f 100644 # Run Sphinx with Sage's special logger - sys.argv = ["sphinx-build"] + build_command.split() - from .sphinxbuild import runsphinx -+ args = "python -um sage_setup.docbuild.sphinxbuild -N".split() + build_command.split() ++ args = "python3 -um sage_setup.docbuild.sphinxbuild -N".split() + build_command.split() try: - runsphinx() + subprocess.check_call(args) diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch index 20020d610f80..d71f3acbc706 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch @@ -1,5 +1,5 @@ diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py -index 1640ac4f6a..03578be7b8 100644 +index 92cb01fd73..b123e6accc 100644 --- a/src/sage/lfunctions/sympow.py +++ b/src/sage/lfunctions/sympow.py @@ -50,6 +50,7 @@ from __future__ import print_function, absolute_import @@ -8,14 +8,14 @@ index 1640ac4f6a..03578be7b8 100644 +from sage.env import DOT_SAGE from sage.structure.sage_object import SageObject - from sage.misc.all import pager, verbose - import sage.rings.all -@@ -76,7 +77,7 @@ class Sympow(SageObject): + from sage.misc.all import pager + from sage.misc.verbose import verbose +@@ -78,7 +79,7 @@ class Sympow(SageObject): """ Used to call sympow with given args """ -- cmd = 'sympow %s'%args +- cmd = 'sympow %s' % args + cmd = 'env SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args) - v = os.popen(cmd).read().strip() + with os.popen(cmd) as f: + v = f.read().strip() verbose(v, level=2) - return v diff --git a/nixpkgs/pkgs/applications/science/math/sage/pybrial.nix b/nixpkgs/pkgs/applications/science/math/sage/pybrial.nix deleted file mode 100644 index 718414126ae8..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/pybrial.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv -, fetchFromGitHub -, buildPythonPackage -, brial -}: -# This has a cyclic dependency with sage. I don't include sage in the -# buildInputs and let python figure it out at runtime. Because of this, -# I don't include the package in the main nipxkgs tree. It wouldn't be useful -# outside of sage anyways (as you could just directly depend on sage and use -# it). -buildPythonPackage rec { - pname = "pyBRiAl"; - version = brial.version; - - # included with BRiAl source - src = brial.src; - - sourceRoot = "source/sage-brial"; - - meta = with stdenv.lib; { - description = "python implementation of BRiAl"; - license = licenses.gpl2; - maintainers = with maintainers; [ timokau ]; - }; -} diff --git a/nixpkgs/pkgs/applications/science/math/sage/python-openid.nix b/nixpkgs/pkgs/applications/science/math/sage/python-openid.nix deleted file mode 100644 index 4c7fdadadaf0..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/python-openid.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -, isPy3k -, django -, nose -, twill -, pycrypto -}: - -buildPythonPackage rec { - pname = "python-openid"; - version = "2.2.5"; - - disabled = isPy3k; - - src = fetchPypi { - inherit pname version; - sha256 = "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"; - }; - - propagatedBuildInputs = [ - pycrypto - ]; - - # Cannot access the djopenid example module. - # I don't know how to fix that (adding the examples dir to PYTHONPATH doesn't work) - doCheck = false; - checkInputs = [ nose django twill ]; - checkPhase = '' - nosetests - ''; - - meta = with stdenv.lib; { - description = "OpenID library for Python"; - license = licenses.asl20; - maintainers = with maintainers; [ timokau ]; - homepage = "https://github.com/openid/python-openid/"; - }; -} diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage-env.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-env.nix index ba7f6ccd18b5..568a4a39f393 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sage-env.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sage-env.nix @@ -1,7 +1,6 @@ { stdenv , lib , writeTextFile -, python , sagelib , env-locations , gfortran @@ -67,11 +66,6 @@ let "@sage-local@" "@sage-local@/build" pythonEnv - # empty python env to add python wrapper that clears PYTHONHOME (see - # wrapper.nix). This is necessary because sage will call the python3 binary - # (from python2 code). The python2 PYTHONHOME (again set in wrapper.nix) - # will then confuse python3, if it is not overwritten. - python3.buildEnv gfortran # for inline fortran stdenv.cc # for cython bash @@ -129,8 +123,21 @@ writeTextFile rec { ] }' export SAGE_ROOT='${sagelib.src}' - export SAGE_LOCAL='@sage-local@' + '' + + # TODO: is using pythonEnv instead of @sage-local@ here a good + # idea? there is a test in src/sage/env.py that checks if the values + # SAGE_ROOT and SAGE_LOCAL set here match the ones set in env.py. + # we fix up env.py's SAGE_ROOT in sage-src.nix (which does not + # have access to sage-with-env), but env.py autodetects + # SAGE_LOCAL to be pythonEnv. + # setting SAGE_LOCAL to pythonEnv also avoids having to create + # python3, ipython, ipython3 and jupyter symlinks in + # sage-with-env.nix. + '' + export SAGE_LOCAL='${pythonEnv}' + export SAGE_SHARE='${sagelib}/share' + export SAGE_ENV_CONFIG_SOURCED=1 # sage-env complains if sage-env-config is not sourced beforehand orig_path="$PATH" export PATH='${runtimepath}' @@ -177,9 +184,9 @@ writeTextFile rec { ]) }' - export SAGE_LIB='${sagelib}/${python.sitePackages}' + export SAGE_LIB='${sagelib}/${python3.sitePackages}' - export SAGE_EXTCODE='${sagelib.src}/src/ext' + export SAGE_EXTCODE='${sagelib.src}/src/sage/ext_data' # for find_library export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH" diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix index 4791d12450a9..8948621a025a 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix @@ -10,44 +10,23 @@ # all get the same sources with the same patches applied. stdenv.mkDerivation rec { - version = "8.9"; + version = "9.2"; pname = "sage-src"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "1bwga58x3s8z42w5h51c232f91ndsc1861dlb1glhax3pn0rhn3a"; + sha256 = "103j8d5x6szl9fxaz0dvdi4y47q1af9h9y5hmjh2xayi62qmp5ql"; }; # Patches needed because of particularities of nix or the way this is packaged. # The goal is to upstream all of them and get rid of this list. nixPatches = [ - # https://trac.sagemath.org/ticket/25358 - (fetchpatch { - name = "safe-directory-test-without-patch.patch"; - url = "https://git.sagemath.org/sage.git/patch?id2=8bdc326ba57d1bb9664f63cf165a9e9920cc1afc&id=dc673c17555efca611f68398d5013b66e9825463"; - sha256 = "1hhannz7xzprijakn2w2d0rhd5zv2zikik9p51i87bas3nc658f7"; - }) - - # `is_unitary` test in `matrix_double_dense.pyx` fails with some BLAS implementations - # https://trac.sagemath.org/ticket/29297 should be included in 9.1 - (fetchpatch { - name = "is_unitary-special-case.patch"; - url = "https://git.sagemath.org/sage.git/patch?id=cc3eb9ffa991e328b09028d32aab7e7cc2ddbb6a"; - sha256 = "0jq4w8hnp5c9q99011ldr4n3knvm1rx2g85z0hidv3i9x868p0ay"; - }) - - # Unfortunately inclusion in upstream sage was rejected. Instead the bug was - # fixed in python, but of course not backported to 2.7. So we'll probably - # have to keep this around until 2.7 is deprecated. - # https://trac.sagemath.org/ticket/25316 - # https://github.com/python/cpython/pull/7476 - ./patches/python-5755-hotpatch.patch - # Make sure py2/py3 tests are only run when their expected context (all "sage" # tests) are also run. That is necessary to test dochtml individually. See # https://trac.sagemath.org/ticket/26110 for an upstream discussion. + # TODO: Determine if it is still necessary. ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch # Fixes a potential race condition which can lead to transient doctest failures. @@ -61,10 +40,17 @@ stdenv.mkDerivation rec { # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE ./patches/sphinx-docbuild-subprocesses.patch - # Fix doctest failures with docutils 0.15: - # https://nix-cache.s3.amazonaws.com/log/dzmzrb2zvardsmpy7idg7djkizmkzdhs-sage-tests-8.9.drv - # https://trac.sagemath.org/ticket/28856#comment:19 - ./patches/docutils-0.15.patch + # Sage's workaround to pretty print dicts (in + # src/sage/doctest/forker.py:init_sage) runs too late (after + # controller.load_environment(), which imports sage.all.*) to to + # affect sage.sandpiles.Sandpile{Config,Divisor}'s pretty printer. + # Due to the sandpiles module being lazily loaded, this only + # affects the first run (subsequent runs read from an import cache + # at ~/.sage/cache and are not affected), which is probably why + # other distributions don't hit this bug. This breaks two sandpile + # tests, so do the workaround a little bit earlier. + # https://trac.sagemath.org/ticket/31053 + ./patches/register-pretty-printer-earlier.patch ]; # Since sage unfortunately does not release bugfix releases, packagers must @@ -74,6 +60,17 @@ stdenv.mkDerivation rec { # To help debug the transient error in # https://trac.sagemath.org/ticket/23087 when it next occurs. ./patches/configurationpy-error-verbose.patch + + # fix intermittent errors in Sage 9.2's psage.py (this patch is + # already included in Sage 9.3): https://trac.sagemath.org/ticket/30730 + (fetchpatch { + name = "fix-psage-is-locked.patch"; + url = "https://git.sagemath.org/sage.git/patch/?id=75df605f216ddc7b6ca719be942d666b241520e9"; + sha256 = "0g9pl1wbb3sgs26d3bvv70cpa77sfskylv4kd255y1794f1fgk4q"; + }) + + # fix intermittent errors in sagespawn.pyx: https://trac.sagemath.org/ticket/31052 + ./patches/sagespawn-implicit-casting.patch ]; # Patches needed because of package updates. We could just pin the versions of @@ -96,55 +93,16 @@ stdenv.mkDerivation rec { } // builtins.removeAttrs args [ "rev" "base" ]) ); in [ - # New glpk version has new warnings, filter those out until upstream sage has found a solution - # Should be fixed with glpk > 4.65. - # https://trac.sagemath.org/ticket/24824 - ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply - (fetchpatch { - url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch"; - sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp"; - stripLen = 1; - }) - # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can # now set the cache dir to be withing the .sage directory. This is not # strictly necessary, but keeps us from littering in the user's HOME. ./patches/sympow-cache.patch - # https://trac.sagemath.org/ticket/28472 - (fetchpatch { - name = "eclib-20190909.patch"; - url = "https://git.sagemath.org/sage.git/patch?id=d27dc479a5772d59e4bc85d805b6ffd595284f1d"; - sha256 = "1nf1s9y7n30lhlbdnam7sghgaq9nasmv96415gl5jlcf7a3hlxk3"; - }) - # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests ./patches/ignore-cmp-deprecation.patch - # Werkzeug has deprecated ImmutableDict, but it is still used in legacy - # sagenb. That's no big issue since sagenb will be removed soon anyways. - ./patches/ignore-werkzeug-immutable-dict-deprecation.patch - - # threejs r109 (#28560) - (fetchpatch { - name = "threejs-r109.patch"; - url = "https://git.sagemath.org/sage.git/patch?id=fcc11d6effa39f375bc5f4ea5831fb7a2f2767da"; - sha256 = "0hnmc8ld3bblks0hcjvjjaydkgwdr1cs3dbl2ys4gfq964pjgqwc"; - }) - - # https://trac.sagemath.org/ticket/28911 - (fetchpatch { - name = "sympy-1.5.patch"; - url = "https://git.sagemath.org/sage.git/patch/?h=c6d0308db15efd611211d26cfcbefbd180fc0831"; - sha256 = "0nwai2jr22h49km4hx3kwafs3mzsc5kwsv7mqwjf6ibwfx2bbgyq"; - }) - - # https://trac.sagemath.org/ticket/29313 (patch from ArchLinux) - (fetchpatch { - name = "pari-2.11.3.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/sagemath-pari-2.11.3.patch?h=sagemath-git&id=02e1d58bd1cd70935d69a4990469d18be6bd2c43"; - sha256 = "0z07444zvijyw96d11q7j81pvg7ysd6ycf1bbbjr6za9y74hv7d2"; - }) + # adapt sage's Image class to pillow 8.0.1 (https://trac.sagemath.org/ticket/30971) + ./patches/pillow-update.patch ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; @@ -152,16 +110,16 @@ stdenv.mkDerivation rec { postPatch = '' # make sure shebangs etc are fixed, but sage-python23 still works find . -type f -exec sed \ - -e 's/sage-python23/python/g' \ + -e 's/sage-python23/python3/g' \ -i {} \; echo '#!${runtimeShell} - python "$@"' > build/bin/sage-python23 + python3 "$@"' > build/bin/sage-python23 # Make sure sage can at least be imported without setting any environment # variables. It won't be close to feature complete though. sed -i \ - "s|var('SAGE_LOCAL',.*|var('SAGE_LOCAL', '$out/src')|" \ + "s|var('SAGE_ROOT'.*|var('SAGE_ROOT', '$out')|" \ src/sage/env.py # Do not use sage-env-config (generated by ./configure). @@ -169,7 +127,39 @@ stdenv.mkDerivation rec { echo '# do nothing' > src/bin/sage-env-config ''; - configurePhase = "# do nothing"; + # Test src/doc/en/reference/spkg/conf.py will fail if + # src/doc/en/reference/spkg/index.rst is not generated. It is + # generated by src/doc/bootstrap, so I've copied the relevant part + # here. An alternative would be to create an empty + # src/doc/en/reference/spkg/index.rst file. + configurePhase = '' + OUTPUT_DIR="src/doc/en/reference/spkg" + mkdir -p "$OUTPUT_DIR" + OUTPUT_INDEX="$OUTPUT_DIR"/index.rst + cat > "$OUTPUT_INDEX" <<EOF + + External Packages + ================= + + .. toctree:: + :maxdepth: 1 + + EOF + for PKG_SCRIPTS in build/pkgs/*; do + if [ -d "$PKG_SCRIPTS" ]; then + PKG_BASE=$(basename "$PKG_SCRIPTS") + if [ -f "$PKG_SCRIPTS"/SPKG.rst ]; then + # Instead of just copying, we may want to call + # a version of sage-spkg-info to format extra information. + cp "$PKG_SCRIPTS"/SPKG.rst "$OUTPUT_DIR"/$PKG_BASE.rst + echo >> "$OUTPUT_INDEX" " $PKG_BASE" + fi + fi + done + cat >> "$OUTPUT_INDEX" <<EOF + .. include:: ../footer.txt + EOF + ''; buildPhase = "# do nothing"; diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix index 87c1e07f5307..f204d97961b6 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix @@ -13,7 +13,7 @@ , pari , gmp , gfan -, python2 +, python3 , flintqs , eclib , ntl @@ -50,11 +50,11 @@ let ]; # remove python prefix, replace "-" in the name by "_", apply patch_names - # python2.7-some-pkg-1.0 -> some_pkg-1.0 + # python3.8-some-pkg-1.0 -> some_pkg-1.0 pkg_to_spkg_name = pkg: patch_names: let parts = lib.splitString "-" pkg.name; - # remove python2.7- - stripped_parts = if (builtins.head parts) == python2.libPrefix then builtins.tail parts else parts; + # remove python3.8- + stripped_parts = if (builtins.head parts) == python3.libPrefix then builtins.tail parts else parts; version = lib.last stripped_parts; orig_pkgname = lib.init stripped_parts; pkgname = patch_names (lib.concatStringsSep "_" orig_pkgname); diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage.nix b/nixpkgs/pkgs/applications/science/math/sage/sage.nix index 4fa8ae6270ba..e2acef7b8eb5 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sage.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sage.nix @@ -63,6 +63,6 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"; license = licenses.gpl2; - maintainers = with maintainers; [ timokau ]; + maintainers = teams.sage.members; }; } diff --git a/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix b/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix index bf618fe64f45..a10672f3a092 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix @@ -1,6 +1,6 @@ { stdenv , sage-with-env -, python +, python3 , maxima-ecl , tachyon , jmol @@ -17,16 +17,15 @@ stdenv.mkDerivation rec { # modules are imported and because matplotlib is used to produce plots. buildInputs = [ sage-with-env.env.lib - python + python3 maxima-ecl tachyon jmol cddlib - ] ++ (with python.pkgs; [ + ] ++ (with python3.pkgs; [ psutil future sphinx - sagenb scipy sympy matplotlib @@ -35,8 +34,6 @@ stdenv.mkDerivation rec { ipykernel ipywidgets jupyter_client - typing - pybrial ]); unpackPhase = '' @@ -47,13 +44,26 @@ stdenv.mkDerivation rec { chmod -R 755 "$SAGE_DOC_SRC_OVERRIDE" ''; + postPatch = '' + # src/doc/bootstrap generates installation instructions for + # arch, debian, fedora, cygwin and homebrew. as a hack, disable + # including the generated files. + sed -i "/literalinclude/d" $SAGE_DOC_SRC_OVERRIDE/en/installation/source.rst + ''; + buildPhase = '' export SAGE_NUM_THREADS="$NIX_BUILD_CORES" export HOME="$TMPDIR/sage_home" mkdir -p "$HOME" # needed to link them in the sage docs using intersphinx - export PPLPY_DOCS=${python.pkgs.pplpy.doc}/share/doc/pplpy + export PPLPY_DOCS=${python3.pkgs.pplpy.doc}/share/doc/pplpy + + # adapted from src/doc/bootstrap + OUTPUT_DIR="$SAGE_DOC_SRC_OVERRIDE/en/reference/repl" + mkdir -p "$OUTPUT_DIR" + OUTPUT="$OUTPUT_DIR/options.txt" + ${sage-with-env}/bin/sage -advanced > "$OUTPUT" ${sage-with-env}/bin/sage -python -m sage_setup.docbuild \ --mathjax \ diff --git a/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix b/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix index 830d806a8bcd..1c2235bf71b4 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix +++ b/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix @@ -15,6 +15,7 @@ , ecm , flint , gd +, giac , givaro , glpk , gsl @@ -51,6 +52,7 @@ , libbraiding , gmpy2 , pplpy +, sqlite }: assert (!blas.isILP64) && (!lapack.isILP64); @@ -94,6 +96,7 @@ buildPythonPackage rec { ecm fflas-ffpack flint + giac givaro glpk gsl @@ -124,6 +127,7 @@ buildPythonPackage rec { libbraiding gmpy2 pplpy + sqlite ]; buildPhase = '' diff --git a/nixpkgs/pkgs/applications/science/math/sage/sagenb.nix b/nixpkgs/pkgs/applications/science/math/sage/sagenb.nix deleted file mode 100644 index 77b2168ad974..000000000000 --- a/nixpkgs/pkgs/applications/science/math/sage/sagenb.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ stdenv -, python -, buildPythonPackage -, fetchFromGitHub -, mathjax -, twisted -, flask -, flask-oldsessions -, flask-openid -, flask-autoindex -, flask-babel -}: - -# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage. -# Deprecated, hopefully soon to be removed. See -# https://trac.sagemath.org/ticket/25837 - -buildPythonPackage rec { - pname = "sagenb"; - version = "1.1.2"; - - src = fetchFromGitHub { - owner = "sagemath"; - repo = "sagenb"; - rev = version; - sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs"; - }; - - patches = [ - # cmp deprecation in attrs needs to be handled in twisted - ./patches/sagenb-cmp-deprecation.patch - ]; - - propagatedBuildInputs = [ - twisted - flask - flask-oldsessions - flask-openid - flask-autoindex - flask-babel - ]; - - # tests depend on sage - doCheck = false; - - meta = with stdenv.lib; { - description = "Sage Notebook"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ timokau ]; - }; - - # let sagenb use mathjax - postInstall = '' - mkdir -p "$out/${python.sitePackages}/sagenb/data" - ln -s ${mathjax}/lib/node_modules/mathjax "$out/${python.sitePackages}/sagenb/data/mathjax" - ''; -} diff --git a/nixpkgs/pkgs/applications/science/math/singular/default.nix b/nixpkgs/pkgs/applications/science/math/singular/default.nix index a8c4f6bb9a09..8c5eac2c06d2 100644 --- a/nixpkgs/pkgs/applications/science/math/singular/default.nix +++ b/nixpkgs/pkgs/applications/science/math/singular/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A CAS for polynomial computations"; - maintainers = with maintainers; [ raskin timokau ]; + maintainers = teams.sage.members; # 32 bit x86 fails with some link error: `undefined reference to `__divmoddi4@GCC_7.0.0'` platforms = subtractLists platforms.i686 platforms.unix; license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4 diff --git a/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix b/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix index b363137fb99c..ca752259797f 100644 --- a/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix +++ b/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = ''A collection of routines for representation theory and combinatorics''; license = licenses.isc; - maintainers = with maintainers; [raskin timokau]; + maintainers = teams.sage.members; platforms = platforms.unix; homepage = "https://gitlab.com/sagemath/symmetrica"; }; diff --git a/nixpkgs/pkgs/applications/science/math/zegrapher/default.nix b/nixpkgs/pkgs/applications/science/math/zegrapher/default.nix new file mode 100644 index 000000000000..c9eb72cca433 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/zegrapher/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, fetchFromGitHub +, qmake +, wrapQtAppsHook +, boost }: + +stdenv.mkDerivation rec { + pname = "zegrapher"; + version = "3.1.1"; + + src = fetchFromGitHub { + owner = "AdelKS"; + repo = "ZeGrapher"; + rev = "v${version}"; + sha256 = "sha256-OSQXm0gDI1zM2MBM4iiY43dthJcAZJkprklolsNMEvk="; + }; + + nativeBuildInputs = [ + qmake + wrapQtAppsHook + ]; + buildInputs = [ + boost + ]; + + meta = with stdenv.lib; { + homepage = "https://zegrapher.com/"; + description = "An open source math plotter"; + longDescription = '' + An open source, free and easy to use math plotter. It can plot functions, + sequences, parametric equations and data on the plane. + ''; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/misc/colmap/default.nix b/nixpkgs/pkgs/applications/science/misc/colmap/default.nix index 83dff3e08f15..60f9810dfb6a 100644 --- a/nixpkgs/pkgs/applications/science/misc/colmap/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/colmap/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchpatch, fetchFromGitHub, cmake, boost17x, ceres-solver, eigen, +{ mkDerivation, lib, fetchFromGitHub, cmake, boost17x, ceres-solver, eigen, freeimage, glog, libGLU, glew, qtbase, cudaSupport ? false, cudatoolkit ? null }: @@ -7,22 +7,15 @@ assert !cudaSupport || cudatoolkit != null; let boost_static = boost17x.override { enableStatic = true; }; in mkDerivation rec { - version = "3.5"; + version = "3.6"; pname = "colmap"; src = fetchFromGitHub { owner = "colmap"; repo = "colmap"; rev = version; - sha256 = "1vnb62p0y2bnga173wmjs0lnyqdjikv0fkcxjzxm8187khk2lly8"; + sha256 = "1kfivdmhpmdxjjf30rr57y2iy7xmdpg4h8aw3qgacv8ckfpgda3n"; }; - patches = [ - (fetchpatch { - url = "https://github.com/colmap/colmap/commit/6af3d8b0048cecc3b9fc6f4e78c3214dd038180b.patch"; - sha256 = "1zv5girmv4hv78w1xn131v8njwhpbyylc1m15731lnhrs8bri0jq"; - }) - ]; - buildInputs = [ boost_static ceres-solver eigen freeimage glog libGLU glew qtbase diff --git a/nixpkgs/pkgs/applications/science/misc/convertall/default.nix b/nixpkgs/pkgs/applications/science/misc/convertall/default.nix new file mode 100644 index 000000000000..63ed18c89b2f --- /dev/null +++ b/nixpkgs/pkgs/applications/science/misc/convertall/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, python3, wrapQtAppsHook }: + +let + inherit (python3.pkgs) wrapPython pyqt5; +in stdenv.mkDerivation rec { + pname = "convertall"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "doug-101"; + repo = "ConvertAll"; + rev = "v${version}"; + sha256 = "02xxasgbjbivsbhyfpn3cpv52lscdx5kc95s6ns1dvnmdg0fpng0"; + }; + + nativeBuildInputs = [ python3 wrapPython wrapQtAppsHook ]; + + propagatedBuildInputs = [ pyqt5 ]; + + installPhase = '' + python3 install.py -p $out -x + ''; + + postFixup = '' + buildPythonPath $out + patchPythonScript $out/share/convertall/convertall.py + makeQtWrapper $out/share/convertall/convertall.py $out/bin/convertall + ''; + + meta = with stdenv.lib; { + homepage = "https://convertall.bellz.org/"; + description = "Graphical unit converter"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ orivej ]; + platforms = pyqt5.meta.platforms; + }; +} diff --git a/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix b/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix index 12cdeb453d7a..647492bbe318 100644 --- a/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cytoscape"; - version = "3.8.1"; + version = "3.8.2"; src = fetchurl { url = "https://github.com/cytoscape/cytoscape/releases/download/${version}/${pname}-unix-${version}.tar.gz"; - sha256 = "006g0w29sccg5h0zlrxdp3lx4vx1bfdhx2cms6aah85r5b82wgkf"; + sha256 = "0zgsq9qnyvmq96pgf7372r16rm034fd0r4qa72xi9zbd4f2r7z8w"; }; patches = [ diff --git a/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix b/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix index 74a53902ee09..bf7145113f51 100644 --- a/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix +++ b/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix @@ -10,7 +10,7 @@ }: let majMin = stdenv.lib.versions.majorMinor version; - version = "7.6.9"; + version = "7.6.13"; fahclient = stdenv.mkDerivation rec { inherit version; @@ -18,7 +18,7 @@ let src = fetchurl { url = "https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${majMin}/fahclient_${version}_amd64.deb"; - sha256 = "1v4yijjjdq9qx1fp60flp9ya6ywl9qdsgkzwmzjzp8sd5gfvhyr6"; + sha256 = "1j2cnsyassvifp6ymwd9kxwqw09hks24834gf7nljfncyy9g4g0i"; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/misc/foldingathome/control.nix b/nixpkgs/pkgs/applications/science/misc/foldingathome/control.nix index 91c3b8c779cd..85be61f6686d 100644 --- a/nixpkgs/pkgs/applications/science/misc/foldingathome/control.nix +++ b/nixpkgs/pkgs/applications/science/misc/foldingathome/control.nix @@ -8,7 +8,7 @@ }: let majMin = stdenv.lib.versions.majorMinor version; - version = "7.6.13"; + version = "7.6.21"; python = python2.withPackages ( @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.foldingathome.org/releases/public/release/fahcontrol/debian-stable-64bit/v${majMin}/fahcontrol_${version}-1_all.deb"; - sha256 = "0qfvhwc29cgqkwf2bkhq4gr2d1c4jgccfs58916ss03n4rwz9gng"; + sha256 = "1vfrdqkrvdlyxaw3f6z92w5dllrv6810lmf8yhcmjcwmphipvf71"; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/misc/foldingathome/viewer.nix b/nixpkgs/pkgs/applications/science/misc/foldingathome/viewer.nix index cdeed6536efa..a383de621f29 100644 --- a/nixpkgs/pkgs/applications/science/misc/foldingathome/viewer.nix +++ b/nixpkgs/pkgs/applications/science/misc/foldingathome/viewer.nix @@ -11,7 +11,7 @@ }: let majMin = stdenv.lib.versions.majorMinor version; - version = "7.6.13"; + version = "7.6.21"; in stdenv.mkDerivation rec { inherit version; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.foldingathome.org/releases/public/release/fahviewer/debian-stable-64bit/v${majMin}/fahviewer_${version}_amd64.deb"; - sha256 = "09yfvk16j1iwx8h1xg678ks3bc8760gfdn7n32j8r893kd32cwyk"; + sha256 = "00fd00pf6fcpplcaahvy9ir60mk69d9rcmwsyq3jrv9mxqm9aq7p"; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix b/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix new file mode 100644 index 000000000000..390b2c58ca68 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchPypi, python3Packages }: + +python3Packages.buildPythonPackage rec { + pname = "nextinspace"; + version = "1.0.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1h3dksxyy5gq071fa7i2p73s50918y1bkk38hgfwr4226c3wipvg"; + }; + + pythonPath = with python3Packages; [ + requests + tzlocal + colorama + ]; + + meta = with lib; { + description = "Print upcoming space-related events in your terminal"; + homepage = "https://github.com/The-Kid-Gid/nextinspace"; + license = licenses.gpl3; + maintainers = with maintainers; [ penguwin ]; + }; +} diff --git a/nixpkgs/pkgs/applications/science/misc/openmodelica/default.nix b/nixpkgs/pkgs/applications/science/misc/openmodelica/default.nix index 50d4dcc1a9ff..268ae53401f5 100644 --- a/nixpkgs/pkgs/applications/science/misc/openmodelica/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/openmodelica/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { ''; meta = with stdenv.lib; { - description = "OpenModelica is an open-source Modelica-based modeling and simulation environment"; + description = "An open-source Modelica-based modeling and simulation environment"; homepage = "https://openmodelica.org"; license = licenses.gpl3; maintainers = with maintainers; [ smironov ]; diff --git a/nixpkgs/pkgs/applications/science/misc/rink/default.nix b/nixpkgs/pkgs/applications/science/misc/rink/default.nix index b868706a05f9..0b1ef2b16ea9 100644 --- a/nixpkgs/pkgs/applications/science/misc/rink/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/rink/default.nix @@ -23,6 +23,6 @@ rustPlatform.buildRustPackage rec { description = "Unit-aware calculator"; homepage = "https://rinkcalc.app"; license = with licenses; [ mpl20 gpl3 ]; - maintainers = with maintainers; [ sb0 filalex77 ]; + maintainers = with maintainers; [ sb0 Br1ght0ne ]; }; } diff --git a/nixpkgs/pkgs/applications/science/misc/root/default.nix b/nixpkgs/pkgs/applications/science/misc/root/default.nix index 97d8d4e7cee5..03b206973103 100644 --- a/nixpkgs/pkgs/applications/science/misc/root/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/root/default.nix @@ -1,19 +1,20 @@ -{ stdenv, lib, fetchurl, makeWrapper, cmake, gl2ps, gsl, libX11, libXpm, libXft -, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash -, zlib +{ stdenv, lib, fetchurl, makeWrapper, cmake, ftgl, gl2ps, glew, gsl, llvm_5 +, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre +, pkgconfig, python, xxHash, zlib, zstd +, libAfterImage, giflib, libjpeg, libtiff, libpng , Cocoa, OpenGL, noSplash ? false }: stdenv.mkDerivation rec { pname = "root"; - version = "6.18.04"; + version = "6.22.06"; src = fetchurl { url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; - sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii"; + sha256 = "0mqvj42nax0bmz8h83jjlwjm3xxjy1n0n10inc8csip9ly28fs64"; }; nativeBuildInputs = [ makeWrapper cmake pkgconfig ]; - buildInputs = [ gl2ps pcre zlib libxml2 lz4 lzma gsl xxHash python.pkgs.numpy ] + buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 lzma gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ] ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] ; @@ -38,6 +39,7 @@ stdenv.mkDerivation rec { "-DCMAKE_INSTALL_INCLUDEDIR=include" "-Dalien=OFF" "-Dbonjour=OFF" + "-Dbuiltin_llvm=OFF" "-Dcastor=OFF" "-Dchirp=OFF" "-Dclad=OFF" @@ -69,7 +71,14 @@ stdenv.mkDerivation rec { "-Dxrootd=OFF" ] ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include" - ++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; + ++ stdenv.lib.optionals stdenv.isDarwin [ + "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" + "-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE" + + # fatal error: module map file '/nix/store/<hash>-Libsystem-osx-10.12.6/include/module.modulemap' not found + # fatal error: could not build module '_Builtin_intrinsics' + "-Druntime_cxxmodules=OFF" + ]; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/applications/science/misc/root/sw_vers.patch b/nixpkgs/pkgs/applications/science/misc/root/sw_vers.patch index 34af132c11f8..b2ee1b6a4ceb 100644 --- a/nixpkgs/pkgs/applications/science/misc/root/sw_vers.patch +++ b/nixpkgs/pkgs/applications/science/misc/root/sw_vers.patch @@ -1,19 +1,7 @@ -diff a/build/unix/compiledata.sh b/build/unix/compiledata.sh ---- a/build/unix/compiledata.sh -+++ b/build/unix/compiledata.sh -@@ -47,7 +47,7 @@ fi - - if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \ - [ "$ARCH" = "macosxicc" ]; then -- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -+ macosx_minor=12 - SOEXT="so" - if [ $macosx_minor -ge 5 ]; then - if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake --- a/cmake/modules/SetUpMacOS.cmake +++ b/cmake/modules/SetUpMacOS.cmake -@@ -2,17 +2,8 @@ set(ROOT_ARCHITECTURE macosx) +@@ -8,17 +8,10 @@ set(ROOT_ARCHITECTURE macosx) set(ROOT_PLATFORM macosx) if (CMAKE_SYSTEM_NAME MATCHES Darwin) @@ -21,8 +9,8 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake - COMMAND cut -d . -f 1-2 - OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - -- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}") -- + MESSAGE(STATUS "Found a macOS system ${MACOSX_VERSION}") + - if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang) set(libcxx ON CACHE BOOL "Build using libc++" FORCE) - endif() @@ -31,7 +19,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake #TODO: check haveconfig and rpath -> set rpath true #TODO: check Thread, define link command #TODO: more stuff check configure script -@@ -25,23 +16,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) +@@ -37,23 +30,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64") @@ -56,7 +44,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake if (CMAKE_COMPILER_IS_GNUCXX) message(STATUS "Found GNU compiler collection") -@@ -104,7 +79,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) +@@ -115,7 +92,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) endif() #---Set Linker flags---------------------------------------------------------------------- @@ -67,33 +55,33 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake diff a/config/root-config.in b/config/root-config.in --- a/config/root-config.in +++ b/config/root-config.in -@@ -306,12 +306,6 @@ macosxicc) - auxlibs="-lm -ldl" +@@ -312,12 +312,6 @@ macosxicc) ;; - macosx64) -- # MacOS X with gcc (GNU cc v4.x) in 64 bit mode + macosx64|macosxarm64) + # MacOS X with gcc (GNU cc v4.x) in 64 bit mode +- macosx_major=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1 | sed -e 's/^[[:space:]]*//'` - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - # cannot find the one linked to libGraf if relocated after built -- if [ $macosx_minor -le 4 ]; then +- if [ $macosx_major -eq 10 -a $macosx_minor -le 4 ]; then - rootlibs="$rootlibs -lfreetype" - fi auxcflags="${cxxversionflag} -m64" auxldflags="-m64" auxlibs="-lm -ldl" -@@ -375,18 +369,11 @@ freebsd* | openbsd* | linux*) +@@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*) + done + ;; macosx*) +- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then + auxcflags="-pthread $auxcflags" + auxlibs="-lpthread $auxlibs" +- else +- auxcflags="-D_REENTRANT $auxcflags" +- auxlibs="-lpthread $auxlibs" +- fi for f in $features ; do - if test "x$f" = "xthread" ; then -- if [ $macosx_minor -ge 5 ]; then - auxcflags="-pthread $auxcflags" - auxlibs="-lpthread $auxlibs" -- else -- auxcflags="-D_REENTRANT $auxcflags" -- auxlibs="-lpthread $auxlibs" -- fi - fi if test "x$f" = "xrpath" ; then -- if [ $macosx_minor -ge 5 ]; then +- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then auxlibs="-Wl,-rpath,$libdir $auxlibs" - fi fi diff --git a/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix b/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix index 0ba1cd0d2faf..11d73095834f 100644 --- a/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix @@ -18,14 +18,14 @@ in stdenv.mkDerivation rec { pname = "simgrid"; - version = "3.25"; + version = "3.26"; src = fetchFromGitLab { domain = "framagit.org"; owner = pname; repo = pname; rev = "v${version}"; - sha256 = "019fgryfwpcrkv1f3271v7qxk0mfw2w990vgnk1cqhmr9i1f17gs"; + sha256 = "0kwiggdjqjhjvmwb1m7hb9clvm3xz948fy5ia67dif2pakwad754"; }; nativeBuildInputs = [ cmake perl python3 boost valgrind ] diff --git a/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix b/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix index 2b7532a93454..a03f7682a51c 100644 --- a/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix +++ b/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix @@ -2,7 +2,7 @@ python3Packages.buildPythonApplication rec { pname = "snakemake"; - version = "5.19.3"; + version = "5.28.0"; propagatedBuildInputs = with python3Packages; [ appdirs @@ -13,6 +13,7 @@ python3Packages.buildPythonApplication rec { jsonschema nbformat psutil + pulp pyyaml ratelimiter requests @@ -22,7 +23,7 @@ python3Packages.buildPythonApplication rec { src = python3Packages.fetchPypi { inherit pname version; - sha256 = "b83f3ef73e25dafcb39b3565030e33fa2f7e80ed70256c535dc7e58ea762305d"; + sha256 = "2367ce91baf7f8fa7738d33aff9670ffdf5410bbac49aeb209f73b45a3425046"; }; doCheck = false; # Tests depend on Google Cloud credentials at ${HOME}/gcloud-service-key.json diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index 151abb099f5b..84dd3b729b2b 100644 --- a/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -1,26 +1,44 @@ { stdenv , fetchurl , cmake -, singlePrec ? true -, mpiEnabled ? false +, hwloc , fftw , openmpi , perl +, singlePrec ? true +, mpiEnabled ? false +, cpuAcceleration ? null }: -stdenv.mkDerivation { - name = "gromacs-2020.3"; +let + # Select reasonable defaults for all major platforms + # The possible values are defined in CMakeLists.txt: + # AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256 + # AVX2_128 AVX_512 AVX_512_KNL MIC ARM_NEON ARM_NEON_ASIMD + SIMD = x: if (cpuAcceleration != null) then x else + if stdenv.hostPlatform.system == "i686-linux" then "SSE2" else + if stdenv.hostPlatform.system == "x86_64-linux" then "SSE4.1" else + if stdenv.hostPlatform.system == "x86_64-darwin" then "SSE4.1" else + if stdenv.hostPlatform.system == "aarch64-linux" then "ARM_NEON" else + "None"; + +in stdenv.mkDerivation rec { + pname = "gromacs"; + version = "2020.4"; src = fetchurl { - url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2020.3.tar.gz"; - sha256 = "1acjrhcfzpqy2dncblhj97602jbg9gdha4q1bgji9nrj25lq6cch"; + url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-${version}.tar.gz"; + sha256 = "1rplvgna60nqyb8nspaz3bfkwb044kv3zxdaa5whql5m441nj6am"; }; nativeBuildInputs = [ cmake ]; - buildInputs = [ fftw perl ] + buildInputs = [ fftw perl hwloc ] ++ (stdenv.lib.optionals mpiEnabled [ openmpi ]); - cmakeFlags = ( + cmakeFlags = [ + "-DGMX_SIMD:STRING=${SIMD cpuAcceleration}" + "-DGMX_OPENMP:BOOL=TRUE" + ] ++ ( if singlePrec then [ "-DGMX_DOUBLE=OFF" ] else [ @@ -30,8 +48,6 @@ stdenv.mkDerivation { ) ++ ( if mpiEnabled then [ "-DGMX_MPI:BOOL=TRUE" - "-DGMX_CPU_ACCELERATION:STRING=SSE4.1" - "-DGMX_OPENMP:BOOL=TRUE" "-DGMX_THREAD_MPI:BOOL=FALSE" ] else [ "-DGMX_MPI:BOOL=FALSE" diff --git a/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix b/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix index 46cc32fa168e..a76fe3a72774 100644 --- a/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix +++ b/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = "https://elmerfem.org/"; - description = "A finite element software for multiphysical problems."; + description = "A finite element software for multiphysical problems"; platforms = platforms.unix; maintainers = [ maintainers.wulfsta ]; license = licenses.lgpl21; diff --git a/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix b/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix index 609fea9f7dca..2c4757d92e49 100644 --- a/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix +++ b/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation { patches = [ ./compat.patch + ./pythia83xx.patch ]; preConfigure = '' diff --git a/nixpkgs/pkgs/applications/science/physics/sacrifice/pythia83xx.patch b/nixpkgs/pkgs/applications/science/physics/sacrifice/pythia83xx.patch new file mode 100644 index 000000000000..ea162e30c9a8 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/physics/sacrifice/pythia83xx.patch @@ -0,0 +1,55 @@ +diff --git a/include/Sacrifice/UserHooksFactory.hh b/include/Sacrifice/UserHooksFactory.hh +index 04b105b..19f2b4f 100644 +--- a/include/Sacrifice/UserHooksFactory.hh ++++ b/include/Sacrifice/UserHooksFactory.hh +@@ -12,7 +12,7 @@ + + namespace Sacrifice{ + +- using Pythia8::UserHooks; ++ using Pythia8::UserHooksPtr; + using std::string; + using std::map; + +@@ -21,7 +21,7 @@ namespace Sacrifice{ + + public: + +- static UserHooks* create(const string &hookName); ++ static UserHooksPtr create(const string &hookName); + + /** + * Loads a library of UserHooks +@@ -39,7 +39,7 @@ namespace Sacrifice{ + + class ICreator{ + public: +- virtual UserHooks *create() const = 0; ++ virtual UserHooksPtr create() const = 0; + virtual ~ICreator(){}; + }; + +@@ -61,8 +61,8 @@ namespace Sacrifice{ + } + } + +- UserHooks *create()const{ +- return new T; ++ UserHooksPtr create()const{ ++ return std::make_shared<T>(); + } + + private: +diff --git a/src/UserHooksFactory.cxx b/src/UserHooksFactory.cxx +index 84a485b..5274119 100644 +--- a/src/UserHooksFactory.cxx ++++ b/src/UserHooksFactory.cxx +@@ -11,7 +11,7 @@ namespace Sacrifice{ + using std::ifstream; + + ////////////////////////////////////////////////////////////////////////////// +- UserHooks *UserHooksFactory::create(const string &name){ ++ UserHooksPtr UserHooksFactory::create(const string &name){ + map<string, const ICreator*>::const_iterator it = s_creators().find(name); + if(it == s_creators().end()){ + //eek! diff --git a/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix b/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix index a672272e9e62..93e402ec3ceb 100644 --- a/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix +++ b/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1iwa17s8ipj6a2b8zss5csb1k5y9s5js38syvq932rxcinbyjsl4"; }; + postPatch = '' + sed -ie '/sys\/sysctl.h/d' ATOOLS/Org/Run_Parameter.C + ''; + buildInputs = [ gfortran sqlite lhapdf rivet ]; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix b/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix index b992851e40a8..cbb097350c71 100644 --- a/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix +++ b/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, apfel, apfelgrid, applgrid, blas, gfortran, lhapdf, lapack, libyaml, lynx, mela, root5, qcdnum, which }: +{ stdenv, fetchurl, apfel, apfelgrid, applgrid, blas, gfortran, lhapdf, lapack, libyaml, lynx +, mela, root5, qcdnum, which, libtirpc +}: stdenv.mkDerivation rec { pname = "xfitter"; @@ -37,7 +39,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gfortran which ]; buildInputs = - [ apfel apfelgrid applgrid blas lhapdf lapack mela root5 qcdnum ] + [ apfel apfelgrid applgrid blas lhapdf lapack mela root5 qcdnum libtirpc ] # pdf2yaml requires fmemopen and open_memstream which are not readily available on Darwin ++ stdenv.lib.optional (!stdenv.isDarwin) libyaml ; @@ -47,6 +49,9 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + NIX_LDFLAGS = [ "-ltirpc" ]; + meta = with stdenv.lib; { description = "The xFitter project is an open source QCD fit framework ready to extract PDFs and assess the impact of new data"; license = licenses.gpl3; diff --git a/nixpkgs/pkgs/applications/science/physics/xflr5/default.nix b/nixpkgs/pkgs/applications/science/physics/xflr5/default.nix index 85838b04cbf1..5ae56528f964 100644 --- a/nixpkgs/pkgs/applications/science/physics/xflr5/default.nix +++ b/nixpkgs/pkgs/applications/science/physics/xflr5/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchurl, wrapQtAppsHook, qmake }: +{ mkDerivation, lib, fetchurl, qmake }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "xflr5"; version = "6.47"; @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ qmake wrapQtAppsHook ]; + nativeBuildInputs = [ qmake ]; - meta = with stdenv.lib; { + meta = with lib; { description = "An analysis tool for airfoils, wings and planes"; homepage = https://sourceforge.net/projects/xflr5/; license = licenses.gpl3; maintainers = [ maintainers.esclear ]; platforms = platforms.linux; }; -} \ No newline at end of file +} diff --git a/nixpkgs/pkgs/applications/science/programming/scyther/default.nix b/nixpkgs/pkgs/applications/science/programming/scyther/default.nix index 5cfe081072a4..ca6b57de611d 100644 --- a/nixpkgs/pkgs/applications/science/programming/scyther/default.nix +++ b/nixpkgs/pkgs/applications/science/programming/scyther/default.nix @@ -13,7 +13,7 @@ let }; meta = with lib; { - description = "Scyther is a tool for the automatic verification of security protocols."; + description = "A tool for the automatic verification of security protocols"; homepage = "https://www.cs.ox.ac.uk/people/cas.cremers/scyther/"; license = licenses.gpl2; maintainers = with maintainers; [ infinisil ]; diff --git a/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix b/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix index c354dad80428..8e7c5bddd961 100644 --- a/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix +++ b/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix @@ -3,11 +3,11 @@ buildPythonApplication rec { pname = "MAVProxy"; - version = "1.8.19"; + version = "1.8.30"; src = fetchPypi { inherit pname version; - sha256 = "1rbq2nm01212rp5xbl8p8kjl2mpgfppkwjsq3lnfw1v6g0m4359h"; + sha256 = "fe046481b793b592334749249620fce8a463f4c46b394ff744645975465d677b"; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix b/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix new file mode 100644 index 000000000000..5ae04d8a84b7 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix @@ -0,0 +1,59 @@ +{ stdenv, fetchurl, makeDesktopItem, makeWrapper, unzip, mono6 }: + +let + pname = "mission-planner"; + desktopItem = makeDesktopItem { + name = pname; + exec = pname; + icon = pname; + comment = "MissionPlanner GCS & Ardupilot configuration tool"; + desktopName = "MissionPlanner"; + genericName = "Ground Control Station"; + }; +in stdenv.mkDerivation rec { + inherit pname; + version = "1.3.74"; + + src = fetchurl { + url = "https://firmware.ardupilot.org/Tools/MissionPlanner/MissionPlanner-${version}.zip"; + sha256 = "1cgpmsmmnbzw1lwsdafp8yklk1rwc61yf12vc1ahcc6bl7q2385x"; + }; + + nativeBuildInputs = [ makeWrapper mono6 unzip ]; + sourceRoot = "."; + + AOT_FILES = [ "MissionPlanner.exe" "MissionPlanner.*.dll" ]; + + buildPhase = '' + runHook preBuild + for file in $AOT_FILES + do + mono --aot $file + done + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,opt/mission-planner} + install -m 444 -D mpdesktop150.png $out/share/icons/mission-planner.png + cp -r ${desktopItem}/share/applications $out/share/ + mv * $out/opt/mission-planner + makeWrapper ${mono6}/bin/mono $out/bin/mission-planner \ + --add-flags $out/opt/mission-planner/MissionPlanner.exe + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "An ArduPilot ground station"; + longDescription = '' + Full-featured ground station application for the ArduPilot open source + autopilot project. Lets you both flash, configure and control ArduPilot + Plane, Copter and Rover targets. + ''; + homepage = "https://ardupilot.org/planner/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ wucke13 ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix index 8710b88ced36..023a4fc8b6a3 100644 --- a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -6,7 +6,7 @@ mkDerivation rec { pname = "qgroundcontrol"; - version = "4.0.10"; + version = "4.0.11"; qtInputs = [ qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2 @@ -62,7 +62,7 @@ mkDerivation rec { owner = "mavlink"; repo = pname; rev = "v${version}"; - sha256 = "1jmhhd2nwxq3m9rzzmrjls8f6hhj52ia71b1sv4vvcjh802cha8g"; + sha256 = "14pk1vmcpg2cc5p100chbhnynclcwyqmyb2n2w11vvk0l2c9z1gz"; fetchSubmodules = true; }; |