mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 09:58:26 +00:00
Improve nix files
List available versions; refactor modules to reuse default values.
This commit is contained in:
26
nix/pkg.nix
26
nix/pkg.nix
@ -1,6 +1,5 @@
|
||||
version: {stdenv, fetchzip, file, curl, inotifyTools, fetchurl, jre8_headless, bash}:
|
||||
cfg: {stdenv, fetchzip, file, curl, inotifyTools, fetchurl, jre8_headless, bash}:
|
||||
let
|
||||
# version = "0.2.0";
|
||||
meta = with stdenv.lib; {
|
||||
description = "Docspell helps to organize and archive your paper documents.";
|
||||
homepage = https://github.com/eikek/docspell;
|
||||
@ -9,12 +8,9 @@ let
|
||||
};
|
||||
in
|
||||
{ server = stdenv.mkDerivation rec {
|
||||
name = "docspell-server-${version}";
|
||||
name = "docspell-server-${cfg.version}";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/eikek/docspell/releases/download/v${version}/docspell-restserver-${version}.zip";
|
||||
sha256 = "1mpyd66pcsd2q4wx9vszldqlamz9qgv6abrxh7xwzw23np61avy5";
|
||||
};
|
||||
src = fetchzip cfg.server;
|
||||
|
||||
buildInputs = [ jre8_headless ];
|
||||
|
||||
@ -34,12 +30,9 @@ in
|
||||
};
|
||||
|
||||
joex = stdenv.mkDerivation rec {
|
||||
name = "docspell-joex-${version}";
|
||||
name = "docspell-joex-${cfg.version}";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/eikek/docspell/releases/download/v${version}/docspell-joex-${version}.zip";
|
||||
sha256 = "1ycfcfcv24vvkdbzvnahj500gb5l9vdls4bxq0jd1zn72p4z765f";
|
||||
};
|
||||
src = fetchzip cfg.joex;
|
||||
|
||||
buildInputs = [ jre8_headless ];
|
||||
|
||||
@ -58,13 +51,10 @@ in
|
||||
inherit meta;
|
||||
};
|
||||
|
||||
tools = stdenv.mkDerivation rec {
|
||||
name = "docspell-tools-${version}";
|
||||
tools = stdenv.mkDerivation {
|
||||
name = "docspell-tools-${cfg.version}";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/eikek/docspell/releases/download/v${version}/docspell-tools-${version}.zip";
|
||||
sha256 = "0hd93rlnnrq8xj7knp38x1jj2mv4y5lvbcv968bzk5f1az51qsvg";
|
||||
};
|
||||
src = fetchzip cfg.tools;
|
||||
|
||||
buildPhase = "true";
|
||||
|
||||
|
Reference in New Issue
Block a user