Skip to content

gradia: init at 1.4.3#414010

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
Cameo007:add-gradia
Jun 21, 2025
Merged

gradia: init at 1.4.3#414010
Aleksanaa merged 1 commit intoNixOS:masterfrom
Cameo007:add-gradia

Conversation

@Cameo007
Copy link
Contributor

@Cameo007 Cameo007 commented Jun 4, 2025

Gradia is a screenshot editing tool with the option to add a colored background, draw shapes or write text on screenshots.

https://github.com/AlexanderVanhee/Gradia

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 4, 2025
@liberodark
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 414010


x86_64-linux

✅ 1 package built:
  • gradia

Copy link
Contributor

@liberodark liberodark left a comment

Choose a reason for hiding this comment

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

LGTM

Build & Run :

image

@JuliusFreudenberger JuliusFreudenberger mentioned this pull request Jun 7, 2025
13 tasks
@Cameo007 Cameo007 changed the title gradia: init at 1.2.1 gradia: init at 1.4.0 Jun 7, 2025
Copy link
Contributor

@Henry-Hiles Henry-Hiles left a comment

Choose a reason for hiding this comment

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

Tested, works perfectly. Interestingly not all the deps from gradia are in here, namely pycairo and pygobject-stubs, but it works okay, so I guess we are good!

Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

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

I have some nits, nothing obviously immediately wrong with this PR.

@Cameo007 Cameo007 force-pushed the add-gradia branch 2 times, most recently from 9b32494 to 5379215 Compare June 7, 2025 21:01
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels Jun 7, 2025
Copy link
Contributor

@Henry-Hiles Henry-Hiles left a comment

Choose a reason for hiding this comment

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

LGTM, tested and good

@Henry-Hiles Henry-Hiles added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 7, 2025
@LordGrimmauld LordGrimmauld added the 8.has: package (new) This PR adds a new package label Jun 7, 2025
Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

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

Package works. Builds on x86_64-linux and aarch64-linux, as well as cross for both of those platforms.

On x86_64, both the native and cross builds work, supporting screenshots, clipboard and everything. I am honestly a bit surprised, usually these break hard outside flatpak on sway....

One thing i found: The "move" tool to move things you have drawn will spam the log with the following:

Traceback (most recent call last):
  File "/nix/store/3rw1qlb0dqwy0ybwzhffr1z62h7ns9h9-gradia-1.4.0/share/gradia/gradia/overlay/drawing_overlay.py", line 538, in _on_draw
    self._draw_selection_box(cr, scale)
  File "/nix/store/3rw1qlb0dqwy0ybwzhffr1z62h7ns9h9-gradia-1.4.0/share/gradia/gradia/overlay/drawing_overlay.py", line 194, in _draw_selection_box
    cr.set_source_rgba(*accent)
TypeError: Context.set_source_rgba() argument after * must be an iterable, not RGBA

However, this might well be an upstream bug, and it does seam to work.
Overall, lgtm!

@Henry-Hiles Henry-Hiles added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jun 8, 2025
@AlexanderVanhee
Copy link

One thing i found: The "move" tool to move things you have drawn will spam the log with the following
I have not been able to replicate this on the v1.4.0 of the Flatpak from Flathub.

@wegank wegank added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Jun 9, 2025
@LordGrimmauld
Copy link
Contributor

Right. Then my guess is on a library mismatch betweehn your pyproject toml and what is in nixpkgs (we mostly ignore pyproject toml). That said, we did not need relaxDeps here, so in theory these versions are allowed. One would have to now go and compare the dep versions between flatpak and nix i guess. Or read the code and look at the call, see what it takes to make it happy.

@Aleksanaa
Copy link
Member

Better to write a patch and submit upstream.

@Cameo007
Copy link
Contributor Author

Cameo007 commented Jun 10, 2025

@LordGrimmauld
Copy link
Contributor

Flatpak might just blackhole those errors instead of logging them? It is not actually a hard crash.

@wolfgangwalther
Copy link
Contributor

Re-running CI due to a odd failure fixed in #416448

@Cameo007 Cameo007 changed the title gradia: init at 1.4.0 gradia: init at 1.4.1 Jun 13, 2025
@Cameo007 Cameo007 changed the title gradia: init at 1.4.1 gradia: init at 1.4.3 Jun 15, 2025
@LordGrimmauld
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 414010
Commit: ffbd6bdb409c07d222426ad3d756de2941e4acbd


x86_64-linux

✅ 1 package built:
  • gradia

Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

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

Still works, waiting for a merge...

@Aleksanaa Aleksanaa merged commit 3a2a0a7 into NixOS:master Jun 21, 2025
16 of 17 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jun 21, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Jun 21, 2025
@Cameo007 Cameo007 deleted the add-gradia branch June 22, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants