Skip to content

Commit f0b75c4

Browse files
TheGiraffe3momeemtFliegendeWurst
authored
endless-sky: 0.10.10 -> 0.10.12 (NixOS#388189)
Co-authored-by: TheGiraffe3 <[email protected]> Co-authored-by: Mutsuha Asada <[email protected]> Co-authored-by: Arne Keller <[email protected]>
1 parent 7886d98 commit f0b75c4

File tree

2 files changed

+11
-39
lines changed

2 files changed

+11
-39
lines changed

pkgs/by-name/en/endless-sky/fixes.patch

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,14 @@ index 48fd080..419b40d 100644
1212
# Install the desktop file:
1313
env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop")
1414
diff --git a/source/Files.cpp b/source/Files.cpp
15-
index de27023e..4225051f 100644
15+
index f5dec21..ad57c55 100644
1616
--- a/source/Files.cpp
1717
+++ b/source/Files.cpp
18-
@@ -108,32 +108,9 @@ void Files::Init(const char * const *argv)
19-
resources = str;
20-
SDL_free(str);
18+
@@ -115,6 +115,7 @@ void Files::Init(const char * const *argv)
19+
else if(IsParent(STANDARD_PATH, resources))
20+
resources = STANDARD_PATH / RESOURCE_PATH;
21+
#endif
22+
+ resources = "%NIXPKGS_RESOURCES_PATH%";
2123
}
22-
-#if defined _WIN32
23-
- FixWindowsSlashes(resources);
24-
-#endif
25-
- if(resources.back() != '/')
26-
- resources += '/';
27-
-#if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__
28-
- // Special case, for Linux: the resource files are not in the same place as
29-
- // the executable, but are under the same prefix (/usr or /usr/local).
30-
- static const string LOCAL_PATH = "/usr/local/";
31-
- static const string STANDARD_PATH = "/usr/";
32-
- static const string RESOURCE_PATH = "share/games/endless-sky/";
33-
- if(!resources.compare(0, LOCAL_PATH.length(), LOCAL_PATH))
34-
- resources = LOCAL_PATH + RESOURCE_PATH;
35-
- else if(!resources.compare(0, STANDARD_PATH.length(), STANDARD_PATH))
36-
- resources = STANDARD_PATH + RESOURCE_PATH;
37-
-#endif
38-
- // If the resources are not here, search in the directories containing this
39-
- // one. This allows, for example, a Mac app that does not actually have the
40-
- // resources embedded within it.
41-
- while(!Exists(resources + "credits.txt"))
42-
- {
43-
- size_t pos = resources.rfind('/', resources.length() - 2);
44-
- if(pos == string::npos || pos == 0)
45-
- throw runtime_error("Unable to find the resource directories!");
46-
- resources.erase(pos + 1);
47-
- }
48-
+
49-
+ resources = "%NIXPKGS_RESOURCES_PATH%";
50-
+
51-
dataPath = resources + "data/";
52-
imagePath = resources + "images/";
53-
soundPath = resources + "sounds/";
24+
// If the resources are not here, search in the directories containing this
25+
// one. This allows, for example, a Mac app that does not actually have the

pkgs/by-name/en/endless-sky/package.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
stdenv.mkDerivation rec {
1616
pname = "endless-sky";
17-
version = "0.10.10";
17+
version = "0.10.12";
1818

1919
src = fetchFromGitHub {
2020
owner = "endless-sky";
2121
repo = "endless-sky";
22-
rev = "v${version}";
23-
sha256 = "sha256-FjQluOFU+fPr4/3WveScRRabDjD/bq8YmXvCU9w9yo8=";
22+
tag = "v${version}";
23+
hash = "sha256-cT/bklRGQnS9Nm8J0oH1mG20JQOe58FAAHToNDpvPpQ=";
2424
};
2525

2626
patches = [

0 commit comments

Comments
 (0)