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

activitywatch: init at 0.12.1 #214085

Closed
wants to merge 2 commits into from
Closed

activitywatch: init at 0.12.1 #214085

wants to merge 2 commits into from

Conversation

chaoky
Copy link
Contributor

@chaoky chaoky commented Feb 2, 2023

Description of changes
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.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@chaoky
Copy link
Contributor Author

chaoky commented Feb 2, 2023

maybe this should be called activitywatch-bin? as there is some effort to create a compiled version in #97379

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Feb 2, 2023
@auroraanna
Copy link
Contributor

auroraanna commented Feb 3, 2023

maybe this should be called activitywatch-bin? as there is some effort to create a compiled version in #97379

nixpkgs only appends -bin on some package's name whose package can't be built from source. nixpkgs tries to make stuff build from source where ever possible and then Hydra builds it and puts it on cache.nixos.org. That cache will then contain the built package with the binary executable.

So, if there is already a version compiled from source, then a -bin one would be unnescessary.

@chaoky
Copy link
Contributor Author

chaoky commented Feb 3, 2023

Thanks for taking the time to clarify, so should this just be kept as activitywatch?
~ and updated with a compiled version when (and if) it's ever packaged from source

my question came from seeing a lot of foo-bin oss packages on nixpkgs
aur builds are also compiled and cache

@auroraanna
Copy link
Contributor

Hmm, I'm not so sure anymore it it's unnescessary. wkhtmltopdf and wkhtmltopdf-bin exist in nixpkgs, same for Thunderbird.

@amz-x
Copy link
Contributor

amz-x commented Feb 10, 2023

I'm also interested in this package.

I do agree with @chaoky to rename it to activitywatch-bin, since the compiled version in #97379 would be activitywatch thus keeping the package naming convention consistent.

@unode
Copy link
Member

unode commented Mar 15, 2023

@chaoky this recipe doesn't seem to work for me.
None of the bundled binaries have been patched.
They all still expect /lib64/ld-linux-x86-64.so.2 to be the interpreter.

% file /nix/store/9cvi0pxc2dibqjsmryd5baz279888gc4-ActivityWatch-0.12.1/opt/activitywatch/aw-qt 
/nix/store/9cvi0pxc2dibqjsmryd5baz279888gc4-ActivityWatch-0.12.1/opt/activitywatch/aw-qt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=9230f3fa19123436d7e9b46b02c11f1e492895c1, for GNU/Linux 2.6.32, stripped

% ./.nix-profile/bin/aw-qt 
zsh: no such file or directory: ./.nix-profile/bin/aw-qt

Did you do something else to have this recipe running in your system?

@chaoky chaoky force-pushed the master branch 2 times, most recently from e27dd23 to 8fe4f34 Compare April 6, 2023 17:14
@chaoky
Copy link
Contributor Author

chaoky commented Apr 7, 2023

@chaoky this recipe doesn't seem to work for me. None of the bundled binaries have been patched. They all still expect /lib64/ld-linux-x86-64.so.2 to be the interpreter.

% file /nix/store/9cvi0pxc2dibqjsmryd5baz279888gc4-ActivityWatch-0.12.1/opt/activitywatch/aw-qt 
/nix/store/9cvi0pxc2dibqjsmryd5baz279888gc4-ActivityWatch-0.12.1/opt/activitywatch/aw-qt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=9230f3fa19123436d7e9b46b02c11f1e492895c1, for GNU/Linux 2.6.32, stripped

% ./.nix-profile/bin/aw-qt 
zsh: no such file or directory: ./.nix-profile/bin/aw-qt

Did you do something else to have this recipe running in your system?

It's wrapped now, the autoPatchelfHook is only there to pick up libz.so.1, I couldn't figure out how to include this library otherwise

@chaoky
Copy link
Contributor Author

chaoky commented Apr 7, 2023

I see these on the runtime logs

/nix/store/8jlrffqj4h476lmd42l3flrpcl6z2813-ActivityWatch-0.12.1/opt/activitywatch/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /nix/store/3ph4rh9id7an858r1p7dj90nhf78g7s0-libproxy-0.4.18/lib/libproxy.so.1)

I'm not sure weather this is a non-nixos issue, or how to fix it, if it isn't it.
This comes from glib-networking, which is not essential for this package.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Please follow the contributing guide when naming your commits.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/activitywatch/default.nix Outdated Show resolved Hide resolved
};

buildInputs = [ qt6.qtbase glib-networking ];
nativeBuildInputs = [ autoPatchelfHook wrapGAppsNoGuiHook ];
Copy link
Member

Choose a reason for hiding this comment

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

Why not compile from source?

Copy link
Contributor Author

@chaoky chaoky Apr 8, 2023

Choose a reason for hiding this comment

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

activitywatch is composed of a lot of small services, the derivation proposed in the related issue is 380 lines long

Copy link
Member

Choose a reason for hiding this comment

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

which is preferable if someone already has done the work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try, what do you recommend for node packages? buildNpmPackage?

@SuperSandro2000
Copy link
Member

@ofborg eval

Co-authored-by: Sandro <[email protected]>
@unode
Copy link
Member

unode commented May 30, 2023

Superseded by #202935

@chaoky chaoky closed this May 30, 2023
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
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 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants