Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

106 lines
2.0 KiB
Nix

{
lib,
buildDunePackage,
fetchurl,
makeWrapper,
curly,
fmt,
bos,
cmdliner,
re,
rresult,
logs,
fpath,
odoc,
opam-format,
opam-core,
opam-state,
yojson,
astring,
opam,
gitMinimal,
findlib,
mercurial,
bzip2,
gnutar,
coreutils,
alcotest,
}:
# don't include dune as runtime dep, so user can
# choose between dune and dune_2
let
runtimeInputs = [
opam
findlib
gitMinimal
mercurial
bzip2
gnutar
coreutils
];
in
buildDunePackage rec {
pname = "dune-release";
version = "2.1.0";
src = fetchurl {
url = "https://github.com/ocamllabs/${pname}/releases/download/${version}/${pname}-${version}.tbz";
hash = "sha256-bhDf/zb6mnSB53ibb1yb8Yf1TTmVEu8rb8KUnJieCnY=";
};
nativeBuildInputs = [ makeWrapper ] ++ runtimeInputs;
buildInputs = [
curly
fmt
cmdliner
re
opam-format
opam-state
opam-core
rresult
logs
odoc
bos
yojson
astring
fpath
];
nativeCheckInputs = [
odoc
gitMinimal
];
checkInputs = [ alcotest ] ++ runtimeInputs;
doCheck = true;
postPatch = ''
# remove check for curl in PATH, since curly is patched
# to have a fixed path to the binary in nix store
sed -i '/must_exist (Cmd\.v "curl"/d' lib/github.ml
'';
preCheck = ''
export HOME=$TMPDIR
git config --global user.email "nix-builder@nixos.org"
git config --global user.name "Nix Builder"
# it fails when it tries to reference "./make_check_deterministic.exe"
rm -r tests/bin/check
'';
# tool specific env vars have been deprecated, use PATH
preFixup = ''
wrapProgram $out/bin/dune-release \
--prefix PATH : "${lib.makeBinPath runtimeInputs}"
'';
meta = with lib; {
description = "Release dune packages in opam";
mainProgram = "dune-release";
homepage = "https://github.com/ocamllabs/dune-release";
changelog = "https://github.com/tarides/dune-release/blob/${version}/CHANGES.md";
license = licenses.isc;
maintainers = with maintainers; [ sternenseemann ];
};
}