1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/tools/misc/dasht/default.nix

66 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
2020-05-19 10:20:00 +01:00
, installShellFiles
, coreutils
, gnused
, gnugrep
, sqlite
, wget
, w3m
, socat
, gawk
}:
stdenv.mkDerivation rec {
2019-02-23 05:01:31 +00:00
pname = "dasht";
2020-05-19 05:12:33 +01:00
version = "2.4.0";
src = fetchFromGitHub {
owner = "sunaku";
2019-02-23 05:01:31 +00:00
repo = pname;
rev = "v${version}";
2020-05-19 05:12:33 +01:00
sha256 = "08wssmifxi7pnvn9gqrvpzpkc2qpkfbzbhxh0dk1gff2y2211qqk";
};
deps = lib.makeBinPath [
coreutils
gnused
gnugrep
sqlite
wget
w3m
socat
gawk
(placeholder "out")
];
2020-05-19 10:20:00 +01:00
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/* $out/bin/
2020-05-19 10:20:00 +01:00
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";
2019-02-23 05:01:31 +00:00
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 ];
};
}