@@ -0,0 +1,34 @@
1+{ stdenv }:
2+
3+# this tool only exists on darwin
4+assert stdenv.isDarwin;
5+
6+stdenv.mkDerivation {
7+ name = "derez";
8+
9+ src = "/usr/bin/DeRez";
10+
11+ unpackPhase = "true";
12+ configurePhase = "true";
13+ buildPhase = "true";
14+
15+ installPhase = ''
16+ mkdir -p "$out/bin"
17+ ln -s $src "$out/bin"
18+ '';
19+
20+ meta = with stdenv.lib; {
21+ description = "Decompiles resources";
22+ homepage = "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/DeRez.1.html";
23+ maintainers = [ maintainers.lnl7 ];
24+ platforms = platforms.darwin;
25+
26+ longDescription = ''
27+ The DeRez tool decompiles the resource fork of resourceFile according to the type declarations
28+ supplied by the type declaration files. The resource description produced by this decompilation
29+ contains the resource definitions (resource and data statements) associated with these type
30+ declarations. If for some reason it cannot reproduce the appropriate resource statements, DeRez
31+ generates hexadecimal data statements instead.
32+ '';
33+ };
34+}