arcanPackages.arcan: 0.6.2.1 -> 0.6.2.1-unstable-2023-10-14
Let's move to experimental things!
This commit is contained in:
parent
ab04fc5fbf
commit
734e6355b0
5 changed files with 74 additions and 134 deletions
|
@ -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
|
|
|
@ -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}
|
|
|
@ -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
|
|
|
@ -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=";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -32,10 +32,12 @@
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, mesa
|
, mesa
|
||||||
, mupdf
|
, mupdf
|
||||||
|
, ninja
|
||||||
, openal
|
, openal
|
||||||
, openjpeg
|
, openjpeg
|
||||||
, pcre
|
, pcre2
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, ruby
|
||||||
, sqlite
|
, sqlite
|
||||||
, tesseract
|
, tesseract
|
||||||
, valgrind
|
, valgrind
|
||||||
|
@ -44,28 +46,54 @@
|
||||||
, xcbutil
|
, xcbutil
|
||||||
, xcbutilwm
|
, xcbutilwm
|
||||||
, xz
|
, xz
|
||||||
, buildManPages ? true, ruby
|
, buildManPages ? true
|
||||||
, useBuiltinLua ? true
|
, useBuiltinLua ? true
|
||||||
, useStaticFreetype ? false
|
, useEspeak ? !stdenv.isDarwin
|
||||||
, useStaticLibuvc ? false
|
, useStaticLibuvc ? true
|
||||||
, useStaticOpenAL ? true
|
, useStaticOpenAL ? true
|
||||||
, useStaticSqlite ? false
|
, useStaticSqlite ? true
|
||||||
|
, useTracy ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cmakeFeatureFlag = feature: flag:
|
allSources = {
|
||||||
"-D${feature}=${if flag then "on" else "off"}";
|
letoram-arcan-src = fetchFromGitHub {
|
||||||
in
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal";
|
|
||||||
version = "0.6.2.1";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "letoram";
|
owner = "letoram";
|
||||||
repo = "arcan";
|
repo = "arcan";
|
||||||
rev = finalAttrs.version;
|
rev = "85c8564bdbee8468a5716bea64daf1d78937ffbf";
|
||||||
hash = "sha256-7H3fVSsW5VANLqwhykY+Q53fPjz65utaGksh/OpZnJM=";
|
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";
|
||||||
|
version = "0.6.2.1-unstable-2023-10-14";
|
||||||
|
|
||||||
|
src = allSources.letoram-arcan-src;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
@ -77,7 +105,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2
|
SDL2
|
||||||
espeak
|
|
||||||
ffmpeg
|
ffmpeg
|
||||||
file
|
file
|
||||||
freetype
|
freetype
|
||||||
|
@ -100,13 +127,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
libvncserver
|
libvncserver
|
||||||
libxcb
|
libxcb
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
lua5_1
|
|
||||||
luajit
|
|
||||||
mesa
|
mesa
|
||||||
mupdf.dev
|
mupdf.dev
|
||||||
openal
|
openal
|
||||||
openjpeg.dev
|
openjpeg.dev
|
||||||
pcre
|
pcre2
|
||||||
sqlite
|
sqlite
|
||||||
tesseract
|
tesseract
|
||||||
valgrind
|
valgrind
|
||||||
|
@ -115,40 +140,29 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
xcbutil
|
xcbutil
|
||||||
xcbutilwm
|
xcbutilwm
|
||||||
xz
|
xz
|
||||||
];
|
]
|
||||||
|
++ lib.optionals useEspeak [
|
||||||
patches = [
|
espeak
|
||||||
# Nixpkgs-specific: redirect vendoring
|
|
||||||
./000-openal.patch
|
|
||||||
./001-luajit.patch
|
|
||||||
./002-libuvc.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Emulate external/git/clone.sh
|
# Emulate external/git/clone.sh
|
||||||
postUnpack = let
|
postUnpack = let
|
||||||
inherit (import ./clone-sources.nix { inherit fetchFromGitHub fetchgit; })
|
inherit (allSources)
|
||||||
letoram-openal-src freetype-src libuvc-src luajit-src;
|
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
|
in
|
||||||
''
|
''
|
||||||
pushd $sourceRoot/external/git/
|
pushd $sourceRoot/external/git/
|
||||||
''
|
''
|
||||||
+ (lib.optionalString useStaticOpenAL ''
|
+ prepareSource useStaticOpenAL letoram-openal-src "openal"
|
||||||
cp -a ${letoram-openal-src}/ openal
|
+ prepareSource useStaticLibuvc libuvc-src "libuvc"
|
||||||
chmod --recursive 744 openal
|
+ prepareSource useBuiltinLua luajit-src "luajit"
|
||||||
'')
|
+ prepareSource useTracy tracy-src "tracy"
|
||||||
+ (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
|
|
||||||
'') +
|
|
||||||
''
|
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -156,11 +170,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
substituteInPlace ./src/platform/posix/paths.c \
|
substituteInPlace ./src/platform/posix/paths.c \
|
||||||
--replace "/usr/bin" "$out/bin" \
|
--replace "/usr/bin" "$out/bin" \
|
||||||
--replace "/usr/share" "$out/share"
|
--replace "/usr/share" "$out/share"
|
||||||
|
substituteInPlace ./src/CMakeLists.txt \
|
||||||
substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID"
|
--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
|
# `configure` phase
|
||||||
preConfigure = lib.optionalString buildManPages ''
|
preConfigure = lib.optionalString buildManPages ''
|
||||||
pushd doc
|
pushd doc
|
||||||
|
@ -169,17 +183,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DBUILD_PRESET=everything"
|
|
||||||
# The upstream project recommends tagging the distribution
|
# The upstream project recommends tagging the distribution
|
||||||
"-DDISTR_TAG=Nixpkgs"
|
(lib.cmakeFeature "DISTR_TAG" "Nixpkgs")
|
||||||
"-DENGINE_BUILDTAG=${finalAttrs.version}"
|
(lib.cmakeFeature "ENGINE_BUILDTAG" finalAttrs.src.rev)
|
||||||
(cmakeFeatureFlag "HYBRID_SDL" true)
|
(lib.cmakeFeature "BUILD_PRESET" "everything")
|
||||||
(cmakeFeatureFlag "BUILTIN_LUA" useBuiltinLua)
|
(lib.cmakeBool "BUILTIN_LUA" useBuiltinLua)
|
||||||
(cmakeFeatureFlag "DISABLE_JIT" useBuiltinLua)
|
(lib.cmakeBool "DISABLE_JIT" useBuiltinLua)
|
||||||
(cmakeFeatureFlag "STATIC_FREETYPE" useStaticFreetype)
|
(lib.cmakeBool "STATIC_LIBUVC" useStaticLibuvc)
|
||||||
(cmakeFeatureFlag "STATIC_LIBUVC" useStaticLibuvc)
|
(lib.cmakeBool "STATIC_SQLite3" useStaticSqlite)
|
||||||
(cmakeFeatureFlag "STATIC_OPENAL" useStaticOpenAL)
|
(lib.cmakeBool "ENABLE_TRACY" useTracy)
|
||||||
(cmakeFeatureFlag "STATIC_SQLite3" useStaticSqlite)
|
|
||||||
"../src"
|
"../src"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -187,7 +199,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
"format"
|
"format"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
homepage = "https://arcan-fe.com/";
|
homepage = "https://arcan-fe.com/";
|
||||||
description = "Combined Display Server, Multimedia Framework, Game Engine";
|
description = "Combined Display Server, Multimedia Framework, Game Engine";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -196,8 +208,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
e.g. game development, real-time streaming video, monitoring and
|
e.g. game development, real-time streaming video, monitoring and
|
||||||
surveillance, up to and including desktop compositors and window managers.
|
surveillance, up to and including desktop compositors and window managers.
|
||||||
'';
|
'';
|
||||||
license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ];
|
license = with lib.licenses; [ bsd3 gpl2Plus lgpl2Plus ];
|
||||||
maintainers = with maintainers; [ AndersonTorres ];
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||||
platforms = platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue