about summary refs log tree commit diff
path: root/pkgs/applications/networking/tmpmail/default.nix
blob: 70e144cb05caaa9507f05b1b179b529476e3ed26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, fetchFromGitHub, stdenvNoCC, w3m, curl, jq, makeWrapper, installShellFiles }:

stdenvNoCC.mkDerivation rec {
  pname = "tmpmail";
  version = "1.1.4";

   src = fetchFromGitHub {
    owner = "sdushantha";
    repo = "tmpmail";
    rev = "v${version}";
    sha256 = "sha256-Rcu1qNmUZhMRvPiaWrDlzLtGksv09XBiF2GJUxXKs1Y=";
  };

  dontConfigure = true;

  dontBuild = true;

  nativeBuildInputs = [ makeWrapper installShellFiles ];

  installPhase = ''
    mkdir -p $out/bin
    install -Dm755 -t $out/bin tmpmail
    installManPage tmpmail.1
    wrapProgram $out/bin/tmpmail --prefix PATH : ${lib.makeBinPath [ w3m curl jq ]}
  '';

   meta = with lib; {
    homepage = "https://github.com/sdushantha/tmpmail";
    description = "A temporary email right from your terminal written in POSIX sh ";
    license = licenses.mit;
    maintainers = [ maintainers.legendofmiracles ];
  };
}