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

ledger-live-desktop: init at 1.12.0 #62753

Merged

Conversation

thedavidmeister
Copy link
Contributor

@thedavidmeister thedavidmeister commented Jun 6, 2019

Motivation for this change

Adds ledger live desktop, the app that manages ledger S/X/blue

https://www.ledger.com/

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.

pkgs/applications/altcoins/ledger-live-desktop/default.nix Outdated Show resolved Hide resolved
'';

meta = with stdenv.lib; {
description = "Ledger Live (Desktop)";
Copy link
Contributor

Choose a reason for hiding this comment

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

The description shouldn't really be the name of the package. I found "The companion to your Ledger hardware wallet" on their website but that's more of a slogan so there is almost certainly something better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexarice this is the description pasted from their github repo

Copy link
Contributor

Choose a reason for hiding this comment

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

meta.description should:

Be capitalized.
Not start with the package name.
Not have a period at the end.

This is what contributing.md says and it doesn't seem like a helpful description, even if it is the description on their github

pkgs/applications/altcoins/ledger-live-desktop/default.nix Outdated Show resolved Hide resolved
pkgs/applications/altcoins/ledger-live-desktop/default.nix Outdated Show resolved Hide resolved
buildInputs = [ appimage-run ];

unpackPhase = ":";
preInstall = ":";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexarice like this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@alexarice
Copy link
Contributor

alexarice commented Jun 10, 2019

You will need to squash the commits into one adding yourself as a maintainer and one adding the package at some point
Edit: I didn't read the changes carefully enough, I assume you are already on the maintainers list so its just everything else will need to be squashed to one commit

@thedavidmeister
Copy link
Contributor Author

@alexarice squashed, we good?

@alexarice
Copy link
Contributor

I have already approved and cannot do anything else

Update pkgs/applications/altcoins/ledger-live-desktop/default.nix

Co-Authored-By: Benjamin Hipple <bhipple@protonmail.com>
add preInstall and postInstall for ledger-live-desktop

updated longDescription for ledger-live-desktop

resolving feedback
@lukateras lukateras force-pushed the 2019-06-06-ledger-live-desktop branch from 4cf3187 to 659e3f7 Compare August 3, 2019 14:16
@lukateras
Copy link
Member

@GrahamcOfBorg build ledger-live-desktop

Copy link
Member

@lukateras lukateras left a comment

Choose a reason for hiding this comment

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

I'm going to push a commit that addresses this review, please check and tell if you're comfortable with it. Note that it also adds an XDG desktop item.

description = ''
The companion to your Ledger hardware wallet
Easily set up and manage your Ledger device
'';
Copy link
Member

Choose a reason for hiding this comment

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

description should probably fit a single line. This is what https://nixos.org/nixos/packages.html will end up rendering.

The companion to your Ledger hardware wallet
Easily set up and manage your Ledger device
'';
homepage = https://www.ledger.com/live;
Copy link
Member

Choose a reason for hiding this comment

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

cp $src $out/share/${pname}
echo "#!${runtimeShell}" > $out/bin/${pname}
echo "${appimage-run}/bin/appimage-run $out/share/${pname}" >> $out/bin/${pname}
chmod +x $out/bin/${pname} $out/share/${pname}
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 something makeWrapper is a good fit for, as an example:

makeWrapper ${jre}/bin/java $out/bin/tlc2 \
--add-flags "-cp $out/share/java/tla2tools.jar tlc2.TLC"

}:

stdenv.mkDerivation rec {
github-user = "LedgerHQ";
Copy link
Member

Choose a reason for hiding this comment

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

Variables should use camelCase (unlike package names, which use hyphens), see Nixpkgs manual: https://nixos.org/nixpkgs/manual/#sec-syntax

Also, it would make more sense to have it inlined into url, given this is not something that other Nixpkgs packages do.

FTR, if you are interested into something more convenient than fetchurl for fetching GitHub releases, it might make sense to have something like fetchGitHubRelease with options similar to those found in fetchFromGitHub.

@lukateras
Copy link
Member

@GrahamcOfBorg build ledger-live-desktop

@lukateras lukateras changed the title ledger-live-desktop: init at 1.9.1 ledger-live-desktop: init at 1.12.0 Aug 3, 2019
@thedavidmeister
Copy link
Contributor Author

@yegortimoshenko i'm happy with your changes, let's merge :)

@lukateras lukateras merged commit 60358cd into NixOS:master Aug 4, 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

4 participants