diff options
author | Mustafa Çalışkan <muscaln@protonmail.com> | 2022-05-13 21:20:58 +0300 |
---|---|---|
committer | Mustafa Çalışkan <muscaln@protonmail.com> | 2022-05-13 21:42:17 +0300 |
commit | 9cae808f189abf0067ac74be29a73083e166ed11 (patch) | |
tree | 48b894c9bf30842f1dd6a277ef0f4531d3010665 /pkgs/applications/audio/headset | |
parent | 9d5b5668ecf73fec3a3c20146a870102a8d4b6de (diff) |
headset: init at 4.0.0
Closes #172880
Diffstat (limited to 'pkgs/applications/audio/headset')
-rw-r--r-- | pkgs/applications/audio/headset/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/applications/audio/headset/default.nix b/pkgs/applications/audio/headset/default.nix new file mode 100644 index 0000000000000..9fbf3c08c2b79 --- /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 ]; + }; +} |