-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport release-24.11] bencodetools,uade: Fix build, update, modern…
…ise (#358742)
- Loading branch information
Showing
5 changed files
with
166 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
fetchFromGitLab, | ||
unstableGitUpdater, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "libzakalwe"; | ||
version = "1.0.0-unstable-2024-02-26"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "hors"; | ||
repo = "libzakalwe"; | ||
rev = "c7eba014ba14dc6fa145f6e71e75cca2b65bbc8a"; | ||
hash = "sha256-2a30ztFnemCgGW/I5S6Dz4eC1Y6K2aV9dPvysvQtBxo="; | ||
}; | ||
|
||
outputs = [ | ||
"out" | ||
"dev" | ||
]; | ||
|
||
postPatch = | ||
'' | ||
substituteInPlace Makefile.in \ | ||
--replace-fail 'libzakalwe.so' "libzakalwe${stdenv.hostPlatform.extensions.sharedLibrary}" | ||
'' | ||
+ lib.optionalString stdenv.hostPlatform.isDarwin '' | ||
substituteInPlace Makefile.in \ | ||
--replace-fail '-soname' '-install_name' | ||
''; | ||
|
||
strictDeps = true; | ||
|
||
enableParallelBuilding = true; | ||
|
||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; | ||
|
||
# Darwin: Assertion failed at thread_util_test_0:52: tr != NULL | ||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform && (!stdenv.hostPlatform.isDarwin); | ||
|
||
installFlags = [ "PREFIX=$(out)" ]; | ||
|
||
preInstall = '' | ||
mkdir -p $out/lib | ||
''; | ||
|
||
passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; }; | ||
|
||
meta = { | ||
description = "Library for functions shared across zakalwe projects"; | ||
homepage = "https://gitlab.com/hors/libzakalwe"; | ||
license = lib.licenses.bsd2; | ||
maintainers = with lib.maintainers; [ OPNA2608 ]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
buildPythonPackage, | ||
bencodetools, | ||
pytestCheckHook, | ||
setuptools, | ||
}: | ||
buildPythonPackage { | ||
inherit (bencodetools) pname version src; | ||
format = "pyproject"; | ||
|
||
nativeBuildInputs = [ setuptools ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
dontConfigure = true; | ||
|
||
pythonImportsCheck = [ | ||
"bencode" | ||
"typevalidator" | ||
]; | ||
|
||
meta = { | ||
inherit (bencodetools.meta) | ||
description | ||
homepage | ||
license | ||
maintainers | ||
; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters