about summary refs log tree commit diff
path: root/pkgs/by-name/ko/konbucase/package.nix
blob: 56a977eeeb138cd8fad87ba9688abbcbf82077e9 (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
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, vala
, pkg-config
, wrapGAppsHook
, pantheon
, gtksourceview5
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "konbucase";
  version = "4.1.2";

  src = fetchFromGitHub {
    owner = "ryonakano";
    repo = "konbucase";
    rev = finalAttrs.version;
    hash = "sha256-md7drxg1JuW6TRJauKOk4Aqjx/V1RVZ+POa5v6DtKwk=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    meson
    ninja
    vala
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    pantheon.granite7
    gtksourceview5
  ];

  postInstall = ''
    mv $out/bin/com.github.ryonakano.konbucase $out/bin/konbucase
    substituteInPlace $out/share/applications/com.github.ryonakano.konbucase.desktop \
      --replace 'Exec=com.github.ryonakano.konbucase' 'Exec=${placeholder "out"}/bin/konbucase'
  '';

  meta = with lib; {
    homepage = "https://github.com/ryonakano/konbucase";
    description = "A case converting app suitable for coding or typing";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ galaxy ];
    platforms = platforms.linux;
    mainProgram = "konbucase";
  };
})