Skip to content

Commit

Permalink
Merge pull request #333691 from mjoerg/audiobookshelf-2.12.3-fix
Browse files Browse the repository at this point in the history
audiobookshelf: skip version checks
  • Loading branch information
adamcstephens committed Aug 10, 2024
2 parents 1336338 + 4f3cf96 commit 27e5ee9
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions pkgs/by-name/au/audiobookshelf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
ffmpeg-full,
util-linux,
python3,
getopt
getopt,
nixosTests,
}:

let
Expand All @@ -28,7 +29,7 @@ let
pname = "${pname}-client";
inherit (source) version;

src = runCommand "cp-source" {} ''
src = runCommand "cp-source" { } ''
cp -r ${src}/client $out
'';

Expand All @@ -41,13 +42,28 @@ let
};

wrapper = import ./wrapper.nix {
inherit stdenv ffmpeg-full pname nodejs getopt;
inherit
stdenv
ffmpeg-full
pname
nodejs
getopt
;
};

in buildNpmPackage {
in
buildNpmPackage {
inherit pname src;
inherit (source) version;

postPatch = ''
# Always skip version checks of the binary manager.
# We provide our own binaries, and don't want to trigger downloads.
substituteInPlace server/managers/BinaryManager.js --replace-fail \
'if (!this.validVersions.length) return true' \
'return true'
'';

buildInputs = [ util-linux ];
nativeBuildInputs = [ python3 ];

Expand All @@ -67,15 +83,21 @@ in buildNpmPackage {
chmod +x $out/bin/${pname}
'';

passthru.updateScript = ./update.nu;
passthru = {
tests.basic = nixosTests.audiobookshelf;
updateScript = ./update.nu;
};

meta = with lib; {
meta = {
homepage = "https://www.audiobookshelf.org/";
description = "Self-hosted audiobook and podcast server";
changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${source.version}";
license = licenses.gpl3;
maintainers = [ maintainers.jvanbruegge maintainers.adamcstephens ];
platforms = platforms.linux;
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
jvanbruegge
adamcstephens
];
platforms = lib.platforms.linux;
mainProgram = "audiobookshelf";
};
}

0 comments on commit 27e5ee9

Please sign in to comment.