Skip to content

Commit

Permalink
libtorrent-rasterbar-1_2_x: 1.2.11 -> 1.2.19 (#351401)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 18, 2024
2 parents 2e57ac6 + 0f46acc commit dd1a79b
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf
, zlib, boost, openssl, libtool, python311, libiconv, ncurses, darwin
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
, zlib, boost, openssl, python311, libiconv, ncurses, darwin
, boost-build
}:

let
version = "1.2.11";
version = "1.2.19";

# Make sure we override python, so the correct version is chosen
# for the bindings, if overridden
boostPython = boost.override { enablePython = true; python = python311; };
boostPython = boost.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";
Expand All @@ -17,17 +30,29 @@ in stdenv.mkDerivation {
owner = "arvidn";
repo = "libtorrent";
rev = "v${version}";
hash = "sha256-KxyJmG7PdOjGPe18Dd3nzKI5X7B0MovWN8vq7llFFRc=";
hash = "sha256-HkpaOCBL+0Kc7M9DmnW2dUGC+b60a7n5n3i1SyRfkb4=";
};

enableParallelBuilding = true;

nativeBuildInputs = [ automake autoconf libtool pkg-config ];
nativeBuildInputs = [
autoreconfHook
boost-build
pkg-config
python311.pkgs.setuptools
];

buildInputs = [ boostPython openssl zlib python311 libiconv ncurses ]
buildInputs = [ boostPython opensslStatic zlib python311 libiconv ncurses ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];

preConfigure = "./autotool.sh";
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"
Expand Down

0 comments on commit dd1a79b

Please sign in to comment.