mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 20:53:22 +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
|
, mkDerivation
|
||||||
, fetchurl
|
, fetchFromGitHub
|
||||||
, cmake
|
, fetchpatch
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
|
|
||||||
# common deps
|
# common deps
|
||||||
@ -9,6 +10,7 @@
|
|||||||
|
|
||||||
# client deps
|
# client deps
|
||||||
, qtbase
|
, qtbase
|
||||||
|
, qtkeychain
|
||||||
, qtmultimedia
|
, qtmultimedia
|
||||||
, qtsvg
|
, qtsvg
|
||||||
, qttools
|
, qttools
|
||||||
@ -23,6 +25,8 @@
|
|||||||
# optional server deps
|
# optional server deps
|
||||||
, libmicrohttpd
|
, libmicrohttpd
|
||||||
, libsodium
|
, libsodium
|
||||||
|
, withSystemd ? stdenv.isLinux
|
||||||
|
, systemd ? null
|
||||||
|
|
||||||
# options
|
# options
|
||||||
, buildClient ? true
|
, buildClient ? true
|
||||||
@ -35,11 +39,9 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
commonDeps = [
|
|
||||||
karchive
|
|
||||||
];
|
|
||||||
clientDeps = [
|
clientDeps = [
|
||||||
qtbase
|
qtbase
|
||||||
|
qtkeychain
|
||||||
qtmultimedia
|
qtmultimedia
|
||||||
qtsvg
|
qtsvg
|
||||||
qttools
|
qttools
|
||||||
@ -49,40 +51,57 @@ let
|
|||||||
libvpx # WebM video export
|
libvpx # WebM video export
|
||||||
miniupnpc # automatic port forwarding
|
miniupnpc # automatic port forwarding
|
||||||
];
|
];
|
||||||
|
|
||||||
serverDeps = [
|
serverDeps = [
|
||||||
# optional:
|
# optional:
|
||||||
libmicrohttpd # HTTP admin api
|
libmicrohttpd # HTTP admin api
|
||||||
libsodium # ext-auth support
|
libsodium # ext-auth support
|
||||||
];
|
] ++ optional withSystemd systemd;
|
||||||
|
|
||||||
kisDeps = [
|
kisDeps = [
|
||||||
qtx11extras
|
qtx11extras
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boolToFlag = bool:
|
||||||
|
if bool then "ON" else "OFF";
|
||||||
|
|
||||||
in mkDerivation rec {
|
in mkDerivation rec {
|
||||||
pname = "drawpile";
|
pname = "drawpile";
|
||||||
version = "2.1.17";
|
version = "2.1.17";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz";
|
owner = "drawpile";
|
||||||
sha256 = "11lhn1mymhqk9g5sh384xhj3qw8h9lv88pr768y9q6kg3sl7nzzf";
|
repo = "drawpile";
|
||||||
|
rev = "${version}";
|
||||||
|
sha256 = "sha256-AFFY+FcY9ExAur13OoWR9285RZtBe6jnRIrwi5raiCM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
patches = [
|
||||||
cmake
|
# fix for libmicrohttpd 0.9.71
|
||||||
extra-cmake-modules
|
(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 =
|
nativeBuildInputs = [ extra-cmake-modules ];
|
||||||
optional (!buildClient ) "-DCLIENT=off" ++
|
|
||||||
optional (!buildServer ) "-DSERVER=off" ++
|
buildInputs = [
|
||||||
optional (!buildServerGui ) "-DSERVERGUI=off" ++
|
karchive
|
||||||
optional ( buildExtraTools) "-DTOOLS=on" ++
|
]
|
||||||
optional ( enableKisTablet) "-DKIS_TABLET=on";
|
++ 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 = {
|
meta = {
|
||||||
description = "A collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
|
description = "A collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
|
||||||
|
Loading…
Reference in New Issue
Block a user