Unverified Commit 4483ca52 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

ivpn: 3.10.15 -> 3.14.29 (#354428)

parents 4476c3a1 1cd27faa
Loading
Loading
Loading
Loading
+103 −80
Original line number Diff line number Diff line
{ buildGoModule
, fetchFromGitHub
, lib
, wirelesstools
, makeWrapper
, wireguard-tools
, openvpn
, obfs4
, iproute2
, dnscrypt-proxy
, iptables
, gawk
, util-linux
{
  buildGoModule,
  fetchFromGitHub,
  lib,
  wirelesstools,
  makeWrapper,
  wireguard-tools,
  openvpn,
  obfs4,
  iproute2,
  dnscrypt-proxy,
  iptables,
  gawk,
  util-linux,
}:

builtins.mapAttrs (pname: attrs: buildGoModule (attrs // rec {
builtins.mapAttrs
  (
    pname: attrs:
    buildGoModule (
      attrs
      // rec {
        inherit pname;
  version = "3.10.15";
        version = "3.14.29";

        buildInputs = [
          wirelesstools
        ];

        src = fetchFromGitHub {
          owner = "ivpn";
          repo = "desktop-app";
    rev = "v${version}";
    hash = "sha256-3yVRVM98tVjot3gIkUb/CDwmwKdOOBjBjzGL6htDtpk=";
          rev = "refs/tags/v${version}";
          hash = "sha256-8JScty/sGyxzC2ojRpatHpCqEXZw9ksMortIhZnukoU=";
        };

        proxyVendor = true; # .c file

        ldflags = [
          "-s"
          "-w"
@@ -35,24 +47,29 @@ builtins.mapAttrs (pname: attrs: buildGoModule (attrs // rec {
          mv $out/bin/{${attrs.modRoot},${pname}}
        '';

  meta = with lib; {
        meta = {
          description = "Official IVPN Desktop app";
          homepage = "https://www.ivpn.net/apps";
          changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${version}";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ urandom ataraxiasjel ];
          license = lib.licenses.gpl3Only;
          maintainers = with lib.maintainers; [
            urandom
            ataraxiasjel
          ];
          mainProgram = "ivpn";
        };
})) {
      }
    )
  )
  {
    ivpn = {
      modRoot = "cli";
    vendorHash = "sha256-T49AE3SUmdP3Tu9Sp5C/QryKDto/NzEqRuUQ3+aJFL0=";
      vendorHash = "sha256-STbkFchrmxwWnSgEJ7RGKN3jGaCC0npL80YjlwUcs1g=";
    };
    ivpn-service = {
      modRoot = "daemon";
    vendorHash = "sha256-9Rk6ruMpyWtQe+90kw4F8OLq7/JcDSrG6ufkfcrS4W8=";
      vendorHash = "sha256-REIY3XPyMA2Loxo1mKzJMJwZrf9dQMOtnQOUEgN5LP8=";
      nativeBuildInputs = [ makeWrapper ];
    buildInputs = [ wirelesstools ];

      patches = [ ./permissions.patch ];
      postPatch = ''
@@ -86,7 +103,13 @@ builtins.mapAttrs (pname: attrs: buildGoModule (attrs // rec {
        patchShebangs --build $out/etc/firewall.sh $out/etc/splittun.sh $out/etc/client.down $out/etc/client.up

        wrapProgram "$out/bin/ivpn-service" \
        --suffix PATH : ${lib.makeBinPath [ iptables gawk util-linux ]}
          --suffix PATH : ${
            lib.makeBinPath [
              iptables
              gawk
              util-linux
            ]
          }
      '';
    };
  }