python-packages: fix cross compilation errors introduced during the move away from buildPythonPackage

This commit is contained in:
2024-06-27 08:59:08 +00:00
parent f54f1c57bc
commit 27de05a751
9 changed files with 74 additions and 13 deletions

View File

@@ -3,12 +3,13 @@
fetchFromGitHub, fetchFromGitHub,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pythonImportsCheckHook,
setuptools, setuptools,
stdenv stdenv,
wrapPython,
}: stdenv.mkDerivation (finalAttrs: { }: stdenv.mkDerivation (finalAttrs: {
pname = "depthcharge-tools"; pname = "depthcharge-tools";
version = "0.6.2"; version = "0.6.2";
format = "setuptools";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alpernebbi"; owner = "alpernebbi";
@@ -20,16 +21,28 @@
nativeBuildInputs = [ nativeBuildInputs = [
pypaBuildHook pypaBuildHook
pypaInstallHook pypaInstallHook
wrapPython
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
setuptools #< needs `pkg_resources` at runtime setuptools #< needs `pkg_resources` at runtime
]; ];
nativeCheckInputs = [
pythonImportsCheckHook
];
postFixup = ''
wrapPythonPrograms
'';
pythonImportsCheck = [ pythonImportsCheck = [
"depthcharge_tools" "depthcharge_tools"
]; ];
doCheck = true;
strictDeps = true;
meta = with lib; { meta = with lib; {
homepage = "https://github.com/alpernebbi/depthcharge-tools"; homepage = "https://github.com/alpernebbi/depthcharge-tools";
description = "Tools to manage the Chrome OS bootloader"; description = "Tools to manage the Chrome OS bootloader";

View File

@@ -5,7 +5,8 @@
numpy, numpy,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
setuptools, pythonImportsCheckHook,
setuptoolsBuildHook,
stdenv, stdenv,
}: stdenv.mkDerivation (finalAttrs: { }: stdenv.mkDerivation (finalAttrs: {
pname = "fastcluster"; pname = "fastcluster";
@@ -22,17 +23,20 @@
oldest-supported-numpy oldest-supported-numpy
pypaBuildHook pypaBuildHook
pypaInstallHook pypaInstallHook
setuptools setuptoolsBuildHook
]; ];
# propagatedBuildInputs = [ nativeCheckInputs = [
# numpy pythonImportsCheckHook
# ]; ];
pythonImportsCheck = [ pythonImportsCheck = [
"fastcluster" "fastcluster"
]; ];
doCheck = true;
strictDeps = true;
meta = with lib; { meta = with lib; {
homepage = "https://danifold.net/fastcluster.html"; homepage = "https://danifold.net/fastcluster.html";
description = "fast hierarchical clustering routines for R and Python"; description = "fast hierarchical clustering routines for R and Python";

View File

@@ -3,6 +3,7 @@
fetchFromGitHub, fetchFromGitHub,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pythonImportsCheckHook,
stdenv, stdenv,
# nativeBuildInputs python packages # nativeBuildInputs python packages
poetry-core, poetry-core,
@@ -62,10 +63,17 @@ stdenv.mkDerivation {
yarl yarl
]; ];
nativeCheckInputs = [
pythonImportsCheckHook
];
pythonImportsCheck = [ pythonImportsCheck = [
"feedsearch_crawler" "feedsearch_crawler"
]; ];
doCheck = true;
strictDeps = true;
meta = with lib; { meta = with lib; {
homepage = "https://feedsearch.dev"; homepage = "https://feedsearch.dev";
description = "Crawl sites for RSS, Atom, and JSON feeds"; description = "Crawl sites for RSS, Atom, and JSON feeds";

View File

@@ -7,6 +7,7 @@
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pytestCheckHook, pytestCheckHook,
pythonImportsCheckHook,
requests, requests,
stdenv, stdenv,
}: }:
@@ -34,6 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
pythonImportsCheckHook
]; ];
pythonImportsCheck = [ pythonImportsCheck = [
@@ -41,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
doCheck = true; doCheck = true;
strictDeps = true;
passthru.updateScript = nix-update-script { }; passthru.updateScript = nix-update-script { };

View File

@@ -1,6 +1,5 @@
{ {
lib, lib,
buildPythonPackage,
fetchFromGitea, fetchFromGitea,
aiohttp, aiohttp,
fastcluster, fastcluster,
@@ -9,10 +8,11 @@
numpy, numpy,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pythonImportsCheckHook,
scipy, scipy,
setuptools, setuptoolsBuildHook,
stdenv, stdenv,
# , wheel wrapPython,
}: stdenv.mkDerivation { }: stdenv.mkDerivation {
pname = "ols"; pname = "ols";
version = "0.1.0-unstable-2024-06-21"; version = "0.1.0-unstable-2024-06-21";
@@ -49,14 +49,24 @@
nativeBuildInputs = [ nativeBuildInputs = [
pypaBuildHook pypaBuildHook
pypaInstallHook pypaInstallHook
setuptools setuptoolsBuildHook
# wheel wrapPython
]; ];
nativeCheckInputs = [
pythonImportsCheckHook
];
postFixup = ''
wrapPythonPrograms
'';
pythonImportsCheck = [ pythonImportsCheck = [
"ols" "ols"
]; ];
doCheck = true;
strictDeps = true;
meta = with lib; { meta = with lib; {
homepage = "https://codeberg.org/tpikonen/ols"; homepage = "https://codeberg.org/tpikonen/ols";
description = "HTTP location service with Mozilla Location Service (MLS) compatible API"; description = "HTTP location service with Mozilla Location Service (MLS) compatible API";

View File

@@ -5,9 +5,11 @@
libpulseaudio, libpulseaudio,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pythonImportsCheckHook,
psutil, psutil,
pulseaudio, pulseaudio,
stdenv, stdenv,
wrapPython,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@@ -32,6 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
flit-core flit-core
pypaBuildHook pypaBuildHook
pypaInstallHook pypaInstallHook
wrapPython
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
@@ -42,10 +45,21 @@ stdenv.mkDerivation (finalAttrs: {
# ffmpeg flac lame # ffmpeg flac lame
]; ];
nativeCheckInputs = [
pythonImportsCheckHook
];
postFixup = ''
wrapPythonPrograms
'';
pythonImportsCheck = [ pythonImportsCheck = [
"pa_dlna" "pa_dlna"
]; ];
doCheck = true;
strictDeps = true;
meta = with lib; { meta = with lib; {
homepage = "https://pa-dlna.readthedocs.io/en/stable/"; homepage = "https://pa-dlna.readthedocs.io/en/stable/";
description = "An UPnP control point forwarding PulseAudio streams to DLNA devices"; description = "An UPnP control point forwarding PulseAudio streams to DLNA devices";

View File

@@ -1,12 +1,12 @@
# based on: <https://github.com/fort-nix/nix-bitcoin/blob/master/pkgs/python-packages/pyln-bolt7/default.nix> # based on: <https://github.com/fort-nix/nix-bitcoin/blob/master/pkgs/python-packages/pyln-bolt7/default.nix>
{ {
buildPythonPackage,
clightning, clightning,
poetry-core, poetry-core,
pyln-proto, pyln-proto,
pypaBuildHook, pypaBuildHook,
pypaInstallHook, pypaInstallHook,
pytestCheckHook, pytestCheckHook,
setuptoolsBuildHook,
stdenv, stdenv,
unzip, unzip,
}: }:
@@ -33,4 +33,7 @@ stdenv.mkDerivation {
pyln-proto pyln-proto
]; ];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
doCheck = true;
strictDeps = true;
} }

View File

@@ -30,4 +30,7 @@ stdenv.mkDerivation {
]; ];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
doCheck = true;
strictDeps = true;
} }

View File

@@ -46,4 +46,7 @@ stdenv.mkDerivation {
]; ];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
doCheck = true;
strictDeps = true;
} }