13d6681ce7 crippled it unintentionally.
Also remove the incorrect/non-existing stdenv.i686-linux;
building the bootstrap tools should be a good-enough test anyway.
The flockit library and tool exists solely because rsync doesn't have file
locking.
It's not used like a normal library; you don't link against it, and you don't
have to patch your source code to use it. It's inserted between your program and
its libraries by use of LD_PRELOAD.
For example:
$ env LD_PRELOAD=$(nix-build -A pkgs.flockit)/lib/libflockit.so FLOCKIT_FILE_PREFIX=test rsync SRC DEST
Besides the library a handy executable is provided which can simplify the above to:
$ $(nix-build -A pkgs.flockit)/bin/flockit test rsync SRC DEST
Also see the following blog post:
https://www.swiftstack.com/blog/2012/08/15/old-school-monkeypatching/
In ab70693 @viric says zsnes works better without stripping. But the
build expression kept the $STRIP in the compiler options, so if it is
set to something it will show up in there. For example:
g++ -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/nix/store/04qgmdpmalgsy92zgs2z896jx073hcn2-SDL-1.2.15-dev/include/SDL -I/nix/store/04qgmdpmalgsy92zgs2z896jx073hcn2-SDL-1.2.15-dev/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNCURSES -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr strip -D__RELEASE__ -fno-rtti -o tools/fileutil.o -c tools/fileutil.cpp
g++: error: strip: No such file or directory
This commit removes that reference to $STRIP too.
Fixes#27906
Because #pragma GCC optimize ("O0") doesn't work for clang and
NIX_CFLAGS_COMPILE bypasses the fixup done by the makefiles everything
gets compiled with -O2.
The build still uses optimisation for everything else.
The build was failing due to missing telepathy_logger dependency,
I added it. Additionally, the connection to server was failing due to
telepathy executables not having an access to dconf, which was fixed
in #26113. Lastly, when I tried running Polari directly, it terminated
with SIGTRAP and the following error:
(org.gnome.Polari:22998): GLib-GIO-ERROR **: Settings schema 'org.gnome.desktop.interface' is not installed
adding `gnome3.gsettings_desktop_schemas` as a buildInput fixed that.
Some programs store the executable in a different place and link it
from the `bin` directory. For example, Polari links `$out/bin/polari`
to `$out/share/polari/org.gnome.Polari`. `wrapGAppsHook` did not follow
symlinks so it was not able to wrap Polari, making it unable to access
GObject introspection definitions required for running the program.
I made the wrapping script follow symlinks to fix this corner case.