Skip to content

Commit

Permalink
shtris: init at 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiangmoe committed Jan 30, 2025
1 parent d1f5bf3 commit c8565aa
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions pkgs/by-name/sh/shtris/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
stdenvNoCC.mkDerivation(finalAttrs: {
pname = "shtris";
version = "3.0.0";

src = fetchFromGitHub {
owner = "ContentsViewer";
repo = "shtris";
tag = "v${finalAttrs.version}";
hash = "sha256-lAuDM6461fR+i3KkgcCcytRT6llSj0kEoqK6N8Q3kVI=";
};

dontConfigure = true;

installPhase = ''
runHook preInstall
install -Dm555 shtris $out/bin/shtris
runHook postInstall
'';

nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;

passthru.updateScript = nix-update-script { };

meta = {
description = "The pure shell script (sh) that implements the Tetris game following the Tetris Guideline (2009)";
homepage = "https://github.com/ContentsViewer/shtris";
changelog = "https://github.com/ContentsViewer/shtris/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
mainProgram = "tetris";
};
})

0 comments on commit c8565aa

Please sign in to comment.