lol

arcanPackages.arcan: 0.6.2.1 -> 0.6.2.1-unstable-2023-10-14

Let's move to experimental things!

+74 -134
-15
pkgs/desktops/arcan/arcan/000-openal.patch
··· 1 - diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt 2 - --- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 3 - +++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300 4 - @@ -362,10 +360,8 @@ 5 - if (EXISTS ${EXTERNAL_SRC_DIR}/git/openal AND STATIC_OPENAL) 6 - amsg("${CL_YEL}Building OpenAL static from external/git mirror${CL_RST}") 7 - ExternalProject_Add(OpenAL 8 - - SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal 9 - + SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/openal" 10 - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal_static 11 - - UPDATE_COMMAND "" 12 - - GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/openal" 13 - ${EXTERNAL_DEFS} 14 - ${CMAKE_EXTERNAL_DEFS} 15 - -DALSOFT_BACKEND_DSOUND=OFF
-17
pkgs/desktops/arcan/arcan/001-luajit.patch
··· 1 - diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt 2 - --- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 3 - +++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300 4 - @@ -419,12 +415,7 @@ 5 - set(LUA_TAG "luajit51") 6 - if (EXISTS ${EXTERNAL_SRC_DIR}/git/luajit) 7 - ExternalProject_Add(luajit 8 - - SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/luajit 9 - - GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/luajit" 10 - - CONFIGURE_COMMAND "" 11 - - GIT_TAG "v2.1.0-beta3" 12 - - UPDATE_COMMAND "" 13 - - INSTALL_COMMAND "" 14 - + SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/luajit" 15 - BUILD_IN_SOURCE 1 16 - BUILD_COMMAND "${EXTMAKE_CMD}" 17 - DEFAULT_CC=${CMAKE_C_COMPILER}
-15
pkgs/desktops/arcan/arcan/002-libuvc.patch
··· 1 - diff -Naur source-old/src/frameserver/decode/default/CMakeLists.txt source-new/src/frameserver/decode/default/CMakeLists.txt 2 - --- source-old/src/frameserver/decode/default/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300 3 - +++ source-new/src/frameserver/decode/default/CMakeLists.txt 2021-10-29 12:01:31.989933725 -0300 4 - @@ -62,10 +62,8 @@ 5 - if (STATIC_LIBUVC) 6 - pkg_check_modules(LIBUSB_1 REQUIRED libusb-1.0) 7 - ExternalProject_Add(libuvc 8 - - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/frameserver/decode/libuvc" 9 - + SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/libuvc" 10 - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libuvc_static" 11 - - UPDATE_COMMAND "" 12 - - GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/libuvc" 13 - ${EXTERNAL_DEFS} 14 - ${CMAKE_EXTERNAL_DEFS} 15 - -DBUILD_UVC_STATIC=ON
-25
pkgs/desktops/arcan/arcan/clone-sources.nix
··· 1 - { fetchgit, fetchFromGitHub }: 2 - { 3 - letoram-openal-src = fetchFromGitHub { 4 - owner = "letoram"; 5 - repo = "openal"; 6 - rev = "81e1b364339b6aa2b183f39fc16c55eb5857e97a"; 7 - sha256 = "sha256-X3C3TDZPiOhdZdpApC4h4KeBiWFMxkFsmE3gQ1Rz420="; 8 - }; 9 - freetype-src = fetchgit { 10 - url = "git://git.sv.nongnu.org/freetype/freetype2.git"; 11 - rev = "275b116b40c9d183d42242099ea9ff276985855b"; 12 - sha256 = "sha256-YVyJttaXt19MSuD0pmazwxNKz65jcqqWvIgmDj4d3MA="; 13 - }; 14 - libuvc-src = fetchFromGitHub { 15 - owner = "libuvc"; 16 - repo = "libuvc"; 17 - rev = "a4de53e7e265f8c6a64df7ccd289f318104e1916"; 18 - hash = "sha256-a+Q0PTV4ujGnX55u49VJfMgQljZunZYRvkR0tIkGnHI="; 19 - }; 20 - luajit-src = fetchgit { 21 - url = "https://luajit.org/git/luajit-2.0.git"; 22 - rev = "899093a9e0fa5b16f27016381ef4b15529dadff2"; 23 - sha256 = "sha256-bCi1ms78HCOOgStIY2tSGM9LUEX3qnwadLLeYWWu1KI="; 24 - }; 25 - }
+74 -62
pkgs/desktops/arcan/arcan/default.nix
··· 32 32 , makeWrapper 33 33 , mesa 34 34 , mupdf 35 + , ninja 35 36 , openal 36 37 , openjpeg 37 - , pcre 38 + , pcre2 38 39 , pkg-config 40 + , ruby 39 41 , sqlite 40 42 , tesseract 41 43 , valgrind ··· 44 46 , xcbutil 45 47 , xcbutilwm 46 48 , xz 47 - , buildManPages ? true, ruby 49 + , buildManPages ? true 48 50 , useBuiltinLua ? true 49 - , useStaticFreetype ? false 50 - , useStaticLibuvc ? false 51 + , useEspeak ? !stdenv.isDarwin 52 + , useStaticLibuvc ? true 51 53 , useStaticOpenAL ? true 52 - , useStaticSqlite ? false 54 + , useStaticSqlite ? true 55 + , useTracy ? true 53 56 }: 54 57 55 58 let 56 - cmakeFeatureFlag = feature: flag: 57 - "-D${feature}=${if flag then "on" else "off"}"; 59 + allSources = { 60 + letoram-arcan-src = fetchFromGitHub { 61 + owner = "letoram"; 62 + repo = "arcan"; 63 + rev = "85c8564bdbee8468a5716bea64daf1d78937ffbf"; 64 + hash = "sha256-etmj1vpZTjxbmr4UiLBEK57WFJ1NeEnY5WfBYajX3ls="; 65 + }; 66 + letoram-openal-src = fetchFromGitHub { 67 + owner = "letoram"; 68 + repo = "openal"; 69 + rev = "81e1b364339b6aa2b183f39fc16c55eb5857e97a"; 70 + hash = "sha256-X3C3TDZPiOhdZdpApC4h4KeBiWFMxkFsmE3gQ1Rz420="; 71 + }; 72 + libuvc-src = fetchFromGitHub { 73 + owner = "libuvc"; 74 + repo = "libuvc"; 75 + rev = "68d07a00e11d1944e27b7295ee69673239c00b4b"; 76 + hash = "sha256-IdV18mnPTDBODpS1BXl4ulkFyf1PU2ZmuVGNOIdQwzE="; 77 + }; 78 + luajit-src = fetchFromGitHub { 79 + owner = "LuaJIT"; 80 + repo = "LuaJIT"; 81 + rev = "656ecbcf8f669feb94e0d0ec4b4f59190bcd2e48"; 82 + hash = "sha256-/gGQzHgYuWGqGjgpEl18Rbh3Sx2VP+zLlx4N9/hbYLc="; 83 + }; 84 + tracy-src = fetchFromGitHub { 85 + owner = "wolfpld"; 86 + repo = "tracy"; 87 + rev = "93537dff336e0796b01262e8271e4d63bf39f195"; 88 + hash = "sha256-FNB2zTbwk8hMNmhofz9GMts7dvH9phBRVIdgVjRcyQM="; 89 + }; 90 + }; 58 91 in 59 92 stdenv.mkDerivation (finalAttrs: { 60 - pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal"; 61 - version = "0.6.2.1"; 93 + pname = "arcan"; 94 + version = "0.6.2.1-unstable-2023-10-14"; 62 95 63 - src = fetchFromGitHub { 64 - owner = "letoram"; 65 - repo = "arcan"; 66 - rev = finalAttrs.version; 67 - hash = "sha256-7H3fVSsW5VANLqwhykY+Q53fPjz65utaGksh/OpZnJM="; 68 - }; 96 + src = allSources.letoram-arcan-src; 69 97 70 98 nativeBuildInputs = [ 71 99 cmake ··· 77 105 78 106 buildInputs = [ 79 107 SDL2 80 - espeak 81 108 ffmpeg 82 109 file 83 110 freetype ··· 100 127 libvncserver 101 128 libxcb 102 129 libxkbcommon 103 - lua5_1 104 - luajit 105 130 mesa 106 131 mupdf.dev 107 132 openal 108 133 openjpeg.dev 109 - pcre 134 + pcre2 110 135 sqlite 111 136 tesseract 112 137 valgrind ··· 115 140 xcbutil 116 141 xcbutilwm 117 142 xz 118 - ]; 119 - 120 - patches = [ 121 - # Nixpkgs-specific: redirect vendoring 122 - ./000-openal.patch 123 - ./001-luajit.patch 124 - ./002-libuvc.patch 143 + ] 144 + ++ lib.optionals useEspeak [ 145 + espeak 125 146 ]; 126 147 127 148 # Emulate external/git/clone.sh 128 149 postUnpack = let 129 - inherit (import ./clone-sources.nix { inherit fetchFromGitHub fetchgit; }) 130 - letoram-openal-src freetype-src libuvc-src luajit-src; 150 + inherit (allSources) 151 + letoram-openal-src libuvc-src luajit-src tracy-src; 152 + prepareSource = flag: source: destination: 153 + lib.optionalString flag '' 154 + cp -va ${source}/ ${destination} 155 + chmod --recursive 744 ${destination} 156 + ''; 131 157 in 132 158 '' 133 159 pushd $sourceRoot/external/git/ 134 160 '' 135 - + (lib.optionalString useStaticOpenAL '' 136 - cp -a ${letoram-openal-src}/ openal 137 - chmod --recursive 744 openal 138 - '') 139 - + (lib.optionalString useStaticFreetype '' 140 - cp -a ${freetype-src}/ freetype 141 - chmod --recursive 744 freetype 142 - '') 143 - + (lib.optionalString useStaticLibuvc '' 144 - cp -a ${libuvc-src}/ libuvc 145 - chmod --recursive 744 libuvc 146 - '') 147 - + (lib.optionalString useBuiltinLua '' 148 - cp -a ${luajit-src}/ luajit 149 - chmod --recursive 744 luajit 150 - '') + 151 - '' 161 + + prepareSource useStaticOpenAL letoram-openal-src "openal" 162 + + prepareSource useStaticLibuvc libuvc-src "libuvc" 163 + + prepareSource useBuiltinLua luajit-src "luajit" 164 + + prepareSource useTracy tracy-src "tracy" 165 + + '' 152 166 popd 153 167 ''; 154 168 ··· 156 170 substituteInPlace ./src/platform/posix/paths.c \ 157 171 --replace "/usr/bin" "$out/bin" \ 158 172 --replace "/usr/share" "$out/share" 159 - 160 - substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID" 173 + substituteInPlace ./src/CMakeLists.txt \ 174 + --replace "SETUID" "# SETUID" 161 175 ''; 162 176 163 - # INFO: Arcan build scripts require the manpages to be generated before the 177 + # INFO: Arcan build scripts require the manpages to be generated *before* the 164 178 # `configure` phase 165 179 preConfigure = lib.optionalString buildManPages '' 166 180 pushd doc ··· 169 183 ''; 170 184 171 185 cmakeFlags = [ 172 - "-DBUILD_PRESET=everything" 173 186 # The upstream project recommends tagging the distribution 174 - "-DDISTR_TAG=Nixpkgs" 175 - "-DENGINE_BUILDTAG=${finalAttrs.version}" 176 - (cmakeFeatureFlag "HYBRID_SDL" true) 177 - (cmakeFeatureFlag "BUILTIN_LUA" useBuiltinLua) 178 - (cmakeFeatureFlag "DISABLE_JIT" useBuiltinLua) 179 - (cmakeFeatureFlag "STATIC_FREETYPE" useStaticFreetype) 180 - (cmakeFeatureFlag "STATIC_LIBUVC" useStaticLibuvc) 181 - (cmakeFeatureFlag "STATIC_OPENAL" useStaticOpenAL) 182 - (cmakeFeatureFlag "STATIC_SQLite3" useStaticSqlite) 187 + (lib.cmakeFeature "DISTR_TAG" "Nixpkgs") 188 + (lib.cmakeFeature "ENGINE_BUILDTAG" finalAttrs.src.rev) 189 + (lib.cmakeFeature "BUILD_PRESET" "everything") 190 + (lib.cmakeBool "BUILTIN_LUA" useBuiltinLua) 191 + (lib.cmakeBool "DISABLE_JIT" useBuiltinLua) 192 + (lib.cmakeBool "STATIC_LIBUVC" useStaticLibuvc) 193 + (lib.cmakeBool "STATIC_SQLite3" useStaticSqlite) 194 + (lib.cmakeBool "ENABLE_TRACY" useTracy) 183 195 "../src" 184 196 ]; 185 197 ··· 187 199 "format" 188 200 ]; 189 201 190 - meta = with lib; { 202 + meta = { 191 203 homepage = "https://arcan-fe.com/"; 192 204 description = "Combined Display Server, Multimedia Framework, Game Engine"; 193 205 longDescription = '' ··· 196 208 e.g. game development, real-time streaming video, monitoring and 197 209 surveillance, up to and including desktop compositors and window managers. 198 210 ''; 199 - license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ]; 200 - maintainers = with maintainers; [ AndersonTorres ]; 201 - platforms = platforms.unix; 211 + license = with lib.licenses; [ bsd3 gpl2Plus lgpl2Plus ]; 212 + maintainers = with lib.maintainers; [ AndersonTorres ]; 213 + platforms = lib.platforms.unix; 202 214 }; 203 215 })