python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / di / dissent / package.nix
blobf5aef15df5bc3bfe27600b1d21e5ceafec9ed140
1 { buildGoModule
2 , fetchFromGitLab
3 , fetchFromGitHub
4 , gobject-introspection
5 , gst_all_1
6 , lib
7 , libadwaita
8 , libcanberra-gtk3
9 , pkg-config
10 , sound-theme-freedesktop
11 , libspelling
12 , gtksourceview5
13 , wrapGAppsHook4
16 let
17   libspelling_2_1 = libspelling.overrideAttrs {
18     version = "0.2.1";
20     src = fetchFromGitLab {
21       domain = "gitlab.gnome.org";
22       owner = "GNOME";
23       repo = "libspelling";
24       rev = "refs/tags/0.2.1";
25       hash = "sha256-0OGcwPGWtYYf0XmvzXEaQgebBOW/6JWcDuF4MlQjCZQ=";
26     };
27   };
29 buildGoModule rec {
30   pname = "dissent";
31   version = "0.0.31";
33   src = fetchFromGitHub {
34     owner = "diamondburned";
35     repo = "dissent";
36     rev = "v${version}";
37     hash = "sha256-mI0rZ7w2a6fzELYRHgeekTWYDaQGcDYectRWUdOmlYc=";
38   };
40   nativeBuildInputs = [
41     gobject-introspection
42     pkg-config
43     wrapGAppsHook4
44   ];
46   buildInputs = [
47     # Optional according to upstream but required for sound and video
48     gst_all_1.gst-plugins-bad
49     gst_all_1.gst-plugins-base
50     gst_all_1.gst-plugins-good
51     gst_all_1.gst-plugins-ugly
52     gst_all_1.gstreamer
53     libadwaita
54     libcanberra-gtk3
55     sound-theme-freedesktop
56     # gotk4-spelling fails to build with libspelling >= 0.3.0
57     # https://github.com/diamondburned/gotk4-spelling/issues/1
58     libspelling_2_1
59     gtksourceview5
60   ];
62   postInstall = ''
63     substituteInPlace nix/so.libdb.dissent.service \
64       --replace-warn "/usr/bin/dissent" "$out/bin/dissent"
65     install -D -m 444 -t $out/share/applications nix/so.libdb.dissent.desktop
66     install -D -m 444 -t $out/share/icons/hicolor/scalable/apps internal/icons/hicolor/scalable/apps/so.libdb.dissent.svg
67     install -D -m 444 -t $out/share/icons/hicolor/symbolic/apps internal/icons/symbolic/apps/so.libdb.dissent-symbolic.svg
68     install -D -m 444 -t $out/share/metainfo so.libdb.dissent.metainfo.xml
69     install -D -m 444 -t $out/share/dbus-1/services nix/so.libdb.dissent.service
70   '';
72   vendorHash = "sha256-JISIS8k/veBAqZ0DlxVBrc+25IVM6BpY4eE5uxsjo+Y=";
74   meta = with lib; {
75     description = "A third-party Discord client designed for a smooth, native experience (formerly gtkcord4)";
76     homepage = "https://github.com/diamondburned/dissent";
77     license = with licenses; [ gpl3Plus cc0 ];
78     mainProgram = "dissent";
79     maintainers = with maintainers; [ hmenke urandom aleksana ];
80   };