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

74 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
autoconf-archive,
ocamlPackages,
pkg-config,
zlib,
}:
stdenv.mkDerivation rec {
pname = "mldonkey";
version = "3.2.1";
src = fetchFromGitHub {
owner = "ygrek";
repo = "mldonkey";
tag = "release-${lib.replaceStrings [ "." ] [ "-" ] version}";
hash = "sha256-Dbb7163CdqHY7/FJY2yWBFRudT+hTFT6fO4sFgt6C/A=";
};
patches = [
./gettext-0.25.patch
];
postPatch = ''
substituteInPlace config/Makefile.in \
--replace-fail '+camlp4' '${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4'
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
autoconf-archive
ocamlPackages.camlp4
ocamlPackages.findlib
ocamlPackages.ocaml
pkg-config
];
buildInputs = [
ocamlPackages.num
zlib
];
preAutoreconf = ''
cd config
'';
postAutoreconf = ''
cd ..
'';
env = {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
}
# https://github.com/ygrek/mldonkey/issues/117
// lib.optionalAttrs stdenv.cc.isClang {
CXXFLAGS = "-std=c++98";
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
meta = {
description = "Client for many p2p networks, with multiple frontends";
homepage = "https://github.com/ygrek/mldonkey";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.unix;
};
}