nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 fetchpatch,
6 itstool,
7 libxml2,
8 meson,
9 ninja,
10 perl,
11 python3,
12 pkg-config,
13 wrapGAppsHook3,
14 at-spi2-core,
15 dbus,
16 elfutils,
17 libepoxy,
18 gexiv2,
19 glib,
20 gobject-introspection,
21 gst_all_1,
22 gtk3,
23 lcms2,
24 libdatrie,
25 libgphoto2,
26 libgudev,
27 libpeas,
28 libraw,
29 libselinux,
30 libsepol,
31 lerc,
32 libthai,
33 libunwind,
34 libxkbcommon,
35 orc,
36 udev,
37 util-linux,
38 libxtst,
39 libxdmcp,
40 zstd,
41}:
42
43stdenv.mkDerivation (finalAttrs: {
44 pname = "entangle";
45 version = "3.0";
46
47 src = fetchFromGitLab {
48 owner = "entangle";
49 repo = "entangle";
50 tag = "v${finalAttrs.version}";
51 sha256 = "hz2WSDOjriQSavFlDT+35x1X5MeInq80ZrSP1WR/td0=";
52 };
53
54 patches = [
55 # Switch to girepository-2.0
56 # https://src.fedoraproject.org/rpms/libpeas1/pull-request/3
57 ./girepository-2.0.patch
58
59 # Fix build with meson 0.61, can be removed on next update
60 # https://gitlab.com/entangle/entangle/-/issues/67
61 (fetchpatch {
62 url = "https://gitlab.com/entangle/entangle/-/commit/54795d275a93e94331a614c8712740fcedbdd4f0.patch";
63 sha256 = "iEgqGjKa0xwSdctwvNdEV361l9nx+bz53xn3fuDgtzY=";
64 })
65
66 # Fix implicit dependency
67 # https://github.com/NixOS/nixpkgs/issues/36468
68 # https://gitlab.com/entangle/entangle/-/merge_requests/61
69 ./0001-build-Add-missing-gio-unix-2.0-dependency.patch
70 ];
71
72 nativeBuildInputs = [
73 itstool
74 glib
75 libxml2 # for xmllint
76 meson
77 ninja
78 perl # for pod2man and build scripts
79 python3 # for build scripts
80 pkg-config
81 wrapGAppsHook3
82 gobject-introspection
83 ];
84
85 buildInputs = [
86 at-spi2-core
87 dbus
88 libepoxy
89 elfutils
90 gexiv2
91 glib
92 lerc
93 gst_all_1.gst-plugins-base
94 gst_all_1.gstreamer
95 gtk3
96 lcms2
97 libdatrie
98 libgphoto2
99 libgudev
100 libpeas
101 libraw
102 libselinux
103 libsepol
104 libthai
105 libunwind
106 libxkbcommon
107 orc
108 udev
109 util-linux
110 zstd
111 libxdmcp
112 libxtst
113 ];
114
115 # Disable building of doc/reference since it requires network connection to render XML to HTML
116 # Patch build script shebangs
117 postPatch = ''
118 sed -i "/subdir('reference')/d" "docs/meson.build"
119 patchShebangs --build build-aux meson_post_install.py
120 sed -i meson_post_install.py \
121 -e "/print('Update icon cache...')/d" \
122 -e "/gtk-update-icon-cache/d"
123 '';
124
125 meta = {
126 description = "Tethered camera control and capture";
127 longDescription = ''
128 Entangle uses GTK and libgphoto2 to provide a graphical interface
129 for tethered photography with digital cameras.
130 It includes control over camera shooting and configuration settings
131 and 'hands off' shooting directly from the controlling computer.
132 This app can also serve as a camera app for mobile devices.
133 '';
134 homepage = "https://gitlab.com/entangle/entangle";
135 license = lib.licenses.gpl3Plus;
136 platforms = lib.platforms.all;
137 maintainers = with lib.maintainers; [ ShamrockLee ];
138 mainProgram = "entangle";
139 };
140})