depot/pkgs/by-name/th/the-powder-toy/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

75 lines
1.3 KiB
Nix

{
bzip2,
Cocoa,
copyDesktopItems,
curl,
fetchFromGitHub,
fftwFloat,
jsoncpp,
lib,
libpng,
lua,
luajit,
meson,
ninja,
pkg-config,
SDL2,
stdenv,
zlib,
}:
stdenv.mkDerivation rec {
pname = "the-powder-toy";
version = "98.2.365";
src = fetchFromGitHub {
owner = "The-Powder-Toy";
repo = "The-Powder-Toy";
rev = "refs/tags/v${version}";
hash = "sha256-S2aUa25EnUfX6ShW6D+wHrsTLxTcCFcZ/uLE9EWGu4Q=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems;
buildInputs = [
bzip2
curl
fftwFloat
jsoncpp
libpng
lua
luajit
SDL2
zlib
] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa;
mesonFlags = [ "-Dworkaround_elusive_bzip2=false" ];
installPhase = ''
runHook preInstall
install -Dm 755 powder $out/bin/powder
mkdir -p $out/share
mv ../resources $out/share
runHook postInstall
'';
desktopItems = [ "resources/powder.desktop" ];
meta = with lib; {
description = "Free 2D physics sandbox game";
homepage = "https://powdertoy.co.uk/";
platforms = platforms.unix;
license = licenses.gpl3Plus;
maintainers = with maintainers; [
abbradar
siraben
];
mainProgram = "powder";
};
}