about summary refs log tree commit diff
path: root/pkgs/games/build-support/monogame-patcher/default.nix
Commit message (Collapse)AuthorAgeFilesLines
* monogame-patcher: Fix SHA256 hashes for depsaszlig2019-02-131-2/+2
| | | | | | | | | | | I checked the archives against the previous versions and the contents match, however the archives themselves had differences with the file order so the hashes are different now. In the long term, we probably should use fetchzip instead so we don't get a hash mismatch if none of the actual contents change. Signed-off-by: aszlig <aszlig@nix.build>
* monogame-patcher: Use cleanSource for the src attraszlig2018-07-191-2/+2
| | | | | | | | While there won't be any .git directories within ./src, I still create Vim swap files all the time when editing stuff. So let's make sure that those swap files are not included in the src input of the derivation. Signed-off-by: aszlig <aszlig@nix.build>
* monogame-patcher: Refactor method ref findingaszlig2018-07-191-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | So far we have searched for methods in two steps: First get all the types and then find all of the constructors or method definitions. The match for the actual method definition was done first for the type and then again for the full definition of the method/constructor. For the replace-call subcommand this also means that we don't have a very good way to find the type, because if we wanted to keep doing this in two steps we would need to parse the type name out of the one given as the replacement string in replace-call. So now we recurse through *all* the constructors and methods and do a full match against the specified replacement string, both for replace-call and for fix-filestreams. Compared to the implementation so far we also do this just once instead of every time we find a call or FileStream constructor. I also overhauled the way we do testing, because in the end writing tests using NUnit would introduce a lot of code churn because we need to make a lot of external calls. The shell is especially useful for exactly that and our tests are now just a plain shell script. Signed-off-by: aszlig <aszlig@nix.build>
* monogame-patcher: Restructure and add stub testsaszlig2018-07-191-0/+21
| | | | | | | | | | | | | Mainly this is so we can prepare for running unit tests, so we get the latest version of NUnit and run the console test runner. Currently there is only a dummy test which always succeeds, but it's there so that we can fill out the boilerplate later. I also moved the option definitions into a separate file so they don't clutter up the main file. Signed-off-by: aszlig <aszlig@nix.build>
* monogame-patcher: Switch to MSBuildaszlig2018-07-191-27/+20
| | | | | | | | | | | | | | I really would have preferred a simple Makefile, but with that we can't use buildDotnetPackage and we also need to take care of butchering the dependencies manually. So I moved everything to src/ and added a csproj file to clean up most of the cruft and just use buildDotnetPackage with minimal attributes. In addition to that I also added assembly info, so that the command line help will show the proper author name, copyright, yaddayadda... Signed-off-by: aszlig <aszlig@nix.build>
* towerfall-ascension: Move patcher into own pkgaszlig2018-07-191-0/+31
The patcher using Cecil is now in its own derivation and can thus be easily added via nativeBuildInputs. Patching FileStream types is so common that it comes in handy for other games using Mono. I also improved the patcher a little bit so it accepts command line arguments and it's easier to add the types that needed to be patched directly via command line arguments. Signed-off-by: aszlig <aszlig@nix.build>