btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / pi / pipeline / package.nix
blob4aef16227c27361e1ad7a567080a97b984870181
2   lib,
3   stdenv,
4   rustPlatform,
5   cargo,
6   rustc,
7   fetchFromGitLab,
8   gtk4,
9   libadwaita,
10   openssl,
11   meson,
12   ninja,
13   pkg-config,
14   wrapGAppsHook4,
15   glib,
16   appstream-glib,
17   desktop-file-utils,
18   blueprint-compiler,
19   sqlite,
20   clapper,
21   gst_all_1,
22   gtuber,
23   glib-networking,
24   gnome,
25   webp-pixbuf-loader,
26   librsvg,
27   nix-update-script,
30 stdenv.mkDerivation (finalAttrs: {
31   pname = "pipeline";
32   version = "2.0.2";
34   src = fetchFromGitLab {
35     owner = "schmiddi-on-mobile";
36     repo = "pipeline";
37     rev = "v${finalAttrs.version}";
38     hash = "sha256-8LKd7zZuwo/HtxFo8x8UpO1Y8/DnTZmaOYrc9NmnIrc=";
39   };
41   cargoDeps = rustPlatform.importCargoLock {
42     lockFile = ./Cargo.lock;
43     outputHashes = {
44       "clapper-0.1.0" = "sha256-IFFqfSq2OpzfopQXSYfnJ68HGLY+rvcLqk7NTdDd+28=";
45       "piped-openapi-sdk-1.0.0" = "sha256-UFzMYYqCzO6KyJvjvK/hBJtz3FOuSC2gWjKp72WFEGk=";
46       "pipeline-api-0.1.0" = "sha256-h094ZAJOqX9QC1EUAtzIVztudhndXglkYLcFbH/mpqQ=";
47     };
48   };
50   nativeBuildInputs = [
51     meson
52     ninja
53     cargo
54     rustPlatform.cargoSetupHook
55     rustc
56     pkg-config
57     wrapGAppsHook4
58     glib
59     appstream-glib
60     desktop-file-utils
61     blueprint-compiler
62   ];
64   buildInputs = [
65     gtk4
66     libadwaita
67     openssl
68     sqlite
69     clapper
71     gst_all_1.gstreamer
72     gst_all_1.gst-libav
73     gst_all_1.gst-plugins-base
74     (gst_all_1.gst-plugins-good.override { gtkSupport = true; })
75     gst_all_1.gst-plugins-bad
76     gtuber
77     glib-networking # For GIO_EXTRA_MODULES. Fixes "TLS support is not available"
78   ];
80   # Pull in WebP support for YouTube avatars.
81   # In postInstall to run before gappsWrapperArgsHook.
82   postInstall = ''
83     export GDK_PIXBUF_MODULE_FILE="${
84       gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
85         extraLoaders = [
86           webp-pixbuf-loader
87           librsvg
88         ];
89       }
90     }"
91   '';
93   passthru.updateScript = nix-update-script { attrPath = finalAttrs.pname; };
95   meta = {
96     description = "Watch YouTube and PeerTube videos in one place";
97     homepage = "https://mobile.schmidhuberj.de/pipeline";
98     mainProgram = "tubefeeder";
99     license = lib.licenses.gpl3Plus;
100     maintainers = with lib.maintainers; [ chuangzhu ];
101     platforms = lib.platforms.linux;
102   };