2021-06-07 21:35:43 +00:00
|
|
|
cfg: {stdenv, lib, fetchzip, file, curl, inotifyTools, fetchurl, jdk11, bash, jq, sqlite}:
|
2020-01-19 21:53:58 +00:00
|
|
|
let
|
2021-06-07 21:35:43 +00:00
|
|
|
meta = with lib; {
|
2020-01-19 21:53:58 +00:00
|
|
|
description = "Docspell helps to organize and archive your paper documents.";
|
|
|
|
homepage = https://github.com/eikek/docspell;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.eikek ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{ server = stdenv.mkDerivation rec {
|
2020-01-22 22:11:02 +00:00
|
|
|
name = "docspell-server-${cfg.version}";
|
2020-01-19 21:53:58 +00:00
|
|
|
|
2020-04-30 20:23:02 +00:00
|
|
|
src = fetchzip cfg.server;
|
2020-01-19 21:53:58 +00:00
|
|
|
|
2021-01-12 00:09:15 +00:00
|
|
|
buildInputs = [ jdk11 ];
|
2020-01-19 21:53:58 +00:00
|
|
|
|
|
|
|
buildPhase = "true";
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-01-24 20:56:48 +00:00
|
|
|
mkdir -p $out/{bin,docspell-restserver-${cfg.version}}
|
|
|
|
cp -R * $out/docspell-restserver-${cfg.version}/
|
2020-01-19 21:53:58 +00:00
|
|
|
cat > $out/bin/docspell-restserver <<-EOF
|
|
|
|
#!${bash}/bin/bash
|
2021-01-12 00:09:15 +00:00
|
|
|
$out/docspell-restserver-${cfg.version}/bin/docspell-restserver -java-home ${jdk11} "\$@"
|
2020-01-19 21:53:58 +00:00
|
|
|
EOF
|
|
|
|
chmod 755 $out/bin/docspell-restserver
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
};
|
|
|
|
|
|
|
|
joex = stdenv.mkDerivation rec {
|
2020-01-22 22:11:02 +00:00
|
|
|
name = "docspell-joex-${cfg.version}";
|
2020-01-19 21:53:58 +00:00
|
|
|
|
2020-01-22 22:11:02 +00:00
|
|
|
src = fetchzip cfg.joex;
|
2020-01-19 21:53:58 +00:00
|
|
|
|
2021-01-12 00:09:15 +00:00
|
|
|
buildInputs = [ jdk11 ];
|
2020-01-19 21:53:58 +00:00
|
|
|
|
|
|
|
buildPhase = "true";
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-01-24 20:56:48 +00:00
|
|
|
mkdir -p $out/{bin,docspell-joex-${cfg.version}}
|
|
|
|
cp -R * $out/docspell-joex-${cfg.version}/
|
2020-01-19 21:53:58 +00:00
|
|
|
cat > $out/bin/docspell-joex <<-EOF
|
|
|
|
#!${bash}/bin/bash
|
2021-01-12 00:09:15 +00:00
|
|
|
$out/docspell-joex-${cfg.version}/bin/docspell-joex -java-home ${jdk11} "\$@"
|
2020-01-19 21:53:58 +00:00
|
|
|
EOF
|
|
|
|
chmod 755 $out/bin/docspell-joex
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|