about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ov/overskride/package.nix
blob: 9ca167dd37ea5d348048d9012e4545312a193103 (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
{ lib, fetchFromGitHub, rustPlatform, cargo, rustc, meson, ninja
, pkg-config, wrapGAppsHook4, desktop-file-utils, appstream-glib
, blueprint-compiler, dbus, gtk4, libadwaita, bluez, libpulseaudio }: let

owner = "kaii-lb";
name = "overskride";
version = "0.5.6";

in rustPlatform.buildRustPackage {

  pname = name;
  inherit version;

  src = fetchFromGitHub {
    inherit owner;
    repo = name;
    rev = "v${version}";
    hash = "sha256-syQzHHT0s15oj8Yl2vhgyXlPI8UxOqIXGDqFeUc/dJQ=";
  };

  cargoHash = "sha256-NEsqVfKZqXSLieRO0BvQGdggmXXYO15qVhbfgAFATPc=";

  nativeBuildInputs = [
    pkg-config
    wrapGAppsHook4
    desktop-file-utils
    appstream-glib
    blueprint-compiler
    meson
    ninja
    cargo
    rustc
  ];

  buildInputs = [ dbus gtk4 libadwaita bluez libpulseaudio ];

  buildPhase = ''
    runHook preBuild

    meson setup build --prefix $out && cd build
    meson compile && meson devenv

    runHook postBuild
  '';

  # The "Validate appstream file" test fails.
  # TODO: This appears to have been fixed upstream
  # so checks should be enabled with the next version.
  doCheck = false;

  preFixup = ''
    glib-compile-schemas $out/share/gsettings-schemas/${name}-${version}/glib-2.0/schemas
  '';

  meta = with lib; {
    description =
      "A Bluetooth and Obex client that is straight to the point, DE/WM agnostic, and beautiful";
    homepage = "https://github.com/${owner}/${name}";
    changelog = "https://github.com/${owner}/${name}/blob/v${version}/CHANGELOG.md";
    license = licenses.gpl3Only;
    mainProgram = name;
    maintainers = with maintainers; [ mrcjkb ];
    platforms = platforms.linux;
  };

}