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