chore(nix/darwin): Add Vesktop

This commit is contained in:
Ahmad Ansori Palembani 2024-11-05 08:51:55 +07:00
parent d4e9969eec
commit 5624c40c14
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
5 changed files with 71 additions and 29 deletions

View file

@ -0,0 +1,18 @@
# REF: https://github.com/bandithedoge/nixpkgs-firefox-darwin/blob/ceaca2359e5371ccef3f92a36baf7c438b354afb/overlay.nix
{ stdenv, undmg, pname, version, sourceRoot ? ".", appFileName, src, meta, nativeBuildInputs ? [ undmg ] }:
stdenv.mkDerivation rec {
inherit pname version;
inherit src nativeBuildInputs;
inherit sourceRoot;
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out/Applications
cp -R ${appFileName} "$out/Applications/"
'';
inherit meta;
}

View file

@ -2,34 +2,27 @@
final: prev: final: prev:
let let
package = version: mkApp = import ../../lib/darwin/mkApp.nix;
final.stdenv.mkDerivation rec { version = "1.5.0";
pname = "HeliPort";
inherit version;
src = final.fetchurl {
url = "https://github.com/OpenIntelWireless/HeliPort/releases/download/v${version}/HeliPort.dmg";
sha256 = "49cbe7abea742a3c662a836f14c05b79b3e6e6577c897b57101f5bd0a086eec8";
};
nativeBuildInputs = [ final.undmg ];
sourceRoot = ".";
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out/Applications
cp -R HeliPort.app "$out/Applications/"
'';
meta = with final.lib; {
description = "Intel WiFi Client for itlwm";
homepage = "https://github.com/OpenIntelWireless/HeliPort";
license = licenses.bsd3;
platforms = platforms.darwin;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
};
in { in {
heliport = package "1.5.0"; heliport = mkApp {
inherit (final) stdenv undmg;
pname = "HeliPort";
appFileName = "HeliPort.app";
inherit version;
src = final.fetchurl {
url = "https://github.com/OpenIntelWireless/HeliPort/releases/download/v${version}/HeliPort.dmg";
sha256 = "49cbe7abea742a3c662a836f14c05b79b3e6e6577c897b57101f5bd0a086eec8";
};
meta = with final.lib; {
description = "Intel WiFi Client for itlwm";
homepage = "https://github.com/OpenIntelWireless/HeliPort";
license = licenses.bsd3;
platforms = platforms.darwin;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
};
} }

View file

@ -0,0 +1,28 @@
# REF: https://github.com/bandithedoge/nixpkgs-firefox-darwin/blob/ceaca2359e5371ccef3f92a36baf7c438b354afb/overlay.nix
final: prev:
let
mkApp = import ../../lib/darwin/mkApp.nix;
version = "1.5.2";
in {
vesktop = mkApp {
inherit (final) stdenv undmg;
pname = "Vesktop";
appFileName = "Vesktop*.app";
inherit version;
src = final.fetchurl {
url = "https://github.com/Vencord/Vesktop/releases/download/v${version}/Vesktop-${version}.dmg";
hash = "sha256-/u2G5v98+FAIfg7UMq5vUFmYO2Tj5ZiAaLrdqUdOMAo";
};
meta = with final.lib; {
description = "An alternate client for Discord with Vencord built-in";
homepage = "https://github.com/Vencord/Vesktop";
license = licenses.gpl3Only;
platforms = platforms.darwin;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
};
}

View file

@ -57,6 +57,7 @@ in {
pkgs.casks.zotero pkgs.casks.zotero
# pkgs.casks.lulu # Doesn't work, it needs to be installed on /Applications/ # pkgs.casks.lulu # Doesn't work, it needs to be installed on /Applications/
# pkgs.heliport # FIXME: https://github.com/matthewbauer/undmg/issues/2 # pkgs.heliport # FIXME: https://github.com/matthewbauer/undmg/issues/2
# pkgs.vesktop # FIXME: "only HFS file systems are supported."
pkgs.lf pkgs.lf
pkgs.yazi # lf replacement, need further testing pkgs.yazi # lf replacement, need further testing

View file

@ -24,6 +24,7 @@ in
inputs.firefox-darwin.overlay inputs.firefox-darwin.overlay
(mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; }) (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; })
(import ../../overlays/darwin/heliport.nix) (import ../../overlays/darwin/heliport.nix)
(import ../../overlays/darwin/vesktop.nix)
]; ];
} }
) pkgs pkgs-unstable; ) pkgs pkgs-unstable;
@ -49,6 +50,7 @@ in
extraOverlays = [ extraOverlays = [
inputs.firefox-darwin.overlay inputs.firefox-darwin.overlay
(mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; }) (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; })
(import ../../overlays/darwin/vesktop.nix)
]; ];
} }
) pkgs pkgs-unstable; ) pkgs pkgs-unstable;