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

mailsy: init at 5.0.0 #332859

Merged
merged 2 commits into from
Aug 22, 2024
Merged

mailsy: init at 5.0.0 #332859

merged 2 commits into from
Aug 22, 2024

Conversation

404Wolf
Copy link

@404Wolf 404Wolf commented Aug 7, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Solves #331854

Not sure what to do for a test here. This is my first time contributing, I tried to follow the guides but I'm happy to fix up anything I inevitably messed up.

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

Comment on lines 25 to 35
meta = with lib; {
description = "Quickly generate a disposable email straight from terminal";
mainProgram = "mailsy";
homepage = "https://fig.io/manual/mailsy";
license = licenses.mit;
maintainers = [maintainers._404wolf];
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use with lib; (see #208242)

Suggested change
meta = with lib; {
description = "Quickly generate a disposable email straight from terminal";
mainProgram = "mailsy";
homepage = "https://fig.io/manual/mailsy";
license = licenses.mit;
maintainers = [maintainers._404wolf];
};
meta = {
description = "Quickly generate a disposable email straight from terminal";
mainProgram = "mailsy";
homepage = "https://fig.io/manual/mailsy";
license = lib.licenses.mit;
maintainers = [ lib.maintainers._404wolf ];
};


dontNpmBuild = true;

patches = [./fix-file-lookup.patch];
Copy link
Contributor

Choose a reason for hiding this comment

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

The patch is pretty simple, so we can just do this instead:

Suggested change
patches = [./fix-file-lookup.patch];
postPatch = ''
substituteInPlace utils/index.js \
--replace-fail 'dirname, "../data/account.json"' 'process.cwd(), "account.json"' \
--replace-fail 'dirname, "../data/email.html"' 'process.cwd() + "email.html"'
'';


npmDepsHash = "sha256-ljmqNmLvRHPdsKyOdDfECBXHTIExM6nPZF45lqV+pDM=";

npmFlags = ["--legacy-peer-deps"];
Copy link
Contributor

Choose a reason for hiding this comment

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

The file doesn't seem to be properly formatted. You should format it with nixfmt

Comment on lines 2 to 4
buildNpmPackage,
fetchFromGitHub,
lib,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more of a cosmetic thing (as far as I know), but lib is usually the first input of the derviation.

Suggested change
buildNpmPackage,
fetchFromGitHub,
lib,
lib,
buildNpmPackage,
fetchFromGitHub,

@eljamm
Copy link
Contributor

eljamm commented Aug 19, 2024

Also, the commit message is missing a :

-  mailsy init at 5.0.0
+  mailsy: init at 5.0.0

You should also change the PR title to this.

@404Wolf
Copy link
Author

404Wolf commented Aug 19, 2024

@eljamm Thank you very much for the feedback, I've gone ahead and made the suggested changes! :)

mailsy init at 5.0.0
@@ -0,0 +1,32 @@
{ lib, buildNpmPackage, fetchFromGitHub, }:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you used the wrong formatter. The nixfmt you should use is nixfmt-rfc-style

Suggested change
{ lib, buildNpmPackage, fetchFromGitHub, }:
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:

@eljamm
Copy link
Contributor

eljamm commented Aug 19, 2024

@404Wolf Thanks, can you also change the PR title to mailsy: init at 5.0.0 as well? This gives better context to which version mailsy was initialized from in the PR list.

@404Wolf 404Wolf changed the title Add mailsy mailsy: init at 5.0.0 Aug 19, 2024
Copy link
Contributor

@eljamm eljamm left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@404Wolf Just don't forget to remove the commit to add yourself as a maintainer from your other PR if this one gets merged first (and vice versa), else you'd be adding yourself twice (if a merge conflict doesn't happen).

That said, welcome to nixpkgs :)

@404Wolf
Copy link
Author

404Wolf commented Aug 20, 2024

Makes sense. Thank you! Your feedback and help has been really phenomenal

@SuperSandro2000 SuperSandro2000 merged commit 0c14315 into NixOS:master Aug 22, 2024
36 of 37 checks passed
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.

5 participants