From a895e7e8339ff163354dbfb09c8c7997124e4df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Wed, 19 Apr 2023 12:58:11 +0200 Subject: [PATCH 1/2] filebot: 5.0.1 -> 5.0.2 --- pkgs/applications/video/filebot/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/video/filebot/default.nix b/pkgs/applications/video/filebot/default.nix index 014e009f2496..15a8161ed26f 100644 --- a/pkgs/applications/video/filebot/default.nix +++ b/pkgs/applications/video/filebot/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "filebot"; - version = "5.0.1"; + version = "5.0.2"; src = fetchurl { - url = "https://web.archive.org/web/20220305095926/https://get.filebot.net/filebot/FileBot_${version}/FileBot_${version}-portable.tar.xz"; - sha256 = "sha256-0d0+o8ZiF1m83AasjoxUDNtUSquy69wFY1m1oYeybFw="; + url = "https://web.archive.org/web/20230418205553/https://get.filebot.net/filebot/FileBot_${version}/FileBot_${version}-portable.tar.xz"; + hash = "sha256-XnzBXZy/gNA8qf7XairoviRmdQiXHbW19BgbHL52SP0="; }; unpackPhase = "tar xvf $src"; From 0ddbe69156f9846c6e7f311cf69d1a7e97368c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Wed, 19 Apr 2023 13:13:34 +0200 Subject: [PATCH 2/2] filebot: fix stty command in --mode interactive --- pkgs/applications/video/filebot/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/video/filebot/default.nix b/pkgs/applications/video/filebot/default.nix index 15a8161ed26f..09f99f400aa6 100644 --- a/pkgs/applications/video/filebot/default.nix +++ b/pkgs/applications/video/filebot/default.nix @@ -1,8 +1,13 @@ -{ lib, stdenv, fetchurl, openjdk17, makeWrapper, autoPatchelfHook +{ lib, stdenv, fetchurl, coreutils, openjdk17, makeWrapper, autoPatchelfHook , zlib, libzen, libmediainfo, curlWithGnuTls, libmms, glib }: -stdenv.mkDerivation rec { +let + lanterna = fetchurl { + url = "https://search.maven.org/remotecontent?filepath=com/googlecode/lanterna/lanterna/3.1.1/lanterna-3.1.1.jar"; + hash = "sha256-7zxCeXYW5v9ritnvkwRpPKdgSptCmkT3HJOaNgQHUmQ="; + }; +in stdenv.mkDerivation rec { pname = "filebot"; version = "5.0.2"; @@ -17,6 +22,11 @@ stdenv.mkDerivation rec { buildInputs = [ zlib libzen libmediainfo curlWithGnuTls libmms glib ]; + postPatch = '' + # replace lanterna.jar to be able to specify `com.googlecode.lanterna.terminal.UnixTerminal.sttyCommand` + cp ${lanterna} jar/lanterna.jar + ''; + dontBuild = true; installPhase = '' mkdir -p $out/opt $out/bin @@ -25,7 +35,8 @@ stdenv.mkDerivation rec { # Filebot writes to $APP_DATA, which fails due to read-only filesystem. Using current user .local directory instead. substituteInPlace $out/opt/filebot.sh \ --replace 'APP_DATA="$FILEBOT_HOME/data/$(id -u)"' 'APP_DATA=''${XDG_DATA_HOME:-$HOME/.local/share}/filebot/data' \ - --replace '$FILEBOT_HOME/data/.license' '$APP_DATA/.license' + --replace '$FILEBOT_HOME/data/.license' '$APP_DATA/.license' \ + --replace '-jar "$FILEBOT_HOME/jar/filebot.jar"' '-Dcom.googlecode.lanterna.terminal.UnixTerminal.sttyCommand=${coreutils}/bin/stty -jar "$FILEBOT_HOME/jar/filebot.jar"' wrapProgram $out/opt/filebot.sh \ --prefix PATH : ${lib.makeBinPath [ openjdk17 ]} # Expose the binary in bin to make runnable.