-
Notifications
You must be signed in to change notification settings - Fork 0
/
boomaga.nix
55 lines (49 loc) · 1.27 KB
/
boomaga.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
lib,
stdenv,
fetchFromGitHub,
cmake,
cups,
qtbase,
qttools,
wrapQtAppsHook,
pkg-config,
poppler,
}:
stdenv.mkDerivation rec {
pname = "boomaga";
version = "3.0.0"; # Update this to the correct version
src = fetchFromGitHub {
owner = "Boomaga";
repo = "boomaga";
rev = "v${version}";
sha256 = "sha256-ThiyZ/fTwp+E639HavUv9WbRE+RxGbRwcPqXSuVWdaQ="; # Update with correct hash
};
nativeBuildInputs = [
cmake
wrapQtAppsHook
pkg-config
];
buildInputs = [
cups.dev
qtbase
qttools
poppler
];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DCUPS_PPD_DIR=${placeholder "out"}/share/cups/model/boomaga"
"-DCUPS_BACKEND_DIR=${placeholder "out"}/lib/cups/backend"
];
postPatch = ''
substituteInPlace src/backend/cups_backend/main.cpp \
--replace "if (chown(dir.c_str(), pwd->pw_uid, -1) != 0)" "if ((chown(dir.c_str(), pwd->pw_uid, -1) != 0) && (errno != EPERM))"
'';
meta = with lib; {
description = "Virtual printer for viewing and editing before printing";
homepage = "https://www.boomaga.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ]; # Add your name if you're maintaining this package
platforms = platforms.linux;
};
}