Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 nix-update-script, 5 6 cmake, 7 ninja, 8 9 alsa-lib, 10 asio, 11 curl, 12 libremidi, 13 nlohmann_json, 14 obs-studio, 15 opencv, 16 procps, 17 qtbase, 18 stdenv, 19 websocketpp, 20 libXScrnSaver, 21 libusb1, 22 pkg-config, 23# #FIXME: Could not get cmake to pick up on these dependencies 24# Ommiting them prevents cmake from building the OCR video capabilities 25# Everything else should work it's just missing this one plugin 26# tesseract, 27# leptonica, 28}: 29let 30 httplib-src = fetchFromGitHub { 31 owner = "yhirose"; 32 repo = "cpp-httplib"; 33 rev = "v0.13.3"; 34 hash = "sha256-ESaH0+n7ycpOKM+Mnv/UgT16UEx86eFMQDHB3RVmgBw="; 35 }; 36in 37stdenv.mkDerivation rec { 38 pname = "advanced-scene-switcher"; 39 version = "1.31.0"; 40 41 src = fetchFromGitHub { 42 owner = "WarmUpTill"; 43 repo = "SceneSwitcher"; 44 rev = version; 45 hash = "sha256-9gCGzIvVMQewphThdNJKUVgJYzrfkn18A97RL+4IHM8="; 46 }; 47 48 nativeBuildInputs = [ 49 cmake 50 ninja 51 pkg-config 52 ]; 53 54 buildInputs = [ 55 alsa-lib 56 asio 57 curl 58 libremidi 59 nlohmann_json 60 obs-studio 61 opencv 62 # tesseract 63 # leptonica 64 procps 65 qtbase 66 websocketpp 67 libXScrnSaver 68 libusb1 69 ]; 70 71 dontWrapQtApps = true; 72 73 postUnpack = '' 74 cp -r ${httplib-src}/* $sourceRoot/deps/cpp-httplib 75 cp -r ${libremidi.src}/* $sourceRoot/deps/libremidi 76 chmod -R +w $sourceRoot/deps/cpp-httplib 77 chmod -R +w $sourceRoot/deps/libremidi 78 ''; 79 80 # PipeWire support currently disabled in libremidi dependency. 81 # see https://github.com/NixOS/nixpkgs/pull/374469 82 cmakeFlags = [ (lib.cmakeBool "LIBREMIDI_NO_PIPEWIRE" true) ]; 83 84 env.NIX_CFLAGS_COMPILE = "-Wno-error=stringop-overflow -Wno-error=deprecated-declarations"; 85 86 passthru.updateScript = nix-update-script { }; 87 meta = with lib; { 88 description = "Automated scene switcher for OBS Studio"; 89 homepage = "https://github.com/WarmUpTill/SceneSwitcher"; 90 license = licenses.gpl2Plus; 91 platforms = platforms.linux; 92 maintainers = with lib.maintainers; [ patrickdag ]; 93 }; 94}