Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 53 lines 1.7 kB view raw
1{ lib, buildDunePackage, fetchurl, makeWrapper, fetchpatch 2, curly, fmt, bos, cmdliner, re, rresult, logs, fpath 3, odoc, opam-format, opam-core, opam-state, yojson, astring 4, opam, git, findlib, mercurial, bzip2, gnutar, coreutils 5, alcotest 6}: 7 8# don't include dune as runtime dep, so user can 9# choose between dune and dune_2 10let runtimeInputs = [ opam findlib git mercurial bzip2 gnutar coreutils ]; 11in buildDunePackage rec { 12 pname = "dune-release"; 13 version = "1.6.2"; 14 duneVersion = "3"; 15 16 minimalOCamlVersion = "4.06"; 17 18 src = fetchurl { 19 url = "https://github.com/ocamllabs/${pname}/releases/download/${version}/${pname}-${version}.tbz"; 20 sha256 = "sha256-oJ5SL7qNM5izoEpr+nTjbT+YmmNIoy7QgSNse3wNIA4="; 21 }; 22 23 nativeBuildInputs = [ makeWrapper ] ++ runtimeInputs; 24 buildInputs = [ curly fmt cmdliner re opam-format opam-state opam-core 25 rresult logs odoc bos yojson astring fpath ]; 26 nativeCheckInputs = [ odoc ]; 27 checkInputs = [ alcotest ] ++ runtimeInputs; 28 doCheck = true; 29 30 postPatch = '' 31 # remove check for curl in PATH, since curly is patched 32 # to have a fixed path to the binary in nix store 33 sed -i '/must_exist (Cmd\.v "curl"/d' lib/github.ml 34 ''; 35 36 preCheck = '' 37 # it fails when it tries to reference "./make_check_deterministic.exe" 38 rm -r tests/bin/check 39 ''; 40 41 # tool specific env vars have been deprecated, use PATH 42 preFixup = '' 43 wrapProgram $out/bin/dune-release \ 44 --prefix PATH : "${lib.makeBinPath runtimeInputs}" 45 ''; 46 47 meta = with lib; { 48 description = "Release dune packages in opam"; 49 homepage = "https://github.com/ocamllabs/dune-release"; 50 license = licenses.isc; 51 maintainers = with maintainers; [ sternenseemann ]; 52 }; 53}