Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

75 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
makeWrapper,
ninja,
SDL2,
SDL2_image,
SDL2_mixer,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "biplanes-revival";
version = "1.2.1";
src = fetchFromGitHub {
owner = "regular-dev";
repo = "biplanes-revival";
tag = "v${finalAttrs.version}";
hash = "sha256-rdPcI4j84fVKNwv2OQ9gwC0X2CHlObYfSYkCMlcm4sM=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
makeWrapper
ninja
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
];
strictDeps = true;
postInstall = ''
id="org.regular_dev.biplanes_revival"
install -Dm644 $src/flatpak-data/$id.desktop -t $out/share/applications
install -Dm644 $src/flatpak-data/$id.metainfo.xml -t $out/share/metainfo
install -Dm644 $src/flatpak-data/$id.svg -t $out/share/icons/hicolor/scalable/apps
# Move assets directory into the preferred location.
mkdir -p $out/share/biplanes-revival
mv $out/bin/assets $out/share/biplanes-revival
# Remove TimeUtils headers.
rm -rf $out/include
'';
postFixup = ''
# Set assets root, the default is the current working directory.
# The game automatically appends "/assets" to the variable.
wrapProgram $out/bin/BiplanesRevival \
--set BIPLANES_ASSETS_ROOT "$out/share/biplanes-revival";
'';
env.NIX_CFLAGS_COMPILE = "-I ../deps/TimeUtils/include";
passthru.updateScript = nix-update-script { };
meta = {
mainProgram = "BiplanesRevival";
description = "Old cellphone arcade recreated for PC";
homepage = "https://regular-dev.org/biplanes-revival";
changelog = "https://github.com/regular-dev/biplanes-revival/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = [ ];
};
})