2023-05-09 22:31:23 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, zip
|
|
|
|
, love
|
|
|
|
, makeWrapper
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
2023-06-10 05:26:13 +01:00
|
|
|
, strip-nondeterminism
|
2023-05-09 22:31:23 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wireworld";
|
|
|
|
version = "unstable-2023-05-09";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "blinry";
|
|
|
|
repo = pname;
|
|
|
|
rev = "03b82bf5d604d6d4ad3c07b224583de6c396fd17";
|
|
|
|
hash = "sha256-8BshnGLuA8lmG9g7FU349DWKP/fZvlvjrQBau/LSJ4E=";
|
|
|
|
};
|
|
|
|
|
2023-06-10 05:24:55 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
copyDesktopItems
|
|
|
|
makeWrapper
|
2023-06-10 05:26:13 +01:00
|
|
|
strip-nondeterminism
|
2023-06-10 05:24:55 +01:00
|
|
|
zip
|
|
|
|
];
|
2023-05-09 22:31:23 +01:00
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "Wireworld";
|
|
|
|
exec = pname;
|
|
|
|
comment = "";
|
|
|
|
desktopName = "Wireworld";
|
|
|
|
genericName = "Wireworld";
|
|
|
|
categories = [ "Game" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
zip -9 -r Wireworld.love ./*
|
2023-06-10 05:26:13 +01:00
|
|
|
strip-nondeterminism --type zip Wireworld.love
|
2023-05-09 22:31:23 +01:00
|
|
|
install -Dm444 -t $out/share/games/lovegames/ Wireworld.love
|
|
|
|
makeWrapper ${love}/bin/love $out/bin/Wireworld \
|
|
|
|
--add-flags $out/share/games/lovegames/Wireworld.love
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fascinating electronics logic puzzles, game where you'll learn how to build clocks, diodes, and logic gates";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "Wireworld";
|
2023-05-09 22:31:23 +01:00
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
ofl
|
|
|
|
blueOak100
|
|
|
|
cc-by-sa-30
|
|
|
|
cc-by-sa-40
|
|
|
|
];
|
|
|
|
downloadPage = "https://ldjam.com/events/ludum-dare/53/wireworld";
|
2024-04-27 13:37:51 +01:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2023-05-09 22:31:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|