summary refs log tree commit diff
path: root/pkgs/tools/misc/dasht
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-20 19:26:47 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-21 20:05:20 +0100
commite77902ce7b424fef00a25401215dfe94bba933f4 (patch)
tree62834d9f368989a47b2d1713b0af720bf516a9a3 /pkgs/tools/misc/dasht
parentecfcf8bdf0f21ca0ca5e7407d597b4831014df48 (diff)
downloadnixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar.gz
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar.bz2
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar.lz
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar.xz
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.tar.zst
nixpkgs-e77902ce7b424fef00a25401215dfe94bba933f4.zip
dasht: init at v2.3.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'pkgs/tools/misc/dasht')
-rw-r--r--pkgs/tools/misc/dasht/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/tools/misc/dasht/default.nix b/pkgs/tools/misc/dasht/default.nix
new file mode 100644
index 00000000000..cfd33edbd05
--- /dev/null
+++ b/pkgs/tools/misc/dasht/default.nix
@@ -0,0 +1,65 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, makeWrapper
+, coreutils
+, gnused
+, gnugrep
+, sqlite
+, wget
+, w3m
+, socat
+, gawk
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.3.0";
+  name    = "dasht-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "sunaku";
+    repo   = "dasht";
+    rev    = "v${version}";
+    sha256 = "0d0pcjalba58nvxdgn39m4b6n9ifajf3ygyjaqgvzwxzgpzw0a60";
+  };
+
+  deps = lib.makeBinPath [
+    coreutils
+    gnused
+    gnugrep
+    sqlite
+    wget
+    w3m
+    socat
+    gawk
+    (placeholder "out")
+  ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp bin/* $out/bin/
+
+    mkdir -p $out/share/man/man1
+    cp man/man1/* $out/share/man/man1/
+
+    for i in $out/bin/*; do
+      echo "Wrapping $i"
+      wrapProgram $i --prefix PATH : ${deps};
+    done;
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "Search API docs offline, in terminal or browser";
+    homepage    = https://sunaku.github.io/dasht/man;
+    license     = stdenv.lib.licenses.isc;
+    platforms   = stdenv.lib.platforms.unix; #cannot test other
+    maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
+  };
+}
+