Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix flake failing to build due to hatch test failure #317

Open
rykugur opened this issue Dec 31, 2024 · 8 comments
Open

Nix flake failing to build due to hatch test failure #317

rykugur opened this issue Dec 31, 2024 · 8 comments
Labels

Comments

@rykugur
Copy link

rykugur commented Dec 31, 2024

I'm not sure if this belongs here or not.

I ran a nix flake update today, followed by a rebuild, and started seeing this error:

error: builder for '/nix/store/l4i8gyfxjz9z8ljrq9wqd1sww7myhiw7-hatch-1.13.0.drv' failed with exit code 1;
       last 25 log lines:
       > E
       > E                             Skipping 39 identical leading characters in diff, use -v to show
       > E                               ion: 0.0.1
       > E                             - License-File: LICENSE.txt
       >
       > /build/source/tests/helpers/helpers.py:85: AssertionError
       > =========================== short test summary info ============================
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_include_project_file - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_project_file_always_included - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_config_file_always_included - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_explicit_selection_with_src_layout - AssertionError: my_app-0.0.1.dist-info/METADATA
       > FAILED tests/backend/metadata/test_spec.py::TestProjectMetadataFromCoreMetadata::test_license_files - AssertionError: assert {'license-fil...ion': '0.1.0'} == {'license-fil...io...
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_include_readme - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/metadata/test_spec.py::TestCoreMetadataV23::test_license_expression[construct_metadata_file_2_3] - AssertionError: assert 'Metadata-Ver...sion: 0.1.0\n' == 'Metadata-Ver... A...
       > FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_single_module - AssertionError: my_app-0.0.1.dist-info/METADATA
       > FAILED tests/backend/metadata/test_spec.py::TestCoreMetadataV23::test_license_files[construct_metadata_file_2_3] - AssertionError: assert 'Metadata-Ver...sion: 0.1.0\n' == 'Metadata-Ver...SE...
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_readme_always_included - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_no_strict_naming - AssertionError: My.App-0.0.1.dist-info/METADATA
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_include_license_files - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_license_files_always_included - AssertionError: my_app-0.0.1/PKG-INFO
       > FAILED tests/backend/metadata/test_spec.py::TestCoreMetadataV23::test_all[construct_metadata_file_2_3] - AssertionError: assert 'Metadata-Ver...est content\n' == 'Metadata-Ver...es...
       > FAILED tests/backend/builders/test_sdist.py::TestBuildStandard::test_no_strict_naming - AssertionError: My.App-0.0.1/PKG-INFO
       > ERROR tests/backend/licenses/test_parse.py
       > ERROR tests/backend/licenses/test_supported.py
       > =========== 15 failed, 1474 passed, 116 skipped, 2 errors in 12.16s ============
       For full logs, run 'nix log /nix/store/l4i8gyfxjz9z8ljrq9wqd1sww7myhiw7-hatch-1.13.0.drv'.
error: 1 dependencies of derivation '/nix/store/kr8ijhyahfa211cm0y7khyy2zyi6dayf-python3.12-umu-launcher-1.1.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/a58n2lh66fbagabaa0x6zaiyg6r5ck37-umu-run-bwrap.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g3ghxyx826gp6p0zhm4g2qxbmkbi7m55-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3vgw7fa75wp6ikp7map0x1dvw34plk2z-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/10g1bslq5x1m9pj2rf4ww8vfj61s7dnm-unit-home-manager-dusty.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/63y1wf6bfcdgvwpwx0ahgjnysxf74l35-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0g3c2vmqzlkgnfijxdm4y32v815w23km-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8ja0fdqqhpl7n3x1bhnjf3mvlsnzfr0v-nixos-system-jezrien-25.05.20241229.88195a9.drv' failed to build

Here is a link to the nix log output.

Relevant config:

# flake .nix
  inputs = {
    ...
    umu = {
      url =
        "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&submodules=1";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    ...
  };
# home.nix

home.packages = [
    ...
    inputs.umu.packages.${pkgs.system}.umu
    ...
];
@rykugur
Copy link
Author

rykugur commented Dec 31, 2024

Tagging @beh-10257

@rykugur
Copy link
Author

rykugur commented Dec 31, 2024

Might be a more widespread python issue; I'm not a python-knower (on purpose), so unsure, but I tried removing umu to see if I could get it to build and started seeing this error coming from bottles:

error: builder for '/nix/store/bqfg2ljj6cmv8cppfhhn08c5zzmakzli-python3.12-patool-2.4.0.drv' failed with exit code 1;
       last 25 log lines:
       > =================================== FAILURES ===================================
       > __________________________ TestMime.test_nested_gzip ___________________________
       >
       > args = (<tests.test_mime.TestMime testMethod=test_nested_gzip>,), kwargs = {}
       >
       >     def newfunc(*args, **kwargs):
       >         if not testfunc(name):
       >             pytest.skip(f"{description} {name!r} is not available")
       > >       return func(*args, **kwargs)
       >
       > tests/__init__.py:44:
       > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       > tests/test_mime.py:198: in test_nested_gzip
       >     self.mime_test_file("t.rar.gz", "application/x-rar", "gzip")
       > tests/test_mime.py:56: in mime_test_file
       >     self.mime_test(patoolib.mime.guess_mime_file, archive, mime, encoding, info)
       > tests/test_mime.py:38: in mime_test
       >     self.assertEqual(
       > E   AssertionError: 'application/gzip' != 'application/x-rar'
       > E   - application/gzip
       > E   + application/x-rar
       > E    : MIME type for archive `/build/source/tests/data/t.rar.gz' should be application/x-rar, but was application/gzip. Info: application/x-gzip
       > =========================== short test summary info ============================
       > FAILED tests/test_mime.py::TestMime::test_nested_gzip - AssertionError: 'application/gzip' != 'application/x-rar'
       > =========== 1 failed, 87 passed, 124 skipped, 6 deselected in 57.81s ===========
       For full logs, run 'nix log /nix/store/bqfg2ljj6cmv8cppfhhn08c5zzmakzli-python3.12-patool-2.4.0.drv'.
error: 1 dependencies of derivation '/nix/store/d1bhadx9561cqg0fgwhk745j6w4f4d9b-bottles-unwrapped-51.17.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pqyfr6w9rbydm08wrcng8cx7nkc4n9a9-bottles.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2hyn1vzh45hq1h12zmm4xxr49njlcz1l-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bay799k302fp5jxq4c8987n4mfx0rq9l-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vyh81rnk17lgmscp1s2k8mx09mhc27sk-unit-home-manager-dusty.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7256vd2v9mk24406v1yr2sjvv5lg7n2h-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cnxm2jaspivd6wkna75a2zckvf9rjani-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bmx20wfkicxyg1xkcy059bclgxb6pr1c-nixos-system-jezrien-25.05.20241229.88195a9.drv' failed to build

michaelmnemonic added a commit to michaelmnemonic/nixos that referenced this issue Dec 31, 2024
@R1kaB3rN R1kaB3rN added the nixos label Jan 1, 2025
@Alanazane
Copy link

This is also being tracked at an issue in nixpkgs here.

@beh-10257
Copy link
Contributor

don't follow nixpkgs for now
this is finals week for me so yeah gonna fix this IDK next week
if its still broken upstream

@Freyja335
Copy link

Freyja335 commented Jan 6, 2025

Yeah it fails to build for me too but i found a way to make it work until the issue is resolved. What I basically did is use a specific commit as the umu.url:
umu.url = "github:Open-Wine-Components/umu-launcher/59a82ea8cd284c7535bc06b8f6156abb7da96f6a?dir=packaging/nix";
also add a stable-nixpkgs.url input:
stable-nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
and have umu follow stable-nixpkgs:
umu.inputs.nixpkgs.follows = "stable-nixpkgs";.
After runing nixos-rebuild umu builds fine.
EDIT: The commit I'm using does not have cbor2 so you might want to remove it from your config or else nixos-rebuild will fail.

@rykugur
Copy link
Author

rykugur commented Jan 7, 2025

Yeah it fails to build for me too but i found a way to make it work until the issue is resolved. What I basically did is use a specific commit as the umu.url: umu.url = "github:Open-Wine-Components/umu-launcher/59a82ea8cd284c7535bc06b8f6156abb7da96f6a?dir=packaging/nix"; also add a stable-nixpkgs.url input: stable-nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; and have umu follow stable-nixpkgs: umu.inputs.nixpkgs.follows = "stable-nixpkgs";. After runing nixos-rebuild umu builds fine. EDIT: The commit I'm using does not have cbor2 so you might want to remove it from your config or else nixos-rebuild will fail.

Thank you for posting this. This workaround worked for me.

@Freyja335
Copy link

Boys! I am happy to report that as I am writing this, umu builds fine on the latest nixos-unstable without using the workaround I mentioned above.

@NullCub3
Copy link

NullCub3 commented Jan 9, 2025

Yes! The flake here should have all been fixed with #322, and hatch itself should be fixed once this is merged: NixOS/nixpkgs#371743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants