depot/third_party/nixpkgs/pkgs/tools/misc/dasht/default.nix
Default email 4fc29cb41f Project import generated by Copybara.
GitOrigin-RevId: 135073a87b7e2c631739f4ffa016e1859b1a425e
2020-05-29 08:06:01 +02:00

65 lines
1.2 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, installShellFiles
, coreutils
, gnused
, gnugrep
, sqlite
, wget
, w3m
, socat
, gawk
}:
stdenv.mkDerivation rec {
pname = "dasht";
version = "2.4.0";
src = fetchFromGitHub {
owner = "sunaku";
repo = pname;
rev = "v${version}";
sha256 = "08wssmifxi7pnvn9gqrvpzpkc2qpkfbzbhxh0dk1gff2y2211qqk";
};
deps = lib.makeBinPath [
coreutils
gnused
gnugrep
sqlite
wget
w3m
socat
gawk
(placeholder "out")
];
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/* $out/bin/
installManPage man/man1/*
installShellCompletion --zsh etc/zsh/completions/*
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 ];
};
}