NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.06k forks source link

Build failure: pylibdmtx #289742

Open leana8959 opened 8 months ago

leana8959 commented 8 months ago

Steps To Reproduce

Steps to reproduce the behaviour:

  1. build pylibdmtx

Build log

https://gist.github.com/leana8959/cdb7a4758823b664e1e35698cb50695a

Additional context

I use it in a flake, here's the output attribute of it.

  outputs = {
    self,
    nixpkgs,
    flake-utils,
  }:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {inherit system;};
      python = pkgs.python3;
      pythonPackages = ps: [
        ps.beautifulsoup4
        ps.opencv4
        pkgs.libdmtx # with out without this, it still fails
        ps.pylibdmtx
      ];
    in {
      formatter = pkgs.alejandra;
      devShell = pkgs.mkShell {
        # put your packages here !
        packages = with pkgs; [
          (python.withPackages pythonPackages)
        ];
      };
    });

Notify maintainers

@grahamc

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.3.0, macOS 14.3.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.19.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

Sigmanificient commented 6 months ago

Its build on x86_64-linux so this seems to be specific to aarch64-darwin

leana8959 commented 6 months ago

According to their page, 3.11 is not on the list of supported python version. Since python3 is an alias for python311 on channel 23.11 at the moment, this might be an issue?

Furthermore, I have tested to build the package with different versions of pythonPackages.

{
  inputs = {
    nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.614481.tar.gz";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs =
    inputs:
    inputs.flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import inputs.nixpkgs { inherit system; };
      in
      {
        formatter = pkgs.nixfmt;
        packages = {
          pylibdmtx39 = pkgs.lib.callPackageWith (pkgs // pkgs.python39Packages) ./pylibdmtx.nix { };
          pylibdmtx310 = pkgs.lib.callPackageWith (pkgs // pkgs.python310Packages) ./pylibdmtx.nix { };
          pylibdmtx311 = pkgs.lib.callPackageWith (pkgs // pkgs.python311Packages) ./pylibdmtx.nix { };
        };
      }
    );
}

where pylidmtx.nix is the nix expression currently available on nixpkgs.

These three all failed with the same error in the gist in the first post.

I don't have much idea why it's not building, I hope these information help :)