diff --git a/pkgs/by-name/ca/cadzinho/package.nix b/pkgs/by-name/ca/cadzinho/package.nix index f74f7b0e697a..9297ab87fb11 100644 --- a/pkgs/by-name/ca/cadzinho/package.nix +++ b/pkgs/by-name/ca/cadzinho/package.nix @@ -1,28 +1,34 @@ -{ lib, stdenv, fetchFromGitHub, SDL2, glew, lua5_4, desktopToDarwinBundle }: +{ lib, stdenv, fetchFromGitHub, SDL2, SDL2_net, glew, lua5_4, desktopToDarwinBundle }: stdenv.mkDerivation rec { pname = "cadzinho"; - version = "0.4.1"; + version = "0.5.0"; src = fetchFromGitHub { owner = "zecruel"; repo = "CadZinho"; rev = version; - hash = "sha256-6/sBNxQb52FFO2fWLVs6YDOmJLEbSOA5mwdMdJDjEDM="; + hash = "sha256-s2+k1TcmY3xwxXccHP7au71e0l3Qrso5XxmGGVvyIo0="; }; postPatch = '' - substituteInPlace src/gui_config.c --replace "/usr/share/cadzinho" "$out/share/cadzinho" + substituteInPlace src/gui_config.c --replace-fail "/usr/share/cadzinho" "$out/share/cadzinho" + substituteInPlace Makefile --replace-fail "-lGLEW" "-lGLEW -lSDL2_net" ''; nativeBuildInputs = lib.optional stdenv.isDarwin desktopToDarwinBundle; - buildInputs = [ SDL2 glew lua5_4 ]; + buildInputs = [ SDL2 SDL2_net glew lua5_4 ]; makeFlags = [ "CC:=$(CC)" ]; - # https://github.com/llvm/llvm-project/issues/62254 - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-builtin-strrchr"; + env.NIX_CFLAGS_COMPILE = toString ([ + "-I${SDL2.dev}/include/SDL2" + "-I${SDL2_net.dev}/include/SDL2" + ] ++ lib.optionals stdenv.isDarwin [ + # https://github.com/llvm/llvm-project/issues/62254 + "-fno-builtin-strrchr" + ]); hardeningDisable = [ "format" ];