summary refs log tree commit diff
path: root/pkgs/by-name/he/headphones-toolbox/package.nix
blob: 9f520d7c4875776f9602616e8e3674105ff6c0ee (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
{ lib
, stdenv
, dpkg
, fetchurl
, autoPatchelfHook
, webkitgtk
}:

stdenv.mkDerivation (finalAttrs: {
  name = "headphones-toolbox";
  version = "0.0.5";

  src = fetchurl {
    url = "https://github.com/ploopyco/headphones-toolbox/releases/download/app-v${finalAttrs.version}/ploopy-headphones-toolbox_${finalAttrs.version}_amd64.deb";
    hash = "sha256-lWjmpybGcL3sbBng8zCTUtwYhlrQ6cCrKkhiu+g9MsE=";
  };

  nativeBuildInputs = [
    dpkg
    autoPatchelfHook
  ];

  buildInputs = [
    webkitgtk
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    mv usr/bin $out
    mv usr/lib $out
    mv usr/share $out

    runHook postInstall
  '';

  meta = with lib; {
    description = "A UI for configuring Ploopy Headphones";
    homepage = "https://github.com/ploopyco/headphones-toolbox/";
    maintainers = with maintainers; [ knarkzel nyanbinary ];
    license = licenses.gpl3Only;
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    platforms = [ "x86_64-linux" ];
    mainProgram = "headphones-toolbox";
  };
})