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

JabRef: build from source #162593

Merged
merged 1 commit into from
Jul 15, 2022
Merged

JabRef: build from source #162593

merged 1 commit into from
Jul 15, 2022

Conversation

linsui
Copy link
Contributor

@linsui linsui commented Mar 3, 2022

Motivation for this change

JabRef 5.5 crashes

Things done
  1. Build JabRef from source
  2. Fix problem that files can't be opened
  • 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/)
  • 22.05 Release Notes (or backporting 21.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.

@Artturin @zoedsoupe @wamserma @Coda-Coda

Closes #130717
Closes #134516

pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
@Artturin
Copy link
Member

@ofborg build jabref

@linsui
Copy link
Contributor Author

linsui commented May 22, 2022

@ofborg build jabref

@linsui linsui force-pushed the patch-2 branch 2 times, most recently from d951c7a to 31a0595 Compare June 7, 2022 12:29
@linsui
Copy link
Contributor Author

linsui commented Jun 7, 2022

@ofborg build jabref

@linsui
Copy link
Contributor Author

linsui commented Jun 7, 2022

@Artturin Could you please review again?

@linsui
Copy link
Contributor Author

linsui commented Jun 7, 2022

@ofborg build jabref

@linsui
Copy link
Contributor Author

linsui commented Jun 7, 2022

@ofborg build jabref

Copy link
Member

@wamserma wamserma left a comment

Choose a reason for hiding this comment

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

Built on aarch64-linux and x86_64-linux.

@bobby285271 bobby285271 added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 10, 2022
@obff
Copy link

obff commented Jun 22, 2022

Hi,

i tried your patch and it works like charm. Thanks so much for tackling this build-jabref-from-source thing. I have also tried this before, but gave up very quickly.

In the past I used the derivation from 21.11 with a small modification to make the Firefox plugin work. Glad to see, that you already fixed this.

Unfortunately, $out/opt/jabref/lib/jabrefHost.py and $out/bin/.Jabref-wrapped don't work together out of the box - at least at my machine (nixos 22.05, x86_64-linux). I got some weird error message in the Browser Console. Something like

JabRef: Got success response from JabRef with details  
b"/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: line 238: @techreport{wesselkamp_misleading_2022,: command not found\n/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: line 239: title: command not found\n/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: line 240: url: command not found\n/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: line 241: doi: command not found\n/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: eval: line 242: syntax error near unexpected token `('\n/nix/store/vkrhnpbqy7iyzciyjr4wzjfvcxf8n0gh-jabref-5.6/bin/.JabRef-wrapped: eval: line 242: `\tabstract = {Generative adversarial networks (GANs) have made remarkable progress in synthesizing realistic-looking images that effectively outsmart even humans. Although several detection methods can recognize these deep fakes by checking for image artifacts from the generation process, multi…

To make it work again I applied the following change to jabrefHost.py

77c77
<     cmd = str(JABREF_PATH).split() + ["--importBibtex", r"{}".format(data)]
---
>     cmd = str(JABREF_PATH).split() + ["--importBibtex", r"'{}'".format(data)]

by adding the following line to the installPhase.

sed -i "s/r\"{}\"/r\"'{}'\"/g" $out/opt/jabref/lib/jabrefHost.py

At the moment I am not sure which of the two files is the root cause. Unfortunately, I don't have time to investigate this further in the next few days. Nevertheless, I did not want to withhold this from you.

Cheers

@linsui
Copy link
Contributor Author

linsui commented Jun 23, 2022

I build it again and the hash changed again even with gradle.lockfile. I guess the problem is that snapshot deps are used which are not locked.

@linsui linsui closed this Jun 23, 2022
@linsui linsui reopened this Jun 23, 2022
@linsui
Copy link
Contributor Author

linsui commented Jun 23, 2022

@koschtschei Thanks! I have been confused about why the extension doesn't work for a long time! I implement your fix and it work now!

@linsui
Copy link
Contributor Author

linsui commented Jun 23, 2022

@ofborg build jabref

@linsui
Copy link
Contributor Author

linsui commented Jun 23, 2022

I removed those test deps including some snapshot. Now there is only one snapshot which has been inactive since 2019.

@wamserma
Copy link
Member

Result of nixpkgs-review pr 162593 run on aarch64-linux 1

1 package built:
  • jabref

@bobby285271 bobby285271 removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 26, 2022
@linsui linsui force-pushed the patch-2 branch 3 times, most recently from d630d04 to 29917d0 Compare July 14, 2022 12:41
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/553

@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Jul 14, 2022
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/jabref/default.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

@ofborg build jabref

@SuperSandro2000 SuperSandro2000 merged commit baeefad into NixOS:master Jul 15, 2022
@linsui linsui deleted the patch-2 branch July 15, 2022 09:36
@linsui
Copy link
Contributor Author

linsui commented Jul 15, 2022

Thanks!

@linsui linsui mentioned this pull request Jul 19, 2022
@fleimgruber
Copy link
Contributor

fleimgruber commented Jul 22, 2022

@SuperSandro2000 could you please try backporting this via label backport release-22.05 as you did after #165182 (comment)? If auto backporting fails here as well, I will open a manual backport PR.

Edit: opened a manual backport PR in any case.

@SuperSandro2000
Copy link
Member

If you are a maintainer you can add the label yourself.

@fleimgruber
Copy link
Contributor

fleimgruber commented Jul 24, 2022

Thanks for notifying. I am not a maintainer, but I will notify maintainers with such requests in the future.

@github-actions
Copy link
Contributor

Backport failed for release-22.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-22.05
git worktree add -d .worktree/backport-162593-to-release-22.05 origin/release-22.05
cd .worktree/backport-162593-to-release-22.05
git checkout -b backport-162593-to-release-22.05
ancref=$(git merge-base 0b683abff06fe55755ea992ba47f2e787081a30f 2df7e1869949e771d7b989fafdc02e1690053f1b)
git cherry-pick -x $ancref..2df7e1869949e771d7b989fafdc02e1690053f1b

@wamserma wamserma added 8.has: port to stable A PR already has a backport to the stable release. and removed backport release-22.05 labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: clean-up 8.has: port to stable A 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 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.

jabref: 5.1 -> 5.3
8 participants