From 744d9c902c45243984ff4da104e811c4412b4e90 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 2 Nov 2024 20:13:19 +0700 Subject: [PATCH] feat(nix/darwin): HeliPort Currently disabled because undmg doesn't handle EULAs REF: https://github.com/matthewbauer/undmg/issues/2 --- .config/nix/overlays/darwin/heliport.nix | 35 ++++++++++++++++++++ .config/nix/systems/darwin/configuration.nix | 35 +++++++++++--------- .config/nix/systems/darwin/default.nix | 1 + 3 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 .config/nix/overlays/darwin/heliport.nix diff --git a/.config/nix/overlays/darwin/heliport.nix b/.config/nix/overlays/darwin/heliport.nix new file mode 100644 index 0000000..f8ec3e0 --- /dev/null +++ b/.config/nix/overlays/darwin/heliport.nix @@ -0,0 +1,35 @@ +# REF: https://github.com/bandithedoge/nixpkgs-firefox-darwin/blob/ceaca2359e5371ccef3f92a36baf7c438b354afb/overlay.nix +final: prev: + +let + package = version: + final.stdenv.mkDerivation rec { + 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 = "HeliPort.app"; + + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + mkdir -p $out/Applications + cp -R . "$out/Applications/HeliPort.app" + ''; + + 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 { + heliport = package "1.5.0"; +} diff --git a/.config/nix/systems/darwin/configuration.nix b/.config/nix/systems/darwin/configuration.nix index 77fba93..ea14051 100644 --- a/.config/nix/systems/darwin/configuration.nix +++ b/.config/nix/systems/darwin/configuration.nix @@ -12,34 +12,39 @@ pkgs.git pkgs.vim pkgs.neovim - pkgs.pass - pkgs.passExtensions.pass-otp - pkgs.gnupg pkgs.htop-vim - common.custom.python - common.custom.inkscape - #(pkgs.poetry.override { python3 = common.custom.python; }) - pkgs.fastfetch + pkgs.wget pkgs.eza - pkgs.wimlib - pkgs.google-cloud-sdk + pkgs.coreutils-full + pkgs.rclone + pkgs.fastfetch + pkgs.iterm2 pkgs.nmap pkgs.cargo pkgs.android-tools - pkgs.coreutils-full - pkgs.rclone - (pkgs.yt-dlp.override { withAlias = true; }) pkgs.duti + pkgs.undmg + + pkgs.pass + pkgs.passExtensions.pass-otp + pkgs.gnupg pkgs.pinentry_mac + + common.custom.python + #(pkgs.poetry.override { python3 = common.custom.python; }) + pkgs.wimlib + pkgs.google-cloud-sdk + (pkgs.yt-dlp.override { withAlias = true; }) + pkgs.iina pkgs.floorp-bin - + common.custom.inkscape pkgs.casks.zotero + # pkgs.casks.lulu # Doesn't work, it needs to be installed on /Applications/ + # pkgs.heliport # FIXME: https://github.com/matthewbauer/undmg/issues/2 pkgs.lf pkgs.yazi # lf replacement, need further testing - - pkgs.iterm2 ]; # Auto upgrade nix package and the daemon service. diff --git a/.config/nix/systems/darwin/default.nix b/.config/nix/systems/darwin/default.nix index 5d0bba3..f3bb0f3 100644 --- a/.config/nix/systems/darwin/default.nix +++ b/.config/nix/systems/darwin/default.nix @@ -25,6 +25,7 @@ in inherit system brew-api; nixpkgs = nixpkgs-stable; }) + (import ../../overlays/darwin/heliport.nix) ]; } ) pkgs pkgs-unstable;