3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/drawpile/default.nix

109 lines
2.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, mkDerivation
, fetchFromGitHub
, extra-cmake-modules
# common deps
, karchive
# client deps
2018-06-13 13:37:53 +01:00
, qtbase
, qtkeychain
2018-06-13 13:37:53 +01:00
, qtmultimedia
, qtsvg
2018-06-13 13:37:53 +01:00
, qttools
, libsecret
# optional client deps
2018-06-13 13:37:53 +01:00
, giflib
, kdnssd
2019-03-13 10:29:56 +00:00
, libvpx
, miniupnpc
, qtx11extras # kis
# optional server deps
, libmicrohttpd
, libsodium
, withSystemd ? stdenv.isLinux
, systemd ? null
# 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 13:37:53 +01:00
}:
with lib;
let
clientDeps = [
qtbase
qtkeychain
qtmultimedia
qtsvg
qttools
libsecret
# 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
] ++ optional withSystemd systemd;
kisDeps = [
qtx11extras
];
boolToFlag = bool:
if bool then "ON" else "OFF";
in mkDerivation rec {
pname = "drawpile";
2021-10-02 16:50:36 +01:00
version = "2.1.20";
src = fetchFromGitHub {
owner = "drawpile";
repo = "drawpile";
rev = version;
2021-10-02 16:50:36 +01:00
sha256 = "sha256-HjGsaa2BYRNxaQP9e8Z7BkVlIKByC/ta92boGbYHRWQ=";
2018-06-13 13:37:53 +01: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}"
2018-06-13 13:37:53 +01:00
];
meta = {
2018-06-13 13:37:53 +01: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/";
2018-06-13 13:37:53 +01:00
license = licenses.gpl3;
maintainers = with maintainers; [ fgaz ];
2019-04-11 05:27:17 +01:00
platforms = platforms.unix;
2018-06-13 13:37:53 +01:00
};
}