Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

103 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
autoreconfHook,
zlib,
boost186,
openssl,
python311,
libiconv,
ncurses,
boost-build,
}:
let
version = "1.2.19";
# Make sure we override python, so the correct version is chosen
# for the bindings, if overridden
boostPython = boost186.override (_: {
enablePython = true;
python = python311;
enableStatic = true;
enableShared = false;
enableSingleThreaded = false;
enableMultiThreaded = true;
# So that libraries will be named like 'libboost_system.a' instead
# of 'libboost_system-x64.a'.
taggedLayout = false;
});
opensslStatic = openssl.override (_: {
static = true;
});
in
stdenv.mkDerivation {
pname = "libtorrent-rasterbar";
inherit version;
src = fetchFromGitHub {
owner = "arvidn";
repo = "libtorrent";
rev = "v${version}";
hash = "sha256-HkpaOCBL+0Kc7M9DmnW2dUGC+b60a7n5n3i1SyRfkb4=";
};
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
boost-build
pkg-config
python311.pkgs.setuptools
];
buildInputs = [
boostPython
opensslStatic
zlib
python311
libiconv
ncurses
];
preAutoreconf = ''
mkdir -p build-aux
cp m4/config.rpath build-aux
'';
preConfigure = ''
configureFlagsArray+=('PYTHON_INSTALL_PARAMS=--prefix=$(DESTDIR)$(prefix) --single-version-externally-managed --record=installed-files.txt')
'';
postInstall = ''
moveToOutput "include" "$dev"
moveToOutput "lib/${python311.libPrefix}" "$python"
'';
outputs = [
"out"
"dev"
"python"
];
configureFlags = [
"--enable-python-binding"
"--with-libiconv=yes"
"--with-boost=${boostPython.dev}"
"--with-boost-libdir=${boostPython.out}/lib"
];
meta = with lib; {
homepage = "https://libtorrent.org/";
description = "C++ BitTorrent implementation focusing on efficiency and scalability";
license = licenses.bsd3;
maintainers = [ ];
broken = stdenv.hostPlatform.isDarwin;
platforms = platforms.unix;
};
}