summary refs log tree commit diff
path: root/pkgs/development/tools/misc/distcc
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-12-26 23:32:23 +0100
committerLluís Batlle i Rossell <viric@viric.name>2012-12-26 23:32:23 +0100
commit499e686ca5ac91001f86b15f3ed050e94bde5803 (patch)
treefcde1e8596bad7e3a0e348c40979d6f88856b1c7 /pkgs/development/tools/misc/distcc
parent63035ba87da29c2023a00e09a7b37faedc551905 (diff)
downloadnixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar.gz
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar.bz2
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar.lz
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar.xz
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.tar.zst
nixpkgs-499e686ca5ac91001f86b15f3ed050e94bde5803.zip
distcc: Fixing indentation
Noticed by niksnut.
Diffstat (limited to 'pkgs/development/tools/misc/distcc')
-rw-r--r--pkgs/development/tools/misc/distcc/default.nix125
1 files changed, 64 insertions, 61 deletions
diff --git a/pkgs/development/tools/misc/distcc/default.nix b/pkgs/development/tools/misc/distcc/default.nix
index 6101650c6de..565d7835f05 100644
--- a/pkgs/development/tools/misc/distcc/default.nix
+++ b/pkgs/development/tools/misc/distcc/default.nix
@@ -4,71 +4,74 @@
 }:
 
 let
-name    = "distcc";
-version = "3.1";
-distcc = stdenv.mkDerivation {
-  name = "${name}-${version}";
-  src = fetchurl {
-    url = "http://distcc.googlecode.com/files/${name}-${version}.tar.bz2";
-    sha256 = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89";
-  };
+  name    = "distcc";
+  version = "3.1";
+  distcc = stdenv.mkDerivation {
+    name = "${name}-${version}";
+    src = fetchurl {
+      url = "http://distcc.googlecode.com/files/${name}-${version}.tar.bz2";
+      sha256 = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89";
+    };
 
-  buildInputs = [popt avahi pkgconfig python gtk];
-  preConfigure =
-  ''
-    configureFlagsArray=( CFLAGS="-O2 -fno-strict-aliasing"
-                          CXXFLAGS="-O2 -fno-strict-aliasing"
-			  --mandir=$out/share/man
-                          ${if sysconfDir == "" then "" else "--sysconfdir=${sysconfDir}"}
-                          ${if static then "LDFLAGS=-static" else ""}
-                          --with${if static == true || popt == null then "" else "out"}-included-popt
-                          --with${if avahi != null then "" else "out"}-avahi
-                          --with${if gtk != null then "" else "out"}-gtk
-                          --without-gnome
-                          --enable-rfc2553
-                          --disable-Werror   # a must on gcc 4.6
-                         )
-    installFlags="sysconfdir=$out/etc";
-  '';
-  patches = [ ./20-minute-io-timeout.patch ];
+    buildInputs = [popt avahi pkgconfig python gtk];
+    preConfigure =
+    ''
+      configureFlagsArray=( CFLAGS="-O2 -fno-strict-aliasing"
+                            CXXFLAGS="-O2 -fno-strict-aliasing"
+          --mandir=$out/share/man
+                            ${if sysconfDir == "" then "" else "--sysconfdir=${sysconfDir}"}
+                            ${if static then "LDFLAGS=-static" else ""}
+                            --with${if static == true || popt == null then "" else "out"}-included-popt
+                            --with${if avahi != null then "" else "out"}-avahi
+                            --with${if gtk != null then "" else "out"}-gtk
+                            --without-gnome
+                            --enable-rfc2553
+                            --disable-Werror   # a must on gcc 4.6
+                           )
+      installFlags="sysconfdir=$out/etc";
+    '';
+    patches = [ ./20-minute-io-timeout.patch ];
 
-  # The test suite fails because it uses hard-coded paths, i.e. /usr/bin/gcc.
-  doCheck = false;
+    # The test suite fails because it uses hard-coded paths, i.e. /usr/bin/gcc.
+    doCheck = false;
 
-  passthru = {
-    # A derivation that provides gcc and g++ commands, but that
-    # will end up calling distcc for the given cacheDir
-    links = extraConfig : (runCommand "distcc-links"
-        { inherit (gcc) langC langCC; }
-      ''
-        mkdir -p $out/bin
-        if [ $langC -eq 1 ]; then
-          cat > $out/bin/gcc << EOF
-          #!/bin/sh
-          ${extraConfig}
-          exec ${distcc}/bin/distcc gcc "\$@"
-        EOF
-          chmod +x $out/bin/gcc
-        fi
-        if [ $langCC -eq 1 ]; then
-          cat > $out/bin/g++ << EOF
-          #!/bin/sh
-          ${extraConfig}
-          exec ${distcc}/bin/distcc g++ "\$@"
-        EOF
-          chmod +x $out/bin/g++
-        fi
-      '');
-  };
+    passthru = {
+      # A derivation that provides gcc and g++ commands, but that
+      # will end up calling distcc for the given cacheDir
+      #
+      # extraConfig is meant to be sh lines exporting environment
+      # variables like DISTCC_HOSTS, DISTCC_DIR, ...
+      links = extraConfig : (runCommand "distcc-links"
+          { inherit (gcc) langC langCC; }
+        ''
+          mkdir -p $out/bin
+          if [ $langC -eq 1 ]; then
+            cat > $out/bin/gcc << EOF
+            #!/bin/sh
+            ${extraConfig}
+            exec ${distcc}/bin/distcc gcc "\$@"
+          EOF
+            chmod +x $out/bin/gcc
+          fi
+          if [ $langCC -eq 1 ]; then
+            cat > $out/bin/g++ << EOF
+            #!/bin/sh
+            ${extraConfig}
+            exec ${distcc}/bin/distcc g++ "\$@"
+          EOF
+            chmod +x $out/bin/g++
+          fi
+        '');
+    };
 
-  meta = {
-    description = "a fast, free distributed C/C++ compiler";
-    homepage = "http://distcc.org";
-    license = "GPL";
+    meta = {
+      description = "a fast, free distributed C/C++ compiler";
+      homepage = "http://distcc.org";
+      license = "GPL";
 
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.simons ];
+      platforms = stdenv.lib.platforms.linux;
+      maintainers = [ stdenv.lib.maintainers.simons ];
+    };
   };
-};
 in
-distcc
+  distcc