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

pineflash: init at 0.5.4 #243312

Closed
wants to merge 1 commit into from
Closed

Conversation

Janik-Haag
Copy link
Member

@Janik-Haag Janik-Haag commented Jul 13, 2023

Description of changes

https;//github.com/spagett1/pineFlash/

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

I have some problems with dfu-util when trying to flash a pinecil with pineflash it complaints about not finding dfu-util no matter iif I put it into buildInputs, nativeBuildInputs or propagatedBuildInputs what does work is spawning a nix-shell like that: nix-shell -p dfu-util and then opening pineflash from that nix-shell. I'm guessing this is caused by some wired behavior of $PATH but I don't know.

@Janik-Haag
Copy link
Member Author

#227474 has to get merged before this one since blisp is needed to flash the pincil v2

@Luflosi
Copy link
Contributor

Luflosi commented Nov 5, 2023

blisp is now packaged. Does anything else need to be done before this PR is ready for merging?

Copy link
Contributor

@danjujan danjujan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestions for the latest version.

pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/pineflash/default.nix Outdated Show resolved Hide resolved
@Janik-Haag
Copy link
Member Author

Thanks for the review and the ping, I'll try to work on it this weekend :D

@Janik-Haag
Copy link
Member Author

I applied your suggested patches and building works fine, but executing ./result/bin/pineflash results in A massive error occured, not sure whats goin on here. and funnily enough exit code 0. Do you have a idea why that happens?

@Janik-Haag Janik-Haag force-pushed the pine-flash branch 2 times, most recently from 188576b to 6403e0f Compare November 12, 2023 16:17
@Janik-Haag Janik-Haag marked this pull request as ready for review November 12, 2023 16:17
@Janik-Haag Janik-Haag requested a review from danjujan November 12, 2023 16:17
@Janik-Haag Janik-Haag changed the title pineflash: init at 0.5.1 pineflash: init at 0.5.3 Nov 12, 2023
@danjujan
Copy link
Contributor

Works fine for me on Arch Linux with home-manager in a Gnome wayland session. I don't have a NixOS system to test this on at the moment. Maybe @Luflosi can help?
The error comes from these lines https://github.com/Spagett1/PineFlash/blob/d3527083b716979a6211ffc0395403de23c99b75/src/.main.rs.rustfmt#L526C1-L532C85. Maybe a missing dependency that causes eframe::run_native to fail?

@Janik-Haag
Copy link
Member Author

Hmm I'm on Nixos unstable with sway

@danjujan
Copy link
Contributor

emilk/egui#3104 seems related to your sway problem. Pineflash 0.5.3 bumped egui from version 0.21 to 0.22.

@danjujan
Copy link
Contributor

danjujan commented Dec 9, 2023

Any news? Had the time to test pineflash in hyperland and sway. Works fine here.
screenshot

Copy link
Contributor

@Luflosi Luflosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about moving this from pkgs/tools/misc/pineflash/default.nix to pkgs/by-name/pi/pineflash/package.nix? Then you don't need to change pkgs/top-level/all-packages.nix.

@Janik-Haag
Copy link
Member Author

Any news? Had the time to test pineflash in hyperland and sway. Works fine here.

I wonder whats different on your host. I tried bisecting egui earlier but to no avail all the hello_world examples even the one from the 0.21 release fail with:

Failed to initialize any backend! Wayland status: NoWaylandLib X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libX11.so.6: cannot open shared object file: No such file or directory); opening library failed (libX11.so: cannot open shared object file: No such file or directory)" })

How about moving this from pkgs/tools/misc/pineflash/default.nix to pkgs/by-name/pi/pineflash/package.nix? Then you don't need to change pkgs/top-level/all-packages.nix.

There will be a pr with automated tooling to do this. No need for extra manual labor

@mweinelt
Copy link
Member

mweinelt commented Dec 14, 2023

❯ ./result/bin/pineflash
A massive error occured, not sure whats goin on here.

On sway, x86_64-linux.

@NovaViper
Copy link
Contributor

NovaViper commented Feb 26, 2024

I tried this on NixOS unstable for my desktop (x86_64-linux) running KDE Plasma 5.27.10; I also got the A massive error occured, not sure whats goin on here. error too.

@Janik-Haag Janik-Haag changed the title pineflash: init at 0.5.3 pineflash: init at 0.5.4 Feb 26, 2024
@Janik-Haag
Copy link
Member Author

updated, but still getting the same error on wayland :(

@NovaViper
Copy link
Contributor

I actually got a different error this time, same system. I also forgot to mention in my previous comment that my desktop is using X11 and not Wayland

A massive error occured, not sure whats goin on here:
 Found no glutin configs matching the template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None }. error: Error { raw_code: None, raw_os_message: None, kind: NotFound }

@Luflosi
Copy link
Contributor

Luflosi commented Feb 27, 2024

I'm also getting

A massive error occured, not sure whats goin on here: 
 Found no glutin configs matching the template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None }. error: Error { raw_code: None, raw_os_message: None, kind: NotFound }

I'm running GNOME with Wayland.

@NovaViper
Copy link
Contributor

Hey I gave it a try once again after updating it and it's still erroring out on X11

A massive error occured, not sure whats goin on here:
 Found no glutin configs matching the template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None }. error: Error { raw_code: None, raw_os_message: None, kind: NotFound }

@Janik-Haag
Copy link
Member Author

I guess this is a upstream error and not one with our packaging but not sure.

Copy link
Contributor

@danjujan danjujan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream reworked its wayland code.


rustPlatform.buildRustPackage rec {
pname = "pineflash";
version = "0.5.4";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "0.5.4";
version = "0.5.5";

owner = "Spagett1";
repo = "PineFlash";
rev = version;
hash = "sha256-4izfxApaCLbetZmMMKZIAknb+88B7z2WO+sBafehKHI=";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hash = "sha256-4izfxApaCLbetZmMMKZIAknb+88B7z2WO+sBafehKHI=";
hash = "sha256-4tcwEok36vuXbtlZNUkLNw1kHFQPBEJM/gWRhRWNLPg=";

categories = [ "Utility" ];
})];

cargoHash = "sha256-VtUq/scRnx52ibqvUIqvaloaQpZyyXUlJYd2UIKQTjg=";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cargoHash = "sha256-VtUq/scRnx52ibqvUIqvaloaQpZyyXUlJYd2UIKQTjg=";
cargoHash = "sha256-l01It6mUflENlADW6PpOQvK1o4qOjbTsMLB6n+OIl0U=";

--replace 'Command::new("dfu-util")' 'Command::new("${dfu-util}/bin/dfu-util")' \
--replace 'Command::new("blisp")' 'Command::new("${blisp}/bin/blisp")'
'';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
postFixup = ''
patchelf $out/bin/${pname} \
--add-rpath ${lib.makeLibraryPath [libxkbcommon wayland]}
'';

@Luflosi
Copy link
Contributor

Luflosi commented May 5, 2024

With the new version I'm still getting the error :(

A massive error occured, not sure whats goin on here: 
 Found no glutin configs matching the template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: ConfigSurfaceTypes(WINDOW), api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None }. Error: Error { raw_code: None, raw_os_message: None, kind: NotFound }

I get the same error when I rebase the PR on top of the version of Nixpkgs I'm currently running on my NixOS system (5c24cf2) I also tried rebasing on top of the latest master with the same result.

@FliegendeWurst FliegendeWurst added the awaiting_changes (old Marvin label, do not use) label Nov 14, 2024
@acuteaangle
Copy link
Contributor

acuteaangle commented Dec 30, 2024

Whoops. I just found this PR.
I had opened gh-369458.

The 0 exit status with no stack trace was in part an upstream bug, which should be fixed in the next version.

strace revealed it to be crashing after searching for libxkbcommon-x11.so and libGL.so; patching the pkexec path and adding those to buildInputs and rpath resolved that specific issue.

How should we go about merging these—can anyone test if either of these function for them currently? My PR doesn’t have the desktop icons currently, and has not been tested on Darwin, but functions for me with X11 Cinnamon on x86_64-linux.

Note: The license is now out of date here, it was changed to gpl2Only.

@acuteaangle acuteaangle mentioned this pull request Jan 1, 2025
13 tasks
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
@SigmaSquadron SigmaSquadron removed the awaiting_changes (old Marvin label, do not use) label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants