at 24.11-pre 39 lines 846 B view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, boost 6}: 7 8stdenv.mkDerivation rec { 9 pname = "quantlib"; 10 version = "1.34"; 11 12 outputs = [ "out" "dev" ]; 13 14 src = fetchFromGitHub { 15 owner = "lballabio"; 16 repo = "QuantLib"; 17 rev = "v${version}"; 18 sha256 = "sha256-qrMaIBiDg7bFtWTDAQgAMtekb/7VrI7Ix+G59mU4WHI="; 19 }; 20 21 nativeBuildInputs = [ cmake ]; 22 buildInputs = [ boost ]; 23 24 # Required by RQuantLib, may be beneficial for others too 25 cmakeFlags = [ "-DQL_HIGH_RESOLUTION_DATE=ON" ]; 26 27 # Needed for RQuantLib and possible others 28 postInstall = '' 29 cp ./quantlib-config $out/bin/ 30 ''; 31 32 meta = with lib; { 33 description = "A free/open-source library for quantitative finance"; 34 homepage = "https://quantlib.org"; 35 platforms = platforms.unix; 36 license = licenses.bsd3; 37 maintainers = [ maintainers.kupac ]; 38 }; 39}