mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
1844d4ad07
Fixes this build failure: Running desktop-file validation /nix/store/vadj03624kv6h963c7fjwdz1hg403aa9-system-syzygy.desktop/share/applications/system-syzygy.desktop: error: value "%out%/bin/syzygy" for key "Exec" in group "Desktop Entry" contains an invalid field code "%o" /nix/store/vadj03624kv6h963c7fjwdz1hg403aa9-system-syzygy.desktop/share/applications/system-syzygy.desktop: error: value "%out%/bin/syzygy" for key "Exec" in group "Desktop Entry" contains an invalid field code "%/" Signed-off-by: Anders Kaseorg <andersk@mit.edu>
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{lib, rustPlatform, fetchFromGitHub, fetchurl, SDL2, makeWrapper, makeDesktopItem}:
|
|
|
|
let
|
|
desktopFile = makeDesktopItem {
|
|
name = "system-syzygy";
|
|
exec = "@out@/bin/syzygy";
|
|
comment = "A puzzle game";
|
|
desktopName = "System Syzygy";
|
|
categories = "Game;";
|
|
};
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "system-syzygy";
|
|
version = "1.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mdsteele";
|
|
repo = "syzygy";
|
|
rev = "5ba148fed7aae14bf35108d7303e4194e8ffe5e8";
|
|
sha256 = "07mzwx8ql33q865snnw4gm3dgf0mnm60lnq1f5fgas2yjy9g9vwa";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ SDL2 ];
|
|
|
|
cargoSha256 = "001cwdq8zxji56yahwfsydi7s0j7c5zsip60lxk3qmn078wcipdp";
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/syzygy/
|
|
cp -r ${src}/data/* $out/share/syzygy/
|
|
wrapProgram $out/bin/syzygy --set SYZYGY_DATA_DIR $out/share/syzygy
|
|
mkdir -p $out/share/applications
|
|
substituteAll ${desktopFile}/share/applications/system-syzygy.desktop $out/share/applications/system-syzygy.desktop
|
|
'';
|
|
|
|
|
|
meta = with lib; {
|
|
description = "A story and a puzzle game, where you solve a variety of puzzle";
|
|
homepage = "https://mdsteele.games/syzygy";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.marius851000 ];
|
|
};
|
|
}
|