cadzinho: 0.4.1 → 0.5.0
This commit is contained in:
parent
106b852a30
commit
9525044c7c
1 changed files with 13 additions and 7 deletions
|
@ -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)" ];
|
||||
|
||||
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
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-builtin-strrchr";
|
||||
"-fno-builtin-strrchr"
|
||||
]);
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue