git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108990 from iblech/patch-bb

koules: init at 1.4

commitc804ddb129c536c100cc9876f3d87197d1a6be0e authorAnderson Torres <torres.anderson.85@protonmail.com> dateThu 7 Apr 2022, 21:59 (5 years ago) parent8d486e403b659b
2 files changed+78
pkgs/games/koules/default.nix+76 pkgs/top-level/all-packages.nix+2
pkgs/games/koules/default.nixnew file+76
@@ -0,0 +1,76 @@
1+{ stdenv
2+, lib
3+, fetchurl
4+, fetchzip
5+, makeDesktopItem
6+, copyDesktopItems
7+, imake
8+, gccmakedep
9+, libX11
10+, libXext
11+, installShellFiles
12+}:
13+
14+let
15+ debian-extras = fetchzip {
16+ url = "mirror://debian/pool/main/k/koules/koules_1.4-27.debian.tar.xz";
17+ sha256 = "0bq1rr6vxqmx2k0dhyrqnwwfiw4h2ycbj576v66vwr0jaq5plil3";
18+ };
19+in
20+
21+stdenv.mkDerivation rec {
22+ pname = "koules";
23+ version = "1.4";
24+
25+ src = fetchurl {
26+ url = "https://www.ucw.cz/~hubicka/koules/packages/${pname}${version}-src.tar.gz";
27+ sha256 = "06x2wkpns14kii9fxmxbmj5lma371qj00hgl7fc5kggfmzz96vy3";
28+ };
29+
30+ nativeBuildInputs = [ imake gccmakedep installShellFiles copyDesktopItems ];
31+ buildInputs = [ libX11 libXext ];
32+
33+ # Debian maintains lots of patches for koules. Let's include all of them.
34+ prePatch = ''
35+ patches="$patches $(cat ${debian-extras}/patches/series | sed 's|^|${debian-extras}/patches/|')"
36+ '';
37+
38+ postPatch = ''
39+ # We do not want to depend on that particular font to be available in the
40+ # xserver, hence substitute it by a font which is always available
41+ sed -ie 's:-schumacher-clean-bold-r-normal--8-80-75-75-c-80-\*iso\*:fixed:' xlib/init.c
42+ '';
43+
44+ preBuild = ''
45+ cp xkoules.6 xkoules.man # else "make" will not succeed
46+ sed -ie "s:^SOUNDDIR\s*=.*:SOUNDDIR=$out/lib:" Makefile
47+ sed -ie "s:^KOULESDIR\s*=.*:KOULESDIR=$out:" Makefile
48+ '';
49+
50+ installPhase = ''
51+ runHook preInstall
52+ install -Dm755 xkoules $out/bin/xkoules
53+ install -Dm755 koules.sndsrv.linux $out/lib/koules.sndsrv.linux
54+ install -m644 sounds/* $out/lib/
55+ install -Dm644 Koules.xpm $out/share/pixmaps/koules.xpm
56+ installManPage xkoules.6
57+ runHook postInstall
58+ '';
59+
60+ desktopItems = [ (makeDesktopItem {
61+ desktopName = "Koules";
62+ name = "koules";
63+ exec = "xkoules";
64+ icon = "koules";
65+ comment = "Push your enemies away, but stay away from obstacles";
66+ categories = [ "Game" "ArcadeGame" ];
67+ }) ];
68+
69+ meta = with lib; {
70+ description = "Fast arcade game based on the fundamental law of body attraction";
71+ homepage = "https://www.ucw.cz/~hubicka/koules/English/";
72+ license = licenses.gpl2Plus;
73+ platforms = platforms.linux;
74+ maintainers = [ maintainers.iblech ];
75+ };
76+}
pkgs/top-level/all-packages.nix+2
@@ -31335,6 +31335,8 @@ with pkgs;
3133531335 useProprietaryAssets = false;
3133631336 };
3133731337
31338+ koules = callPackage ../games/koules { };
31339+
3133831340 leela-zero = libsForQt5.callPackage ../games/leela-zero { };
3133931341
3134031342 legendary-gl = python38Packages.callPackage ../games/legendary-gl { };