mastermind: init at 1.0.0 (#499048)

This commit is contained in:
Pol Dellaiera
2026-03-12 17:50:06 +00:00
committed by GitHub
+47
View File
@@ -0,0 +1,47 @@
{
lib,
rustPlatform,
fetchFromGitHub,
# nativeBuildInputs
installShellFiles,
scdoc,
# nativeInstallCheckInputs
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mastermind";
version = "1.0.0";
src = fetchFromGitHub {
owner = "mahyarmirrashed";
repo = "mastermind";
tag = "v${finalAttrs.version}";
hash = "sha256-WWM3OnPJm5BvD2l5KnKrlfKqvMcyrpStcji1joq28hg=";
};
cargoHash = "sha256-N6zjgcaJRwRdmvIXzwFeiW1YCpRV6P2P7uj7D2EK0IQ=";
nativeBuildInputs = [
installShellFiles
scdoc
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
postInstall = ''
scdoc < doc/mastermind.6.scd > mastermind.6
installManPage mastermind.6
'';
meta = {
description = "A game of cunning and logic";
homepage = "https://github.com/mahyarmirrashed/mastermind";
license = lib.licenses.mit;
mainProgram = "mastermind";
maintainers = with lib.maintainers; [ mahyarmirrashed ];
};
})