Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions pkgs/by-name/mj/mjmap/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromSourcehut,
unstableGitUpdater,
}:

buildGoModule {
pname = "mjmap";
version = "0.1.0-unstable-2023-11-13";

src = fetchFromSourcehut {
owner = "~rockorager";
repo = "mjmap";
rev = "d54badae8152b4db6eec8b03a7bd7c5ff1724aa7";
hash = "sha256-yFYYnklNNOHTfoT54kOIVoM4t282/0Ir4l72GmqlGSY=";
};

vendorHash = "sha256-fJuPrzjRH0FpYj2D9CsFdsdzYT0C3/D2PhmJIZTsgfQ=";

installCheckPhase = ''
runHook preInstallCheck

$out/bin/mjmap --version >/dev/null

runHook postInstallCheck
'';
Comment on lines +21 to +27
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this is best expressed through a versionCheckHook or passthru.tests.version = testVersion?

Copy link
Member Author

@emilazy emilazy Oct 14, 2024

Choose a reason for hiding this comment

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

Nope, because it reports its version as 0.0.0 🫠

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

I could add an explanatory comment, though.


passthru.updateScript = unstableGitUpdater {
tagPrefix = "v.";
};

meta = {
description = "Sendmail‐compatible JMAP client";
homepage = "https://git.sr.ht/~rockorager/mjmap";
license = lib.licenses.mpl20;
sourceProvenance = [ lib.sourceTypes.fromSource ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this the default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, as is license = lib.licenses.free;. See #329470 (comment), #330741 (comment), and #332035 (comment) for my thoughts on this. Hopefully, in the future, both license and sourceProvenance will be mandatory fields.

maintainers = [ lib.maintainers.emily ];
mainProgram = "mjmap";
platforms = lib.platforms.unix;
};
}