From 92432797bd4a2025ca8239132081dba912cff306 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 7 Oct 2021 16:35:08 +0200 Subject: [PATCH 1/3] angelscript: 2.35.0 -> 2.35.1 --- .../interpreters/angelscript/default.nix | 26 ++++++++----------- .../interpreters/angelscript/default.upstream | 4 --- 2 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 pkgs/development/interpreters/angelscript/default.upstream diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix index 9a6aae053f9d..abd680ad2342 100644 --- a/pkgs/development/interpreters/angelscript/default.nix +++ b/pkgs/development/interpreters/angelscript/default.nix @@ -1,20 +1,17 @@ -{ lib, stdenv, fetchurl, unzip, cmake }: -let - s = # Generated upstream information - rec { - baseName="angelscript"; - version = "2.35.0"; - name="${baseName}-${version}"; - url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; - sha256 = "sha256-AQ3UXiPnNNRvWJHXDiaGB6EsuasSUD3aQvhC2dt+iFc="; - }; +{ lib +, stdenv +, fetchurl +, unzip +, cmake +}: -in -stdenv.mkDerivation { - inherit (s) name version; +stdenv.mkDerivation rec { + pname = "angelscript"; + version = "2.35.1"; src = fetchurl { - inherit (s) url sha256; + url = "https://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; + sha256 = "12x12fs2bjkbh73n2w84wnqhg6xn6mnp6g79gbkwfl6gssv9c42w"; }; nativeBuildInputs = [ unzip cmake ]; @@ -32,7 +29,6 @@ stdenv.mkDerivation { ''; meta = with lib; { - inherit (s) version; description = "Light-weight scripting library"; license = licenses.zlib; maintainers = with maintainers; [ raskin ]; diff --git a/pkgs/development/interpreters/angelscript/default.upstream b/pkgs/development/interpreters/angelscript/default.upstream deleted file mode 100644 index 7dbe527b276c..000000000000 --- a/pkgs/development/interpreters/angelscript/default.upstream +++ /dev/null @@ -1,4 +0,0 @@ -url http://www.angelcode.com/angelscript/downloads.html -version_link '[.]zip$' -version '.*_([0-9.]+)[.].*' '\1' -do_overwrite () { do_overwrite_just_version ; } From 781972b22f25e721d745b712aff4ec1a2f9c64ac Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 7 Oct 2021 16:36:07 +0200 Subject: [PATCH 2/3] libopenglrecorder: init at unstable-2020-08-13 --- .../libraries/libopenglrecorder/default.nix | 46 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/libraries/libopenglrecorder/default.nix diff --git a/pkgs/development/libraries/libopenglrecorder/default.nix b/pkgs/development/libraries/libopenglrecorder/default.nix new file mode 100644 index 000000000000..05616dd7c984 --- /dev/null +++ b/pkgs/development/libraries/libopenglrecorder/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, libjpeg +, libvpx +, openh264 +, withPulse ? stdenv.hostPlatform.isLinux +, libpulseaudio +, libvorbis +}: + +stdenv.mkDerivation rec { + pname = "libopenglrecorder"; + version = "unstable-2020-08-13"; + + src = fetchFromGitHub { + owner = "Benau"; + repo = "libopenglrecorder"; + rev = "c1b81ce26e62fae1aaa086b5cd337cb12361ea3d"; + sha256 = "13s2d7qs8z4w0gb3hx03n97xmwl07d4s473m4gw90qcvmz217kiz"; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libjpeg + libvpx + openh264 + ] ++ lib.optionals withPulse [ + libpulseaudio + libvorbis + ]; + + meta = with lib; { + description = "Library allowing Optional async readback OpenGL frame buffer with optional audio recording"; + homepage = "https://github.com/Benau/libopenglrecorder"; + license = licenses.bsd3; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = with platforms; windows ++ linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c542955a6c7..70dcaa6cee71 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17693,6 +17693,8 @@ with pkgs; libopenaptx = callPackage ../development/libraries/libopenaptx { }; + libopenglrecorder = callPackage ../development/libraries/libopenglrecorder { }; + libopus = callPackage ../development/libraries/libopus { }; libopusenc = callPackage ../development/libraries/libopusenc { }; From 23dab135572c6d4bfa3b11ca976f53e1a2f2fc31 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 7 Oct 2021 08:30:10 +0200 Subject: [PATCH 3/3] superTuxKart: 1.2 -> 1.3 --- pkgs/games/super-tux-kart/default.nix | 54 +++++++++++++-------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/pkgs/games/super-tux-kart/default.nix b/pkgs/games/super-tux-kart/default.nix index 3589e10e7a53..248db620fe11 100644 --- a/pkgs/games/super-tux-kart/default.nix +++ b/pkgs/games/super-tux-kart/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , fetchsvn , cmake , pkg-config @@ -20,15 +19,17 @@ , mcpp , wiiuse , angelscript +, libopenglrecorder +, sqlite , Cocoa , IOKit +, libsamplerate }: let - dir = "stk-code"; assets = fetchsvn { url = "https://svn.code.sf.net/p/supertuxkart/code/stk-assets"; - rev = "18218"; - sha256 = "11iv3cqzvbjg33zz5i5gkl2syn6mlw9wqv0jc7h36vjnjqjv17xw"; + rev = "18464"; + sha256 = "1a84j3psl4cxzkn5ynakpjill7i2f9ki2p729bpmbrvg8fki95aa"; name = "stk-assets"; }; @@ -44,45 +45,35 @@ let # has been fixed to support it. "enet" # Internal library of STK, nothing to do about it + "graphics_engine" + # Internal library of STK, nothing to do about it "graphics_utils" # This irrlicht is bundled with cmake # whereas upstream irrlicht still uses # archaic Makefiles, too complicated to switch to. "irrlicht" # Not packaged to this date - "libraqm" - # Not packaged to this date "libsquish" # Not packaged to this date "sheenbidi" - ] - # Our system angelscript causes linking error on ARM - # ld: libangelscript.so: undefined reference to - # `CallSystemFunctionNative(asCContext*, asCScriptFunction*, void*, unsigned int*, void*, unsigned long&, void*)' - # Bundled angelscript compiles fine - ++ lib.optional stdenv.hostPlatform.isAarch64 "angelscript"; + # Not packaged to this date + "tinygettext" + # Not packaged to this date (needed on Darwin) + "mojoal" + ]; in stdenv.mkDerivation rec { pname = "supertuxkart"; - version = "1.2"; + version = "1.3"; src = fetchFromGitHub { owner = "supertuxkart"; repo = "stk-code"; rev = version; - sha256 = "1f98whk0v45jgwcsbdsb1qfambvrnbbgwq0w28kjz4278hinwzq6"; - name = dir; + sha256 = "1llyxkdc4m9gnjxqaxlpwvv3ayvpw2bfjzfkkrljaxhznq811g0l"; }; - patches = [ - (fetchpatch { - # Fix build with SDL 2.0.14 - url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch?id=288360dc7ce2f968a2f12099edeace3f3ed1a705"; - sha256 = "1jgab9393qan8qbqf5bf8cgw4mynlr5a6pggqhybzsmaczgnns3n"; - }) - ]; - postPatch = '' # Deletes all bundled libs in stk-code/lib except those # That couldn't be replaced with system packages @@ -93,7 +84,11 @@ stdenv.mkDerivation rec { --replace 'NOT (APPLE OR HAIKU)) AND USE_SYSTEM_WIIUSE' 'NOT (HAIKU)) AND USE_SYSTEM_WIIUSE' ''; - nativeBuildInputs = [ cmake pkg-config makeWrapper ]; + nativeBuildInputs = [ + cmake + pkg-config + makeWrapper + ]; buildInputs = [ SDL2 @@ -107,15 +102,16 @@ stdenv.mkDerivation rec { harfbuzz mcpp wiiuse + angelscript + sqlite ] - ++ lib.optional (!stdenv.hostPlatform.isAarch64) angelscript + ++ lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isLinux) libopenglrecorder ++ lib.optional stdenv.hostPlatform.isLinux openal - ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenAL IOKit Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenAL IOKit Cocoa libsamplerate ]; cmakeFlags = [ - "-DBUILD_RECORDER=OFF" # libopenglrecorder is not in nixpkgs - # doesn't work with our 2.35.0 on aarch64-linux - "-DUSE_SYSTEM_ANGELSCRIPT=${if !stdenv.hostPlatform.isAarch64 then "ON" else "OFF"}" + "-DBUILD_RECORDER=${if (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isLinux) then "ON" else "OFF"}" + "-DUSE_SYSTEM_ANGELSCRIPT=ON" "-DCHECK_ASSETS=OFF" "-DUSE_SYSTEM_WIIUSE=ON" "-DOpenGL_GL_PREFERENCE=GLVND"