python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / games / endless-sky / fixes.patch
blob359e2ee4af3b2379b5243c1037fe2524e5b49b9a
1 diff --git a/SConstruct b/SConstruct
2 index 48fd080..419b40d 100644
3 --- a/SConstruct
4 +++ b/SConstruct
5 @@ -55,7 +55,7 @@ sky = env.Program("endless-sky", Glob("build/" + env["mode"] + "/*.cpp"))
8 # Install the binary:
9 -env.Install("$DESTDIR$PREFIX/games", sky)
10 +env.Install("$DESTDIR$PREFIX/bin", sky)
12 # Install the desktop file:
13 env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop")
14 diff --git a/source/Files.cpp b/source/Files.cpp
15 index c8c8957..d196459 100644
16 --- a/source/Files.cpp
17 +++ b/source/Files.cpp
18 @@ -114,15 +114,9 @@ void Files::Init(const char * const *argv)
19 if(resources.back() != '/')
20 resources += '/';
21 #if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__
22 - // Special case, for Linux: the resource files are not in the same place as
23 - // the executable, but are under the same prefix (/usr or /usr/local).
24 - static const string LOCAL_PATH = "/usr/local/";
25 - static const string STANDARD_PATH = "/usr/";
26 - static const string RESOURCE_PATH = "share/games/endless-sky/";
27 - if(!resources.compare(0, LOCAL_PATH.length(), LOCAL_PATH))
28 - resources = LOCAL_PATH + RESOURCE_PATH;
29 - else if(!resources.compare(0, STANDARD_PATH.length(), STANDARD_PATH))
30 - resources = STANDARD_PATH + RESOURCE_PATH;
31 + // Workaround for NixOS. Not sure how to proceed with other OSes, feedback
32 + // is welcome.
33 + resources += "../share/games/endless-sky/";
34 #elif defined __APPLE__
35 // Special case for Mac OS X: the resources are in ../Resources relative to
36 // the folder the binary is in.