From 75656dcfa9b9fbbfd9ea7881f3acdd9227acac11 Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 6 Jan 2024 13:28:01 -0600 Subject: [PATCH] Update obs-streamfx to 0.12.0b299 --- flake.lock | 42 ++++++++++++++++++++++++++++++++++++++---- flake.nix | 27 +++++++++++++++++---------- obs-streamfx.nix | 11 ++++++----- parse-version.patch | 20 ++++++++++++++++++++ 4 files changed, 81 insertions(+), 19 deletions(-) create mode 100644 parse-version.patch diff --git a/flake.lock b/flake.lock index c1e9d39..557beca 100644 --- a/flake.lock +++ b/flake.lock @@ -1,25 +1,59 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1680665430, - "narHash": "sha256-MTVhTukwza1Jlq2gECITZPFnhROmylP2uv3O3cSqQCE=", + "lastModified": 1704420045, + "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5233fd2ba76a3accb5aaa999c00509a11fd0793c", + "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index b3b1231..a7c26d3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,15 +1,22 @@ { description = "obs-streamfx packaged"; - inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11; + inputs = { + nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11; + flake-utils.url = github:numtide/flake-utils; + }; - outputs = { nixpkgs, ... }: - let - pkgs = import nixpkgs { - system = "x86_64-linux"; - }; - in - { - obs-streamfx = pkgs.qt6Packages.callPackage ./obs-streamfx.nix { }; - }; + outputs = { nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + packages = rec { + obs-streamfx = pkgs.qt6Packages.callPackage ./obs-streamfx.nix { }; + default = obs-streamfx; + }; + }); } diff --git a/obs-streamfx.nix b/obs-streamfx.nix index 3a92419..ccef6c2 100644 --- a/obs-streamfx.nix +++ b/obs-streamfx.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "obs-streamfx"; - version = "0.12.0b202"; + version = "0.12.0b299"; src = fetchFromGitHub { owner = "Xaymar"; repo = "obs-StreamFx"; rev = version; - sha256 = "J/EevYKJuB4LsdNk3snigTgLizLXYPZt4RMEwLKGsC0="; + sha256 = "H93wwLiqzkKssxH4PI8OJltjVUlHwv8BKiS7S7rC1UI="; fetchSubmodules = true; }; @@ -30,15 +30,16 @@ stdenv.mkDerivation rec { "-DCMAKE_BUILD_TYPE=Release" "-DENABLE_CLANG=true" "-DENABLE_PROFILING=off" - "-DPACKAGE_NAME=streamfx-nix-${version}" - "-Dlibobs_DIR=${obs-studio.out}/lib" + "-DPACKAGE_NAME=${pname}-${version}" + "-DVERSION=${version}" "-DSTRUCTURE_PACKAGEMANAGER=true" + "-DSTANDALONE=true" "-DENABLE_UPDATER=false" "-DENABLE_FRONTEND=true" "-DREQUIRE_JSON=true" ]; - patches = [ ./0001-Add-more-version-prints.patch ]; + patches = [ ./parse-version.patch ]; meta = with lib; { description = "StreamFX is a plugin for OBSĀ® Studio which adds many new effects, filters, sources, transitions and encoders - all for free! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here."; diff --git a/parse-version.patch b/parse-version.patch new file mode 100644 index 0000000..2aa36f4 --- /dev/null +++ b/parse-version.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 186c32b1..5cf9ce12 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -227,7 +227,6 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") + else() + message(STATUS "Not a git repository, automatic version detection disabled.") + endif() +-version(PARSE _VERSION "${_VERSION}" REQUIRE "PATCH;TWEAK") + + # Allow manual overrides of the detected version. + if(NOT ("${${PREFIX}VERSION}" STREQUAL "")) +@@ -244,6 +243,7 @@ if(NOT ("${${PREFIX}VERSION}" STREQUAL "")) + BUILD "${_VERSION_CFG_BUILD}" + ) + endif() ++version(PARSE _VERSION "${_VERSION}" REQUIRE "PATCH;TWEAK") + + set(_VERSION_THIN "${_VERSION_MAJOR}.${_VERSION_MINOR}.${_VERSION_PATCH}") + if(NOT (_VERSION_PRERELEASE STREQUAL ""))