Complex source fetching

The source I’d like to fetch for a package has a complex cloning procedure, effectively:

svn checkout --depth=immediates 'https://josm.openstreetmap.de/osmsvn/applications/editors/josm' 'josm'
svn update --set-depth=immediates 'josm/core'
svn update --set-depth=immediates 'josm/plugins'
svn update --set-depth=infinity --accept=theirs-full 'josm/plugins/00_core_test_config'
svn update --set-depth=infinity --accept=theirs-full 'josm/plugins/00_core_test_lib'
svn update --set-depth=infinity --accept=theirs-full 'josm/plugins/00_core_tools'
svn update --set-depth=infinity --accept=theirs-full 'josm/plugins/00_tools'
svn update --set-depth=infinity --accept=theirs-full 'josm/i18n'
svn checkout --depth=empty 'https://josm.openstreetmap.de/svn/trunk/' 'josm/core'
svn update --set-depth=empty 'josm/core/nodist'
svn update 'josm/core/ivy.xml' 'josm/core/ivysettings.xml' 'josm/core/pom.xml' 'josm/core/nodist/pom.xml'
svn checkout 'https://josm.openstreetmap.de/svn/trunk/test/config' 'josm/plugins/00_core_test_config'
svn checkout 'https://josm.openstreetmap.de/svn/trunk/test/lib' 'josm/plugins/00_core_test_lib'
svn checkout 'https://josm.openstreetmap.de/svn/trunk/tools' 'josm/plugins/00_core_tools'

Is there a way to do this as the source for a Nix package? How close can I get?