Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 72 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitLab, 5 buildDunePackage, 6 gmp, 7 pkg-config, 8 dune-configurator, 9 zarith, 10 integers, 11 alcotest, 12 bisect_ppx, 13}: 14 15buildDunePackage ( 16 rec { 17 pname = "class_group_vdf"; 18 version = "0.0.4"; 19 duneVersion = "3"; 20 21 src = fetchFromGitLab { 22 owner = "nomadic-labs/cryptography"; 23 repo = "ocaml-chia-vdf"; 24 rev = "v${version}"; 25 hash = "sha256-KvpnX2DTUyfKARNWHC2lLBGH2Ou2GfRKjw05lu4jbBs="; 26 }; 27 28 minimalOCamlVersion = "4.08"; 29 30 nativeBuildInputs = [ 31 gmp 32 pkg-config 33 dune-configurator 34 ]; 35 36 buildInputs = [ 37 dune-configurator 38 ]; 39 40 propagatedBuildInputs = [ 41 zarith 42 integers 43 ]; 44 45 checkInputs = [ 46 alcotest 47 bisect_ppx 48 ]; 49 50 doCheck = true; 51 52 meta = { 53 description = "Verifiable Delay Functions bindings to Chia's VDF"; 54 homepage = "https://gitlab.com/nomadic-labs/tezos"; 55 license = lib.licenses.mit; 56 maintainers = [ lib.maintainers.ulrikstrid ]; 57 }; 58 } 59 # Darwin sdk on intel target 10.12 (2016) at the time of writing. It is likely that host will be at least 10.14 (2018). This fix allow it to build and run on 10.14 and build on 10.12 (but don't run). 60 // 61 lib.optionalAttrs 62 ( 63 lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.14" 64 && stdenv.hostPlatform.isMacOS 65 && stdenv.hostPlatform.isx86_64 66 ) 67 { 68 preHook = '' 69 export MACOSX_DEPLOYMENT_TARGET=10.14 70 ''; 71 } 72)