diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2023-12-06 23:58:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 23:58:55 +0100 |
commit | 37eb75ecc29fcdbe94b7480a024e5619abb0f06b (patch) | |
tree | 548b38321194d220d98be4175425e9548b2f1196 /pkgs/by-name | |
parent | 6be62203abd573b77472606e4848d29e2f1dd961 (diff) | |
parent | e9654b3ea39a9d170da0e0739119f6d39a07720c (diff) | |
download | nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar.gz nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar.bz2 nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar.lz nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar.xz nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.tar.zst nixlib-37eb75ecc29fcdbe94b7480a024e5619abb0f06b.zip |
Merge pull request #270301 from atorres1985-contrib/arcan
Arcan updates
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/ar/arcan/package.nix | 219 | ||||
-rw-r--r-- | pkgs/by-name/ar/arcan/wrapper.nix | 29 | ||||
-rw-r--r-- | pkgs/by-name/ca/cat9/package.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/du/durden/package.nix | 43 | ||||
-rw-r--r-- | pkgs/by-name/pi/pipeworld/package.nix | 50 | ||||
-rw-r--r-- | pkgs/by-name/pr/prio/package.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/xa/xarcan/package.nix | 119 |
7 files changed, 534 insertions, 0 deletions
diff --git a/pkgs/by-name/ar/arcan/package.nix b/pkgs/by-name/ar/arcan/package.nix new file mode 100644 index 000000000000..ce4fc7256b77 --- /dev/null +++ b/pkgs/by-name/ar/arcan/package.nix @@ -0,0 +1,219 @@ +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, callPackage +, cmake +, espeak-ng +, ffmpeg +, file +, freetype +, glib +, gumbo +, harfbuzz +, jbig2dec +, leptonica +, libGL +, libX11 +, libXau +, libXcomposite +, libXdmcp +, libXfixes +, libdrm +, libffi +, libjpeg +, libusb1 +, libuvc +, libvlc +, libvncserver +, libxcb +, libxkbcommon +, makeWrapper +, mesa +, mupdf +, openal +, openjpeg +, pcre2 +, pkg-config +, ruby +, sqlite +, tesseract +, valgrind +, wayland +, wayland-protocols +, xcbutil +, xcbutilwm +, xz +, buildManPages ? true +, useBuiltinLua ? true +, useEspeak ? !stdenv.isDarwin +, useStaticLibuvc ? true +, useStaticOpenAL ? true +, useStaticSqlite ? true +, useTracy ? true +}: + +let + allSources = { + letoram-arcan = { + pname = "arcan"; + version = "0.6.2.1-unstable-2023-11-18"; + src = fetchFromGitHub { + owner = "letoram"; + repo = "arcan"; + rev = "0950ee236f96a555729498d0fdf91c16901037f5"; + hash = "sha256-TxadRlidy4KRaQ4HunPO6ISJqm6JwnMRM8y6dX6vqJ4="; + }; + }; + 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: { + inherit (allSources.letoram-arcan) pname version src; + + nativeBuildInputs = [ + cmake + makeWrapper + pkg-config + ] ++ lib.optionals buildManPages [ + ruby + ]; + + buildInputs = [ + SDL2 + ffmpeg + file + freetype + glib + gumbo + harfbuzz + jbig2dec + leptonica + libGL + libX11 + libXau + libXcomposite + libXdmcp + libXfixes + libdrm + libffi + libjpeg + libusb1 + libuvc + libvlc + libvncserver + libxcb + libxkbcommon + mesa + mupdf + openal + openjpeg + pcre2 + sqlite + tesseract + valgrind + wayland + wayland-protocols + xcbutil + xcbutilwm + xz + ] + ++ lib.optionals useEspeak [ + espeak-ng + ]; + + # Emulate external/git/clone.sh + postUnpack = let + 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/ + '' + + prepareSource useStaticOpenAL letoram-openal-src "openal" + + prepareSource useStaticLibuvc libuvc-src "libuvc" + + prepareSource useBuiltinLua luajit-src "luajit" + + prepareSource useTracy tracy-src "tracy" + + '' + popd + ''; + + postPatch = '' + substituteInPlace ./src/platform/posix/paths.c \ + --replace "/usr/bin" "$out/bin" \ + --replace "/usr/share" "$out/share" + substituteInPlace ./src/CMakeLists.txt \ + --replace "SETUID" "# SETUID" + ''; + + # INFO: Arcan build scripts require the manpages to be generated *before* the + # `configure` phase + preConfigure = lib.optionalString buildManPages '' + pushd doc + ruby docgen.rb mangen + popd + ''; + + cmakeFlags = [ + # The upstream project recommends tagging the distribution + (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" + ]; + + hardeningDisable = [ + "format" + ]; + + passthru = { + wrapper = callPackage ./wrapper.nix { }; + }; + + meta = { + homepage = "https://arcan-fe.com/"; + description = "Combined Display Server, Multimedia Framework, Game Engine"; + longDescription = '' + Arcan is a portable and fast self-sufficient multimedia engine for + advanced visualization and analysis work in a wide range of applications + e.g. game development, real-time streaming video, monitoring and + surveillance, up to and including desktop compositors and window managers. + ''; + license = with lib.licenses; [ bsd3 gpl2Plus lgpl2Plus ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/ar/arcan/wrapper.nix b/pkgs/by-name/ar/arcan/wrapper.nix new file mode 100644 index 000000000000..b61c5a5becd8 --- /dev/null +++ b/pkgs/by-name/ar/arcan/wrapper.nix @@ -0,0 +1,29 @@ +{ arcan +, makeWrapper +, symlinkJoin +, appls ? [ ] +, name ? "arcan-wrapped" +}: + +symlinkJoin rec { + inherit name; + + paths = appls ++ [ arcan ]; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + for prog in ${placeholder "out"}/bin/*; do + wrapProgram $prog \ + --prefix PATH ":" "${placeholder "out"}/bin" \ + --set ARCAN_APPLBASEPATH "${placeholder "out"}/share/arcan/appl/" \ + --set ARCAN_BINPATH "${placeholder "out"}/bin/arcan_frameserver" \ + --set ARCAN_LIBPATH "${placeholder "out"}/lib/" \ + --set ARCAN_RESOURCEPATH "${placeholder "out"}/share/arcan/resources/" \ + --set ARCAN_SCRIPTPATH "${placeholder "out"}/share/arcan/scripts/" + done + ''; +} +# TODO: set ARCAN_STATEBASEPATH to $HOME/.arcan/resources/savestates/ - possibly +# via a suitable script +# TODO: set ARCAN_FONTPATH to a set of default-but-configurable fontset diff --git a/pkgs/by-name/ca/cat9/package.nix b/pkgs/by-name/ca/cat9/package.nix new file mode 100644 index 000000000000..dac6f85656dc --- /dev/null +++ b/pkgs/by-name/ca/cat9/package.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "cat9"; + version = "unstable-2023-11-06"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "cat9"; + rev = "a807776a85237ab0bdd0a712fb33c176fc295e30"; + hash = "sha256-OlH8FgVBk76Qw+5mnsrryXOL9GbPJWlwUGtYlLuAPxQ="; + }; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p ${placeholder "out"}/share/arcan/appl/cat9 + cp -a ./* ${placeholder "out"}/share/arcan/appl/cat9 + + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/letoram/cat9"; + description = "A User shell for LASH"; + license = with lib.licenses; [ unlicense ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/du/durden/package.nix b/pkgs/by-name/du/durden/package.nix new file mode 100644 index 000000000000..3d72e132964a --- /dev/null +++ b/pkgs/by-name/du/durden/package.nix @@ -0,0 +1,43 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "durden"; + version = "unstable-2023-10-23"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "durden"; + rev = "347dba6da011bbaa70c6edaf82a2d915f4057db3"; + hash = "sha256-iNf7fOzz7mf1CXG5leCenkSTrdCc9/KL8VLw8gUIyKE="; + }; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p ${placeholder "out"}/share/arcan/appl/ + cp -a ./durden ${placeholder "out"}/share/arcan/appl/ + + runHook postInstall + ''; + + meta = { + homepage = "https://durden.arcan-fe.com/"; + description = "Reference Desktop Environment for Arcan"; + longDescription = '' + Durden is a desktop environment for the Arcan Display Server. It serves + both as a reference showcase on how to take advantage of some of the + features in Arcan, and as a very competent entry to the advanced-user side + of the desktop environment spectrum. + ''; + license = with lib.licenses; [ bsd3 ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/pi/pipeworld/package.nix b/pkgs/by-name/pi/pipeworld/package.nix new file mode 100644 index 000000000000..52c411d83777 --- /dev/null +++ b/pkgs/by-name/pi/pipeworld/package.nix @@ -0,0 +1,50 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalPackages: { + pname = "pipeworld"; + version = "unstable-2023-02-05"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "pipeworld"; + rev = "edc3821404b3a1274b8a50d2fb1c6b523fbd4a1c"; + hash = "sha256-PbKejghMkLZdeQJD9fObw9xhGH24IX72X7pyjapTXJM="; + }; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p ${placeholder "out"}/share/arcan/appl/ + cp -a ./pipeworld ${placeholder "out"}/share/arcan/appl/ + + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/letoram/pipeworld"; + description = "Dataflow 'spreadsheet' desktop environment"; + longDescription = '' + Pipeworld is a zooming dataflow tool and desktop heavily inspired by + userland. It is built using the arcan desktop engine. + + It combines the programmable processing of shell scripts and pipes, the + interactive visual addressing/programming model of spread sheets, the + scenegraph- and interactive controls-, IPC- and client processing- of + display servers into one model with zoomable tiling window management. + + It can be used as a standalone desktop of its own, or as a normal + application within another desktop as a 'substitute' for your normal + terminal emulator. + ''; + license = with lib.licenses; [ bsd3 ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/pr/prio/package.nix b/pkgs/by-name/pr/prio/package.nix new file mode 100644 index 000000000000..620e4f9382ce --- /dev/null +++ b/pkgs/by-name/pr/prio/package.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "prio"; + version = "unstable-2018-09-13"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "prio"; + rev = "c3f97491339d15f063d6937d5f89bcfaea774dd1"; + hash = "sha256-Idv/duEYmDk/rO+TI8n+FY3VFDtUEh8C292jh12BJuM="; + }; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p ${placeholder "out"}/share/arcan/appl/prio + cp -a ./* ${placeholder "out"}/share/arcan/appl/prio + + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/letoram/prio"; + description = "Plan9- Rio like Window Manager for Arcan"; + license = with lib.licenses; [ bsd3 ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/xa/xarcan/package.nix b/pkgs/by-name/xa/xarcan/package.nix new file mode 100644 index 000000000000..fb43766e7207 --- /dev/null +++ b/pkgs/by-name/xa/xarcan/package.nix @@ -0,0 +1,119 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, arcan +, audit +, dbus +, libepoxy +, fontutil +, libGL +, libX11 +, libXau +, libXdmcp +, libXfont2 +, libdrm +, libgcrypt +, libmd +, libselinux +, libtirpc +, libxcb +, libxkbfile +, libxshmfence +, mesa +, meson +, nettle +, ninja +, openssl +, pixman +, pkg-config +, systemd +, xcbutil +, xcbutilwm +, xkbcomp +, xkeyboard_config +, xorgproto +, xtrans +}: + +stdenv.mkDerivation (finalPackages: { + pname = "xarcan"; + version = "unstable-2023-11-03"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "xarcan"; + rev = "380ea856307f593535dfc8b23799938db69e31b0"; + hash = "sha256-RdizezCbJylQDkOmUdqL0lBTNLsjyvo+lKAjfZXTXf4="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + arcan + audit + dbus + libepoxy + fontutil + libGL + libX11 + libXau + libXdmcp + libXfont2 + libdrm + libgcrypt + libmd + libselinux + libtirpc + libxcb + libxkbfile + libxshmfence + mesa + nettle + openssl + pixman + systemd + xcbutil + xcbutilwm + xkbcomp + xkeyboard_config + xorgproto + xtrans + ]; + + configureFlags = [ + "--disable-int10-module" + "--disable-static" + "--disable-xnest" + "--disable-xorg" + "--disable-xvfb" + "--disable-xwayland" + "--enable-glamor" + "--enable-glx" + "--enable-ipv6" + "--enable-kdrive" + "--enable-record" + "--enable-xarcan" + "--enable-xcsecurity" + "--with-xkb-bin-directory=${xkbcomp}/bin" + "--with-xkb-output=/tmp" + "--with-xkb-path=${xkeyboard_config}/share/X11/xkb" + ]; + + meta = { + homepage = "https://github.com/letoram/letoram"; + description = "Patched Xserver that bridges connections to Arcan"; + longDescription = '' + xarcan is a patched X server with a KDrive backend that uses the + arcan-shmif to map Xlib/Xcb/X clients to a running arcan instance. It + allows running an X session as a window under Arcan. + ''; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) |