summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/co/constrict/package.nix
blob: fe5c9a0ef8e9b2b82d1437b87001e35bf2ab4dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
  lib,
  python3Packages,
  fetchFromGitLab,
  meson,
  ninja,
  pkg-config,
  blueprint-compiler,
  gobject-introspection,
  wrapGAppsHook4,
  desktop-file-utils,
  libadwaita,
  libglycin,
  libglycin-gtk4,
  libva-utils,
  ffmpeg,
  gst-thumbnailers,
  glycin-loaders,
  nix-update-script,
}:

python3Packages.buildPythonApplication (finalAttrs: {
  pname = "constrict";
  version = "26.2";
  pyproject = false; # Built with meson

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "World";
    repo = "Constrict";
    tag = finalAttrs.version;
    hash = "sha256-SkfutiBi0Y7gNx5PyTaSzVw/5rU/0ULxbtf2606i2wA=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    blueprint-compiler
    gobject-introspection
    wrapGAppsHook4
    desktop-file-utils
  ];

  buildInputs = [
    libadwaita
    libglycin
    libglycin-gtk4
    glycin-loaders
  ];

  dependencies = [
    python3Packages.pygobject3
  ];

  # Search for use of subprocess
  runtimeDeps = [
    libva-utils
    ffmpeg
    gst-thumbnailers
  ];

  dontWrapGApps = true;

  preFixup = ''
    makeWrapperArgs+=(
      ''${gappsWrapperArgs[@]}
      --prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps}
    )
  '';

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Compresses your videos to your chosen file size";
    homepage = "https://gitlab.gnome.org/World/Constrict";
    changelog = "https://gitlab.gnome.org/World/Constrict/-/releases/${finalAttrs.src.tag}";
    license = lib.licenses.gpl3Plus;
    mainProgram = "constrict";
    teams = [ lib.teams.gnome-circle ];
    platforms = lib.platforms.linux;
  };
})