evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ca / caribou / package.nix
blob463fe2f7e2815c4ad14e7a400970dce3dfc357b7
2   fetchurl,
3   lib,
4   stdenv,
5   pkg-config,
6   gnome,
7   glib,
8   gtk3,
9   clutter,
10   dbus,
11   python3,
12   libxml2,
13   libxklavier,
14   libXtst,
15   gtk2,
16   intltool,
17   libxslt,
18   at-spi2-core,
19   autoreconfHook,
20   wrapGAppsHook3,
21   libgee,
22   vala,
25 let
26   pname = "caribou";
27   version = "0.4.21";
28   pythonEnv = python3.withPackages (ps: with ps; [ pygobject3 ]);
30 stdenv.mkDerivation rec {
31   name = "caribou-${version}";
33   src = fetchurl {
34     url = "mirror://gnome/sources/caribou/${lib.versions.majorMinor version}/${name}.tar.xz";
35     hash = "sha256-nEPZ9L0w9P6n94DU6LFPdYkQfFLpy2vSAr0NHCBk3lU=";
36   };
38   patches = [
39     # Fix crash in GNOME Flashback
40     # https://bugzilla.gnome.org/show_bug.cgi?id=791001
41     (fetchurl {
42       url = "https://bugzilla.gnome.org/attachment.cgi?id=364774";
43       hash = "sha256-bU+/PTfkMh0KAUNCDhYYJ2iq9JlWLtwztdO4/EohYZY=";
44     })
45     # Stop patching the generated GIR, fixes build with latest vala
46     (fetchurl {
47       url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/c52ce71c49dc8d6109a58d16cc8d491d7bd1d781.patch";
48       hash = "sha256-jbF1Ygp8Q0ENN/5aEpROuK5zkufIfn6cGW8dncl7ET4=";
49     })
50     (fetchurl {
51       name = "fix-build-modern-vala.patch";
52       url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/76fbd11575f918fc898cb0f5defe07f67c11ec38.patch";
53       hash = "sha256-XkyRYXWmlcHTx2q81WFUMXV273MKkG5DeTAhdOY/wmM=";
54     })
55     (fetchurl {
56       name = "CVE-2021-3567.patch";
57       url = "https://gitlab.gnome.org/GNOME/caribou/-/commit/d41c8e44b12222a290eaca16703406b113a630c6.patch";
58       hash = "sha256-yIsEqSflpAdQPAB6eNr6fctxzyACu7N1HVfMIdCQou0=";
59     })
60   ];
62   nativeBuildInputs = [
63     pkg-config
64     intltool
65     libxslt
66     libxml2
67     autoreconfHook
68     wrapGAppsHook3
69     vala
70   ];
72   buildInputs = [
73     glib
74     gtk3
75     clutter
76     at-spi2-core
77     dbus
78     pythonEnv
79     python3.pkgs.pygobject3
80     libXtst
81     gtk2
82   ];
84   propagatedBuildInputs = [
85     libgee
86     libxklavier
87   ];
89   postPatch = ''
90     patchShebangs .
91     substituteInPlace libcaribou/Makefile.am --replace "--shared-library=libcaribou.so.0" "--shared-library=$out/lib/libcaribou.so.0"
92   '';
94   passthru = {
95     updateScript = gnome.updateScript { packageName = "caribou"; };
96   };
98   meta = with lib; {
99     description = "Input assistive technology intended for switch and pointer users";
100     mainProgram = "caribou-preferences";
101     homepage = "https://gitlab.gnome.org/Archive/caribou";
102     license = licenses.lgpl21;
103     maintainers = [ ];
104     platforms = platforms.linux;
105   };