From bbc6174eaa76065f0d94a0c2a107dbb7594cc3c8 Mon Sep 17 00:00:00 2001 From: Anund Date: Sat, 9 Sep 2023 07:46:42 +1000 Subject: [PATCH] audiobookshelf: fix reference to getopt in wrapper --- pkgs/servers/audiobookshelf/default.nix | 17 +++++++++++++++-- pkgs/servers/audiobookshelf/wrapper.nix | 6 +++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/audiobookshelf/default.nix b/pkgs/servers/audiobookshelf/default.nix index 748800f52ed6..4aafa973bb3d 100644 --- a/pkgs/servers/audiobookshelf/default.nix +++ b/pkgs/servers/audiobookshelf/default.nix @@ -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 nodejs = nodejs_18; @@ -28,7 +41,7 @@ let }; wrapper = import ./wrapper.nix { - inherit stdenv ffmpeg-full tone pname nodejs; + inherit stdenv ffmpeg-full tone pname nodejs getopt; }; in buildNpmPackage { diff --git a/pkgs/servers/audiobookshelf/wrapper.nix b/pkgs/servers/audiobookshelf/wrapper.nix index cbe7e3ebd971..787ee5ac4917 100644 --- a/pkgs/servers/audiobookshelf/wrapper.nix +++ b/pkgs/servers/audiobookshelf/wrapper.nix @@ -1,4 +1,4 @@ -{ stdenv, ffmpeg-full, tone, pname, nodejs }: '' +{ stdenv, ffmpeg-full, tone, pname, nodejs, getopt }: '' #!${stdenv.shell} port=8000 @@ -7,7 +7,7 @@ metadata=$(pwd)/metadata LONGOPTS=host:,port:,config:,metadata:,help - args=$(getopt -l "$LONGOPTS" -o h -- "$@") + args=$(${getopt}/bin/getopt -l "$LONGOPTS" -o h -- "$@") eval set -- "$args" @@ -44,7 +44,7 @@ ;; --help|-h) echo "Usage: audiobookshelf [--host ] [--port ] [--metadata ] [--config ]" - shift + exit 0 ;; esac shift