firecat53 / keepmenu

Dmenu/Rofi frontend for Keepass databases
GNU General Public License v3.0
204 stars 32 forks source link

nix-rebuild hanging on installCheckPhase #163

Closed PhilT closed 4 months ago

PhilT commented 4 months ago

There's probably a better way to go about this but I've just forked keepmenu and with NixOS using keepmenu.overrideAttrs to build a local version as I want to add support for Tofi but it's hanging at the installCheckPhase.

configuration.nix:

  systemPackages = with pkgs; [
      (keepmenu.overrideAttrs (oldAttrs: {
        name = "keepmenu-philt-custom";
        src = /data/code/keepmenu;
      }))
  ];

nixos-rebuild:

Successfully built keepmenu-1.4.0-py2.py3-none-any.whl
Finished creating a wheel...
Finished executing pypaBuildPhase
Running phase: pythonRuntimeDepsCheckHook
Executing pythonRuntimeDepsCheck
Checking runtime dependencies for keepmenu-1.4.0-py2.py3-none-any.whl
Finished executing pythonRuntimeDepsCheck
Running phase: installPhase
Executing pypaInstallPhase
Successfully installed keepmenu-1.4.0-py2.py3-none-any.whl
Finished executing pypaInstallPhase
Running phase: pythonOutputDistPhase
Executing pythonOutputDistPhase
Finished executing pythonOutputDistPhase
Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom
checking for references to /build/ in /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom...
gzipping man pages under /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom/share/man/
patching script interpreter paths in /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom
stripping (with command strip and flags -S -p) in  /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom/lib /nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/v401ybdswcla5w04n3ghh5w86flxd26c-keepmenu-philt-custom-dist
checking for references to /build/ in /nix/store/v401ybdswcla5w04n3ghh5w86flxd26c-keepmenu-philt-custom-dist...
patching script interpreter paths in /nix/store/v401ybdswcla5w04n3ghh5w86flxd26c-keepmenu-philt-custom-dist
Rewriting #!/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/bin/python3.11 to #!/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9
wrapping `/nix/store/6c8a2wvf971j3lc7nk66fdmjs9q66rb8-keepmenu-philt-custom/bin/keepmenu'...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
Running phase: installCheckPhase

Any ideas how I troubleshoot this? I'm not a Python dev (I know Ruby though).

PhilT commented 4 months ago

I've workaround it for now by adding installCheckPhase = ''true''; to the overrides.

firecat53 commented 4 months ago

Glad you got it working and thanks for the PR! I would think just using nix develop would allow you to run the script during testing. I'm not versed enough in Nix to be able to say why the installCheckPhase was hanging.

I use flakes to install the package from github, but you could change the input to a local directory and install from there as well. My nixos config is here. Keepmenu is installed with the home-manager packages.

PhilT commented 3 months ago

This has been addressed in https://github.com/NixOS/nixpkgs/pull/328672

Scrumplex commented 3 months ago

Perhaps the tests could warn/disable themselves when xsel or xclip are missing, as that seems to be the root cause for this