honey-home: init at 0-unstable-2022-10-25 (#410606)

authored by Arne Keller and committed by GitHub ce82f456 dfa87d11

+92
+92
pkgs/by-name/ho/honey-home/package.nix
··· 1 + { 2 + lib, 3 + zip, 4 + love, 5 + imagemagick, 6 + strip-nondeterminism, 7 + copyDesktopItems, 8 + fetchFromGitHub, 9 + fetchpatch2, 10 + makeDesktopItem, 11 + makeBinaryWrapper, 12 + stdenv, 13 + }: 14 + 15 + stdenv.mkDerivation (finalAttrs: { 16 + pname = "honey-home"; 17 + version = "0-unstable-2022-10-25"; 18 + 19 + # submodules have git@github.com which doesn't work 20 + # error: cannot run ssh: No such file or directory 21 + # this override is required to fetch them via https 22 + src = 23 + (fetchFromGitHub { 24 + owner = "dvdfu"; 25 + repo = "ld38"; 26 + rev = "45bb4bde8a667ee8cfb5034345bec90f70eb3b91"; 27 + hash = "sha256-m8dyCoudTJDfP0KGcoA0Xj5LmRwN/8YOfEwiwCa8sOE="; 28 + fetchSubmodules = true; 29 + }).overrideAttrs 30 + (_: { 31 + GIT_CONFIG_COUNT = 1; 32 + GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf"; 33 + GIT_CONFIG_VALUE_0 = "git@github.com:"; 34 + }); 35 + 36 + patches = [ 37 + # follow https://github.com/dvdfu/ld38/pull/58 and remove if ever merged 38 + (fetchpatch2 { 39 + url = "https://github.com/dvdfu/ld38/commit/808537065a8dacc903e3d704b381f61b11f91d47.patch?full_index=1"; 40 + hash = "sha256-iXFQWRU2hbKjVGjkwZKgxckRpr3/DUXczNNuMz48ktA="; 41 + }) 42 + ]; 43 + 44 + nativeBuildInputs = [ 45 + copyDesktopItems 46 + makeBinaryWrapper 47 + imagemagick 48 + strip-nondeterminism 49 + zip 50 + ]; 51 + 52 + desktopItems = [ 53 + (makeDesktopItem { 54 + name = "Honey Home"; 55 + exec = "honey-home"; 56 + icon = "honey-home"; 57 + comment = "Save the bees in this tiny world"; 58 + desktopName = "Honey Home"; 59 + genericName = "Honey Home"; 60 + categories = [ "Game" ]; 61 + }) 62 + ]; 63 + 64 + installPhase = '' 65 + runHook preInstall 66 + mkdir -p $out/share/pixmaps 67 + # generate a logo as the title logo in the readme is too wide for an app icon 68 + magick \ 69 + res/tree_hive.png \ 70 + res/hud_bee.png -gravity Center -geometry -8+15 -composite \ 71 + res/hud_bee.png -gravity Center -geometry -24+8 -composite \ 72 + honey-home-logo.png 73 + install -Dm644 honey-home-logo.png $out/share/pixmaps/honey-home.png 74 + rm honey-home-logo.png 75 + zip -9 -r honey-home.love ./* 76 + strip-nondeterminism --type zip honey-home.love 77 + install -Dm444 -t $out/share/games/lovegames/ honey-home.love 78 + makeWrapper ${love}/bin/love $out/bin/honey-home \ 79 + --add-flags $out/share/games/lovegames/honey-home.love 80 + runHook postInstall 81 + ''; 82 + 83 + meta = { 84 + homepage = "https://github.com/dvdfu/ld38"; 85 + downloadPage = "https://dvdfu.itch.io/honey-home"; 86 + description = "A game where you save the bees, Ludum Dare 38 Game Jam winner"; 87 + license = lib.licenses.unfreeRedistributable; # best guess as it is source available 88 + platforms = love.meta.platforms; 89 + mainProgram = "honey-home"; 90 + maintainers = with lib.maintainers; [ phanirithvij ]; 91 + }; 92 + })