about summary refs log tree commit diff
path: root/pkgs/applications/video/simplescreenrecorder/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/simplescreenrecorder/default.nix')
-rw-r--r--pkgs/applications/video/simplescreenrecorder/default.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix
index cbeb325e7ce09..3669666cee8ac 100644
--- a/pkgs/applications/video/simplescreenrecorder/default.nix
+++ b/pkgs/applications/video/simplescreenrecorder/default.nix
@@ -1,16 +1,16 @@
 { lib, stdenv, mkDerivation, fetchFromGitHub, alsa-lib, ffmpeg_4, libjack2, libX11, libXext, libXinerama, qtx11extras
-, libXfixes, libGLU, libGL, pkg-config, libpulseaudio, libv4l, qtbase, qttools, cmake, ninja
+, libXfixes, libGLU, libGL, pkg-config, libpulseaudio, libv4l, qtbase, qttools, cmake, ninja, nix-update-script
 }:
 
 mkDerivation rec {
   pname = "simplescreenrecorder";
-  version = "0.4.3";
+  version = "0.4.4";
 
   src = fetchFromGitHub {
     owner = "MaartenBaert";
     repo = "ssr";
     rev = version;
-    sha256 = "0mrx8wprs8bi42fwwvk6rh634ic9jnn0gkfpd6q9pcawnnbz3vq8";
+    sha256 = "sha256-cVjQmyk+rCqmDJzdnDk7bQ8kpyD3HtTw3wLVx2thHok=";
   };
 
   cmakeFlags = [
@@ -18,14 +18,13 @@ mkDerivation rec {
     "-DWITH_GLINJECT=${if stdenv.hostPlatform.isx86 then "TRUE" else "FALSE"}"
   ];
 
-  patches = [ ./fix-paths.patch ];
-
   postPatch = ''
-    for i in scripts/ssr-glinject src/AV/Input/GLInjectInput.cpp; do
-      substituteInPlace $i \
-        --subst-var out \
-        --subst-var-by sh ${stdenv.shell}
-    done
+    substituteInPlace scripts/ssr-glinject \
+      --replace-fail "libssr-glinject.so" "$out/lib/libssr-glinject.so"
+
+    substituteInPlace src/AV/Input/GLInjectInput.cpp \
+      --replace-fail "/bin/sh" "${stdenv.shell}" \
+      --replace-fail "libssr-glinject.so" "$out/lib/libssr-glinject.so"
   '';
 
   nativeBuildInputs = [ pkg-config cmake ninja ];
@@ -34,6 +33,8 @@ mkDerivation rec {
     libpulseaudio libv4l qtbase qttools qtx11extras
   ];
 
+  passthru.updateScript = nix-update-script { };
+
   meta = with lib; {
     description = "A screen recorder for Linux";
     homepage = "https://www.maartenbaert.be/simplescreenrecorder";