2020-08-24 07:54:17 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2019-09-05 12:47:57 +00:00
|
|
|
, mkDerivation
|
2020-08-24 07:54:17 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2019-04-15 22:20:13 +00:00
|
|
|
, extra-cmake-modules
|
|
|
|
|
|
|
|
# common deps
|
|
|
|
, karchive
|
|
|
|
|
|
|
|
# client deps
|
2018-06-13 12:37:53 +00:00
|
|
|
, qtbase
|
2020-08-24 07:54:17 +00:00
|
|
|
, qtkeychain
|
2018-06-13 12:37:53 +00:00
|
|
|
, qtmultimedia
|
2019-04-15 22:20:13 +00:00
|
|
|
, qtsvg
|
2018-06-13 12:37:53 +00:00
|
|
|
, qttools
|
2019-04-15 22:20:13 +00:00
|
|
|
|
|
|
|
# optional client deps
|
2018-06-13 12:37:53 +00:00
|
|
|
, giflib
|
2019-04-15 22:20:13 +00:00
|
|
|
, kdnssd
|
2019-03-13 10:29:56 +00:00
|
|
|
, libvpx
|
2019-04-15 22:20:13 +00:00
|
|
|
, miniupnpc
|
|
|
|
, qtx11extras # kis
|
|
|
|
|
|
|
|
# optional server deps
|
|
|
|
, libmicrohttpd
|
|
|
|
, libsodium
|
2020-08-24 07:54:17 +00:00
|
|
|
, withSystemd ? stdenv.isLinux
|
|
|
|
, systemd ? null
|
2019-04-15 22:20:13 +00:00
|
|
|
|
|
|
|
# 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 12:37:53 +00:00
|
|
|
}:
|
|
|
|
|
2019-09-05 12:47:57 +00:00
|
|
|
with lib;
|
2019-04-15 22:20:13 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
clientDeps = [
|
|
|
|
qtbase
|
2020-08-24 07:54:17 +00:00
|
|
|
qtkeychain
|
2019-04-15 22:20:13 +00:00
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
# optional:
|
|
|
|
giflib # gif animation export support
|
|
|
|
kdnssd # local server discovery with Zeroconf
|
|
|
|
libvpx # WebM video export
|
|
|
|
miniupnpc # automatic port forwarding
|
|
|
|
];
|
2020-08-24 07:54:17 +00:00
|
|
|
|
2019-04-15 22:20:13 +00:00
|
|
|
serverDeps = [
|
|
|
|
# optional:
|
|
|
|
libmicrohttpd # HTTP admin api
|
|
|
|
libsodium # ext-auth support
|
2020-08-24 07:54:17 +00:00
|
|
|
] ++ optional withSystemd systemd;
|
|
|
|
|
2019-04-15 22:20:13 +00:00
|
|
|
kisDeps = [
|
|
|
|
qtx11extras
|
|
|
|
];
|
|
|
|
|
2020-08-24 07:54:17 +00:00
|
|
|
boolToFlag = bool:
|
|
|
|
if bool then "ON" else "OFF";
|
|
|
|
|
2019-09-05 12:47:57 +00:00
|
|
|
in mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "drawpile";
|
2020-03-04 08:31:46 +00:00
|
|
|
version = "2.1.17";
|
2019-04-15 22:20:13 +00:00
|
|
|
|
2020-08-24 07:54:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drawpile";
|
|
|
|
repo = "drawpile";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "sha256-AFFY+FcY9ExAur13OoWR9285RZtBe6jnRIrwi5raiCM=";
|
2018-06-13 12:37:53 +00:00
|
|
|
};
|
2019-04-15 22:20:13 +00:00
|
|
|
|
2020-08-24 07:54:17 +00:00
|
|
|
patches = [
|
|
|
|
# fix for libmicrohttpd 0.9.71
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/drawpile/Drawpile/commit/ed1a75deb113da2d1df91a28f557509c4897130e.diff";
|
|
|
|
sha256 = "sha256-54wabH5F3Hf+6vv9rpCwCRdhjSaUFtuF/mE1/U+CpOA=";
|
|
|
|
name = "mhdfix.patch"; })
|
|
|
|
];
|
|
|
|
|
|
|
|
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}"
|
2018-06-13 12:37:53 +00:00
|
|
|
];
|
|
|
|
|
2019-04-15 22:20:13 +00:00
|
|
|
meta = {
|
2018-06-13 12:37:53 +00:00
|
|
|
description = "A collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://drawpile.net/";
|
|
|
|
downloadPage = "https://drawpile.net/download/";
|
2018-06-13 12:37:53 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
2019-04-11 04:27:17 +00:00
|
|
|
platforms = platforms.unix;
|
2018-06-13 12:37:53 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|