nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 52 lines 997 B view raw
1{ lib, stdenv 2, fetchFromGitHub 3, cmake 4, gmp 5, flint 6, mpfr 7, libmpc 8, catch 9}: 10 11stdenv.mkDerivation rec { 12 pname = "symengine"; 13 version = "0.9.0"; 14 15 src = fetchFromGitHub { 16 owner = "symengine"; 17 repo = "symengine"; 18 rev = "v${version}"; 19 sha256 = "sha256-5KpxBusJCuwrfFWHbrRKlH6Ic7YivYqz2m+BCbNfZp0="; 20 }; 21 22 postPatch = '' 23 cp ${catch}/include/catch/catch.hpp symengine/utilities/catch/catch.hpp 24 ''; 25 26 nativeBuildInputs = [ cmake ]; 27 28 buildInputs = [ gmp flint mpfr libmpc ]; 29 30 cmakeFlags = [ 31 "-DWITH_FLINT=ON" 32 "-DINTEGER_CLASS=flint" 33 "-DWITH_SYMENGINE_THREAD_SAFE=yes" 34 "-DWITH_MPC=yes" 35 "-DBUILD_FOR_DISTRIBUTION=yes" 36 ]; 37 38 doCheck = true; 39 40 checkPhase = '' 41 ctest 42 ''; 43 44 meta = with lib; { 45 description = "A fast symbolic manipulation library"; 46 homepage = "https://github.com/symengine/symengine"; 47 platforms = platforms.unix ++ platforms.windows; 48 license = licenses.bsd3; 49 maintainers = [ maintainers.costrouc ]; 50 }; 51 52}