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

Support global WakaTime installation #178

Merged
merged 1 commit into from
Feb 19, 2021
Merged

Support global WakaTime installation #178

merged 1 commit into from
Feb 19, 2021

Conversation

notquiteamonad
Copy link
Contributor

This is quick-and-dirty for the moment but I'll clean it up if you think it's worth adding as an option. For systems like NixOS ones where the paths are unpredictable, I added a dependency on node-which. This could also replace or be used alongside the current search for python, although the existing method found my python executable fine.

Feel free to flat-out reject this if it goes against what you're aiming for in terms of config surface etc.

Closes #177.

@jakeisnt
Copy link

jakeisnt commented Feb 2, 2021

I need this to get NixOS working - would love to see this merged.

@notquiteamonad
Copy link
Contributor Author

I'll give this a clean up tomorrow if there's someone else waiting for it then so if you do decide to go ahead with it it can be done quicker.

@jakeisnt In the meantime, if it's acceptable to you, adding python37 to your system config should at least enable the current version to work.

@jakeisnt
Copy link

jakeisnt commented Feb 2, 2021

Unfortunately, installing python37 doesn't do it for me - all my extensions are installed declaratively, and because they're saved as Nix derivations, the extension can't pull down the wakatime-cli python file due to the Nix store being read-only. Thanks for the PR, though; I hope this can be merged soon!

@notquiteamonad
Copy link
Contributor Author

That link's into a private repo unfortunately so I can't see it - although if you'd be willing to publish it as a gist or something I'd be interested to see how you're doing that. Working on cleaning this up now 🙂

@jakeisnt
Copy link

jakeisnt commented Feb 3, 2021

I just gave you the wrong link - try this! https://github.com/jakeisnt/nix-cfg/blob/master/modules/editors/vscode.nix

@notquiteamonad
Copy link
Contributor Author

I've rebased onto master and changed a couple of fatal logs into errors to quit out if there's no global installation. It works for me using a global or non-global installation with vscodium package from the unstable NixOS channel (this extension requires version 52 or greater, not available on 20.09). Anything else you want changing I'll be happy to do so.

@jakeisnt
Copy link

jakeisnt commented Feb 3, 2021

Remove 'WIP' from the title and request a review!

@notquiteamonad
Copy link
Contributor Author

Doh! Thanks 😂

@notquiteamonad notquiteamonad changed the title WIP: Support global WakaTime installation Support global WakaTime installation Feb 3, 2021
@notquiteamonad
Copy link
Contributor Author

@jakeisnt I've followed your example and configured all my VSCode extensions in my nixos config as well now. Although I'm going to have to switch back to manual installs until this is merged as you can't mix the two 😭

@alanhamlett is there any chance you could take a look at this?

@alanhamlett alanhamlett merged commit dccf48f into wakatime:master Feb 19, 2021
@notquiteamonad notquiteamonad deleted the support-global-wakatime-installation branch February 19, 2021 16:06
@jakeisnt
Copy link

Would it be possible to get a release candidate for this?

@alanhamlett
Copy link
Member

Released in v5.0.1 today.

@notquiteamonad
Copy link
Contributor Author

Thank you ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow use of global wakatime-cli
3 participants