From ee951a92d346e5147001bcb290b3923b0fdcb607 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Wed, 17 Jun 2015 20:52:27 -0700 Subject: [PATCH] relocate adv_cmds --- pkgs/os-specific/darwin/adv_cmds/locale.nix | 29 --------------- pkgs/os-specific/darwin/adv_cmds/ps.nix | 35 ------------------- .../adv_cmds/default.nix | 15 +++++--- pkgs/top-level/all-packages.nix | 12 +++---- 4 files changed, 15 insertions(+), 76 deletions(-) delete mode 100644 pkgs/os-specific/darwin/adv_cmds/locale.nix delete mode 100644 pkgs/os-specific/darwin/adv_cmds/ps.nix diff --git a/pkgs/os-specific/darwin/adv_cmds/locale.nix b/pkgs/os-specific/darwin/adv_cmds/locale.nix deleted file mode 100644 index 92de8a242e2a..000000000000 --- a/pkgs/os-specific/darwin/adv_cmds/locale.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchurl }: - -stdenv.mkDerivation rec { - name = "locale-${version}"; - version = "153"; - - src = fetchurl { - url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-${version}.tar.gz"; - sha256 = "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v"; - }; - - buildPhase = '' - cd locale - c++ -Os -Wall -o locale locale.cc - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/man/man1 - - cp locale $out/bin/locale - cp locale.1 $out/share/man/man1 - ''; - - - meta = { - platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; - }; -} diff --git a/pkgs/os-specific/darwin/adv_cmds/ps.nix b/pkgs/os-specific/darwin/adv_cmds/ps.nix deleted file mode 100644 index c3d3d1588627..000000000000 --- a/pkgs/os-specific/darwin/adv_cmds/ps.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ stdenv, fetchurl }: - -stdenv.mkDerivation rec { - name = "ps-${version}"; - version = "153"; - - src = fetchurl { - url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-${version}.tar.gz"; - sha256 = "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v"; - }; - - buildPhase = '' - cd ps - cc -Os -Wall -I. -c -o fmt.o fmt.c - cc -Os -Wall -I. -c -o keyword.o keyword.c - cc -Os -Wall -I. -c -o nlist.o nlist.c - cc -Os -Wall -I. -c -o print.o print.c - cc -Os -Wall -I. -c -o ps.o ps.c - cc -Os -Wall -I. -c -o tasks.o tasks.c - cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/man/man1 - - cp ps $out/bin/ps - cp ps.1 $out/share/man/man1 - ''; - - - meta = { - platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; - }; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix index db467254f171..4bc3a7a7fa42 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix @@ -2,10 +2,8 @@ appleDerivation { # Will override the name until we provide all of adv_cmds - name = "ps-${version}"; - buildPhase = '' - cd ps + pushd ps cc -Os -Wall -I. -c -o fmt.o fmt.c cc -Os -Wall -I. -c -o keyword.o keyword.c cc -Os -Wall -I. -c -o nlist.o nlist.c @@ -13,13 +11,20 @@ appleDerivation { cc -Os -Wall -I. -c -o ps.o ps.c cc -Os -Wall -I. -c -o tasks.o tasks.c cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o + popd + + pushd locale + c++ -o locale locale.cc + popd ''; installPhase = '' mkdir -p $out/bin $out/share/man/man1 - cp ps $out/bin/ps - cp ps.1 $out/share/man/man1 + cp ps/ps $out/bin/ps + cp ps/ps.1 $out/share/man/man1 + cp locale/locale $out/bin/locale + cp locale/locale.1 $out/share/man/man1 ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e903f6395b9b..dc41bf4064db 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1512,7 +1512,9 @@ let garmintools = callPackage ../development/libraries/garmintools {}; - gawk = callPackage ../tools/text/gawk { inherit (darwin) locale; }; + gawk = callPackage ../tools/text/gawk { + locale = darwin.adv_cmds; + }; gawkInteractive = appendToName "interactive" (gawk.override { readlineSupport = true; }); @@ -5282,12 +5284,12 @@ let cmake-2_8 = callPackage ../development/tools/build-managers/cmake/2.8.nix { wantPS = stdenv.isDarwin; - ps = if stdenv.isDarwin then darwin.ps else null; + ps = if stdenv.isDarwin then darwin.adv_cmds else null; }; cmake = callPackage ../development/tools/build-managers/cmake { wantPS = stdenv.isDarwin; - ps = if stdenv.isDarwin then darwin.ps else null; + ps = if stdenv.isDarwin then darwin.adv_cmds else null; }; cmakeCurses = cmake.override { useNcurses = true; }; @@ -9294,10 +9296,6 @@ let osx_sdk = callPackage ../os-specific/darwin/osx-sdk {}; osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk { inherit osx_sdk; }; - ps = callPackage ../os-specific/darwin/adv_cmds/ps.nix {}; - - locale = callPackage ../os-specific/darwin/adv_cmds/locale.nix {}; - security_tool = callPackage ../os-specific/darwin/security-tool { inherit osx_private_sdk; }; binutils = callPackage ../os-specific/darwin/binutils { inherit cctools; };