mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
boost,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "quantlib";
|
|
version = "1.43";
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lballabio";
|
|
repo = "QuantLib";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Bl+Q5BKUg9WCzktaeCr9Zdw38arg3K4/wqBC8tS8ghM=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ boost ];
|
|
|
|
# Required by RQuantLib, may be beneficial for others too
|
|
cmakeFlags = [ "-DQL_HIGH_RESOLUTION_DATE=ON" ];
|
|
|
|
# Needed for RQuantLib and possible others
|
|
postInstall = ''
|
|
cp ./quantlib-config $out/bin/
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Free/open-source library for quantitative finance";
|
|
homepage = "https://quantlib.org";
|
|
changelog = "https://github.com/lballabio/QuantLib/releases/tag/v${finalAttrs.version}";
|
|
platforms = lib.platforms.unix;
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ lib.maintainers.kupac ];
|
|
};
|
|
})
|