curseofwar: move to pkgs/by-name

this shouldn't create any rebuilds
This commit is contained in:
quantenzitrone 2026-01-22 07:39:22 +01:00
parent d9bb201fe4
commit ae6b3ca429
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View file

@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
withSDL ? false,
ncurses,
SDL,
}:
@ -19,10 +20,10 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
ncurses
SDL
(if withSDL then SDL else null)
];
makeFlags = (lib.optionals (SDL != null) [ "SDL=yes" ]) ++ [
makeFlags = (lib.optional withSDL "SDL=yes") ++ [
"PREFIX=$(out)"
# force platform's cc on darwin, otherwise gcc is used
"CC=${stdenv.cc.targetPrefix}cc"
@ -32,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
description = "Fast-paced action strategy game";
homepage = "https://a-nikolaev.github.io/curseofwar/";
license = lib.licenses.gpl3;
mainProgram = if SDL != null then "curseofwar-sdl" else "curseofwar";
mainProgram = if withSDL then "curseofwar-sdl" else "curseofwar";
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
};

View file

@ -12203,8 +12203,10 @@ with pkgs;
tileMode = true;
};
curseofwar = callPackage ../games/curseofwar { SDL = null; };
curseofwar-sdl = callPackage ../games/curseofwar { ncurses = null; };
curseofwar-sdl = curseofwar.override {
withSDL = true;
ncurses = null;
};
ddnet-server = ddnet.override { buildClient = false; };