Merge pull request #308815 from LordGrimmauld/powder_update
the-powder-toy: 97.0.352 -> 98.2.365
This commit is contained in:
commit
785fe8efb8
75
pkgs/by-name/th/the-powder-toy/package.nix
Normal file
75
pkgs/by-name/th/the-powder-toy/package.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{
|
||||||
|
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.isLinux copyDesktopItems;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
bzip2
|
||||||
|
curl
|
||||||
|
fftwFloat
|
||||||
|
jsoncpp
|
||||||
|
libpng
|
||||||
|
lua
|
||||||
|
luajit
|
||||||
|
SDL2
|
||||||
|
zlib
|
||||||
|
] ++ lib.optional stdenv.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 = "A free 2D physics sandbox game";
|
||||||
|
homepage = "https://powdertoy.co.uk/";
|
||||||
|
platforms = platforms.unix;
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
abbradar
|
||||||
|
siraben
|
||||||
|
];
|
||||||
|
mainProgram = "powder";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,65 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, fetchFromGitHub
|
|
||||||
, fetchpatch
|
|
||||||
, meson
|
|
||||||
, ninja
|
|
||||||
, pkg-config
|
|
||||||
, python3
|
|
||||||
, SDL2
|
|
||||||
, bzip2
|
|
||||||
, curl
|
|
||||||
, fftwFloat
|
|
||||||
, lua
|
|
||||||
, luajit
|
|
||||||
, zlib
|
|
||||||
, jsoncpp
|
|
||||||
, libpng
|
|
||||||
, Cocoa }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "the-powder-toy";
|
|
||||||
version = "97.0.352";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "The-Powder-Toy";
|
|
||||||
repo = "The-Powder-Toy";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-LYohsqFU9LBgTXMaV6cf8/zf3fBvT+s5A1JBpPHekH8=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix gcc-13 build failure:
|
|
||||||
# https://github.com/The-Powder-Toy/The-Powder-Toy/pull/898
|
|
||||||
(fetchpatch {
|
|
||||||
name = "gcc-13.patch";
|
|
||||||
url = "https://github.com/The-Powder-Toy/The-Powder-Toy/commit/162bce9a1036e0c233399941410364c4a4370980.patch";
|
|
||||||
hash = "sha256-oQNwKemV3BjMLSUd6zMCKqiClcc3Ouxwn3jagf/Q1/I=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ meson ninja pkg-config python3 ];
|
|
||||||
|
|
||||||
buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib jsoncpp libpng ]
|
|
||||||
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
|
||||||
|
|
||||||
mesonFlags = [ "-Dworkaround_elusive_bzip2=false" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -Dm 755 powder $out/bin/powder
|
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
|
||||||
mv ../resources $out/share
|
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
|
||||||
mv ./resources/powder.desktop $out/share/applications
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A free 2D physics sandbox game";
|
|
||||||
homepage = "https://powdertoy.co.uk/";
|
|
||||||
platforms = platforms.unix;
|
|
||||||
license = licenses.gpl3Plus;
|
|
||||||
maintainers = with maintainers; [ abbradar siraben ];
|
|
||||||
mainProgram = "powder";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -37473,8 +37473,8 @@ with pkgs;
|
||||||
|
|
||||||
tcl2048 = callPackage ../games/tcl2048 { };
|
tcl2048 = callPackage ../games/tcl2048 { };
|
||||||
|
|
||||||
the-powder-toy = callPackage ../games/the-powder-toy {
|
the-powder-toy = callPackage ../by-name/th/the-powder-toy/package.nix {
|
||||||
lua = lua5_1;
|
lua = lua5_2;
|
||||||
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user