diff --git a/pkgs/by-name/ar/arcan/package.nix b/pkgs/by-name/ar/arcan/package.nix index ce4fc7256b77..d3eeec5c5838 100644 --- a/pkgs/by-name/ar/arcan/package.nix +++ b/pkgs/by-name/ar/arcan/package.nix @@ -1,106 +1,69 @@ -{ 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 +{ + lib, + 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, + stdenv, + tesseract, + valgrind, + wayland, + wayland-protocols, + xcbutil, + xcbutilwm, + xz, + # Boolean flags + buildManPages ? true, + useBuiltinLua ? true, + useEspeak ? !stdenv.isDarwin, + useStaticLibuvc ? true, + useStaticOpenAL ? true, + useStaticSqlite ? true, + useTracy ? true, + # Configurable options + sources ? callPackage ./sources.nix { }, }: -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; + inherit (sources.letoram-arcan) pname version src; nativeBuildInputs = [ cmake makeWrapper pkg-config - ] ++ lib.optionals buildManPages [ - ruby - ]; + ] ++ lib.optionals buildManPages [ ruby ]; buildInputs = [ SDL2 @@ -140,47 +103,7 @@ stdenv.mkDerivation (finalAttrs: { 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 - ''; + ] ++ lib.optionals useEspeak [ espeak-ng ]; cmakeFlags = [ # The upstream project recommends tagging the distribution @@ -195,11 +118,57 @@ stdenv.mkDerivation (finalAttrs: { "../src" ]; - hardeningDisable = [ - "format" - ]; + outputs = [ "out" "dev" "lib" "man" ]; + + hardeningDisable = [ "format" ]; + + strictDeps = true; + + # Emulate external/git/clone.sh + postUnpack = + let + inherit (sources) + letoram-openal + libuvc + luajit + tracy + ; + 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-fail "/usr/bin" "$out/bin" \ + --replace-fail "/usr/share" "$out/share" + substituteInPlace ./src/CMakeLists.txt \ + --replace-fail "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 + ''; passthru = { + inherit sources; wrapper = callPackage ./wrapper.nix { }; }; @@ -212,7 +181,11 @@ 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 lib.licenses; [ bsd3 gpl2Plus lgpl2Plus ]; + license = with lib.licenses; [ + bsd3 + gpl2Plus + lgpl2Plus + ]; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; }; diff --git a/pkgs/by-name/ar/arcan/sources.nix b/pkgs/by-name/ar/arcan/sources.nix new file mode 100644 index 000000000000..6701021eb6b4 --- /dev/null +++ b/pkgs/by-name/ar/arcan/sources.nix @@ -0,0 +1,80 @@ +{ + fetchFromGitHub, +}: + +{ + letoram-arcan = let + self = { + pname = "arcan"; + version = "0.6.3"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "arcan"; + rev = self.version; + hash = "sha256-ZSKOkNrFa2QgmXmmXnLkB1pehmVJbEFVeNs43Z2DSKo="; + }; + }; + in + self; + + letoram-openal = { + pname = "letoram-openal"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "openal"; + rev = "81e1b364339b6aa2b183f39fc16c55eb5857e97a"; + hash = "sha256-X3C3TDZPiOhdZdpApC4h4KeBiWFMxkFsmE3gQ1Rz420="; + }; + }; + + libuvc = { + pname = "libuvc"; + version = "0.0.7-unstable-2024-03-05"; + + src = fetchFromGitHub { + owner = "libuvc"; + repo = "libuvc"; + rev = "047920bcdfb1dac42424c90de5cc77dfc9fba04d"; + hash = "sha256-Ds4N9ezdO44eBszushQVvK0SUVDwxGkUty386VGqbT0="; + }; + }; + + luajit = { + pname = "luajit"; + version = "2.1-unstable-2024-04-19"; + + src = fetchFromGitHub { + owner = "LuaJIT"; + repo = "LuaJIT"; + rev = "9b5e837ac2dfdc0638830c048a47ca9378c504d3"; + hash = "sha256-GflF/sELSNanc9G4WMzoOadUBOFSs6OwqhAXa4sudWA="; + }; + }; + + tracy = { + pname = "tracy"; + version = "0.9.1-unstable-2023-10-09"; + + src = fetchFromGitHub { + owner = "wolfpld"; + repo = "tracy"; + rev = "93537dff336e0796b01262e8271e4d63bf39f195"; + hash = "sha256-FNB2zTbwk8hMNmhofz9GMts7dvH9phBRVIdgVjRcyQM="; + }; + }; + + letoram-tracy = { + pname = "letoram-tracy"; + version = "0-unstable-2024-04-12"; + + src = fetchFromGitHub { + owner = "letoram"; + repo = "tracy"; + rev = "5b3513d9838317bfc0e72344b94aa4443943c2fd"; + hash = "sha256-hUdYC4ziQ7V7T7k99MERp81F5mPHzFtPFrqReWsTjOQ="; + }; + }; +} diff --git a/pkgs/by-name/ca/cat9/package.nix b/pkgs/by-name/ca/cat9/package.nix index 8cee41e62f7e..011450c02560 100644 --- a/pkgs/by-name/ca/cat9/package.nix +++ b/pkgs/by-name/ca/cat9/package.nix @@ -1,17 +1,18 @@ -{ lib -, stdenvNoCC -, fetchFromGitHub +{ + lib, + fetchFromGitHub, + stdenvNoCC, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "cat9"; - version = "unstable-2023-11-06"; + version = "0-unstable-2024-06-17"; src = fetchFromGitHub { owner = "letoram"; repo = "cat9"; - rev = "a807776a85237ab0bdd0a712fb33c176fc295e30"; - hash = "sha256-OlH8FgVBk76Qw+5mnsrryXOL9GbPJWlwUGtYlLuAPxQ="; + rev = "f00e8791c1826065d4a93ace12e55ab5732d17a7"; + hash = "sha256-xFw6r7SQK0T5j7hVK3U39U2Q/qZow6Ad/R0Cl6nqUQw="; }; dontConfigure = true; diff --git a/pkgs/by-name/du/durden/package.nix b/pkgs/by-name/du/durden/package.nix index 3d72e132964a..96d721a5561e 100644 --- a/pkgs/by-name/du/durden/package.nix +++ b/pkgs/by-name/du/durden/package.nix @@ -1,17 +1,18 @@ -{ lib -, stdenvNoCC -, fetchFromGitHub +{ + lib, + stdenvNoCC, + fetchFromGitHub, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "durden"; - version = "unstable-2023-10-23"; + version = "0-unstable-2024-06-23"; src = fetchFromGitHub { owner = "letoram"; repo = "durden"; - rev = "347dba6da011bbaa70c6edaf82a2d915f4057db3"; - hash = "sha256-iNf7fOzz7mf1CXG5leCenkSTrdCc9/KL8VLw8gUIyKE="; + rev = "dffb94b69355ffa9cda074c1d0a48af74b78c220"; + hash = "sha256-sBhlBk4vAYwedw4VerUfY80SXbVoEDid54si6qwDeXs="; }; dontConfigure = true;