python3Packages -> python3.pkgs, to fix cross-compilation errors (especially around geoclue-ols)

This commit is contained in:
2024-06-27 15:46:04 +00:00
parent 9b8c461ce9
commit b3a685aa31
21 changed files with 91 additions and 89 deletions

View File

@@ -12,7 +12,7 @@ let
external_auth_hook = pkgs.static-nix-shell.mkPython3 { external_auth_hook = pkgs.static-nix-shell.mkPython3 {
pname = "external_auth_hook"; pname = "external_auth_hook";
srcRoot = ./.; srcRoot = ./.;
pkgs = [ "python3Packages.passlib" ]; pkgs = [ "python3.pkgs.passlib" ];
}; };
# Client initiates a FTP "control connection" on port 21. # Client initiates a FTP "control connection" on port 21.
# - this handles the client -> server commands, and the server -> client status, but not the actual data # - this handles the client -> server commands, and the server -> client status, but not the actual data

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 -p python3Packages.passlib #!nix-shell -i python3 -p python3 -p python3.pkgs.passlib
# vim: set filetype=python : # vim: set filetype=python :
# #
# available environment variables: # available environment variables:

View File

@@ -151,7 +151,7 @@ in
# "ponymix" # "ponymix"
"pulsemixer" "pulsemixer"
"python3-repl" "python3-repl"
# "python3Packages.eyeD3" # music tagging # "python3.pkgs.eyeD3" # music tagging
"ripgrep" # needed as a user package so that its user-level config file can be installed "ripgrep" # needed as a user package so that its user-level config file can be installed
"rsync" "rsync"
"sane-scripts.bittorrent" "sane-scripts.bittorrent"

View File

@@ -1,7 +1,7 @@
{ {
lib, lib,
fetchFromGitHub, fetchFromGitHub,
python3Packages, python3,
stdenv, stdenv,
}: stdenv.mkDerivation (finalAttrs: { }: stdenv.mkDerivation (finalAttrs: {
pname = "depthcharge-tools"; pname = "depthcharge-tools";
@@ -15,17 +15,17 @@
}; };
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.wrapPython python3.pkgs.wrapPython
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
setuptools #< needs `pkg_resources` at runtime setuptools #< needs `pkg_resources` at runtime
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
postFixup = '' postFixup = ''

View File

@@ -1,7 +1,7 @@
{ {
lib, lib,
fetchFromGitHub, fetchFromGitHub,
python3Packages, python3,
stdenv, stdenv,
}: stdenv.mkDerivation (finalAttrs: { }: stdenv.mkDerivation (finalAttrs: {
pname = "fastcluster"; pname = "fastcluster";
@@ -15,17 +15,18 @@
}; };
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.oldest-supported-numpy python3.pythonOnBuildForHost.pkgs.oldest-supported-numpy
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.setuptoolsBuildHook python3.pkgs.setuptoolsBuildHook
]; ];
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python3.pkgs; [
numpy numpy
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
pythonImportsCheck = [ pythonImportsCheck = [

View File

@@ -1,7 +1,7 @@
{ {
lib, lib,
fetchFromGitHub, fetchFromGitHub,
python3Packages, python3,
stdenv, stdenv,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@@ -30,12 +30,12 @@ stdenv.mkDerivation {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.poetry-core python3.pkgs.poetry-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
aiodns aiodns
aiohttp aiohttp
beautifulsoup4 beautifulsoup4
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
pythonImportsCheck = [ pythonImportsCheck = [

View File

@@ -2,7 +2,7 @@
lib, lib,
fetchFromGitea, fetchFromGitea,
fastcluster, fastcluster,
python3Packages, python3,
stdenv, stdenv,
}: stdenv.mkDerivation { }: stdenv.mkDerivation {
pname = "ols"; pname = "ols";
@@ -28,7 +28,7 @@
# }; # };
# src = /home/colin/ref/repos/tpikonen/ols; # src = /home/colin/ref/repos/tpikonen/ols;
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
aiohttp aiohttp
fastcluster fastcluster
fastjsonschema fastjsonschema
@@ -38,13 +38,13 @@
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.setuptoolsBuildHook python3.pkgs.setuptoolsBuildHook
python3Packages.wrapPython python3.pkgs.wrapPython
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
postFixup = '' postFixup = ''

View File

@@ -2,7 +2,7 @@
fetchFromGitHub, fetchFromGitHub,
lib, lib,
nix-update-script, nix-update-script,
python3Packages, python3,
stdenv, stdenv,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@@ -17,19 +17,19 @@ stdenv.mkDerivation (finalAttrs: {
}; };
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.poetry-core python3.pkgs.poetry-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
requests requests
lxml lxml
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pytestCheckHook python3.pkgs.pytestCheckHook
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
pythonImportsCheck = [ pythonImportsCheck = [

View File

@@ -3,7 +3,7 @@
fetchFromGitLab, fetchFromGitLab,
libpulseaudio, libpulseaudio,
pulseaudio, pulseaudio,
python3Packages, python3,
stdenv, stdenv,
}: }:
@@ -26,13 +26,13 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.flit-core python3.pkgs.flit-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.wrapPython python3.pkgs.wrapPython
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
psutil psutil
# `pa-dlna` shells out to `pa-rec` at runtime. # `pa-dlna` shells out to `pa-rec` at runtime.
pulseaudio pulseaudio
@@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
postFixup = '' postFixup = ''

View File

@@ -2,7 +2,7 @@
{ {
clightning, clightning,
pyln-proto, pyln-proto,
python3Packages, python3,
stdenv, stdenv,
unzip, unzip,
}: }:
@@ -20,15 +20,15 @@ stdenv.mkDerivation {
sourceRoot = "clightning-v${clightning.version}/contrib/pyln-spec/bolt7"; sourceRoot = "clightning-v${clightning.version}/contrib/pyln-spec/bolt7";
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.poetry-core python3.pkgs.poetry-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
unzip # used by `unpackPhase` unzip # used by `unpackPhase`
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
pyln-proto pyln-proto
]; ];
nativeCheckInputs = [ python3Packages.pytestCheckHook ]; nativeCheckInputs = [ python3.pkgs.pytestCheckHook ];
doCheck = true; doCheck = true;
strictDeps = true; strictDeps = true;

View File

@@ -3,7 +3,7 @@
clightning, clightning,
pyln-bolt7, pyln-bolt7,
pyln-proto, pyln-proto,
python3Packages, python3,
stdenv, stdenv,
unzip, unzip,
}: }:
@@ -15,19 +15,19 @@ stdenv.mkDerivation {
sourceRoot = "clightning-v${clightning.version}/contrib/pyln-client"; sourceRoot = "clightning-v${clightning.version}/contrib/pyln-client";
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.poetry-core python3.pkgs.poetry-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
unzip # used by `unpackPhase` unzip # used by `unpackPhase`
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
pyln-bolt7 pyln-bolt7
pyln-proto pyln-proto
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pytestCheckHook python3.pkgs.pytestCheckHook
]; ];
doCheck = true; doCheck = true;

View File

@@ -1,7 +1,7 @@
# based on: <https://github.com/fort-nix/nix-bitcoin/blob/master/pkgs/python-packages/pyln-proto/default.nix> # based on: <https://github.com/fort-nix/nix-bitcoin/blob/master/pkgs/python-packages/pyln-proto/default.nix>
{ {
clightning, clightning,
python3Packages, python3,
stdenv, stdenv,
unzip, unzip,
}: }:
@@ -22,13 +22,13 @@ stdenv.mkDerivation {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.poetry-core python3.pkgs.poetry-core
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
unzip # used by `unpackPhase` unzip # used by `unpackPhase`
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3.pkgs; [
bitstring bitstring
cryptography cryptography
coincurve coincurve
@@ -37,7 +37,7 @@ stdenv.mkDerivation {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pytestCheckHook python3.pkgs.pytestCheckHook
]; ];
doCheck = true; doCheck = true;

View File

@@ -2,5 +2,5 @@
static-nix-shell.mkPython3 { static-nix-shell.mkPython3 {
pname = "sane-die-with-parent"; pname = "sane-die-with-parent";
srcRoot = ./.; srcRoot = ./.;
pkgs = [ "python3Packages.psutil" ]; pkgs = [ "python3.pkgs.psutil" ];
} }

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 -p python3Packages.psutil #!nix-shell -i python3 -p python3 -p python3.pkgs.psutil
# vim: set filetype=python : # vim: set filetype=python :
""" """
USAGE: sane-die-with-parent [options...] <cmd> [args ...] USAGE: sane-die-with-parent [options...] <cmd> [args ...]

View File

@@ -1,9 +1,10 @@
{ lib {
, python3Packages lib,
, static-nix-shell python3,
, stdenv static-nix-shell,
, symlinkJoin stdenv,
, transmission symlinkJoin,
transmission,
}: }:
let let
@@ -16,13 +17,13 @@ let
src = ./src/lib/bt; src = ./src/lib/bt;
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.setuptoolsBuildHook python3.pkgs.setuptoolsBuildHook
]; ];
propagatedBuildInputs = [ transmission ]; propagatedBuildInputs = [ transmission ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
pythonImportChecks = [ pythonImportChecks = [
@@ -31,19 +32,19 @@ let
doCheck = true; doCheck = true;
strictDeps = true; strictDeps = true;
}; };
ssdp = python3Packages.buildPythonPackage { ssdp = python3.pkgs.buildPythonPackage {
pname = "sane-lib-ssdp"; pname = "sane-lib-ssdp";
version = "0.1.0"; version = "0.1.0";
format = "setuptools"; format = "setuptools";
src = ./src/lib/ssdp; src = ./src/lib/ssdp;
nativeBuildInputs = [ nativeBuildInputs = [
python3Packages.pypaBuildHook python3.pkgs.pypaBuildHook
python3Packages.pypaInstallHook python3.pkgs.pypaInstallHook
python3Packages.setuptoolsBuildHook python3.pkgs.setuptoolsBuildHook
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
python3Packages.pythonImportsCheckHook python3.pkgs.pythonImportsCheckHook
]; ];
pythonImportChecks = [ pythonImportChecks = [
@@ -70,7 +71,7 @@ let
bt-add = static-nix-shell.mkPython3 { bt-add = static-nix-shell.mkPython3 {
pname = "sane-bt-add"; pname = "sane-bt-add";
srcRoot = ./src; srcRoot = ./src;
pkgs = [ "python3Packages.requests" "sane-scripts.lib.bt" ]; pkgs = [ "python3.pkgs.requests" "sane-scripts.lib.bt" ];
}; };
bt-rm = static-nix-shell.mkPython3 { bt-rm = static-nix-shell.mkPython3 {
pname = "sane-bt-rm"; pname = "sane-bt-rm";
@@ -80,7 +81,7 @@ let
bt-search = static-nix-shell.mkPython3 { bt-search = static-nix-shell.mkPython3 {
pname = "sane-bt-search"; pname = "sane-bt-search";
srcRoot = ./src; srcRoot = ./src;
pkgs = [ "python3Packages.natsort" "python3Packages.requests" ]; pkgs = [ "python3.pkgs.natsort" "python3.pkgs.requests" ];
}; };
bt-show = static-nix-shell.mkPython3 { bt-show = static-nix-shell.mkPython3 {
pname = "sane-bt-show"; pname = "sane-bt-show";
@@ -110,7 +111,7 @@ let
ip-check = static-nix-shell.mkPython3 { ip-check = static-nix-shell.mkPython3 {
pname = "sane-ip-check"; pname = "sane-ip-check";
srcRoot = ./src; srcRoot = ./src;
pkgs = [ "miniupnpc" "python3Packages.requests" "sane-scripts.lib.ssdp" ]; pkgs = [ "miniupnpc" "python3.pkgs.requests" "sane-scripts.lib.ssdp" ];
}; };
ip-port-forward = static-nix-shell.mkPython3 { ip-port-forward = static-nix-shell.mkPython3 {
pname = "sane-ip-port-forward"; pname = "sane-ip-port-forward";
@@ -199,12 +200,12 @@ let
sync-music = static-nix-shell.mkPython3 { sync-music = static-nix-shell.mkPython3 {
pname = "sane-sync-music"; pname = "sane-sync-music";
srcRoot = ./src; srcRoot = ./src;
pkgs = [ "ffmpeg" "python3Packages.unidecode" "sox" ]; pkgs = [ "ffmpeg" "python3.pkgs.unidecode" "sox" ];
}; };
tag-music = static-nix-shell.mkPython3 { tag-music = static-nix-shell.mkPython3 {
pname = "sane-tag-music"; pname = "sane-tag-music";
srcRoot = ./src; srcRoot = ./src;
pkgs = [ "python3Packages.mutagen" ]; pkgs = [ "python3.pkgs.mutagen" ];
}; };
vpn = static-nix-shell.mkBash { vpn = static-nix-shell.mkBash {
pname = "sane-vpn"; pname = "sane-vpn";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 -p python3Packages.requests -p sane-scripts.lib.bt #!nix-shell -i python3 -p python3 -p python3.pkgs.requests -p sane-scripts.lib.bt
# vim: set filetype=python : # vim: set filetype=python :
""" """
sane-bt-add: instruct servo to download or rename some torrent. sane-bt-add: instruct servo to download or rename some torrent.

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 -p python3Packages.natsort -p python3Packages.requests #!nix-shell -i python3 -p python3 -p python3.pkgs.natsort -p python3.pkgs.requests
# vim: set filetype=python : # vim: set filetype=python :
""" """
usage: sane-bt-search [options] <query_string> usage: sane-bt-search [options] <query_string>

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p miniupnpc -p python3 -p python3Packages.requests -p sane-scripts.lib.ssdp #!nix-shell -i python3 -p miniupnpc -p python3 -p python3.pkgs.requests -p sane-scripts.lib.ssdp
# vim: set filetype=python : # vim: set filetype=python :
""" """
sane-ip-check: query the IP address of this machine as seen by an external Internet host. sane-ip-check: query the IP address of this machine as seen by an external Internet host.

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p ffmpeg -p python3 -p python3Packages.unidecode -p sox #!nix-shell -i python3 -p ffmpeg -p python3 -p python3.pkgs.unidecode -p sox
# vim: set filetype=python : # vim: set filetype=python :
import argparse import argparse
import concurrent.futures import concurrent.futures

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 -p python3Packages.mutagen #!nix-shell -i python3 -p python3 -p python3.pkgs.mutagen
# vim: set filetype=python : # vim: set filetype=python :
# #
# mutagen docs: # mutagen docs:

View File

@@ -74,7 +74,7 @@ in rec {
pkgExprs pkgExprs
); );
# allow any package to be a list of packages, to support things like # allow any package to be a list of packages, to support things like
# -p python3Packages.foo.propagatedBuildInputs # -p python3.pkgs.foo.propagatedBuildInputs
pkgsEnv' = lib.flatten pkgsEnv; pkgsEnv' = lib.flatten pkgsEnv;
doWrap = pkgsEnv' != []; doWrap = pkgsEnv' != [];
in in