nixpkgs-immich/pkgs/applications/networking/rofi-vpn/default.nix
2024-09-17 10:23:40 -06:00

42 lines
937 B
Nix

{ stdenv
, lib
, fetchFromGitLab
, makeWrapper
, networkmanager
, rofi-unwrapped
}:
stdenv.mkDerivation rec {
pname = "rofi-vpn";
version = "0.2.0";
src = fetchFromGitLab {
owner = "DamienCassou";
repo = pname;
rev = "v${version}";
sha256 = "04jcfb2jy8yyrk4mg68krwh3zb5qcyj1aq1bwk96fhybrq9k2hhp";
};
installPhase = ''
runHook preInstall
install -D --target-directory=$out/bin/ ./rofi-vpn
wrapProgram $out/bin/rofi-vpn \
--prefix PATH ":" ${lib.makeBinPath [ rofi-unwrapped networkmanager ]}
runHook postInstall
'';
nativeBuildInputs = [ makeWrapper ];
meta = with lib; {
description = "Rofi-based interface to enable VPN connections with NetworkManager";
homepage = "https://gitlab.com/DamienCassou/rofi-vpn";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ DamienCassou ];
platforms = platforms.linux;
mainProgram = "rofi-vpn";
};
}