Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 boost,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "quantlib";
11 version = "1.39";
12
13 outputs = [
14 "out"
15 "dev"
16 ];
17
18 src = fetchFromGitHub {
19 owner = "lballabio";
20 repo = "QuantLib";
21 rev = "v${finalAttrs.version}";
22 hash = "sha256-UrFamEIeFTR0finNGESlDYbvrmD8jtv73tDUJ17P7WA=";
23 };
24
25 nativeBuildInputs = [ cmake ];
26 buildInputs = [ boost ];
27
28 # Required by RQuantLib, may be beneficial for others too
29 cmakeFlags = [ "-DQL_HIGH_RESOLUTION_DATE=ON" ];
30
31 # Needed for RQuantLib and possible others
32 postInstall = ''
33 cp ./quantlib-config $out/bin/
34 '';
35
36 meta = with lib; {
37 description = "Free/open-source library for quantitative finance";
38 homepage = "https://quantlib.org";
39 changelog = "https://github.com/lballabio/QuantLib/releases/tag/v${finalAttrs.version}";
40 platforms = platforms.unix;
41 license = licenses.bsd3;
42 maintainers = [ maintainers.kupac ];
43 };
44})