From f1195081403ff72edb33565d3669251addd41f86 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan <daiderd@gmail.com> Date: Wed, 17 Jun 2015 15:21:22 +0200 Subject: [PATCH] darwin os-specific: rez and derez packages --- lib/maintainers.nix | 1 + pkgs/os-specific/darwin/derez/default.nix | 34 +++++++++++++++++++++++ pkgs/os-specific/darwin/rez/default.nix | 33 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++ 4 files changed, 71 insertions(+) create mode 100644 pkgs/os-specific/darwin/derez/default.nix create mode 100644 pkgs/os-specific/darwin/rez/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index eaee076635f5..88c513eacabe 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -133,6 +133,7 @@ lhvwb = "Nathaniel Baxter <nathaniel.baxter@gmail.com>"; linquize = "Linquize <linquize@yahoo.com.hk>"; linus = "Linus Arver <linusarver@gmail.com>"; + lnl7 = "Daiderd Jordan <daiderd@gmail.com>"; lovek323 = "Jason O'Conal <jason@oconal.id.au>"; ludo = "Ludovic Courtès <ludo@gnu.org>"; madjar = "Georges Dubus <georges.dubus@compiletoi.net>"; diff --git a/pkgs/os-specific/darwin/derez/default.nix b/pkgs/os-specific/darwin/derez/default.nix new file mode 100644 index 000000000000..f64f05aadf09 --- /dev/null +++ b/pkgs/os-specific/darwin/derez/default.nix @@ -0,0 +1,34 @@ +{ stdenv }: + +# this tool only exists on darwin +assert stdenv.isDarwin; + +stdenv.mkDerivation { + name = "derez"; + + src = "/usr/bin/DeRez"; + + unpackPhase = "true"; + configurePhase = "true"; + buildPhase = "true"; + + installPhase = '' + mkdir -p "$out/bin" + ln -s $src "$out/bin" + ''; + + meta = with stdenv.lib; { + description = "Decompiles resources"; + homepage = "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/DeRez.1.html"; + maintainers = [ maintainers.lnl7 ]; + platforms = platforms.darwin; + + longDescription = '' + The DeRez tool decompiles the resource fork of resourceFile according to the type declarations + supplied by the type declaration files. The resource description produced by this decompilation + contains the resource definitions (resource and data statements) associated with these type + declarations. If for some reason it cannot reproduce the appropriate resource statements, DeRez + generates hexadecimal data statements instead. + ''; + }; +} diff --git a/pkgs/os-specific/darwin/rez/default.nix b/pkgs/os-specific/darwin/rez/default.nix new file mode 100644 index 000000000000..847dfc6e6f34 --- /dev/null +++ b/pkgs/os-specific/darwin/rez/default.nix @@ -0,0 +1,33 @@ +{ stdenv }: + +# this tool only exists on darwin +assert stdenv.isDarwin; + +stdenv.mkDerivation { + name = "rez"; + + src = "/usr/bin/Rez"; + + unpackPhase = "true"; + configurePhase = "true"; + buildPhase = "true"; + + installPhase = '' + mkdir -p "$out/bin" + ln -s $src "$out/bin" + ''; + + meta = with stdenv.lib; { + description = "Compiles resources"; + homepage = "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/Rez.1.html"; + maintainers = [ maintainers.lnl7 ]; + platforms = platforms.darwin; + + longDescription = '' + The Rez tool compiles the resource fork of a file according to the textual description contained in + the resource description files. These resource description files must contain both the type + declarations and the resource definitions needed to compile the resources. This data can come + directly from the resource description files. + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index de9cea273a3b..35a9ca58854b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -635,6 +635,9 @@ let oracle-instantclient = callPackage ../development/libraries/oracle-instantclient { }; + derez = callPackage ../os-specific/darwin/derez { }; + rez = callPackage ../os-specific/darwin/rez { }; + setfile = callPackage ../os-specific/darwin/setfile { }; install_name_tool = callPackage ../os-specific/darwin/install_name_tool { };