From 9cae808f189abf0067ac74be29a73083e166ed11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= Date: Fri, 13 May 2022 21:20:58 +0300 Subject: [PATCH] headset: init at 4.0.0 Closes #172880 --- pkgs/applications/audio/headset/default.nix | 45 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/applications/audio/headset/default.nix diff --git a/pkgs/applications/audio/headset/default.nix b/pkgs/applications/audio/headset/default.nix new file mode 100644 index 000000000000..9fbf3c08c2b7 --- /dev/null +++ b/pkgs/applications/audio/headset/default.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, fetchurl +, dpkg +, makeWrapper +, electron +}: + +stdenv.mkDerivation rec { + pname = "headset"; + version = "4.0.0"; + + src = fetchurl { + url = "https://github.com/headsetapp/headset-electron/releases/download/v${version}/headset_${version}_amd64.deb"; + hash = "sha256-M1HMZgYczZWFq0EGlCMEGOGUNoUcmq37J8Ycen72PhM="; + }; + + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ makeWrapper dpkg ]; + + unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner"; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share/headset + cp -R usr/share/{applications,icons} $out/share + cp -R usr/lib/headset/resources/app.asar $out/share/headset/ + + makeWrapper ${electron}/bin/electron $out/bin/headset \ + --add-flags $out/share/headset/app.asar + + runHook postInstall + ''; + + meta = with lib; { + description = "A simple music player for YouTube and Reddit"; + homepage = "https://headsetapp.co/"; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ muscaln ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 764f61623bfb..c17ebb8c598e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2311,6 +2311,8 @@ with pkgs; harvid = callPackage ../tools/video/harvid { }; + headset = callPackage ../applications/audio/headset { }; + hilbish = callPackage ../shells/hilbish { }; hime = callPackage ../tools/inputmethods/hime {};