2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
2023-08-04 22:07:22 +00:00
|
|
|
, jdk17_headless
|
2022-08-21 13:32:41 +00:00
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "komga";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.2.1";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/gotson/${pname}/releases/download/v${version}/${pname}-${version}.jar";
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-+4At5of/jaol4c1eElpw/D9hDnWSkc8x4gCmqqg88as=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildCommand = ''
|
2023-08-04 22:07:22 +00:00
|
|
|
makeWrapper ${jdk17_headless}/bin/java $out/bin/komga --add-flags "-jar $src"
|
2022-08-21 13:32:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
komga = nixosTests.komga;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Free and open source comics/mangas server";
|
|
|
|
homepage = "https://komga.org/";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
platforms = jdk17_headless.meta.platforms;
|
2022-08-21 13:32:41 +00:00
|
|
|
maintainers = with maintainers; [ govanify ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|