about summary refs log tree commit diff
path: root/pkgs/applications/graphics/ciano/default.nix
blob: 454a1d28c47725ef68149b628f14d0c9e48cde55 (plain) (blame)
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
{ lib
, stdenv
, fetchFromGitHub
, desktop-file-utils
, ffmpeg
, granite
, gtk
, imagemagick
, meson
, ninja
, pkg-config
, python
, vala
, wrapGAppsHook3
}:

stdenv.mkDerivation rec {
  pname = "ciano";
  version = "0.2.4";

  src = fetchFromGitHub {
    owner = "robertsanseries";
    repo = pname;
    rev = version;
    hash = "sha256-nubm6vBWwsHrrmvFAL/cIzYPxg9B1EhnpC79IJMNuFY=";
  };

  nativeBuildInputs = [
    desktop-file-utils
    meson
    ninja
    pkg-config
    python
    vala
    wrapGAppsHook3
  ];

  buildInputs = [
    ffmpeg
    imagemagick
    granite
    gtk
  ];

  postPatch = ''
    chmod +x meson/post_install.py
    patchShebangs meson/post_install.py
  '';

  dontWrapGApps = true;

  postFixup = let
    binPath = lib.makeBinPath [
      ffmpeg
      imagemagick
    ];
  in
    ''
      wrapProgram $out/bin/com.github.robertsanseries.ciano \
         --prefix PATH : ${binPath} "''${gappsWrapperArgs[@]}"
      ln -s $out/bin/com.github.robertsanseries.ciano $out/bin/ciano
    '';

  meta = with lib; {
    homepage = "https://github.com/robertsanseries/ciano";
    description = "A multimedia file converter focused on simplicity";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.linux;
  };
}