From 6a69cda1d53b9389af82cd8e0953b041c544a19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Sat, 2 Oct 2021 18:07:28 +0700 Subject: [PATCH] blackshades: 1.3.1 -> 2.4.7 --- pkgs/games/blackshades/default.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pkgs/games/blackshades/default.nix b/pkgs/games/blackshades/default.nix index bd29c7b616c4..76f22e98d9e9 100644 --- a/pkgs/games/blackshades/default.nix +++ b/pkgs/games/blackshades/default.nix @@ -1,29 +1,27 @@ { lib, stdenv, fetchFromSourcehut -, SDL, stb, libGLU, libGL, openal, libvorbis, freealut }: +, zig, glfw, libGLU, libGL, openal, libsndfile }: stdenv.mkDerivation rec { pname = "blackshades"; - version = "1.3.1"; + version = "2.4.7"; src = fetchFromSourcehut { owner = "~cnx"; repo = pname; rev = version; - sha256 = "0yzp74ynkcp6hh5m4zmvrgx5gwm186hq7p3m7qkww54qdyijb3rv"; + fetchSubmodules = true; + sha256 = "sha256-hvJwWUUmGeb7MQgKe79cPS2ckPZ9z0Yc5S9IiwuXPD8="; }; - buildInputs = [ SDL stb libGLU libGL openal libvorbis freealut ]; + nativeBuildInputs = [ zig ]; + buildInputs = [ glfw libGLU libGL openal libsndfile ]; - postPatch = '' - sed -i -e s,Data/,$out/share/$pname/,g \ - -e s,Data:,$out/share/$pname/,g \ - src/*.cpp + preBuild = '' + export HOME=$TMPDIR ''; installPhase = '' - mkdir -p $out/bin $out/share - cp build/blackshades $out/bin - cp -R Data $out/share/$pname + zig build -Drelease-fast -Dcpu=baseline --prefix $out install ''; meta = {