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

mailspring: init at 1.7.8 #85492

Merged
merged 2 commits into from Jul 7, 2020
Merged

mailspring: init at 1.7.8 #85492

merged 2 commits into from Jul 7, 2020

Conversation

toschmidt
Copy link
Contributor

@toschmidt toschmidt commented Apr 18, 2020

Motivation for this change

Packaged the mail client Mailspring at version 1.7.5

Mailspring is a new version of Nylas Mail maintained by one of the original authors. It's faster, leaner, and shipping today!

Currently two pull requests for mailspring at version 1.6.3 exist: #69384 and #69027

Syncing mails does not work in #69384 and #69027 uses buildFHSUserEnv although only one file needs patching.

This PR is based on the work done by rummik in #69384 and solves both problems for the latest version of mailspring.

The application needs gnome-keyring for storing passwords.

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

cc @

@drewrisinger
Copy link
Contributor

Closes #69027 #69384
@GrahamcOfBorg build mailspring

Copy link
Contributor

@drewrisinger drewrisinger left a comment

Choose a reason for hiding this comment

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

Thanks for submitting your first PR! This looks like a well-researched PR. I'm honestly not terribly familiar with the Linux binary side of nixpkgs, but I know the general preference is to build packages from scratch in Nixpkgs if possible.

There's some formatting/best practices included below.
Also, when trying to review this, I ran into a merge conflict with the maintainers list (probably b/c you submitted a different PR & now there's a conflict). So please remove that commit from this with git rebase -i master. Reviewers can't easily test building this until that's fixed.

@toschmidt
Copy link
Contributor Author

@drewrisinger thanks for your review.

Also, when trying to review this, I ran into a merge conflict with the maintainers list (probably b/c you submitted a different PR & now there's a conflict). So please remove that commit from this with git rebase -i master. Reviewers can't easily test building this until that's fixed.

I removed myself from the maintainer list (it's my only PR so there should not be any conflict in that file). Before merging, we should probably revert that unless someone else wants to maintain the package. I also updated mailspring to the latest version (1.7.6) and applied your suggestions.

@drewrisinger
Copy link
Contributor

Oh, sorry. If this is actually your first package, then a commit adding yourself as maintainer IS appropriate. Just make sure that it merges with master branch. I recommend rebasing, dropping the revert commit, and then git push -f that fixed branch. You should resolve whatever merge commit the maintainer list pops up.

Builds locally with nixpkgs-review pr 85492

https://github.com/NixOS/nixpkgs/pull/85492
1 package built:
mailspring

@drewrisinger
Copy link
Contributor

Note: commits will also need squashed down to just the maintainer commit & mailspring: init at 1.7.6 (PR title should also be changed) before this PR is accepted/merged.

@toschmidt toschmidt changed the title mailspring: init at 1.7.5 mailspring: init at 1.7.6 Apr 29, 2020
@toschmidt
Copy link
Contributor Author

Ok, the PR should have no conflicts with master and I squashed all commits down.

Copy link
Contributor

@drewrisinger drewrisinger left a comment

Choose a reason for hiding this comment

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

Few small notes still to be resolved by someone who knows more about packaging .deb better than I.

Builds locally, not tested.
nixpkgs-review pr 85492

https://github.com/NixOS/nixpkgs/pull/85492
1 package built:
mailspring

@drewrisinger
Copy link
Contributor

Closes #69027

@drewrisinger
Copy link
Contributor

Closes #69384

@tyrion
Copy link

tyrion commented May 29, 2020

I tried upgrading this to the latest Mailspring release and it seems to work fine so far.
You just need to change the version and sha checksum:

  version = "1.7.8";

  src = fetchurl {
    url = "https://github.com/Foundry376/Mailspring/releases/download/${version}/mailspring-${version}-amd64.deb";
    sha256 = "207fbf813b6da018a5b848e5dc1194b5996daab39adbd873b2cecb0565c105ce";
  };

@toschmidt toschmidt changed the title mailspring: init at 1.7.6 mailspring: init at 1.7.8 Jun 4, 2020
Copy link
Contributor

@drewrisinger drewrisinger left a comment

Choose a reason for hiding this comment

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

  • Diff LGTM
  • Builds Locally
  • After build, GUI launches
  • Still not sure about best method when using dpkg, but seems to build fine.

@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-ready-for-review/3032/181

This was referenced Jun 18, 2020
Copy link
Contributor

@tobkratz tobkratz left a comment

Choose a reason for hiding this comment

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

I can get it work.
LGTM

@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/172

@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/181

Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this and sorry for having to wait so long for getting this merged. It seems that mailspring relies on wget for crash dumps:

$ wrapit --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 --dir /home/daniel --setenv DISPLAY :0 `realpath results/mailspring/bin/mailspring`
Fontconfig error: Cannot load default config file
Running database migrations
App load time: 145ms

Running Setup
{"error":null}
Cannot upload crash dump: cannot exec /usr/bin/wget
Failed to get crash dump id.
Report Id: 
Cannot upload crash dump: cannot exec /usr/bin/wget
Failed to get crash dump id.
Report Id: 

Could be something to fix for a future PR.

@danieldk danieldk merged commit e01b23f into NixOS:master Jul 7, 2020
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

7 participants