I had a previously working python package stop working during the recent release, it now errors with
pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
ERROR Backend 'setuptools.build_meta' is not available.
I’m assuming that the packages no longer provide this backend, but I cannot find which one to add, any thoughts?
Here is the package.nix for completeness:
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, fetchPypi
, pkgs
, ffmpeg_7-full
, python312
, python312Packages
, makeDesktopItem
, hdr10plus_tool
}:
let
nvencc = (pkgs.callPackage ../../packages/NVEnc/package.nix {});
# https://github.com/NixOS/nixpkgs/blob/00000000b0be738315769701d1bc6ee298ad44a9/pkgs/development/python-modules/chardet/default.nix
chardet510 = (pkgs.callPackage ./chardet510/default.nix {
buildPythonPackage = python312Packages.buildPythonPackage;
hypothesis = python312Packages.hypothesis;
pytestCheckHook = python312Packages.pytestCheckHook;
setuptools = python312Packages.setuptools;
});
# Not in nixpkgs
iso639lang = (python312Packages.buildPythonPackage rec {
pname = "iso639_lang";
version = "2.6.1";
format = "pyproject";
nativeBuildInputs = [
python312Packages.setuptools
];
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-XpYEZ82Vt+RBfUh5J0WlFFe+A0ZBejzeQKdc/BQuGjc=";
};
});
# https://github.com/NixOS/nixpkgs/blob/294f94582559690359b28a044cbe96659091f118/pkgs/development/python-modules/mistune/default.nix
mistune205 = (pkgs.callPackage ./mistune205/default.nix {
buildPythonPackage = python312Packages.buildPythonPackage;
setuptools = python312Packages.setuptools;
pytestCheckHook = python312Packages.pytestCheckHook;
});
# https://github.com/NixOS/nixpkgs/blob/50ab793786d9de88ee30ec4e4c24fb4236fc2674/pkgs/development/python-modules/pathvalidate/default.nix#L29
pathvalidate252 = (pkgs.callPackage ./pathvalidate252/default.nix {
buildPythonPackage = python312Packages.buildPythonPackage;
});
# https://github.com/NixOS/nixpkgs/blob/96f7b8213bd9f6aebc4a54815195de827a05b561/pkgs/development/python-modules/psutil/default.nix
psutil598 = (pkgs.callPackage ./psutil598/default.nix {
buildPythonPackage = python312Packages.buildPythonPackage;
pytestCheckHook = python312Packages.pytestCheckHook;
});
python-box610 = (pkgs.callPackage ./python-box610/default.nix {
buildPythonPackage = python312Packages.buildPythonPackage;
pytestCheckHook = python312Packages.pytestCheckHook;
pyyaml = python312Packages.pyyaml;
ruamel-yaml = python312Packages.ruamel-yaml;
toml = python312Packages.toml;
tomli = python312Packages.tomli;
tomli-w = python312Packages.tomli-w;
cython = python312Packages.cython;
});
# Not in nixpkgs
reusables100 = (python312Packages.buildPythonPackage rec {
pname = "reusables";
version = "1.0.0";
doCheck = false;
format = "pyproject";
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-AuJOZuiXD+P1puuu9pHs7U4jiK4pHzdHsdY+Vh26Kws=";
};
nativeBuildInputs = [
python312Packages.pip
python312Packages.setuptools
];
});
release = "5.12.4";
in
python312Packages.buildPythonApplication rec {
name = "fastflix-${version}";
pname = "fastflix-${version}";
version = release;
format = "pyproject";
src = fetchFromGitHub {
owner = "cdgriffith";
repo = "FastFlix";
rev = "refs/tags/${version}";
hash = "sha256-wrmc0w8qC8o0aeYPIqt4qfw+7w1jPHCciN0hpJJYFj4=";
};
patches = [
./pyproject.toml.patch
./disable-version-check_application.py.patch
./disable-version-check_config.py.patch
./disable-version-check_settings.py.patch
./auto-set-tool-paths_config.py.patch
];
propagatedBuildInputs = with pkgs; [
# dependencies
python312Packages.platformdirs # platformdirs~=4.3
chardet510#chardet # chardet>=5.1.0,<5.2.0
python312Packages.colorama # colorama>=0.4,<1.0
python312Packages.coloredlogs # coloredlogs>=15.0,<16.0
iso639lang # iso639-lang==0.0.9 patched to iso639-lang==2.5.1
mistune205 # mistune>=2.0,<3.0
python312Packages.packaging # packaging>=23.2
pathvalidate252 # pathvalidate>=2.4,<3.0
psutil598 # psutil>=5.9,<6.0
python312Packages.pydantic # pydantic>=2.0,<3.0
python312Packages.pyside6 # pyside6==6.9.0
python-box610 # python-box # python-box[all]>=6.0,<7.0
python312Packages.requests # requests>=2.28,<3.0
reusables100 # reusables>=0.9.6,<0.10.0
python312Packages.setuptools # setuptools>=75.8
python312Packages.setuptools-scm # setuptools_scm[toml]>=6.2
ffmpeg-normalize # ffmpeg-normalize>=1.31.3,<2.0
# optional-dependencies
python312Packages.wheel # wheel>=0.38.4
python312Packages.typing-extensions # typing_extensions>=4.4
python312Packages.pyinstaller # pyinstaller==6.9.0
python312Packages.pytest # pytest>=7.3
python312Packages.types-requests # types-requests>=2.28
python312Packages.types-setuptools # types-setuptools>=65.7
python312Packages.pre-commit-hooks # pre-commit>=3.0.3
];
postInstall = ''
mkdir -p $out/share/applications
cat > $out/share/applications/fastflix.desktop << EOF
[Desktop Entry]
Name=FastFlix
Comment=Transcoding assistant
Exec=$out/bin/fastflix
Icon=fastflix
Terminal=true
Type=Application
Categories=AudioVideo;Video;Utility;
EOF
install -Dm644 ${./resources/icon_16x16x32.png} $out/share/icons/hicolor/16x16/apps/fastflix.png
install -Dm644 ${./resources/icon_32x32x32.png} $out/share/icons/hicolor/32x32/apps/fastflix.png
install -Dm644 ${./resources/icon_64x64x32.png} $out/share/icons/hicolor/64x64/apps/fastflix.png
install -Dm644 ${./resources/icon_128x128x32.png} $out/share/icons/hicolor/128x128/apps/fastflix.png
install -Dm644 ${./resources/icon_256x256x32.png} $out/share/icons/hicolor/256x256/apps/fastflix.png
install -Dm644 ${./resources/icon_512x512x32.png} $out/share/icons/hicolor/512x512/apps/fastflix.png
install -Dm644 ${./resources/icon_1024x1024x32.png} $out/share/icons/hicolor/1024x1024/apps/fastflix.png
'';
postFixup = ''
wrapProgram $out/bin/fastflix \
--set _PKG_FFMPEG_BIN "${ffmpeg_7-full}/bin/ffmpeg" \
--set _PKG_FFPROBE_BIN "${ffmpeg_7-full}/bin/ffprobe" \
--set _PKG_NVENCC_BIN "${nvencc}/bin/nvencc" \
--set _PKG_HDR10PLUS_TOOL_BIN "${hdr10plus_tool}/bin/hdr10plus_tool"
'';
meta = {
homepage = "https://fastflix.org/";
description = "Transcoding assistant.";
longDescription = ''
FastFlix is a free GUI for H.264, HEVC and AV1 hardware and software encoding!
'';
changelog = "https://github.com/cdgriffith/FastFlix/releases/tag/${version}";
platforms = lib.platforms.linux;
};
}
And the console output:
building the system configuration...
these 13 derivations will be built:
/nix/store/crmx93jzjcpjzac1aa65x2sz3651jzl1-fastflix-5.12.4.drv
/nix/store/96bkyzrs3n9f5mq5q8fw8rrjhk7vvpqn-system-path.drv
/nix/store/2ls7y3k9lp32ak6p80i6lsqliadlp4ir-dbus-1.drv
/nix/store/gaqhlmbw0r2fyzql89fkj7qqf7wyxfz9-X-Restart-Triggers-polkit.drv
/nix/store/4wa6vmqz366cflka51sf3kgp449zhb1y-unit-polkit.service.drv
/nix/store/yg5zpfn8rzfypd5fzjvw8jighr35av9m-X-Restart-Triggers-dbus.drv
/nix/store/9k2x8c9f507b79khpw160hy0a0frcyaf-unit-dbus.service.drv
/nix/store/l1cvavn3fnhzmb70h0bxa5n424qxs1w6-unit-accounts-daemon.service.drv
/nix/store/8yf8s67fkgdcdg6rvwmf5k88aihipmci-system-units.drv
/nix/store/faqy103pczrvpawiy16n0hjgv7radxs3-unit-dbus.service.drv
/nix/store/y3v36a7vksnyq2py7mm3li4qjzi5j833-user-units.drv
/nix/store/yvx8w1ymb15j3vry0izm0rf6z4qgn9b7-etc.drv
/nix/store/g2l50dmi281jipzs24gr6fk71s17rric-nixos-system-cornwall-office-dan-25.11.3064.64049ca74d63.drv
building '/nix/store/crmx93jzjcpjzac1aa65x2sz3651jzl1-fastflix-5.12.4.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Running phase: unpackPhase
unpacking source archive /nix/store/ajs91aivyw9f4im4syabmxaqcmx52cnz-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/uv.lock"
Running phase: patchPhase
applying patch /nix/store/j6qwg2hz6b8qgj33gzr6kpa31vv52ny5-pyproject.toml.patch
patching file pyproject.toml
applying patch /nix/store/gnqyx1sc11q59ahzmqlw77lvxgprq9wh-disable-version-check_application.py.patch
patching file fastflix/application.py
applying patch /nix/store/l50g0fcl4nblnrr843g1a38qipg20wcm-disable-version-check_config.py.patch
patching file fastflix/models/config.py
applying patch /nix/store/hl5qkhv5lb63j8grzaw54qiw1xfc9jgw-disable-version-check_settings.py.patch
patching file fastflix/widgets/settings.py
applying patch /nix/store/z7cvm4rxi0wra0chz0w7g1dhq5jd70c0-auto-set-tool-paths_config.py.patch
patching file fastflix/models/config.py
Hunk #3 succeeded at 402 with fuzz 1.
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
Executing pypaBuildPhase
Setting SETUPTOOLS_SCM_PRETEND_VERSION to 5.12.4
Including all tracked files automatically
Including all tracked files automatically
Creating a wheel...
pypa build flags: --no-isolation --outdir dist/ --wheel
* Getting build dependencies for wheel...
Traceback (most recent call last):
File "/nix/store/ilrjc4nphvrw6ph8plswxxlhkwhfwrn1-python3.12-pyproject-hooks-1.2.0/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
ERROR Backend 'setuptools.build_meta' is not available.
error: Cannot build '/nix/store/crmx93jzjcpjzac1aa65x2sz3651jzl1-fastflix-5.12.4.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/7sqp0bp20ams8r0gls31w5gkkp7hxfzp-fastflix-5.12.4-dist
/nix/store/a21j6crl8f5565nrpd1cd8zxl3qysv6f-fastflix-5.12.4
error: Cannot build '/nix/store/96bkyzrs3n9f5mq5q8fw8rrjhk7vvpqn-system-path.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/cjird5clydldybv960496l0y36v5ri4h-system-path
error: Cannot build '/nix/store/g2l50dmi281jipzs24gr6fk71s17rric-nixos-system-cornwall-office-dan-25.11.3064.64049ca74d63.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/zykalm9j3643wsdqn6i8dmbzpypkwaws-nixos-system-cornwall-office-dan-25.11.3064.64049ca74d63
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 100.