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

todoist-electron: init at 1.19 #79167

Merged
merged 2 commits into from Feb 17, 2020
Merged

Conversation

i077
Copy link
Contributor

@i077 i077 commented Feb 3, 2020

todoist-electron is an Electron wrapper around the Todoist web app, with some global shortcuts.

Note: The source repository does not have a COPYING file to denote a license, so I am basing the license off of the AUR Package (ISC license), maintained by the owner of the source repo. Additionally, while the repo's name is todoist-linux, the AUR package name is todoist-electron, so I'm going with the latter since it's slightly more descriptive.

(this is also my first PR and first derivation for nixpkgs, so I may have gotten some things wrong)

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

maintainers/maintainer-list.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/todoist-electron/default.nix Outdated Show resolved Hide resolved
@i077 i077 force-pushed the todoist-electron/init branch 2 times, most recently from 11bf902 to a5cdfa1 Compare February 3, 2020 18:50
@jonringer
Copy link
Contributor

@GrahamcOfBorg eval

@i077
Copy link
Contributor Author

i077 commented Feb 3, 2020

Ah, it's throwing an error because at_spi2_atk is an alias, and ofborg is failing on allowAliases = false. I'll force push a change to use the original name.

@i077
Copy link
Contributor Author

i077 commented Feb 3, 2020

@GrahamcOfBorg eval

1 similar comment
@jonringer
Copy link
Contributor

@GrahamcOfBorg eval

@jonringer
Copy link
Contributor

ofborg has been slow recently, not sure why

@i077
Copy link
Contributor Author

i077 commented Feb 3, 2020

Yep, that fixed it. Everything's good to go.

pkgs/applications/misc/todoist-electron/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/todoist-electron/default.nix Outdated Show resolved Hide resolved

# Hacky workaround for RPATH problems
makeWrapper $out/opt/Todoist/todoist $out/bin/todoist \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio udev ]}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't be needed with other patchelf usage, unless another binary is using them.

Suggested change
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio udev ]}
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio udev ]}

Copy link
Contributor Author

@i077 i077 Feb 3, 2020

Choose a reason for hiding this comment

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

I actually had a problem where Nix would, while it was shrinking the RPATH, remove the library paths for libpulseaudio and udev, and thus the instance would crash upon startup. I had discussed this in the IRC and was confused on why they got removed, and couldn't figure out why Nix wanted to remove those paths.

Using a wrapper to export LD_LIBRARY_PATH before execution was the only solution I was given that worked, I couldn't think of another one (aside from putting the whole libPath in that wrapper instead).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the output when I build and print the RPATH of the ELF.

@jonringer
Copy link
Contributor

@worldofpeace how do we handle top-level name conflicts. I feel like this should be called todoist, but there's already a go application by that name.

@i077
Copy link
Contributor Author

i077 commented Feb 13, 2020

I'm just going by how it's called in the AUR, I think it should be kept that way.

@jonringer
Copy link
Contributor

@i077
Copy link
Contributor Author

i077 commented Feb 17, 2020

You mean todoist-electron? If so, is this now ready to be merged in?

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

commits LGTM
gui starts fine

[4 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/79167
1 package built:
todoist-electron

@jonringer jonringer merged commit 2599fd0 into NixOS:master Feb 17, 2020
@i077 i077 deleted the todoist-electron/init branch February 18, 2020 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants