From 0b15c7c35b92516c1ee9e5b8061da1777c1e9840 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 21 Dec 2021 12:03:41 +0100 Subject: [PATCH] mailsend: refactor --- pkgs/tools/networking/mailsend/default.nix | 36 ++++++++----------- .../networking/mailsend/default.upstream | 3 -- 2 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 pkgs/tools/networking/mailsend/default.upstream diff --git a/pkgs/tools/networking/mailsend/default.nix b/pkgs/tools/networking/mailsend/default.nix index 9856634116eb..13a6dc005dd8 100644 --- a/pkgs/tools/networking/mailsend/default.nix +++ b/pkgs/tools/networking/mailsend/default.nix @@ -1,24 +1,17 @@ -{lib, stdenv, fetchurl, openssl}: -let - s = # Generated upstream information - rec { - baseName="mailsend"; - version="1.19"; - name="${baseName}-${version}"; - hash="1xwk6jvl5li8ddlik1lj88qswnyminp9wlf5cm8gg3n54szgcpjn"; - url="https://github.com/muquit/mailsend/archive/1.19.tar.gz"; - sha256="1xwk6jvl5li8ddlik1lj88qswnyminp9wlf5cm8gg3n54szgcpjn"; +{ lib, stdenv, fetchurl, openssl }: + +stdenv.mkDerivation rec { + pname = "mailsend"; + version = "1.19"; + + src = fetchurl { + url = "https://github.com/muquit/mailsend/archive/${version}.tar.gz"; + sha256 = "sha256-Vl72vibFjvdQZcVRnq6N1VuuMUKShhlpayjSQrc0k/c="; }; + buildInputs = [ openssl ]; -in -stdenv.mkDerivation { - inherit (s) name version; - inherit buildInputs; - src = fetchurl { - inherit (s) url sha256; - }; configureFlags = [ "--with-openssl=${openssl.dev}" ]; @@ -29,12 +22,11 @@ stdenv.mkDerivation { sha256 = "0vz373zcfl19inflybfjwshcq06rvhx0i5g0f4b021cxfhyb1sm0"; }) ]; - meta = { - inherit (s) version; + meta = with lib; { description = "CLI email sending tool"; - license = lib.licenses.bsd3 ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; + license = licenses.bsd3; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; homepage = "https://github.com/muquit/mailsend"; downloadPage = "https://github.com/muquit/mailsend/releases"; }; diff --git a/pkgs/tools/networking/mailsend/default.upstream b/pkgs/tools/networking/mailsend/default.upstream deleted file mode 100644 index 3d9862a3de21..000000000000 --- a/pkgs/tools/networking/mailsend/default.upstream +++ /dev/null @@ -1,3 +0,0 @@ -url "https://github.com/muquit/mailsend/releases" -ensure_choice -version '.*/([0-9][0-9.a-z]*)[.]tar[.].*' '\1'