lol
1{ lib
2, stdenv
3, fetchFromGitLab
4, zip
5, love
6, makeWrapper
7, makeDesktopItem
8, copyDesktopItems
9, strip-nondeterminism
10}:
11
12stdenv.mkDerivation rec {
13 pname = "wireworld";
14 version = "unstable-2023-05-09";
15
16 src = fetchFromGitLab {
17 owner = "blinry";
18 repo = pname;
19 rev = "03b82bf5d604d6d4ad3c07b224583de6c396fd17";
20 hash = "sha256-8BshnGLuA8lmG9g7FU349DWKP/fZvlvjrQBau/LSJ4E=";
21 };
22
23 nativeBuildInputs = [
24 copyDesktopItems
25 makeWrapper
26 strip-nondeterminism
27 zip
28 ];
29
30 desktopItems = [
31 (makeDesktopItem {
32 name = "Wireworld";
33 exec = pname;
34 comment = "";
35 desktopName = "Wireworld";
36 genericName = "Wireworld";
37 categories = [ "Game" ];
38 })
39 ];
40
41 installPhase = ''
42 runHook preInstall
43 zip -9 -r Wireworld.love ./*
44 strip-nondeterminism --type zip Wireworld.love
45 install -Dm444 -t $out/share/games/lovegames/ Wireworld.love
46 makeWrapper ${love}/bin/love $out/bin/Wireworld \
47 --add-flags $out/share/games/lovegames/Wireworld.love
48 runHook postInstall
49 '';
50
51 meta = with lib; {
52 description = "Fascinating electronics logic puzzles, game where you'll learn how to build clocks, diodes, and logic gates";
53 license = with licenses; [
54 mit
55 ofl
56 blueOak100
57 cc-by-sa-30
58 cc-by-sa-40
59 ];
60 downloadPage = "https://ldjam.com/events/ludum-dare/53/wireworld";
61 maintainers = with lib.maintainers; [ janik ];
62 };
63
64}