From 5ca4089d6fb8ed73fd0859d6c2052aad0ce72055 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:42:25 -0700 Subject: [PATCH] aws-mfa: fix script duplication when installing with installer --- pkgs/tools/admin/aws-mfa/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/aws-mfa/default.nix b/pkgs/tools/admin/aws-mfa/default.nix index 53855b6d28de..666161f1d363 100644 --- a/pkgs/tools/admin/aws-mfa/default.nix +++ b/pkgs/tools/admin/aws-mfa/default.nix @@ -1,24 +1,36 @@ { lib , buildPythonApplication , fetchFromGitHub +, fetchpatch , boto3 }: buildPythonApplication rec { pname = "aws-mfa"; version = "0.0.12"; + format = "setuptools"; src = fetchFromGitHub { owner = "broamski"; repo = "aws-mfa"; rev = version; - sha256 = "1blcpa13zgyac3v8inc7fh9szxq2avdllx6w5ancfmyh5spc66ay"; + hash = "sha256-XhnDri7QV8esKtx0SttWAvevE3SH2Yj2YMq/P4K6jK4="; }; + patches = [ + # https://github.com/broamski/aws-mfa/pull/87 + (fetchpatch { + name = "remove-duplicate-script.patch"; + url = "https://github.com/broamski/aws-mfa/commit/0d1624022c71cb92bb4436964b87f0b2ffd677ec.patch"; + hash = "sha256-Bv8ffPbDysz87wLg2Xip+0yxaBfbEmu+x6fSXI8BVjA="; + }) + ]; + propagatedBuildInputs = [ boto3 ]; + # package has no tests doCheck = false; pythonImportsCheck = [ @@ -28,7 +40,7 @@ buildPythonApplication rec { meta = with lib; { description = "Manage AWS MFA Security Credentials"; homepage = "https://github.com/broamski/aws-mfa"; - license = [ licenses.mit ]; + license = licenses.mit; maintainers = [ maintainers.srapenne ]; }; }