Unverified Commit fbf7fa1d authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #206817 from penalty1083/geph

parents 46e5d1e2 6f7320ac
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -11537,6 +11537,12 @@
    githubId = 1368952;
    name = "Pedro Lara Campos";
  };
  penalty1083 = {
    email = "penalty1083@outlook.com";
    github = "penalty1083";
    githubId = 121009904;
    name = "penalty1083";
  };
  penguwin = {
    email = "penguwin@penguwin.eu";
    github = "penguwin";
+122 −0
Original line number Diff line number Diff line
{ lib
, stdenvNoCC
, rustPlatform
, fetchFromGitHub
, buildNpmPackage
, perl
, pkg-config
, glib
, webkitgtk
, libappindicator-gtk3
, libayatana-appindicator
, cairo
, openssl
}:

let
  version = "4.7.8";
  geph-meta = with lib; {
    description = "A modular Internet censorship circumvention system designed specifically to deal with national filtering.";
    homepage = "https://geph.io";
    platforms = platforms.linux;
    maintainers = with maintainers; [ penalty1083 ];
  };
in
{
  cli = rustPlatform.buildRustPackage rec {
    pname = "geph4-client";
    inherit version;

    src = fetchFromGitHub {
      owner = "geph-official";
      repo = pname;
      rev = "v${version}";
      hash = "sha256-DVGbLyFgraQMSIUAqDehF8DqbnvcaeWbuLVgiSQY3KE=";
    };

    cargoHash = "sha256-uBq6rjUnKEscwhu60HEZffLvuXcArz+AiR52org+qKw=";

    nativeBuildInputs = [ perl ];

    meta = geph-meta // {
      license = with lib.licenses; [ gpl3Only ];
    };
  };

  gui = stdenvNoCC.mkDerivation rec {
    pname = "geph-gui";
    inherit version;

    src = fetchFromGitHub {
      owner = "geph-official";
      repo = "gephgui-pkg";
      rev = "85a55bfc2f4314d9c49608f252080696b1f8e2a9";
      hash = "sha256-id/sfaQsF480kUXg//O5rBIciuuhDuXY19FQe1E3OQs=";
      fetchSubmodules = true;
    };

    gephgui = buildNpmPackage {
      pname = "gephgui";
      inherit version src;

      sourceRoot = "source/gephgui-wry/gephgui";

      postPatch = "ln -s ${./package-lock.json} ./package-lock.json";

      npmDepsHash = "sha256-5y6zpMF4M56DiWVhMvjJGsYpVdlJSoWoWyPgLc7hJoo=";

      installPhase = ''
        runHook preInstall

        mkdir -p $out
        mv dist $out

        runHook postInstall
      '';
    };

    gephgui-wry = rustPlatform.buildRustPackage rec {
      pname = "gephgui-wry";
      inherit version src;

      sourceRoot = "source/gephgui-wry";

      cargoHash = "sha256-lidlUUfHXKPUlICdaVv/SFlyyWsZ7cYHyTJ3kkMn3L4=";

      nativeBuildInputs = [ pkg-config ];

      buildInputs = [
        glib
        webkitgtk
        libappindicator-gtk3
        libayatana-appindicator
        cairo
        openssl
      ];

      preBuild = ''
        ln -s ${gephgui}/dist ./gephgui
      '';
    };

    dontBuild = true;

    installPhase = ''
      install -Dt $out/bin ${gephgui-wry}/bin/gephgui-wry
      install -d $out/share/icons/hicolor
      for i in '16' '32' '64' '128' '256'
      do
        name=''${i}x''${i}
        dir=$out/share/icons/hicolor
        mkdir -p $dir
        mv flatpak/icons/$name $dir
      done
      install -Dt $out/share/applications flatpak/icons/io.geph.GephGui.desktop
      sed -i -e '/StartupWMClass/s/=.*/=gephgui-wry/' $out/share/applications/io.geph.GephGui.desktop
    '';

    meta = geph-meta // {
      license = with lib.licenses; [ unfree ];
    };
  };
}
+3658 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -19994,6 +19994,8 @@ with pkgs;
  gecode_6 = qt5.callPackage ../development/libraries/gecode { };
  gecode = gecode_6;
  geph = callPackages ../applications/networking/geph { };
  gephi = callPackage ../applications/science/misc/gephi { };
  gegl = callPackage ../development/libraries/gegl {