New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openarena: add community map pack #84868
Conversation
ideally users of this package could choose whether they want the community maps. The map pack needs to go into openarena's What's a good pattern to support optionality here? Should the map pack be a separate derivation, and then copied into the openarena derivation? I think that'd make the openarena derivation large, and thus lose nix cache benefits. I couldn't find a way to configure openarena to look at multiple directories for game resources. |
The moddb.com link is dead. Currently this one works, but it's probably temporary: https://sjc3.dl.dbolical.com/dl/2014/01/20/oacmp-volume1-v3.zip?st=ju5icWRS1x_v2PxfPD270A==&e=1586721284 |
@progval Ah, I feared that would happen, hence why I uploaded the zip to archive.org and included that URL too. I've updated the PR to only include the archive.org link. Please could you download the zip from the original site, and confirm the sha256 that I've put in the PR? |
@@ -31,6 +38,9 @@ stdenv.mkDerivation { | |||
makeWrapper "${gameDir}/openarena.${arch}" "$out/bin/openarena" \ | |||
--prefix LD_LIBRARY_PATH : "${libPath}" | |||
makeWrapper "${gameDir}/oa_ded.${arch}" "$out/bin/oa_ded" | |||
|
|||
cd openarena-0.8.8 | |||
unzip $communityMaps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Delete sources/ which is ~70% of the unzipped space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this fits better into the unpackPhase.
The download links on https://openarena.fandom.com/wiki/OACMP/Volume_1 don't have stable URLs, so I have uploaded the zip file to archive.org.
Indeed:
|
@@ -10,6 +10,13 @@ stdenv.mkDerivation { | |||
sha256 = "0jmc1cmdz1rcvqc9ilzib1kilpwap6v0d331l6q53wsibdzsz3ss"; | |||
}; | |||
|
|||
# https://openarena.fandom.com/wiki/OACMP/Volume_1 | |||
communityMaps = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an optional part of the openarena package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should definitely be optional but I think it can be enabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to make it optional. openarena.withMaps [ communityMaps ]
would be a nice pattern for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could have a communityMaps ? true
as parameter and use lib.optionalString communityMaps "unzip $communityMaps"
I think (would be a good idea to also make the fetchurl
step optional), but maybe it would be better to convert the maps to another derivation and add a parameter withMaps
like you said (then, you can use propagatedBuildInputs = withMaps
to include the files from withMaps
in the openarena
).
Would be cleaner and more flexible that way.
Is it possibly to have the maps in a different package such that they can be referenced by a configuration file or similar? This way the openarena package doesn't depend on the maps. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
More maps in Openarena!
To test, install openarena and start a game using one of the community maps from https://openarena.fandom.com/wiki/OACMP/Volume_1 , e.g.
oacmpdm1
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)