From 54ec249bbe869ea46304e8a34709bce12bb69909 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 9 Jul 2021 08:33:17 +0200 Subject: [PATCH] rofi-vpn: init at 0.2.0 --- .../networking/rofi-vpn/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/networking/rofi-vpn/default.nix diff --git a/pkgs/applications/networking/rofi-vpn/default.nix b/pkgs/applications/networking/rofi-vpn/default.nix new file mode 100644 index 000000000000..8ff83db294ff --- /dev/null +++ b/pkgs/applications/networking/rofi-vpn/default.nix @@ -0,0 +1,40 @@ +{ 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 280283e07619..3c391fce141f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25667,6 +25667,8 @@ in rofi-power-menu = callPackage ../applications/misc/rofi-power-menu { }; + rofi-vpn = callPackage ../applications/networking/rofi-vpn { }; + ympd = callPackage ../applications/audio/ympd { }; # a somewhat more maintained fork of ympd