mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
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.
This commit is contained in:
parent
ff80331317
commit
2a15e3ba75
2 changed files with 4 additions and 13 deletions
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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,
|
Loading…
Reference in a new issue