audiobookshelf: fix reference to getopt in wrapper

This commit is contained in:
Anund 2023-09-09 07:46:42 +10:00
parent 57a0c58e72
commit bbc6174eaa
2 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,17 @@
{ lib, stdenv, pkgs, fetchFromGitHub, runCommand, buildNpmPackage, nodejs_18, tone, ffmpeg-full, util-linux, python3 }: {
lib,
stdenv,
pkgs,
fetchFromGitHub,
runCommand,
buildNpmPackage,
nodejs_18,
tone,
ffmpeg-full,
util-linux,
python3,
getopt
}:
let let
nodejs = nodejs_18; nodejs = nodejs_18;
@ -28,7 +41,7 @@ let
}; };
wrapper = import ./wrapper.nix { wrapper = import ./wrapper.nix {
inherit stdenv ffmpeg-full tone pname nodejs; inherit stdenv ffmpeg-full tone pname nodejs getopt;
}; };
in buildNpmPackage { in buildNpmPackage {

View File

@ -1,4 +1,4 @@
{ stdenv, ffmpeg-full, tone, pname, nodejs }: '' { stdenv, ffmpeg-full, tone, pname, nodejs, getopt }: ''
#!${stdenv.shell} #!${stdenv.shell}
port=8000 port=8000
@ -7,7 +7,7 @@
metadata=$(pwd)/metadata metadata=$(pwd)/metadata
LONGOPTS=host:,port:,config:,metadata:,help LONGOPTS=host:,port:,config:,metadata:,help
args=$(getopt -l "$LONGOPTS" -o h -- "$@") args=$(${getopt}/bin/getopt -l "$LONGOPTS" -o h -- "$@")
eval set -- "$args" eval set -- "$args"
@ -44,7 +44,7 @@
;; ;;
--help|-h) --help|-h)
echo "Usage: audiobookshelf [--host <host>] [--port <port>] [--metadata <dir>] [--config <dir>]" echo "Usage: audiobookshelf [--host <host>] [--port <port>] [--metadata <dir>] [--config <dir>]"
shift exit 0
;; ;;
esac esac
shift shift