Extract Daml source files from a DAR?

How can I extract the Daml source files from a DAR?
(assuming they have not been removed)

The following works on macOS:

unzip some.dar '*.daml'
1 Like

Keep in mind that there is no guarantee that the embedded Daml source files are exactly the same as the source files used to compile the DAR.

DAR files are in in the zip format (similar to Java ecosystem’s JAR files). The Daml source files are included in the DAR files for convenience. However, replacing them does not invalidate the DAR file.