filebot: fix stty command in --mode interactive
This commit is contained in:
parent
a895e7e833
commit
0ddbe69156
|
@ -1,8 +1,13 @@
|
||||||
{ lib, stdenv, fetchurl, openjdk17, makeWrapper, autoPatchelfHook
|
{ lib, stdenv, fetchurl, coreutils, openjdk17, makeWrapper, autoPatchelfHook
|
||||||
, zlib, libzen, libmediainfo, curlWithGnuTls, libmms, glib
|
, 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";
|
pname = "filebot";
|
||||||
version = "5.0.2";
|
version = "5.0.2";
|
||||||
|
|
||||||
|
@ -17,6 +22,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ zlib libzen libmediainfo curlWithGnuTls libmms glib ];
|
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;
|
dontBuild = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/opt $out/bin
|
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.
|
# Filebot writes to $APP_DATA, which fails due to read-only filesystem. Using current user .local directory instead.
|
||||||
substituteInPlace $out/opt/filebot.sh \
|
substituteInPlace $out/opt/filebot.sh \
|
||||||
--replace 'APP_DATA="$FILEBOT_HOME/data/$(id -u)"' 'APP_DATA=''${XDG_DATA_HOME:-$HOME/.local/share}/filebot/data' \
|
--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 \
|
wrapProgram $out/opt/filebot.sh \
|
||||||
--prefix PATH : ${lib.makeBinPath [ openjdk17 ]}
|
--prefix PATH : ${lib.makeBinPath [ openjdk17 ]}
|
||||||
# Expose the binary in bin to make runnable.
|
# Expose the binary in bin to make runnable.
|
||||||
|
|
Loading…
Reference in a new issue