mailsend: refactor

This commit is contained in:
Felix Buehler 2021-12-21 12:03:41 +01:00
parent 459f9fe2be
commit 0b15c7c35b
2 changed files with 14 additions and 25 deletions

View file

@ -1,24 +1,17 @@
{lib, stdenv, fetchurl, openssl}: { lib, stdenv, fetchurl, openssl }:
let
s = # Generated upstream information stdenv.mkDerivation rec {
rec { pname = "mailsend";
baseName="mailsend"; version = "1.19";
version="1.19";
name="${baseName}-${version}"; src = fetchurl {
hash="1xwk6jvl5li8ddlik1lj88qswnyminp9wlf5cm8gg3n54szgcpjn"; url = "https://github.com/muquit/mailsend/archive/${version}.tar.gz";
url="https://github.com/muquit/mailsend/archive/1.19.tar.gz"; sha256 = "sha256-Vl72vibFjvdQZcVRnq6N1VuuMUKShhlpayjSQrc0k/c=";
sha256="1xwk6jvl5li8ddlik1lj88qswnyminp9wlf5cm8gg3n54szgcpjn";
}; };
buildInputs = [ buildInputs = [
openssl openssl
]; ];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
configureFlags = [ configureFlags = [
"--with-openssl=${openssl.dev}" "--with-openssl=${openssl.dev}"
]; ];
@ -29,12 +22,11 @@ stdenv.mkDerivation {
sha256 = "0vz373zcfl19inflybfjwshcq06rvhx0i5g0f4b021cxfhyb1sm0"; sha256 = "0vz373zcfl19inflybfjwshcq06rvhx0i5g0f4b021cxfhyb1sm0";
}) })
]; ];
meta = { meta = with lib; {
inherit (s) version;
description = "CLI email sending tool"; description = "CLI email sending tool";
license = lib.licenses.bsd3 ; license = licenses.bsd3;
maintainers = [lib.maintainers.raskin]; maintainers = with maintainers; [ raskin ];
platforms = lib.platforms.linux; platforms = platforms.linux;
homepage = "https://github.com/muquit/mailsend"; homepage = "https://github.com/muquit/mailsend";
downloadPage = "https://github.com/muquit/mailsend/releases"; downloadPage = "https://github.com/muquit/mailsend/releases";
}; };

View file

@ -1,3 +0,0 @@
url "https://github.com/muquit/mailsend/releases"
ensure_choice
version '.*/([0-9][0-9.a-z]*)[.]tar[.].*' '\1'