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

docear: init at 1.2.0 #61817

Merged
merged 1 commit into from Jun 9, 2019
Merged

docear: init at 1.2.0 #61817

merged 1 commit into from Jun 9, 2019

Conversation

unode
Copy link
Member

@unode unode commented May 21, 2019

Motivation for this change

Adding Docear - an academic literature suite

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

As per terms of service (bottom of page) some optional functionality included in the software may fall under nonfree license.

stdenv.mkDerivation rec {
pname = "docear";
version = "1.2";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

This is actually already set so you can omit it.

pkgs/applications/office/docear/default.nix Show resolved Hide resolved

meta = with stdenv.lib; {
description = "A unique solution to academic literature management";
homepage = http://www.docear.org/;
Copy link
Member

Choose a reason for hiding this comment

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

Please enclose in quotes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this a new practice? Most URLs in nixpkgs are actually unquoted.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. Very new. Unquoted urls are going to eventually be deprecated. You don't have to quote it right now, but minimal effort now saves some time later when it has become deprecated.

chmod 0755 $out/share/ -R

# The wrapper ensures oraclejre is used
echo "#!${runtimeShell}" > $out/bin/docear
Copy link
Member

Choose a reason for hiding this comment

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

You're looking for makeWrapper here. If you do a search on github for makeWrapper + jre I'm sure you'll find a number of examples. If not, feel free to ask for further help.

sha256 = "1g5n7r2x4gas6dl2fbyh7v9yxdcb6bzml8n3ldmpzv1rncgjcdp4";
};

phases = [ "unpackPhase" "installPhase" ];
Copy link
Member

Choose a reason for hiding this comment

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

You should omit this as I believe it is or will be deprecated. Either way it isn't a good idea.

Stable URLs are only provided for older versions.
@unode
Copy link
Member Author

unode commented May 27, 2019

@aanderse thanks for the review. I implemented most of your suggestions with exception of the point about stable urls. Unfortunately given the link above, the lack of a stable url for the most recent version seems deliberate.

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

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

Not ideal, but OK, I think. And I can't see a simple way to improve. Building from source would be better of course.

@vcunat vcunat merged commit bd95c91 into NixOS:master Jun 9, 2019
vcunat added a commit that referenced this pull request Jun 9, 2019
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