Change:
<ins> { lib , stdenv , fetchFromGitHub , SDL2 , cmake , espeak , ffmpeg , file , freetype , harfbuzz , leptonica , libGL , libX11 , libXau , libXcomposite , libXdmcp , libXfixes , libdrm , libffi , libusb1 , libuvc , libvlc , libvncserver , libxcb , libxkbcommon , luajit , makeWrapper , mesa , openal , pkg-config , sqlite , tesseract , valgrind , wayland , wayland-protocols , xcbutil , xcbutilwm , xz , buildManPages ? true, ruby }: let # TODO: investigate vendoring, especially OpenAL # WARN: vendoring of OpenAL is required for running arcan_lwa # INFO: maybe it needs leaveDotGit, but it is dangerous/impure letoram-openal-src = fetchFromGitHub { owner = "letoram"; repo = "openal"; rev = "1c7302c580964fee9ee9e1d89ff56d24f934bdef"; hash = "sha256-InqU59J0zvwJ20a7KU54xTM7d76VoOlFbtj7KbFlnTU="; }; in stdenv.mkDerivation rec { pname = "arcan"; version = "0.6.1pre1+unstable=2021-07-07"; src = fetchFromGitHub { owner = "letoram"; repo = "arcan"; rev = "f3341ab94b32d02f3d15c3b91a512b2614e950a5"; hash = "sha256-YBtRA5uCk4tjX3Bsu5vMkaNaCLRlM6HVQ53sna3gDsY="; }; postUnpack = '' ( cd $sourceRoot/external/git/ cp -a ${letoram-openal-src}/ openal/ chmod --recursive 744 openal/ ) ''; # TODO: work with upstream in order to get rid of these hardcoded paths postPatch = '' substituteInPlace ./src/platform/posix/paths.c  --replace "/usr/bin" "$out/bin"  --replace "/usr/share" "$out/share" substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID" ''; nativeBuildInputs = [ cmake makeWrapper pkg-config ] ++ lib.optionals buildManPages [ ruby ]; buildInputs = [ SDL2 espeak ffmpeg file freetype harfbuzz leptonica libGL libX11 libXau libXcomposite libXdmcp libXfixes libdrm libffi libusb1 libuvc libvlc libvncserver libxcb libxkbcommon luajit mesa openal sqlite tesseract valgrind wayland wayland-protocols xcbutil xcbutilwm xz ]; # INFO: According to the source code, the manpages need to be generated before # the configure phase preConfigure = lib.optionalString buildManPages '' (cd doc; ruby docgen.rb mangen) ''; cmakeFlags = [ "-DBUILD_PRESET=everything" # The upstream project recommends tagging the distribution "-DDISTR_TAG=Nixpkgs" "-DENGINE_BUILDTAG=${version}" "-DHYBRID_SDL=on" "-DSTATIC_OPENAL=off" "../src" ]; hardeningDisable = [ "format" ]; meta = with lib; { 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 licenses; [ bsd3 gpl2Plus lgpl2Plus ]; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; }; } </ins>

Discussion:
Anyone want to collaborate? I will try my hand at packaging it in a bit, and will probably add it to the wayland/windowmanager overlay I'm maintaining along with a nixpkgs PR if I get it working. Arcan "Arcan - [Display Server, Multimedia Framework, Game Engine] -"Desktop Engine" http://arcan-" Durden "Desktop Environment for Arcan "
I've succeeded in building and running Arcan and Durden. works but I'm sure there are things in the closure that don't belong (X11?). I started with Void Linux's dependency list and kept adding things cmake complained about until it built. Getting it running was challenging because it depends on a bunch of environment variables being set correctly and neither the error messages or the documentation are all that clear. It also wants its binary to be SUID. Here's what I've been doing while working on the package and figuring out how to run the binary: From a virtual terminal: Here are my settings for the environment variables: I created all the directories in $HOME which are referenced in the variables. I don't have a package for Durden. I installed it by cloning it off github and then making a symbolic link to its subdirectory from . I'm running this on a laptop with Intel graphics, and have been working on it in a virtual terminal with my x session left running in another. The one time I switched back to xserver without killing arcan first, it hung my laptop.
That is great to hear thank you for sharing. I'm pretty occupied right now with some traveling, but I'll try to take a look at this soon. Thank you for writing it up though, I'm sure someone will stumble on that and be thankful too! EDIT: oops, I thought this was on a different repo, I probably would've worded this differently otherwise. Either way, still excited to see this. :)
I've and am typing this in Firefox running in an X server in a window on Arcan. The package definition builds an executable called and you can invoke it from a shell prompt in a Durden window to run it. To run a second instance, use . To start an application or window manager in the X server from a shell prompt, set first as in . It doesn't automatically detect when its window size changes, but works.

The font path part of the derivation isn't right. I made two attempts at making it work and left them both in the derivation. The code in puts a font path into the configure flag provided for that purpose, but the resulting executable can't find the fonts. The other chunk of code in links fonts into the derivation, and that part gets the truetype fonts to work but not the bitmap fonts. I'm happy to run so I stopped there, but someone who knows more about X fonts than me should take a look.
I was curious about the various Arcan tools (clipboard, image viewer, network proxy, wayland bridge) so I packaged them. There had been a lot of change in the tools directory between the last release and master, so I packaged the tools from master. So the latest commit in adds , and several child packages under . I haven't figured out how to get the Wayland bridge to work, but I wasn't using Wayland before this so may be missing something obvious. I have been running and with Durden on my laptop for about a week now and am finding it very usable and stable.
Hey there and Wish I had found this thread earlier. I had a go at packaging Arcan at . It builds, however it still has some rough edges at runtime (most glaringly, mouse and keyboard don't work if not running as root - addressing that now). I'm going to study what the two of you have discovered so far, and maybe we can join forces in bringing this very interesting piece of software to the Nix ecosystem.
Hey I've just updated with a commit to make it build more recent versions of and . I've had no problems with but the recent litters the screen with mouse cursor trails. It would be great to get it running not as root so keep us posted on your progress.
To get the keyboard and mouse to work when not running as root, just add the user running to the group.
thanks, that worked! I brushed the dust off my Arcan/Nix code just to try out your suggestion. Now I have Arcan, its core utilities and the example compositors (except which fails to find something or other) running on my system, including a terminal - one more thing to run besides , , or in a vanilla console! Neat!

I skipped the whole overlays thing and ended up with a file that can be submitted to Nixpkgs (or imported into ). Guess I should share that part of my config as a gist or something before submitting a PR? Or is there something missing, as might be suggested by Food for thought a.k.a. "and then what?": Port my i3 keys to a fork of Durden, ripping some features from Prio to finally organize my daily terminal-browser-devtools grind in a sane way :grin: We have a powerful engine on our hands and a whole lot of Lua ricing to do. Would be cool if some logic from can be ported over to an environment outside X.
Gist: (Sure is cool how Durden and Prio have different mouse capture behavior btw)
I marked this as stale due to inactivity. &rarr;
There is still some good progress over at the gist.
I found this while looking into a new project (, ) posted to today. (By same developers as arcan, and uses arcan, so I was curious if we had it packaged.) Just cross-referencing on the off-chance it helps anyone here. I'll also add this to the gist.