dehydrated: move to pname syntax, handle docs/manpage.

This commit is contained in:
Philipp 2019-09-07 15:47:17 +02:00
parent 8490d53463
commit 274b8654f5

View file

@ -1,10 +1,7 @@
{ stdenv, coreutils, curl, diffutils, gawk, gnugrep, gnused, openssl, makeWrapper, fetchFromGitHub }:
let
pkgName = "dehydrated";
version = "0.6.5";
in
{ stdenv, coreutils, curl, diffutils, gawk, gnugrep, gnused, openssl, makeWrapper, fetchFromGitHub, installShellFiles }:
stdenv.mkDerivation rec {
name = pkgName + "-" + version;
pname = "dehydrated";
version = "0.6.5";
src = fetchFromGitHub {
owner = "lukas2511";
@ -13,9 +10,16 @@ stdenv.mkDerivation rec {
sha256 = "14k7ykry16zp09i0bqb5pqaclvnjcb6p3x8knm9v5q0bdvlplkjv";
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
installManPage docs/man/dehydrated.1
mkdir -p "$out/share/docs/dehydrated"
cp docs/*.md "$out/share/docs/dehydrated"
cp -r docs/examples "$out/share/docs/dehydrated"
cp {CHANGELOG,LICENSE,README.md} "$out/share/docs/dehydrated"
mkdir -p $out/bin
cp -a dehydrated $out/bin
wrapProgram "$out/bin/dehydrated" --prefix PATH : "${stdenv.lib.makeBinPath [ openssl coreutils gnused gnugrep diffutils curl gawk ]}"