Merge pull request #68266 from pstn/dehydrated-modernisation

dehydrated: move to pname syntax, handle docs/manpage.
This commit is contained in:
worldofpeace 2019-09-12 14:16:39 -04:00 committed by GitHub
commit 2a10e8fef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 ]}"