mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
drawpile: make it build with a recent libmicrohttpd
This commit is contained in:
parent
7bb2382432
commit
375aca6f76
@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
{ stdenv
|
||||
, lib
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, extra-cmake-modules
|
||||
|
||||
# common deps
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
# client deps
|
||||
, qtbase
|
||||
, qtkeychain
|
||||
, qtmultimedia
|
||||
, qtsvg
|
||||
, qttools
|
||||
@ -23,6 +25,8 @@
|
||||
# optional server deps
|
||||
, libmicrohttpd
|
||||
, libsodium
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, systemd ? null
|
||||
|
||||
# options
|
||||
, buildClient ? true
|
||||
@ -35,11 +39,9 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
commonDeps = [
|
||||
karchive
|
||||
];
|
||||
clientDeps = [
|
||||
qtbase
|
||||
qtkeychain
|
||||
qtmultimedia
|
||||
qtsvg
|
||||
qttools
|
||||
@ -49,40 +51,57 @@ let
|
||||
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";
|
||||
version = "2.1.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz";
|
||||
sha256 = "11lhn1mymhqk9g5sh384xhj3qw8h9lv88pr768y9q6kg3sl7nzzf";
|
||||
src = fetchFromGitHub {
|
||||
owner = "drawpile";
|
||||
repo = "drawpile";
|
||||
rev = "${version}";
|
||||
sha256 = "sha256-AFFY+FcY9ExAur13OoWR9285RZtBe6jnRIrwi5raiCM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
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"; })
|
||||
];
|
||||
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";
|
||||
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}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
|
||||
|
Loading…
Reference in New Issue
Block a user