2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, mkDerivation
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, extra-cmake-modules
|
|
|
|
|
|
|
|
# common deps
|
|
|
|
, karchive
|
|
|
|
|
|
|
|
# client deps
|
|
|
|
, qtbase
|
2020-09-25 04:45:31 +00:00
|
|
|
, qtkeychain
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtmultimedia
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
2020-09-25 04:45:31 +00:00
|
|
|
, libsecret
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# optional client deps
|
|
|
|
, giflib
|
|
|
|
, kdnssd
|
|
|
|
, libvpx
|
|
|
|
, miniupnpc
|
|
|
|
, qtx11extras # kis
|
|
|
|
|
|
|
|
# optional server deps
|
|
|
|
, libmicrohttpd
|
|
|
|
, libsodium
|
2020-09-25 04:45:31 +00:00
|
|
|
, withSystemd ? stdenv.isLinux
|
|
|
|
, systemd ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# options
|
|
|
|
, buildClient ? true
|
|
|
|
, buildServer ? true
|
|
|
|
, buildServerGui ? true # if false builds a headless server
|
|
|
|
, buildExtraTools ? false
|
|
|
|
, enableKisTablet ? false # enable improved graphics tablet support
|
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
clientDeps = [
|
|
|
|
qtbase
|
2020-09-25 04:45:31 +00:00
|
|
|
qtkeychain
|
2020-04-24 23:36:52 +00:00
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qttools
|
2020-09-25 04:45:31 +00:00
|
|
|
libsecret
|
2020-04-24 23:36:52 +00:00
|
|
|
# optional:
|
|
|
|
giflib # gif animation export support
|
|
|
|
kdnssd # local server discovery with Zeroconf
|
|
|
|
libvpx # WebM video export
|
|
|
|
miniupnpc # automatic port forwarding
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
serverDeps = [
|
|
|
|
# optional:
|
|
|
|
libmicrohttpd # HTTP admin api
|
|
|
|
libsodium # ext-auth support
|
2020-09-25 04:45:31 +00:00
|
|
|
] ++ optional withSystemd systemd;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
kisDeps = [
|
|
|
|
qtx11extras
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
boolToFlag = bool:
|
|
|
|
if bool then "ON" else "OFF";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
in mkDerivation rec {
|
|
|
|
pname = "drawpile";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "2.1.19";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drawpile";
|
|
|
|
repo = "drawpile";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-MNmzcqTHfMms6q3ZilrChE5WoGzGxnAOkB0a75udA1I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
karchive
|
|
|
|
]
|
|
|
|
++ optionals buildClient clientDeps
|
|
|
|
++ optionals buildServer serverDeps
|
|
|
|
++ optionals enableKisTablet kisDeps;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-Wno-dev"
|
|
|
|
"-DINITSYS=systemd"
|
|
|
|
"-DCLIENT=${boolToFlag buildClient}"
|
|
|
|
"-DSERVER=${boolToFlag buildServer}"
|
|
|
|
"-DSERVERGUI=${boolToFlag buildServerGui}"
|
|
|
|
"-DTOOLS=${boolToFlag buildExtraTools}"
|
|
|
|
"-DKIS_TABLET=${boolToFlag enableKisTablet}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
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 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|