generated from GarandPLG/rust-flake-template
8e67166c58
Export `block_title` and `helpers` with `pub mod` for external use. Add Nix improvements: version check hook, update script, install check. Include post‑install step to copy soundtracks and rename binary. Extend meta with platforms, mainProgram, and maintainer handling. Update docs to show required imports for block title helpers.
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
# fetchFromGitea,
|
|
pkg-config,
|
|
alsa-lib,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}: let
|
|
version = "0.1.0";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "war-in-tunnels";
|
|
inherit version;
|
|
|
|
src = ./.;
|
|
# src = fetchFromGitea {
|
|
# domain = "gitea.garandplg.com";
|
|
# owner = "GarandPLG";
|
|
# repo = "war-in-tunnels";
|
|
# tag = "v${version}";
|
|
# hash = lib.fakeHash;
|
|
# };
|
|
|
|
cargoHash = "sha256-Cv/sUzkiQuQS3ybg2glfXucIu+HtPi2brH/D7tqc3Mc=";
|
|
|
|
nativeBuildInputs = [pkg-config];
|
|
buildInputs = [alsa-lib];
|
|
|
|
nativeInstallCheckInputs = [versionCheckHook];
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script {};
|
|
|
|
postInstall = ''
|
|
cp -r soundtracks $out/bin
|
|
mv $out/bin/war_in_tunnels $out/bin/war-in-tunnels
|
|
'';
|
|
|
|
meta = {
|
|
description = "TUI underground game";
|
|
homepage = "https://gitea.garandplg.com/GarandPLG/war-in-tunnels";
|
|
license = lib.licenses.mit;
|
|
platforms = ["x86_64-linux"];
|
|
maintainers = with lib.maintainers; [
|
|
GarandPLG
|
|
];
|
|
mainProgram = "war-in-tunnels";
|
|
};
|
|
}
|