diff options
Diffstat (limited to 'pkgs/desktops/arcan')
-rw-r--r-- | pkgs/desktops/arcan/arcan/000-openal.patch | 15 | ||||
-rw-r--r-- | pkgs/desktops/arcan/arcan/001-luajit.patch | 17 | ||||
-rw-r--r-- | pkgs/desktops/arcan/arcan/002-libuvc.patch | 15 | ||||
-rw-r--r-- | pkgs/desktops/arcan/arcan/clone-sources.nix | 25 | ||||
-rw-r--r-- | pkgs/desktops/arcan/arcan/default.nix | 144 | ||||
-rw-r--r-- | pkgs/desktops/arcan/cat9/default.nix | 6 | ||||
-rw-r--r-- | pkgs/desktops/arcan/durden/default.nix | 6 | ||||
-rw-r--r-- | pkgs/desktops/arcan/pipeworld/default.nix | 6 |
8 files changed, 86 insertions, 148 deletions
diff --git a/pkgs/desktops/arcan/arcan/000-openal.patch b/pkgs/desktops/arcan/arcan/000-openal.patch deleted file mode 100644 index f8e02a4cb0c..00000000000 --- a/pkgs/desktops/arcan/arcan/000-openal.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt ---- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 -+++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300 -@@ -362,10 +360,8 @@ - if (EXISTS ${EXTERNAL_SRC_DIR}/git/openal AND STATIC_OPENAL) - amsg("${CL_YEL}Building OpenAL static from external/git mirror${CL_RST}") - ExternalProject_Add(OpenAL -- SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal -+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/openal" - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal_static -- UPDATE_COMMAND "" -- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/openal" - ${EXTERNAL_DEFS} - ${CMAKE_EXTERNAL_DEFS} - -DALSOFT_BACKEND_DSOUND=OFF diff --git a/pkgs/desktops/arcan/arcan/001-luajit.patch b/pkgs/desktops/arcan/arcan/001-luajit.patch deleted file mode 100644 index eff3c0a5aad..00000000000 --- a/pkgs/desktops/arcan/arcan/001-luajit.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt ---- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 -+++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300 -@@ -419,12 +415,7 @@ - set(LUA_TAG "luajit51") - if (EXISTS ${EXTERNAL_SRC_DIR}/git/luajit) - ExternalProject_Add(luajit -- SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/luajit -- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/luajit" -- CONFIGURE_COMMAND "" -- GIT_TAG "v2.1.0-beta3" -- UPDATE_COMMAND "" -- INSTALL_COMMAND "" -+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/luajit" - BUILD_IN_SOURCE 1 - BUILD_COMMAND "${EXTMAKE_CMD}" - DEFAULT_CC=${CMAKE_C_COMPILER} diff --git a/pkgs/desktops/arcan/arcan/002-libuvc.patch b/pkgs/desktops/arcan/arcan/002-libuvc.patch deleted file mode 100644 index 48d25fe8271..00000000000 --- a/pkgs/desktops/arcan/arcan/002-libuvc.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur source-old/src/frameserver/decode/default/CMakeLists.txt source-new/src/frameserver/decode/default/CMakeLists.txt ---- source-old/src/frameserver/decode/default/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 -+++ source-new/src/frameserver/decode/default/CMakeLists.txt 2021-10-29 12:01:31.989933725 -0300 -@@ -62,10 +62,8 @@ - if (STATIC_LIBUVC) - pkg_check_modules(LIBUSB_1 REQUIRED libusb-1.0) - ExternalProject_Add(libuvc -- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/frameserver/decode/libuvc" -+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/libuvc" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libuvc_static" -- UPDATE_COMMAND "" -- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/libuvc" - ${EXTERNAL_DEFS} - ${CMAKE_EXTERNAL_DEFS} - -DBUILD_UVC_STATIC=ON diff --git a/pkgs/desktops/arcan/arcan/clone-sources.nix b/pkgs/desktops/arcan/arcan/clone-sources.nix deleted file mode 100644 index bd39c0843a8..00000000000 --- a/pkgs/desktops/arcan/arcan/clone-sources.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ fetchgit, fetchFromGitHub }: -{ - letoram-openal-src = fetchFromGitHub { - owner = "letoram"; - repo = "openal"; - rev = "81e1b364339b6aa2b183f39fc16c55eb5857e97a"; - sha256 = "sha256-X3C3TDZPiOhdZdpApC4h4KeBiWFMxkFsmE3gQ1Rz420="; - }; - freetype-src = fetchgit { - url = "git://git.sv.nongnu.org/freetype/freetype2.git"; - rev = "275b116b40c9d183d42242099ea9ff276985855b"; - sha256 = "sha256-YVyJttaXt19MSuD0pmazwxNKz65jcqqWvIgmDj4d3MA="; - }; - libuvc-src = fetchFromGitHub { - owner = "libuvc"; - repo = "libuvc"; - rev = "a4de53e7e265f8c6a64df7ccd289f318104e1916"; - hash = "sha256-a+Q0PTV4ujGnX55u49VJfMgQljZunZYRvkR0tIkGnHI="; - }; - luajit-src = fetchgit { - url = "https://luajit.org/git/luajit-2.0.git"; - rev = "899093a9e0fa5b16f27016381ef4b15529dadff2"; - sha256 = "sha256-bCi1ms78HCOOgStIY2tSGM9LUEX3qnwadLLeYWWu1KI="; - }; -} diff --git a/pkgs/desktops/arcan/arcan/default.nix b/pkgs/desktops/arcan/arcan/default.nix index 22c214728f2..1a46c693b02 100644 --- a/pkgs/desktops/arcan/arcan/default.nix +++ b/pkgs/desktops/arcan/arcan/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchgit , SDL2 , cmake , espeak @@ -21,21 +20,21 @@ , libXfixes , libdrm , libffi +, libjpeg , libusb1 , libuvc , libvlc , libvncserver , libxcb , libxkbcommon -, lua5_1 -, luajit , makeWrapper , mesa , mupdf , openal , openjpeg -, pcre +, pcre2 , pkg-config +, ruby , sqlite , tesseract , valgrind @@ -44,28 +43,54 @@ , xcbutil , xcbutilwm , xz -, buildManPages ? true, ruby +, buildManPages ? true , useBuiltinLua ? true -, useStaticFreetype ? false -, useStaticLibuvc ? false +, useEspeak ? !stdenv.isDarwin +, useStaticLibuvc ? true , useStaticOpenAL ? true -, useStaticSqlite ? false +, useStaticSqlite ? true +, useTracy ? true }: let - cmakeFeatureFlag = feature: flag: - "-D${feature}=${if flag then "on" else "off"}"; + allSources = { + letoram-arcan-src = fetchFromGitHub { + owner = "letoram"; + repo = "arcan"; + rev = "85c8564bdbee8468a5716bea64daf1d78937ffbf"; + hash = "sha256-etmj1vpZTjxbmr4UiLBEK57WFJ1NeEnY5WfBYajX3ls="; + }; + letoram-openal-src = fetchFromGitHub { + owner = "letoram"; + repo = "openal"; + rev = "81e1b364339b6aa2b183f39fc16c55eb5857e97a"; + hash = "sha256-X3C3TDZPiOhdZdpApC4h4KeBiWFMxkFsmE3gQ1Rz420="; + }; + libuvc-src = fetchFromGitHub { + owner = "libuvc"; + repo = "libuvc"; + rev = "68d07a00e11d1944e27b7295ee69673239c00b4b"; + hash = "sha256-IdV18mnPTDBODpS1BXl4ulkFyf1PU2ZmuVGNOIdQwzE="; + }; + luajit-src = fetchFromGitHub { + owner = "LuaJIT"; + repo = "LuaJIT"; + rev = "656ecbcf8f669feb94e0d0ec4b4f59190bcd2e48"; + hash = "sha256-/gGQzHgYuWGqGjgpEl18Rbh3Sx2VP+zLlx4N9/hbYLc="; + }; + tracy-src = fetchFromGitHub { + owner = "wolfpld"; + repo = "tracy"; + rev = "93537dff336e0796b01262e8271e4d63bf39f195"; + hash = "sha256-FNB2zTbwk8hMNmhofz9GMts7dvH9phBRVIdgVjRcyQM="; + }; + }; in stdenv.mkDerivation (finalAttrs: { - pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal"; - version = "0.6.2.1"; + pname = "arcan"; + version = "0.6.2.1-unstable-2023-10-14"; - src = fetchFromGitHub { - owner = "letoram"; - repo = "arcan"; - rev = finalAttrs.version; - hash = "sha256-7H3fVSsW5VANLqwhykY+Q53fPjz65utaGksh/OpZnJM="; - }; + src = allSources.letoram-arcan-src; nativeBuildInputs = [ cmake @@ -77,7 +102,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 - espeak ffmpeg file freetype @@ -94,19 +118,18 @@ stdenv.mkDerivation (finalAttrs: { libXfixes libdrm libffi + libjpeg libusb1 libuvc libvlc libvncserver libxcb libxkbcommon - lua5_1 - luajit mesa - mupdf.dev + mupdf openal - openjpeg.dev - pcre + openjpeg + pcre2 sqlite tesseract valgrind @@ -115,40 +138,29 @@ stdenv.mkDerivation (finalAttrs: { xcbutil xcbutilwm xz - ]; - - patches = [ - # Nixpkgs-specific: redirect vendoring - ./000-openal.patch - ./001-luajit.patch - ./002-libuvc.patch + ] + ++ lib.optionals useEspeak [ + espeak ]; # Emulate external/git/clone.sh postUnpack = let - inherit (import ./clone-sources.nix { inherit fetchFromGitHub fetchgit; }) - letoram-openal-src freetype-src libuvc-src luajit-src; + inherit (allSources) + letoram-openal-src libuvc-src luajit-src tracy-src; + prepareSource = flag: source: destination: + lib.optionalString flag '' + cp -va ${source}/ ${destination} + chmod --recursive 744 ${destination} + ''; in '' pushd $sourceRoot/external/git/ '' - + (lib.optionalString useStaticOpenAL '' - cp -a ${letoram-openal-src}/ openal - chmod --recursive 744 openal - '') - + (lib.optionalString useStaticFreetype '' - cp -a ${freetype-src}/ freetype - chmod --recursive 744 freetype - '') - + (lib.optionalString useStaticLibuvc '' - cp -a ${libuvc-src}/ libuvc - chmod --recursive 744 libuvc - '') - + (lib.optionalString useBuiltinLua '' - cp -a ${luajit-src}/ luajit - chmod --recursive 744 luajit - '') + - '' + + prepareSource useStaticOpenAL letoram-openal-src "openal" + + prepareSource useStaticLibuvc libuvc-src "libuvc" + + prepareSource useBuiltinLua luajit-src "luajit" + + prepareSource useTracy tracy-src "tracy" + + '' popd ''; @@ -156,11 +168,11 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace ./src/platform/posix/paths.c \ --replace "/usr/bin" "$out/bin" \ --replace "/usr/share" "$out/share" - - substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID" + substituteInPlace ./src/CMakeLists.txt \ + --replace "SETUID" "# SETUID" ''; - # INFO: Arcan build scripts require the manpages to be generated before the + # INFO: Arcan build scripts require the manpages to be generated *before* the # `configure` phase preConfigure = lib.optionalString buildManPages '' pushd doc @@ -169,17 +181,15 @@ stdenv.mkDerivation (finalAttrs: { ''; cmakeFlags = [ - "-DBUILD_PRESET=everything" # The upstream project recommends tagging the distribution - "-DDISTR_TAG=Nixpkgs" - "-DENGINE_BUILDTAG=${finalAttrs.version}" - (cmakeFeatureFlag "HYBRID_SDL" true) - (cmakeFeatureFlag "BUILTIN_LUA" useBuiltinLua) - (cmakeFeatureFlag "DISABLE_JIT" useBuiltinLua) - (cmakeFeatureFlag "STATIC_FREETYPE" useStaticFreetype) - (cmakeFeatureFlag "STATIC_LIBUVC" useStaticLibuvc) - (cmakeFeatureFlag "STATIC_OPENAL" useStaticOpenAL) - (cmakeFeatureFlag "STATIC_SQLite3" useStaticSqlite) + (lib.cmakeFeature "DISTR_TAG" "Nixpkgs") + (lib.cmakeFeature "ENGINE_BUILDTAG" finalAttrs.src.rev) + (lib.cmakeFeature "BUILD_PRESET" "everything") + (lib.cmakeBool "BUILTIN_LUA" useBuiltinLua) + (lib.cmakeBool "DISABLE_JIT" useBuiltinLua) + (lib.cmakeBool "STATIC_LIBUVC" useStaticLibuvc) + (lib.cmakeBool "STATIC_SQLite3" useStaticSqlite) + (lib.cmakeBool "ENABLE_TRACY" useTracy) "../src" ]; @@ -187,7 +197,7 @@ stdenv.mkDerivation (finalAttrs: { "format" ]; - meta = with lib; { + meta = { homepage = "https://arcan-fe.com/"; description = "Combined Display Server, Multimedia Framework, Game Engine"; longDescription = '' @@ -196,8 +206,8 @@ stdenv.mkDerivation (finalAttrs: { e.g. game development, real-time streaming video, monitoring and surveillance, up to and including desktop compositors and window managers. ''; - license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ]; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.unix; + license = with lib.licenses; [ bsd3 gpl2Plus lgpl2Plus ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; }) diff --git a/pkgs/desktops/arcan/cat9/default.nix b/pkgs/desktops/arcan/cat9/default.nix index 5e96b0f5fbd..7bc6005b0c6 100644 --- a/pkgs/desktops/arcan/cat9/default.nix +++ b/pkgs/desktops/arcan/cat9/default.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "cat9"; - version = "unstable-2023-02-11"; + version = "unstable-2023-06-25"; src = fetchFromGitHub { owner = "letoram"; repo = "cat9"; - rev = "1da9949c728e0734a883d258a8a05ca0e3dd5897"; - hash = "sha256-kit+H9u941oK2Ko8S/1w+3DN6ktnfBtd+3s9XgU+qOQ="; + rev = "4d8a0c539a5c756acada96fd80e7eb3b9554ac05"; + hash = "sha256-T3RPuldKTzHm0EdfdMOtHv9kcr9oE9YQgdzv/jjPPnc="; }; dontConfigure = true; diff --git a/pkgs/desktops/arcan/durden/default.nix b/pkgs/desktops/arcan/durden/default.nix index 14047669bd5..f6677b9823f 100644 --- a/pkgs/desktops/arcan/durden/default.nix +++ b/pkgs/desktops/arcan/durden/default.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "durden"; - version = "unstable-2023-01-19"; + version = "unstable-2023-08-11"; src = fetchFromGitHub { owner = "letoram"; repo = "durden"; - rev = "bba1bcc8992ea5826fd3b1c798cb271141b7c8e2"; - hash = "sha256-PK9ObMJ3SbHZLnLjxk4smh5N0WaM/2H/Y+T5vKBdHWA="; + rev = "728d7fc3292cc162b1cea505c8a71512b2e84925"; + hash = "sha256-UL36JeppnoFDdzdsJMsWKJL58ioz9eOaNEZp/7DGV9w="; }; dontConfigure = true; diff --git a/pkgs/desktops/arcan/pipeworld/default.nix b/pkgs/desktops/arcan/pipeworld/default.nix index a9a1e24a97b..9474535133f 100644 --- a/pkgs/desktops/arcan/pipeworld/default.nix +++ b/pkgs/desktops/arcan/pipeworld/default.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation (finalPackages: { pname = "pipeworld"; - version = "unstable-2023-02-05"; + version = "unstable-2023-03-02"; src = fetchFromGitHub { owner = "letoram"; repo = "pipeworld"; - rev = "58b2e9fe15ef0baa4b04c27079bfa386ec62b28e"; - hash = "sha256-PbKejghMkLZdeQJD9fObw9xhGH24IX72X7pyjapTXJM="; + rev = "9ea79f72ad500fe78b9f46e680be87eaac3bfb0e"; + hash = "sha256-/cjse6XXrdLoUB35GLgl871qINOm4SvKPTbfoBceLu0="; }; dontConfigure = true; |