about summary refs log tree commit diff
path: root/pkgs/by-name/go
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/go')
-rw-r--r--pkgs/by-name/go/gophish/package.nix30
-rw-r--r--pkgs/by-name/go/got/package.nix71
2 files changed, 101 insertions, 0 deletions
diff --git a/pkgs/by-name/go/gophish/package.nix b/pkgs/by-name/go/gophish/package.nix
new file mode 100644
index 0000000000000..a319b2bd97e87
--- /dev/null
+++ b/pkgs/by-name/go/gophish/package.nix
@@ -0,0 +1,30 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "gophish";
+  version = "0.12.1";
+
+  src = fetchFromGitHub {
+    owner = "gophish";
+    repo = "gophish";
+    rev = "v${version}";
+    hash = "sha256-6OUhRB2d8k7h9tI3IPKy9f1KoEx1mvGbxQZF1sCngqs=";
+  };
+
+  vendorHash = "sha256-2seQCVALU35l+aAsfag0W19FWlSTlEsSmxTmKKi3A+0=";
+
+  meta = with lib; {
+    description = "Open-Source Phishing Toolkit";
+    longDescription = ''
+      Open-source phishing toolkit designed for businesses and penetration testers.
+      Provides the ability to quickly and easily setup and execute phishing engagements and security awareness training.
+    '';
+    homepage = "https://github.com/gophish/gophish";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mib ];
+    mainProgram = "gophish";
+  };
+}
diff --git a/pkgs/by-name/go/got/package.nix b/pkgs/by-name/go/got/package.nix
new file mode 100644
index 0000000000000..127ff219ed5ee
--- /dev/null
+++ b/pkgs/by-name/go/got/package.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, libressl
+, libbsd
+, libevent
+, libuuid
+, libossp_uuid
+, libmd
+, zlib
+, ncurses
+, bison
+, autoPatchelfHook
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "got";
+  version = "0.98.2";
+
+  src = fetchurl {
+    url = "https://gameoftrees.org/releases/portable/got-portable-${finalAttrs.version}.tar.gz";
+    hash = "sha256-/11K2ZIu3xyAVbI5hlCXL9RjyAlZDb544uqxv3ihUMg=";
+  };
+
+  nativeBuildInputs = [ pkg-config bison ]
+    ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+  buildInputs = [ libressl libbsd libevent libuuid libmd zlib ncurses ]
+    ++ lib.optionals stdenv.isDarwin [ libossp_uuid ];
+
+  configureFlags = [ "--enable-gotd" ];
+
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    # The configure script assumes dependencies on Darwin are installed via
+    # Homebrew or MacPorts and hardcodes assumptions about the paths of
+    # dependencies which fails the nixpkgs configurePhase.
+    substituteInPlace configure --replace-fail 'xdarwin' 'xhomebrew'
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
+    # error: conflicting types for 'strmode'
+    "-DHAVE_STRMODE=1"
+    # Undefined symbols for architecture arm64: "_bsd_getopt"
+    "-include getopt.h"
+  ]);
+
+  passthru.tests.version = testers.testVersion {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = {
+    changelog = "https://gameoftrees.org/releases/CHANGES";
+    description = "A version control system which prioritizes ease of use and simplicity over flexibility";
+    longDescription = ''
+      Game of Trees (Got) is a version control system which prioritizes
+      ease of use and simplicity over flexibility.
+
+      Got uses Git repositories to store versioned data. Git can be used
+      for any functionality which has not yet been implemented in
+      Got. It will always remain possible to work with both Got and Git
+      on the same repository.
+    '';
+    homepage = "https://gameoftrees.org";
+    license = lib.licenses.isc;
+    maintainers = with lib.maintainers; [ abbe afh ];
+    mainProgram = "got";
+    platforms = with lib.platforms; darwin ++ linux;
+  };
+})