about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix b/nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix
new file mode 100644
index 000000000000..4d18f6a4f4a7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/gopher/sacc/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, ncurses
+, patches ? [] # allow users to easily override config.def.h
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sacc";
+  version = "1.03";
+
+  src = fetchurl {
+    url = "ftp://bitreich.org/releases/sacc/sacc-${version}.tgz";
+    sha512 = "sha512-vOjAGBM2+080JZv4C4b5dNRTTX45evWFEJfK1DRaWCYrHRCAe07QdEIrHhbaIxhSYfrBd3D1y75rmDnuPC4THA==";
+  };
+
+  inherit patches;
+
+  buildInputs = [ ncurses ];
+
+  CFLAGS = lib.optionals stdenv.isDarwin [
+    "-D_DARWIN_C_SOURCE"
+  ];
+
+  postPatch = ''
+    substituteInPlace config.mk \
+      --replace curses ncurses \
+      --replace "/usr/local" "$out"
+    '';
+
+  meta = with lib; {
+    description = "A terminal gopher client";
+    homepage = "gopher://bitreich.org/1/scm/sacc";
+    license = licenses.isc;
+    maintainers = [ maintainers.sternenseemann ];
+    platforms = platforms.unix;
+  };
+}