summary refs log tree commit diff
path: root/pkgs/os-specific/darwin
diff options
context:
space:
mode:
authorJason "Don" O'Conal <lovek323@gmail.com>2013-07-07 18:54:33 +1000
committerJason "Don" O'Conal <lovek323@gmail.com>2013-07-07 18:58:29 +1000
commit525a6856f237add6fa07da4c19d7e7b6e5366dce (patch)
treeb655ae4b0cad6b1947bd96026bebb1d868de208f /pkgs/os-specific/darwin
parentda7db90068a435c754110f6aea315c7b6aca772b (diff)
downloadnixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar.gz
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar.bz2
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar.lz
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar.xz
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.tar.zst
nixlib-525a6856f237add6fa07da4c19d7e7b6e5366dce.zip
otool and setfile: cleanup
Diffstat (limited to 'pkgs/os-specific/darwin')
-rw-r--r--pkgs/os-specific/darwin/otool/default.nix35
-rw-r--r--pkgs/os-specific/darwin/setfile/default.nix35
2 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/otool/default.nix b/pkgs/os-specific/darwin/otool/default.nix
new file mode 100644
index 000000000000..c998253d1480
--- /dev/null
+++ b/pkgs/os-specific/darwin/otool/default.nix
@@ -0,0 +1,35 @@
+{ stdenv }:
+
+# this tool only exists on darwin
+assert stdenv.isDarwin;
+
+stdenv.mkDerivation {
+  name = "otool";
+
+  src = "/usr/bin/otool";
+
+  unpackPhase = "true";
+  configurePhase = "true";
+  buildPhase = "true";
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    ln -s $src "$out/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Object file displaying tool";
+    homepage    = https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/otool.1.html;
+    license     = licenses.unfree;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.darwin;
+
+    longDescription = ''
+      The otool command displays specified parts of object files or libraries.
+      If the, -m option is not used, the file arguments may be of the form
+      libx.a(foo.o), to request information about only that object file and not
+      the entire library.
+    '';
+  };
+}
+
diff --git a/pkgs/os-specific/darwin/setfile/default.nix b/pkgs/os-specific/darwin/setfile/default.nix
new file mode 100644
index 000000000000..94320c94bc0c
--- /dev/null
+++ b/pkgs/os-specific/darwin/setfile/default.nix
@@ -0,0 +1,35 @@
+{ stdenv }:
+
+# this tool only exists on darwin
+assert stdenv.isDarwin;
+
+stdenv.mkDerivation {
+  name = "setfile";
+
+  src = "/usr/bin/SetFile";
+
+  unpackPhase = "true";
+  configurePhase = "true";
+  buildPhase = "true";
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    ln -s $src "$out/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Set attributes of files and directories";
+    homepage    = "http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/setfile.1.html";
+    license     = licenses.unfree;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.darwin;
+
+    longDescription = ''
+      SetFile is a tool to set the file attributes on files in an HFS+
+      directory. It attempts to be similar to the setfile command in MPW. It can
+      apply rules to more than one file with the options apply- ing to all files
+      listed.
+    '';
+  };
+}
+