From e77902ce7b424fef00a25401215dfe94bba933f4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 20 Feb 2019 19:26:47 +0100 Subject: [PATCH] dasht: init at v2.3.0 Signed-off-by: Matthias Beyer --- pkgs/tools/misc/dasht/default.nix | 65 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/tools/misc/dasht/default.nix diff --git a/pkgs/tools/misc/dasht/default.nix b/pkgs/tools/misc/dasht/default.nix new file mode 100644 index 000000000000..cfd33edbd053 --- /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 ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a0ba1c984ea..7f25d0d99b59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6535,6 +6535,8 @@ in dash = callPackage ../shells/dash { }; + dasht = callPackage ../tools/misc/dasht { }; + dashing = callPackage ../tools/misc/dashing { }; es = callPackage ../shells/es { };