From 181dfe306f262e8e44f0952efa531f9e3c482ec5 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 26 Apr 2020 11:03:11 +0300 Subject: [PATCH 1/2] todoman: format inputs and arguments --- pkgs/applications/office/todoman/default.nix | 57 +++++++++++++++----- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index e18a11a7448b..ca733f5fad16 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -1,4 +1,9 @@ -{ stdenv, python3, glibcLocales, installShellFiles, jq }: +{ stdenv +, python3 +, glibcLocales +, installShellFiles +, jq +}: let inherit (python3.pkgs) buildPythonApplication fetchPypi; @@ -12,22 +17,46 @@ buildPythonApplication rec { sha256 = "16brw2zhm5vamffin6qjb0lxjlj3ba40vaficl851nw2xh2mrdhy"; }; - LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux - "${glibcLocales}/lib/locale/locale-archive"; - LANG = "en_US.UTF-8"; - LC_TYPE = "en_US.UTF-8"; + LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux + "${glibcLocales}/lib/locale/locale-archive"; + LANG = "en_US.UTF-8"; + LC_TYPE = "en_US.UTF-8"; - nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ glibcLocales ]; - propagatedBuildInputs = with python3.pkgs; - [ atomicwrites click click-log click-repl configobj humanize icalendar parsedatetime - python-dateutil pyxdg tabulate urwid ]; + nativeBuildInputs = [ + installShellFiles + ]; + buildInputs = [ + glibcLocales + ]; + propagatedBuildInputs = with python3.pkgs; [ + atomicwrites + click + click-log + click-repl + configobj + humanize + icalendar + parsedatetime + python-dateutil + pyxdg + tabulate + urwid + ]; - checkInputs = with python3.pkgs; - [ flake8 flake8-import-order freezegun hypothesis pytest pytestrunner pytestcov ]; + checkInputs = with python3.pkgs; [ + flake8 + flake8-import-order + freezegun + hypothesis + pytest + pytestrunner + pytestcov + ]; - makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" - "--set CHARSET en_us.UTF-8" ]; + makeWrapperArgs = [ + "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" + "--set CHARSET en_us.UTF-8" + ]; postInstall = '' installShellCompletion --bash contrib/completion/bash/_todo From c011a6b32193e94954e2b262866619525fa0b93e Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 26 Apr 2020 11:06:01 +0300 Subject: [PATCH 2/2] todoman: remove glibLocale when it's not needed Don't know why they were there in the first place :/. --- pkgs/applications/office/todoman/default.nix | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index ca733f5fad16..163673afb253 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -17,17 +17,9 @@ buildPythonApplication rec { sha256 = "16brw2zhm5vamffin6qjb0lxjlj3ba40vaficl851nw2xh2mrdhy"; }; - LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux - "${glibcLocales}/lib/locale/locale-archive"; - LANG = "en_US.UTF-8"; - LC_TYPE = "en_US.UTF-8"; - nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ - glibcLocales - ]; propagatedBuildInputs = with python3.pkgs; [ atomicwrites click @@ -51,12 +43,10 @@ buildPythonApplication rec { pytest pytestrunner pytestcov + glibcLocales ]; - makeWrapperArgs = [ - "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" - "--set CHARSET en_us.UTF-8" - ]; + LC_ALL = "en_US.UTF-8"; postInstall = '' installShellCompletion --bash contrib/completion/bash/_todo