nixpkgs/pkgs/by-name/de/dehydrated/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

37 lines
1.1 KiB
Nix

{ lib, stdenv, coreutils, curl, diffutils, gawk, gnugrep, gnused, hexdump, openssl, makeWrapper, fetchFromGitHub, installShellFiles }:
stdenv.mkDerivation rec {
pname = "dehydrated";
version = "0.7.1";
src = fetchFromGitHub {
owner = "lukas2511";
repo = "dehydrated";
rev = "v${version}";
sha256 = "sha256-K08eeruyT5vKzK3PzfCkubZiHbf9Yq7wzD1z69MeDtY=";
};
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 : "${lib.makeBinPath [ openssl coreutils gnused gnugrep diffutils curl gawk hexdump ]}"
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Letsencrypt/acme client implemented as a shell-script";
mainProgram = "dehydrated";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.pstn ];
};
}