From ff80331317ac50b80c8cb15918421885d341d63e Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 10 Dec 2019 16:40:13 +0100 Subject: [PATCH 1/2] maintainers: add Luflosi --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a9573c0a8a9a..04f0d882d8d2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4299,6 +4299,16 @@ githubId = 1784379; name = "Kyohei Kadota"; }; + Luflosi = { + name = "Luflosi"; + email = "luflosi@luflosi.de"; + github = "Luflosi"; + githubId = 15217907; + keys = [{ + longkeyid = "rsa4096/0x6F987CCF224D20B9"; + fingerprint = "66D1 3048 2B5F 2069 81A6 6B83 6F98 7CCF 224D 20B9"; + }]; + }; luispedro = { email = "luis@luispedro.org"; github = "luispedro"; From 2a15e3ba751d1f1a9337335262f3b3e26753c7b3 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 18 Feb 2020 16:51:31 +0100 Subject: [PATCH 2/2] kitty: better fix for build error Without the `no-werror.patch`, the compilation would fail with the following warning: ``` clang-7: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument] ``` To fix this, the compiler command line options `-pedantic-errors` and `-Werror` were patched out of the build script so that the warning would not become an error and stop the build. This is not ideal as this piece of code is changed fairly frequently, which requires fixing the patch. In the next kitty version the patch would need to be fixed again. A better alternative is to just not pass `-fno-strict-overflow` to the compiler. This is done by disabling the `strictoverflow` hardening feature. --- pkgs/applications/misc/kitty/default.nix | 6 ++++-- pkgs/applications/misc/kitty/no-werror.patch | 11 ----------- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 pkgs/applications/misc/kitty/no-werror.patch diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index 188e902614fa..cdba8c3f686b 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -74,10 +74,12 @@ buildPythonApplication rec { }) ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./no-lto.patch - ./no-werror.patch ./png2icns.patch ]; + # Causes build failure due to warning + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + buildPhase = if stdenv.isDarwin then '' ${python.interpreter} setup.py kitty.app --update-check-interval=0 '' else '' @@ -123,6 +125,6 @@ buildPythonApplication rec { description = "A modern, hackable, featureful, OpenGL based terminal emulator"; license = licenses.gpl3; platforms = platforms.darwin ++ platforms.linux; - maintainers = with maintainers; [ tex rvolosatovs ma27 ]; + maintainers = with maintainers; [ tex rvolosatovs ma27 Luflosi ]; }; } diff --git a/pkgs/applications/misc/kitty/no-werror.patch b/pkgs/applications/misc/kitty/no-werror.patch deleted file mode 100644 index bc1b369d98d9..000000000000 --- a/pkgs/applications/misc/kitty/no-werror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -217,7 +217,7 @@ def init_env( - cflags = os.environ.get( - 'OVERRIDE_CFLAGS', ( - '-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11' -- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden' -+ ' {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden' - ).format( - float_conversion, - optimize,