2019-09-05 14:47:57 +02:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
2018-06-13 14:37:53 +02:00
|
|
|
, fetchurl
|
|
|
|
, cmake
|
2019-04-16 00:20:13 +02:00
|
|
|
, extra-cmake-modules
|
|
|
|
|
|
|
|
# common deps
|
|
|
|
, karchive
|
|
|
|
|
|
|
|
# client deps
|
2018-06-13 14:37:53 +02:00
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
2019-04-16 00:20:13 +02:00
|
|
|
, qtsvg
|
2018-06-13 14:37:53 +02:00
|
|
|
, qttools
|
2019-04-16 00:20:13 +02:00
|
|
|
|
|
|
|
# optional client deps
|
2018-06-13 14:37:53 +02:00
|
|
|
, giflib
|
2019-04-16 00:20:13 +02:00
|
|
|
, kdnssd
|
2019-03-13 11:29:56 +01:00
|
|
|
, libvpx
|
2019-04-16 00:20:13 +02:00
|
|
|
, miniupnpc
|
|
|
|
, qtx11extras # kis
|
|
|
|
|
|
|
|
# optional server deps
|
|
|
|
, libmicrohttpd
|
|
|
|
, libsodium
|
|
|
|
|
|
|
|
# options
|
|
|
|
, buildClient ? true
|
|
|
|
, buildServer ? true
|
|
|
|
, buildServerGui ? true # if false builds a headless server
|
|
|
|
, buildExtraTools ? false
|
|
|
|
, enableKisTablet ? false # enable improved graphics tablet support
|
2018-06-13 14:37:53 +02:00
|
|
|
}:
|
|
|
|
|
2019-09-05 14:47:57 +02:00
|
|
|
with lib;
|
2019-04-16 00:20:13 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
commonDeps = [
|
|
|
|
karchive
|
|
|
|
];
|
|
|
|
clientDeps = [
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
# optional:
|
|
|
|
giflib # gif animation export support
|
|
|
|
kdnssd # local server discovery with Zeroconf
|
|
|
|
libvpx # WebM video export
|
|
|
|
miniupnpc # automatic port forwarding
|
|
|
|
];
|
|
|
|
serverDeps = [
|
|
|
|
# optional:
|
|
|
|
libmicrohttpd # HTTP admin api
|
|
|
|
libsodium # ext-auth support
|
|
|
|
];
|
|
|
|
kisDeps = [
|
|
|
|
qtx11extras
|
|
|
|
];
|
|
|
|
|
2019-09-05 14:47:57 +02:00
|
|
|
in mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "drawpile";
|
2020-02-11 00:16:23 +01:00
|
|
|
version = "2.1.16";
|
2019-04-16 00:20:13 +02:00
|
|
|
|
2018-06-13 14:37:53 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz";
|
2020-02-11 00:16:23 +01:00
|
|
|
sha256 = "1mz64c1a5x906j2jqq7i16l1q1d97wgm2y0ybmmcyqzg09x9wyaw";
|
2018-06-13 14:37:53 +02:00
|
|
|
};
|
2019-04-16 00:20:13 +02:00
|
|
|
|
2019-03-13 11:29:56 +01:00
|
|
|
nativeBuildInputs = [
|
2018-06-13 14:37:53 +02:00
|
|
|
cmake
|
2019-04-16 00:20:13 +02:00
|
|
|
extra-cmake-modules
|
2018-06-13 14:37:53 +02:00
|
|
|
];
|
2019-04-16 00:20:13 +02:00
|
|
|
buildInputs =
|
|
|
|
commonDeps ++
|
|
|
|
optionals buildClient clientDeps ++
|
|
|
|
optionals buildServer serverDeps ++
|
|
|
|
optionals enableKisTablet kisDeps ;
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
optional (!buildClient ) "-DCLIENT=off" ++
|
|
|
|
optional (!buildServer ) "-DSERVER=off" ++
|
|
|
|
optional (!buildServerGui ) "-DSERVERGUI=off" ++
|
|
|
|
optional ( buildExtraTools) "-DTOOLS=on" ++
|
|
|
|
optional ( enableKisTablet) "-DKIS_TABLET=on";
|
2018-06-13 14:37:53 +02:00
|
|
|
|
2019-04-16 00:20:13 +02:00
|
|
|
meta = {
|
2018-06-13 14:37:53 +02:00
|
|
|
description = "A collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
|
|
|
|
homepage = https://drawpile.net/;
|
|
|
|
downloadPage = https://drawpile.net/download/;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
2019-04-11 06:27:17 +02:00
|
|
|
platforms = platforms.unix;
|
2018-06-13 14:37:53 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|