diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index a79a77f40df1..e118f8b89437 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -67,7 +67,7 @@ in rec { # Generate the HTML manual. dst=$out/share/doc/nixos - ensureDir $dst + mkdir -p $dst xsltproc $xsltFlags --nonet --xinclude \ --output $dst/manual.html \ ${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \ diff --git a/nixos/lib/make-iso9660-image.sh b/nixos/lib/make-iso9660-image.sh index 89b681ed2cd5..675b5bb35148 100644 --- a/nixos/lib/make-iso9660-image.sh +++ b/nixos/lib/make-iso9660-image.sh @@ -78,7 +78,7 @@ done cat pathlist | sed -e 's/=\(.*\)=\(.*\)=/\\=\1=\2\\=/' | tee pathlist.safer -ensureDir $out/iso +mkdir -p $out/iso genCommand="genisoimage -iso-level 4 -r -J $bootFlags -hide-rr-moved -graft-points -path-list pathlist.safer ${volumeID:+-V $volumeID}" if test -z "$compressImage"; then $genCommand -o $out/iso/$isoName @@ -87,5 +87,5 @@ else fi -ensureDir $out/nix-support +mkdir -p $out/nix-support echo $system > $out/nix-support/system diff --git a/nixos/lib/make-system-tarball.sh b/nixos/lib/make-system-tarball.sh index aadd0f6428c8..096d96ac1c81 100644 --- a/nixos/lib/make-system-tarball.sh +++ b/nixos/lib/make-system-tarball.sh @@ -48,11 +48,11 @@ for ((n = 0; n < ${#objects[*]}; n++)); do fi done -ensureDir $out/tarball +mkdir -p $out/tarball tar cvJf $out/tarball/$fileName.tar.xz * -ensureDir $out/nix-support +mkdir -p $out/nix-support echo $system > $out/nix-support/system echo "file system-tarball $out/tarball/$fileName.tar.xz" > $out/nix-support/hydra-build-products diff --git a/nixos/modules/services/amqp/activemq/default.nix b/nixos/modules/services/amqp/activemq/default.nix index f731900070e4..261f97617664 100644 --- a/nixos/modules/services/amqp/activemq/default.nix +++ b/nixos/modules/services/amqp/activemq/default.nix @@ -12,7 +12,7 @@ let phases = [ "installPhase" ]; buildInputs = [ jdk ]; installPhase = '' - ensureDir $out/lib + mkdir -p $out/lib source ${activemq}/lib/classpath.env export CLASSPATH ln -s "${./ActiveMQBroker.java}" ActiveMQBroker.java diff --git a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix index 615f272e7b9a..6e4c59f4bb37 100644 --- a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix +++ b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix @@ -4,9 +4,6 @@ with lib; -let - gnome3 = config.environment.gnome3.packageSet; -in { ###### interface @@ -33,9 +30,9 @@ in config = mkIf config.services.gnome3.at-spi2-core.enable { - environment.systemPackages = [ gnome3.at_spi2_core ]; + environment.systemPackages = [ pkgs.at_spi2_core ]; - services.dbus.packages = [ gnome3.at_spi2_core ]; + services.dbus.packages = [ pkgs.at_spi2_core ]; }; diff --git a/nixos/modules/services/hardware/acpid.nix b/nixos/modules/services/hardware/acpid.nix index b87899e45983..a20b1a1ee3ad 100644 --- a/nixos/modules/services/hardware/acpid.nix +++ b/nixos/modules/services/hardware/acpid.nix @@ -6,7 +6,7 @@ let acpiConfDir = pkgs.runCommand "acpi-events" {} '' - ensureDir $out + mkdir -p $out ${ # Generate a configuration file for each event. (You can't have # multiple events in one config file...) diff --git a/nixos/modules/services/monitoring/nagios.nix b/nixos/modules/services/monitoring/nagios.nix index 97d153153a55..c1f7ba0eca74 100644 --- a/nixos/modules/services/monitoring/nagios.nix +++ b/nixos/modules/services/monitoring/nagios.nix @@ -12,7 +12,7 @@ let nagiosObjectDefs = cfg.objectDefs; nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;} - "ensureDir $out; ln -s $nagiosObjectDefs $out/"; + "mkdir -p $out; ln -s $nagiosObjectDefs $out/"; nagiosCfgFile = pkgs.writeText "nagios.cfg" '' diff --git a/nixos/modules/services/monitoring/systemhealth.nix b/nixos/modules/services/monitoring/systemhealth.nix index b0e59595e133..20d1dadd3bf2 100644 --- a/nixos/modules/services/monitoring/systemhealth.nix +++ b/nixos/modules/services/monitoring/systemhealth.nix @@ -13,7 +13,7 @@ let }; buildInputs = [ python ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin # Make it work for kernels 3.x, not so different than 2.6 sed -i 's/2\.6/4.0/' system_health.py cp system_health.py $out/bin diff --git a/nixos/modules/services/network-filesystems/openafs-client/default.nix b/nixos/modules/services/network-filesystems/openafs-client/default.nix index 23ab39eb05f3..0297da9e865f 100644 --- a/nixos/modules/services/network-filesystems/openafs-client/default.nix +++ b/nixos/modules/services/network-filesystems/openafs-client/default.nix @@ -11,7 +11,7 @@ let }; afsConfig = pkgs.runCommand "afsconfig" {} '' - ensureDir $out + mkdir -p $out echo ${cfg.cellName} > $out/ThisCell cp ${cellServDB} $out/CellServDB echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo diff --git a/nixos/modules/services/networking/ircd-hybrid/builder.sh b/nixos/modules/services/networking/ircd-hybrid/builder.sh index b8cb836db95e..f2c92878a4dc 100644 --- a/nixos/modules/services/networking/ircd-hybrid/builder.sh +++ b/nixos/modules/services/networking/ircd-hybrid/builder.sh @@ -3,7 +3,7 @@ source $stdenv/setup doSub() { local src=$1 local dst=$2 - ensureDir $(dirname $dst) + mkdir -p $(dirname $dst) substituteAll $src $dst } @@ -28,4 +28,4 @@ for i in $substFiles; do fi done -ensureDir $out/bin +mkdir -p $out/bin diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index 8d02a6404ac1..928f16c94489 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -14,7 +14,7 @@ let name = "dbus-conf"; preferLocalBuild = true; buildCommand = '' - ensureDir $out + mkdir -p $out cp -v ${pkgs.dbus.daemon}/etc/dbus-1/system.conf $out/system.conf diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index eb3cb75b658e..78f3cf2b7e49 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -80,7 +80,7 @@ let # !!! should be in lib writeTextInDir = name: text: - pkgs.runCommand name {inherit text;} "ensureDir $out; echo -n \"$text\" > $out/$name"; + pkgs.runCommand name {inherit text;} "mkdir -p $out; echo -n \"$text\" > $out/$name"; enableSSL = any (vhost: vhost.enableSSL) allHosts; @@ -194,7 +194,7 @@ let ) null ([ cfg ] ++ subservices); documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else - pkgs.runCommand "empty" {} "ensureDir $out"; + pkgs.runCommand "empty" {} "mkdir -p $out"; documentRootConf = '' DocumentRoot "${documentRoot}" diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix index fa65ec0ef700..aa9aec87f0c4 100644 --- a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix +++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix @@ -92,7 +92,7 @@ let installPhase = '' - ensureDir $out + mkdir -p $out cp -r * $out cp ${mediawikiConfig} $out/LocalSettings.php sed -i \ @@ -106,7 +106,7 @@ let mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts" { buildInputs = [ pkgs.makeWrapper ]; } '' - ensureDir $out/bin + mkdir -p $out/bin for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \ --add-flags ${mediawikiRoot}/maintenance/$i diff --git a/nixos/modules/services/web-servers/apache-httpd/mercurial.nix b/nixos/modules/services/web-servers/apache-httpd/mercurial.nix index 1d4303b75b35..6dd91be00a73 100644 --- a/nixos/modules/services/web-servers/apache-httpd/mercurial.nix +++ b/nixos/modules/services/web-servers/apache-httpd/mercurial.nix @@ -9,7 +9,7 @@ let cgi = pkgs.stdenv.mkDerivation { name = "mercurial-cgi"; buildCommand = '' - ensureDir $out + mkdir -p $out cp -v ${mercurial}/share/cgi-bin/hgweb.cgi $out sed -i "s|/path/to/repo/or/config|$out/hgweb.config|" $out/hgweb.cgi echo " diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index d459c59b0483..f8ce06738fee 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -26,7 +26,7 @@ let buildInputs = [ pkgs.makeWrapper ]; buildCommand = '' - ensureDir $out/gtk-3.0/ + mkdir -p $out/gtk-3.0/ # This wrapper ensures that we actually get fonts makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \ diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix index 48feb12d044c..9ee4e0dc7cb0 100644 --- a/nixos/modules/services/x11/display-managers/slim.nix +++ b/nixos/modules/services/x11/display-managers/slim.nix @@ -27,7 +27,7 @@ let unpackedTheme = pkgs.stdenv.mkDerivation { name = "slim-theme"; buildCommand = '' - ensureDir $out + mkdir -p $out cd $out unpackFile ${cfg.theme} ln -s * default diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 58ff97671f3d..6a069c5d0540 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -119,7 +119,7 @@ let udevRules = pkgs.stdenv.mkDerivation { name = "udev-rules"; buildCommand = '' - ensureDir $out + mkdir -p $out echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules diff --git a/nixos/modules/tasks/tty-backgrounds-combine.sh b/nixos/modules/tasks/tty-backgrounds-combine.sh index 1e0d8758a6ee..55c3a1ebfa8a 100644 --- a/nixos/modules/tasks/tty-backgrounds-combine.sh +++ b/nixos/modules/tasks/tty-backgrounds-combine.sh @@ -3,7 +3,7 @@ source $stdenv/setup ttys=($ttys) themes=($themes) -ensureDir $out +mkdir -p $out defaultName=$(cd $default && ls | grep -v default) echo $defaultName diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 17acd08f086c..58386ce5cf56 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -376,7 +376,7 @@ in system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; } '' - ensureDir $out/bin + mkdir -p $out/bin ln -s ${config.system.build.toplevel} $out/system ln -s ${pkgs.writeScript "run-nixos-vm" startVM} $out/bin/run-${vmName}-vm ''; diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 1c8dc56de61c..fe4b43539d44 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ libogg ]; - doCheck = true; # takes lots of time but will be run rarely (small build-time closure) + #doCheck = true; # takes lots of time meta = with stdenv.lib; { homepage = http://xiph.org/flac/; diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix index b76eecc9e4ad..e3422d4ba069 100644 --- a/pkgs/applications/audio/mixxx/default.nix +++ b/pkgs/applications/audio/mixxx/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { buildPhase = '' runHook preBuild - ensureDir "$out" + mkdir -p "$out" scons \ -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \ $sconsFlags "prefix=$out" diff --git a/pkgs/applications/audio/praat/default.nix b/pkgs/applications/audio/praat/default.nix index 4859377ab52a..86c68d087b77 100644 --- a/pkgs/applications/audio/praat/default.nix +++ b/pkgs/applications/audio/praat/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp praat $out/bin ''; diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix index 725b4520e699..51844f641794 100644 --- a/pkgs/applications/editors/atom/default.nix +++ b/pkgs/applications/editors/atom/default.nix @@ -43,8 +43,8 @@ in stdenv.mkDerivation rec { phases = [ "installPhase" ]; installPhase = '' - ensureDir $out/share/atom - ensureDir $out/bin + mkdir -p $out/share/atom + mkdir -p $out/bin tar -C $out/share/atom -xvf $src patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ $out/share/atom/atom diff --git a/pkgs/applications/editors/dhex/default.nix b/pkgs/applications/editors/dhex/default.nix index 45b7de900e26..7a0e9e59d7e5 100644 --- a/pkgs/applications/editors/dhex/default.nix +++ b/pkgs/applications/editors/dhex/default.nix @@ -12,9 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses ]; installPhase = '' - ensureDir $out/bin - ensureDir $out/share/man/man1 - ensureDir $out/share/man/man5 + mkdir -p $out/bin + mkdir -p $out/share/man/man1 + mkdir -p $out/share/man/man5 cp dhex $out/bin cp dhex.1 $out/share/man/man1 diff --git a/pkgs/applications/editors/emacs-modes/calfw/default.nix b/pkgs/applications/editors/emacs-modes/calfw/default.nix index 83c9ddebe818..c173684fab4c 100644 --- a/pkgs/applications/editors/emacs-modes/calfw/default.nix +++ b/pkgs/applications/editors/emacs-modes/calfw/default.nix @@ -16,10 +16,10 @@ stdenv.mkDerivation rec { installPhase = '' - ensureDir "$out/share/doc/${name}" + mkdir -p "$out/share/doc/${name}" cp -v readme.md "$out/share/doc/${name}" - ensureDir "$out/share/emacs/site-lisp/" + mkdir -p "$out/share/emacs/site-lisp/" cp *.el "$out/share/emacs/site-lisp/" ''; diff --git a/pkgs/applications/editors/emacs-modes/ocaml/default.nix b/pkgs/applications/editors/emacs-modes/ocaml/default.nix index 1d81a0b7ff1e..9e4496ff1a48 100644 --- a/pkgs/applications/editors/emacs-modes/ocaml/default.nix +++ b/pkgs/applications/editors/emacs-modes/ocaml/default.nix @@ -18,7 +18,7 @@ in stdenv.mkDerivation { installPhase = '' cd emacs; - ensureDir "$out/share/emacs/site-lisp" "$out/bin" + mkdir -p "$out/share/emacs/site-lisp" "$out/bin" EMACSDIR=$out/share/emacs/site-lisp make simple-install install-ocamltags ''; diff --git a/pkgs/applications/editors/emacs-modes/tuareg/default.nix b/pkgs/applications/editors/emacs-modes/tuareg/default.nix index 17957ffc276b..3fd592f3dba6 100644 --- a/pkgs/applications/editors/emacs-modes/tuareg/default.nix +++ b/pkgs/applications/editors/emacs-modes/tuareg/default.nix @@ -15,7 +15,7 @@ in stdenv.mkDerivation { buildInputs = [ emacs ]; installPhase = '' - ensureDir "$out/share/emacs/site-lisp" + mkdir -p "$out/share/emacs/site-lisp" cp *.el *.elc "$out/share/emacs/site-lisp" ''; diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 2390a390854e..feafa7b99777 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -62,7 +62,7 @@ in mkDerivation rec { ''; postInstall = '' - ensureDir $out/Applications + mkdir -p $out/Applications cp -r src/MacVim/build/Release/MacVim.app $out/Applications rm $out/bin/{Vimdiff,Vimtutor,Vim,ex,rVim,rview,view} diff --git a/pkgs/applications/graphics/alchemy/default.nix b/pkgs/applications/graphics/alchemy/default.nix index ee8543f7039a..263c411a8dbf 100644 --- a/pkgs/applications/graphics/alchemy/default.nix +++ b/pkgs/applications/graphics/alchemy/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { }; installPhase = '' - ensureDir $out/bin $out/share + mkdir -p $out/bin $out/share cp -a . $out/share/alchemy cat >> $out/bin/alchemy << EOF #!/bin/sh diff --git a/pkgs/applications/misc/camlistore/default.nix b/pkgs/applications/misc/camlistore/default.nix index 80d8dd801a9b..56131425ab4b 100644 --- a/pkgs/applications/misc/camlistore/default.nix +++ b/pkgs/applications/misc/camlistore/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp bin/* $out/bin ''; diff --git a/pkgs/applications/misc/keepass/default.nix b/pkgs/applications/misc/keepass/default.nix index 0098e626b424..89f794850d27 100644 --- a/pkgs/applications/misc/keepass/default.nix +++ b/pkgs/applications/misc/keepass/default.nix @@ -24,12 +24,12 @@ stdenv.mkDerivation rec { installPhase = '' - ensureDir "$out/bin" + mkdir -p "$out/bin" echo "${mono}/bin/mono $out/KeePass.exe" > $out/bin/keepass chmod +x $out/bin/keepass echo $out cp -r ./* $out/ - ensureDir "$out/share/applications" + mkdir -p "$out/share/applications" cp ${desktopItem}/share/applications/* $out/share/applications ''; diff --git a/pkgs/applications/misc/librecad/2.0.nix b/pkgs/applications/misc/librecad/2.0.nix index 59d25a980404..8b7a9a40c872 100644 --- a/pkgs/applications/misc/librecad/2.0.nix +++ b/pkgs/applications/misc/librecad/2.0.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out/bin $out/share + mkdir -p $out/bin $out/share cp -R unix/librecad $out/bin cp -R unix/resources $out/share/librecad ''; diff --git a/pkgs/applications/misc/librecad/default.nix b/pkgs/applications/misc/librecad/default.nix index be3fa4128b66..b2960e9f47d4 100644 --- a/pkgs/applications/misc/librecad/default.nix +++ b/pkgs/applications/misc/librecad/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { configurePhase = "qmake PREFIX=$out"; installPhase = '' - ensureDir $out/bin $out/share + mkdir -p $out/bin $out/share cp -R unix/librecad $out/bin cp -R unix/resources $out/share/librecad ''; diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index 4e0efc5f3e5f..8d914c262212 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # http://synergy-foss.org/spit/issues/details/3317/ installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp ../bin/synergyc $out/bin cp ../bin/synergys $out/bin cp ../bin/synergyd $out/bin diff --git a/pkgs/applications/misc/vanitygen/default.nix b/pkgs/applications/misc/vanitygen/default.nix index 720240d0d797..6be2dc394cc4 100644 --- a/pkgs/applications/misc/vanitygen/default.nix +++ b/pkgs/applications/misc/vanitygen/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ openssl pcre ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp vanitygen $out/bin cp keyconv $out/bin/vanitygen-keyconv ''; diff --git a/pkgs/applications/networking/bittorrentsync/default.nix b/pkgs/applications/networking/bittorrentsync/default.nix index abb94a32bd71..989ceb235b02 100644 --- a/pkgs/applications/networking/bittorrentsync/default.nix +++ b/pkgs/applications/networking/bittorrentsync/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { buildInputs = [ patchelf ]; installPhase = '' - ensureDir "$out/bin/" + mkdir -p "$out/bin/" cp -r "btsync" "$out/bin/" patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index d425c3f07384..ffc23a9d968d 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -8,7 +8,7 @@ mkChromiumDerivation (base: rec { buildTargets = [ "mksnapshot" "chrome" ]; installPhase = '' - ensureDir "$libExecPath" + mkdir -p "$libExecPath" cp -v "$buildPath/"*.pak "$libExecPath/" cp -v "$buildPath/icudtl.dat" "$libExecPath/" cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/" diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 44fd3c69e537..4dfdca882bc8 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -67,7 +67,7 @@ in stdenv.mkDerivation { browserBinary = "${chromium.browser}/libexec/chromium/chromium"; sandboxBinary = "${chromium.sandbox}/bin/chromium-sandbox"; in '' - ensureDir "$out/bin" "$out/share/applications" + mkdir -p "$out/bin" "$out/share/applications" ln -s "${chromium.browser}/share" "$out/share" makeWrapper "${browserBinary}" "$out/bin/chromium" \ diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index f760b06fe24b..e0c45f910751 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -22,7 +22,7 @@ let else if source.channel == "stable" then "chrome" else "chrome-${source.channel}"; in '' - ensureDir plugins + mkdir -p plugins ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \ ./opt/google/${chan}/PepperFlash \ ./opt/google/${chan}/libpdf.so @@ -53,7 +53,7 @@ let pdfInfo = "#${pdfName}#${pdfDescription};${pdfMimeTypes}"; in '' install -vD libpdf.so "$pdf/lib/libpdf.so" - ensureDir "$pdf/nix-support" + mkdir -p "$pdf/nix-support" echo "--register-pepper-plugins='$pdf/lib/libpdf.so${pdfInfo}'" \ > "$pdf/nix-support/chromium-flags" @@ -63,7 +63,7 @@ let install -vD PepperFlash/libpepflashplayer.so \ "$flash/lib/libpepflashplayer.so" - ensureDir "$flash/nix-support" + mkdir -p "$flash/nix-support" echo "--ppapi-flash-path='$flash/lib/libpepflashplayer.so'" \ "--ppapi-flash-version=$flashVersion" \ > "$flash/nix-support/chromium-flags" diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index c075cc36f166..d7ccc412fa4f 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation { outputs = [ "out" "sandbox" "bundled" "main" ]; installPhase = '' - ensureDir "$out" "$sandbox" "$bundled" "$main" + mkdir -p "$out" "$sandbox" "$bundled" "$main" header "copying browser main sources to $main" find . -mindepth 1 -maxdepth 1 \ diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix index 5262c121bb28..51f3ae2ac8d9 100644 --- a/pkgs/applications/networking/dropbox-cli/default.nix +++ b/pkgs/applications/networking/dropbox-cli/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { phases = "unpackPhase installPhase"; installPhase = '' - ensureDir "$out/bin/" "$out/share/applications" + mkdir -p "$out/bin/" "$out/share/applications" cp data/dropbox.desktop "$out/share/applications" substitute "dropbox.in" "$out/bin/dropbox" \ --replace '@PACKAGE_VERSION@' ${version} \ diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index 62dce4c42127..55b7bd7486b4 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -70,9 +70,9 @@ in stdenv.mkDerivation { ''; installPhase = '' - ensureDir "$out/${appdir}" + mkdir -p "$out/${appdir}" cp -r ".dropbox-dist/"* "$out/${appdir}/" - ensureDir "$out/bin" + mkdir -p "$out/bin" ln -s "$out/${appdir}/dropbox" "$out/bin/dropbox" patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ @@ -83,7 +83,7 @@ in stdenv.mkDerivation { find "$out/${appdir}" -type f -a -perm +0100 \ -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; - ensureDir "$out/share/applications" + mkdir -p "$out/share/applications" cp "${desktopItem}/share/applications/"* $out/share/applications ''; diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix index 6402e7154de4..a83589bf75e0 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { buildPhase = "make libskype.so libskype_dbus.so"; installPhase = '' - ensureDir $out/pixmaps/pidgin/protocols/{16,22,48} $out/bin $out/lib/pidgin + mkdir -p $out/pixmaps/pidgin/protocols/{16,22,48} $out/bin $out/lib/pidgin cp icons/16/skypeout.png $out/pixmaps/pidgin/protocols/16 cp icons/22/skypeout.png $out/pixmaps/pidgin/protocols/22 cp icons/48/skypeout.png $out/pixmaps/pidgin/protocols/48 diff --git a/pkgs/applications/networking/irc/irssi/fish/default.nix b/pkgs/applications/networking/irc/irssi/fish/default.nix index eb21f34838e7..64e3d216ac08 100644 --- a/pkgs/applications/networking/irc/irssi/fish/default.nix +++ b/pkgs/applications/networking/irc/irssi/fish/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/lib/irssi/modules + mkdir -p $out/lib/irssi/modules cp src/.libs/libfish.so $out/lib/irssi/modules ''; diff --git a/pkgs/applications/networking/p2p/freenet/default.nix b/pkgs/applications/networking/p2p/freenet/default.nix index 013694d259cb..4e7057116773 100644 --- a/pkgs/applications/networking/p2p/freenet/default.nix +++ b/pkgs/applications/networking/p2p/freenet/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { buildPhase = "ant package-only"; installPhase = '' - ensureDir $out/share/freenet $out/bin + mkdir -p $out/share/freenet $out/bin cp lib/bcprov.jar $out/share/freenet cp lib/freenet/freenet-ext.jar $out/share/freenet cp dist/freenet.jar $out/share/freenet diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix index 8f169180dd5e..226b7f6d097b 100644 --- a/pkgs/applications/networking/syncthing/default.nix +++ b/pkgs/applications/networking/syncthing/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp -r ./bin $out ''; diff --git a/pkgs/applications/office/zotero/default.nix b/pkgs/applications/office/zotero/default.nix index f0f7d801d8fd..b6636cef6418 100644 --- a/pkgs/applications/office/zotero/default.nix +++ b/pkgs/applications/office/zotero/default.nix @@ -23,10 +23,10 @@ stdenv.mkDerivation { inherit bash xulrunner; installPhase = '' - ensureDir "$out/libexec/zotero" + mkdir -p "$out/libexec/zotero" cp -vR * "$out/libexec/zotero/" - ensureDir "$out/bin" + mkdir -p "$out/bin" substituteAll "${./zotero.sh}" "$out/bin/zotero" chmod +x "$out/bin/zotero" ''; diff --git a/pkgs/applications/science/logic/twelf/default.nix b/pkgs/applications/science/logic/twelf/default.nix index 1079c3783218..c6c7e4d9c1a7 100644 --- a/pkgs/applications/science/logic/twelf/default.nix +++ b/pkgs/applications/science/logic/twelf/default.nix @@ -17,15 +17,15 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin rsync -av bin/* $out/bin/ - ensureDir $out/share/emacs/site-lisp/twelf/ + mkdir -p $out/share/emacs/site-lisp/twelf/ rsync -av emacs/ $out/share/emacs/site-lisp/twelf/ - ensureDir $out/share/twelf/examples + mkdir -p $out/share/twelf/examples rsync -av examples/ $out/share/twelf/examples/ - ensureDir $out/share/twelf/vim + mkdir -p $out/share/twelf/vim rsync -av vim/ $out/share/twelf/vim/ ''; diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 74fff2390a39..0700251c3a82 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -38,7 +38,7 @@ rec { phaseNames = ["doConfigure" "doMake" "doDeploy"]; doDeploy = a.fullDepEntry '' - ensureDir "$out/bin" "$out/share/gap/" + mkdir -p "$out/bin" "$out/share/gap/" cp -r . "$out/share/gap/build-dir" diff --git a/pkgs/applications/version-management/git-and-tools/git-bz/default.nix b/pkgs/applications/version-management/git-and-tools/git-bz/default.nix index 3a2270cf972d..4c4ff62901e5 100644 --- a/pkgs/applications/version-management/git-and-tools/git-bz/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-bz/default.nix @@ -21,8 +21,8 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out - ensureDir $out/bin + mkdir -p $out + mkdir -p $out/bin cp git-bz $out/bin wrapProgram $out/bin/git-bz \ --prefix PYTHONPATH : "$(toPythonPath $python):$(toPythonPath $pysqlite)" diff --git a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix index c44f2dbcbb6b..94c819e711b5 100644 --- a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix +++ b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp svn-all-fast-export $out/bin ''; diff --git a/pkgs/applications/video/makemkv/builder.sh b/pkgs/applications/video/makemkv/builder.sh index 0e1898a45564..e4cfcf3d9068 100644 --- a/pkgs/applications/video/makemkv/builder.sh +++ b/pkgs/applications/video/makemkv/builder.sh @@ -30,9 +30,9 @@ for i in ${bin} ; do ${i} done -ensureDir $out/bin -ensureDir $out/lib -ensureDir $out/share/MakeMKV +mkdir -p $out/bin +mkdir -p $out/lib +mkdir -p $out/share/MakeMKV cp ${lib} ${out}/lib cp ${bin} ${out}/bin cp makemkv-bin-${ver}/src/share/* $out/share/MakeMKV diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix index 811fb7a78dbf..3add2646ad9e 100644 --- a/pkgs/applications/video/omxplayer/default.nix +++ b/pkgs/applications/video/omxplayer/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/" ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp omxplayer.bin $out/bin ''; buildInputs = [ raspberrypifw ffmpeg pcre boostHeaders freetype zlib ]; diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index 6c806c4bf1fb..69423004d65f 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -248,12 +248,12 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; ./Setup copy - ensureDir $out/bin # necessary to get it added to PATH + mkdir -p $out/bin # necessary to get it added to PATH local confDir=$out/lib/ghc-${ghc.ghc.version}/package.conf.d local installedPkgConf=$confDir/${self.fname}.installedconf local pkgConf=$confDir/${self.fname}.conf - ensureDir $confDir + mkdir -p $confDir ./Setup register --gen-pkg-config=$pkgConf if test -f $pkgConf; then echo '[]' > $installedPkgConf @@ -265,7 +265,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; fi ${optionalString (self.enableSharedExecutables && self.isExecutable && self.stdenv.isDarwin) '' - for exe in $out/bin/* ; do + for exe in "$out/bin/"* ; do install_name_tool -add_rpath \ $out/lib/${ghc.ghc.name}/${self.pname}-${self.version} $exe done diff --git a/pkgs/build-support/clang-wrapper/add-flags b/pkgs/build-support/clang-wrapper/add-flags index 3b0645471531..7a9711290aa1 100644 --- a/pkgs/build-support/clang-wrapper/add-flags +++ b/pkgs/build-support/clang-wrapper/add-flags @@ -21,4 +21,4 @@ if test -e @out@/nix-support/libc-ldflags-before; then export NIX_LDFLAGS_BEFORE="$(cat @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE" fi -export NIX_CLANG_WRAPPER_FLAGS_SET=1 +export NIX_GCC_WRAPPER_FLAGS_SET=1 diff --git a/pkgs/build-support/clang-wrapper/clang-wrapper.sh b/pkgs/build-support/clang-wrapper/clang-wrapper.sh index b39aa2d721e8..57715274f1e2 100644 --- a/pkgs/build-support/clang-wrapper/clang-wrapper.sh +++ b/pkgs/build-support/clang-wrapper/clang-wrapper.sh @@ -1,10 +1,10 @@ #! @shell@ -e -if test -n "$NIX_CLANG_WRAPPER_START_HOOK"; then - source "$NIX_CLANG_WRAPPER_START_HOOK" +if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then + source "$NIX_GCC_WRAPPER_START_HOOK" fi -if test -z "$NIX_CLANG_WRAPPER_FLAGS_SET"; then +if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then source @out@/nix-support/add-flags.sh fi diff --git a/pkgs/build-support/clang-wrapper/default.nix b/pkgs/build-support/clang-wrapper/default.nix index 4b2a5a1182ea..7a5d87127d90 100644 --- a/pkgs/build-support/clang-wrapper/default.nix +++ b/pkgs/build-support/clang-wrapper/default.nix @@ -29,8 +29,8 @@ stdenv.mkDerivation { builder = ./builder.sh; setupHook = ./setup-hook.sh; clangWrapper = ./clang-wrapper.sh; - ldWrapper = ./ld-wrapper.sh; - utils = ./utils.sh; + ldWrapper = ../gcc-wrapper/ld-wrapper.sh; + utils = ../gcc-wrapper/utils.sh; addFlags = ./add-flags; inherit nativeTools nativeLibc nativePrefix clang clangVersion libcxx; diff --git a/pkgs/build-support/clang-wrapper/ld-wrapper.sh b/pkgs/build-support/clang-wrapper/ld-wrapper.sh deleted file mode 100644 index ae45c62d460a..000000000000 --- a/pkgs/build-support/clang-wrapper/ld-wrapper.sh +++ /dev/null @@ -1,164 +0,0 @@ -#! @shell@ -e - -if test -n "$NIX_LD_WRAPPER_START_HOOK"; then - source "$NIX_LD_WRAPPER_START_HOOK" -fi - -if test -z "$NIX_CLANG_WRAPPER_FLAGS_SET"; then - source @out@/nix-support/add-flags.sh -fi - -source @out@/nix-support/utils.sh - - -# Optionally filter out paths not refering to the store. -params=("$@") -if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \ - -a \( -z "$NIX_IGNORE_LD_THROUGH_CLANG" -o -z "$NIX_LDFLAGS_SET" \); then - rest=() - n=0 - while test $n -lt ${#params[*]}; do - p=${params[n]} - p2=${params[$((n+1))]} - if test "${p:0:3}" = "-L/" && badPath "${p:2}"; then - skip $p - elif test "$p" = "-L" && badPath "$p2"; then - n=$((n + 1)); skip $p2 - elif test "$p" = "-rpath" && badPath "$p2"; then - n=$((n + 1)); skip $p2 - elif test "$p" = "-dynamic-linker" && badPath "$p2"; then - n=$((n + 1)); skip $p2 - elif test "${p:0:1}" = "/" && badPath "$p"; then - # We cannot skip this; barf. - echo "impure path \`$p' used in link" >&2 - exit 1 - elif test "${p:0:9}" = "--sysroot"; then - # Our ld is not built with sysroot support (Can we fix that?) - : - else - rest=("${rest[@]}" "$p") - fi - n=$((n + 1)) - done - params=("${rest[@]}") -fi - - -extra=() -extraBefore=() - -if test -z "$NIX_LDFLAGS_SET"; then - extra=(${extra[@]} $NIX_LDFLAGS) - extraBefore=(${extraBefore[@]} $NIX_LDFLAGS_BEFORE) -fi - - -# Add all used dynamic libraries to the rpath. -if test "$NIX_DONT_SET_RPATH" != "1"; then - - libPath="" - addToLibPath() { - local path="$1" - if test "${path:0:1}" != "/"; then return 0; fi - case "$path" in - *..*|*./*|*/.*|*//*) - local path2 - if path2=$(readlink -f "$path"); then - path="$path2" - fi - ;; - esac - case $libPath in - *\ $path\ *) return 0 ;; - esac - libPath="$libPath $path " - } - - addToRPath() { - # If the path is not in the store, don't add it to the rpath. - # This typically happens for libraries in /tmp that are later - # copied to $out/lib. If not, we're screwed. - if test "${1:0:${#NIX_STORE}}" != "$NIX_STORE"; then return 0; fi - case $rpath in - *\ $1\ *) return 0 ;; - esac - rpath="$rpath $1 " - } - - libs="" - addToLibs() { - libs="$libs $1" - } - - rpath="" - - # First, find all -L... switches. - allParams=("${params[@]}" ${extra[@]}) - n=0 - while test $n -lt ${#allParams[*]}; do - p=${allParams[n]} - p2=${allParams[$((n+1))]} - if test "${p:0:3}" = "-L/"; then - addToLibPath ${p:2} - elif test "$p" = "-L"; then - addToLibPath ${p2} - n=$((n + 1)) - elif test "$p" = "-l"; then - addToLibs ${p2} - n=$((n + 1)) - elif test "${p:0:2}" = "-l"; then - addToLibs ${p:2} - elif test "$p" = "-dynamic-linker"; then - # Ignore the dynamic linker argument, or it - # will get into the next 'elif'. We don't want - # the dynamic linker path rpath to go always first. - n=$((n + 1)) - elif [[ "$p" =~ ^[^-].*\.so($|\.) ]]; then - # This is a direct reference to a shared library, so add - # its directory to the rpath. - path="$(dirname "$p")"; - addToRPath "${path}" - fi - n=$((n + 1)) - done - - # Second, for each directory in the library search path (-L...), - # see if it contains a dynamic library used by a -l... flag. If - # so, add the directory to the rpath. - # It's important to add the rpath in the order of -L..., so - # the link time chosen objects will be those of runtime linking. - - for i in $libPath; do - for j in $libs; do - if test -f "$i/lib$j.so"; then - addToRPath $i - break - fi - done - done - - - # Finally, add `-rpath' switches. - for i in $rpath; do - extra=(${extra[@]} -rpath $i) - done -fi - - -# Optionally print debug info. -if test "$NIX_DEBUG" = "1"; then - echo "original flags to @ld@:" >&2 - for i in "${params[@]}"; do - echo " $i" >&2 - done - echo "extra flags to @ld@:" >&2 - for i in ${extra[@]}; do - echo " $i" >&2 - done -fi - -if test -n "$NIX_LD_WRAPPER_EXEC_HOOK"; then - source "$NIX_LD_WRAPPER_EXEC_HOOK" -fi - -exec @ld@ ${extraBefore[@]} "${params[@]}" ${extra[@]} diff --git a/pkgs/build-support/clang-wrapper/utils.sh b/pkgs/build-support/clang-wrapper/utils.sh deleted file mode 100644 index 753b3772e956..000000000000 --- a/pkgs/build-support/clang-wrapper/utils.sh +++ /dev/null @@ -1,24 +0,0 @@ -skip () { - if test "$NIX_DEBUG" = "1"; then - echo "skipping impure path $1" >&2 - fi -} - - -# Checks whether a path is impure. E.g., `/lib/foo.so' is impure, but -# `/nix/store/.../lib/foo.so' isn't. -badPath() { - local p=$1 - - # Relative paths are okay (since they're presumably relative to - # the temporary build directory). - if test "${p:0:1}" != "/"; then return 1; fi - - # Otherwise, the path should refer to the store or some temporary - # directory (including the build directory). - test \ - "$p" != "/dev/null" -a \ - "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ - "${p:0:4}" != "/tmp" -a \ - "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP" -} diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index 2ad7783a442c..c53fd44207d0 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -77,6 +77,7 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then n=$((n + 1)) done params=("${rest[@]}") + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE --sysroot=/var/empty" fi diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh index 74b6273848ed..822c4a03a218 100644 --- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -32,6 +32,9 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \ # We cannot skip this; barf. echo "impure path \`$p' used in link" >&2 exit 1 + elif test "${p:0:9}" = "--sysroot"; then + # Our ld is not built with sysroot support (Can we fix that?) + : else rest=("${rest[@]}" "$p") fi @@ -45,10 +48,12 @@ extra=() extraBefore=() if test -z "$NIX_LDFLAGS_SET"; then - extra=(${extra[@]} $NIX_LDFLAGS) - extraBefore=(${extraBefore[@]} $NIX_LDFLAGS_BEFORE) + extra+=($NIX_LDFLAGS) + extraBefore+=($NIX_LDFLAGS_BEFORE) fi +extra+=($NIX_LDFLAGS_AFTER) + # Add all used dynamic libraries to the rpath. if test "$NIX_DONT_SET_RPATH" != "1"; then diff --git a/pkgs/build-support/kdewrapper/default.nix b/pkgs/build-support/kdewrapper/default.nix index 6dcf68a324a2..64dfd7d0ca6b 100644 --- a/pkgs/build-support/kdewrapper/default.nix +++ b/pkgs/build-support/kdewrapper/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { inherit libs; buildCommand = '' - ensureDir $out/bin + mkdir -p $out/bin KDEDIRS=${program} QT_PLUGIN_PATH=${program}/lib/qt4/plugins:${program}/lib/kde4/plugins diff --git a/pkgs/build-support/make-startupitem/default.nix b/pkgs/build-support/make-startupitem/default.nix index dc78b8a704e2..fad6f00d8211 100644 --- a/pkgs/build-support/make-startupitem/default.nix +++ b/pkgs/build-support/make-startupitem/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { priority = 5; buildCommand = '' - ensureDir $out/share/autostart + mkdir -p $out/share/autostart target=${name}.desktop cp ${package}/share/applications/${srcPrefix}${name}.desktop $target chmod +rw $target diff --git a/pkgs/build-support/release/functions.sh b/pkgs/build-support/release/functions.sh index 9f2d03519c8c..8ac67a196721 100644 --- a/pkgs/build-support/release/functions.sh +++ b/pkgs/build-support/release/functions.sh @@ -9,6 +9,6 @@ findTarballs() { } propagateImageName() { - ensureDir $out/nix-support + mkdir -p $out/nix-support cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name } diff --git a/pkgs/build-support/vm/windows/bootstrap.nix b/pkgs/build-support/vm/windows/bootstrap.nix index e3b44d1b6ab7..ebea819b1910 100644 --- a/pkgs/build-support/vm/windows/bootstrap.nix +++ b/pkgs/build-support/vm/windows/bootstrap.nix @@ -69,7 +69,7 @@ in rec { -b "${installedVM}/disk.img" \ -f qcow2 winvm.img ${runAndSuspend} - ensureDir "$out" + mkdir -p "$out" cp winvm.img "$out/disk.img" cp state.gz "$out/state.gz" ''; diff --git a/pkgs/build-support/vm/windows/install/default.nix b/pkgs/build-support/vm/windows/install/default.nix index 10690bf6b287..fe8e8f61de02 100644 --- a/pkgs/build-support/vm/windows/install/default.nix +++ b/pkgs/build-support/vm/windows/install/default.nix @@ -22,7 +22,7 @@ let cygwinSshKey = stdenv.mkDerivation { name = "snakeoil-ssh-cygwin"; buildCommand = '' - ensureDir "$out" + mkdir -p "$out" ${openssh}/bin/ssh-keygen -t ecdsa -f "$out/key" -N "" ''; }; @@ -65,7 +65,7 @@ in stdenv.mkDerivation { buildCommand = '' ${qemu}/bin/qemu-img create -f qcow2 winvm.img 2G ${installController} - ensureDir "$out" + mkdir -p "$out" cp winvm.img "$out/disk.img" ''; passthru = { diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 332c9de18373..90111cb52e19 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ln -s . $out/share/zoneinfo/posix mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right - ensureDir "$lib/include" + mkdir -p "$lib/include" cp tzfile.h "$lib/include/tzfile.h" ''; diff --git a/pkgs/desktops/e18/enlightenment.nix b/pkgs/desktops/e18/enlightenment.nix index 52a5dd8f89f3..c3cd585e5257 100644 --- a/pkgs/desktops/e18/enlightenment.nix +++ b/pkgs/desktops/e18/enlightenment.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, pkgconfig, e18, xlibs, libffi, pam, alsaLib, luajit, bzip2, set_freqset_setuid ? false }: + stdenv.mkDerivation rec { name = "enlightenment-${version}"; version = "0.18.8"; diff --git a/pkgs/desktops/gnome-3/3.10/core/at-spi2-atk/default.nix b/pkgs/desktops/gnome-3/3.10/core/at-spi2-atk/default.nix deleted file mode 100644 index fc0c4f2a6bc0..000000000000 --- a/pkgs/desktops/gnome-3/3.10/core/at-spi2-atk/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, python, pkgconfig, popt, atk, libX11, libICE, xlibs, libXi -, intltool, dbus_glib, at_spi2_core, libSM }: - -stdenv.mkDerivation rec { - versionMajor = "2.12"; - versionMinor = "0"; - moduleName = "at-spi2-atk"; - name = "${moduleName}-${versionMajor}.${versionMinor}"; - - src = fetchurl { - url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; - sha256 = "0crn3k6qvn6fjvgm68dj5ska1ppfgmdkaia2db1jp0b9y74nfm1v"; - }; - - buildInputs = [ python pkgconfig popt atk libX11 libICE xlibs.libXtst libXi - intltool dbus_glib at_spi2_core libSM ]; - - meta = with stdenv.lib; { - platforms = platforms.linux; - }; -} diff --git a/pkgs/desktops/gnome-3/3.10/core/caribou/default.nix b/pkgs/desktops/gnome-3/3.10/core/caribou/default.nix index 41a997c1f714..ba5dc7e7b90a 100644 --- a/pkgs/desktops/gnome-3/3.10/core/caribou/default.nix +++ b/pkgs/desktops/gnome-3/3.10/core/caribou/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, gnome3, clutter, dbus, pythonPackages, libxml2 -, libxklavier, libXtst, gtk2, intltool, libxslt }: +, libxklavier, libXtst, gtk2, intltool, libxslt, at_spi2_core }: stdenv.mkDerivation rec { diff --git a/pkgs/desktops/gnome-3/3.10/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/3.10/core/gnome-shell/default.nix index d468e06d429f..2b5ff4cc5a28 100644 --- a/pkgs/desktops/gnome-3/3.10/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/3.10/core/gnome-shell/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, gnome3, json_glib, libcroco, intltool, libsecret -, python, libsoup, polkit, clutter, networkmanager, docbook_xsl, docbook_xsl_ns +, python, libsoup, polkit, clutter, networkmanager, docbook_xsl, docbook_xsl_ns, at_spi2_core , libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit, unzip , pulseaudio, libical, libtool, nss, gobjectIntrospection, gstreamer, makeWrapper , accountsservice, gdk_pixbuf, gdm, upower, ibus, networkmanagerapplet, librsvg }: diff --git a/pkgs/desktops/gnome-3/3.10/default.nix b/pkgs/desktops/gnome-3/3.10/default.nix index 4376493c95b0..89e16490df93 100644 --- a/pkgs/desktops/gnome-3/3.10/default.nix +++ b/pkgs/desktops/gnome-3/3.10/default.nix @@ -10,10 +10,6 @@ rec { #### Core (http://ftp.acc.umu.se/pub/GNOME/core/) - at_spi2_atk = callPackage ./core/at-spi2-atk { }; - - at_spi2_core = callPackage ./core/at-spi2-core { }; - baobab = callPackage ./core/baobab { }; caribou = callPackage ./core/caribou { }; diff --git a/pkgs/desktops/gnome-3/3.12/core/at-spi2-core/default.nix b/pkgs/desktops/gnome-3/3.12/core/at-spi2-core/default.nix deleted file mode 100644 index d60a0ff7480c..000000000000 --- a/pkgs/desktops/gnome-3/3.12/core/at-spi2-core/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ stdenv, fetchurl, python, pkgconfig, popt, intltool, dbus_glib -, libX11, xextproto, libSM, libICE, libXtst, libXi, gobjectIntrospection }: - -stdenv.mkDerivation (rec { - versionMajor = "2.12"; - versionMinor = "0"; - moduleName = "at-spi2-core"; - name = "${moduleName}-${versionMajor}.${versionMinor}"; - - src = fetchurl { - url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; - sha256 = "12gvsgdaxnxskndlhlmdkc50cfqgmzfc4n8la9944fz5k3fhwmfv"; - }; - - buildInputs = [ - python pkgconfig popt intltool dbus_glib - libX11 xextproto libSM libICE libXtst libXi - gobjectIntrospection - ]; - - # ToDo: on non-NixOS we create a symlink from there? - configureFlags = "--with-dbus-daemondir=/run/current-system/sw/bin/"; - - meta = with stdenv.lib; { - platforms = platforms.linux; - }; -} - // stdenv.lib.optionalAttrs stdenv.isDarwin { - NIX_LDFLAGS = "-lintl"; - } -) - diff --git a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix index 4d2f390c0428..3a6c3f0dd357 100644 --- a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, gnome3, clutter, dbus, pythonPackages, libxml2 -, libxklavier, libXtst, gtk2, intltool, libxslt }: +, libxklavier, libXtst, gtk2, intltool, libxslt, at_spi2_core }: stdenv.mkDerivation rec { diff --git a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix index 9663d1317622..002e8e7f7ff2 100644 --- a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, gnome3, json_glib, libcroco, intltool, libsecret -, python, libsoup, polkit, clutter, networkmanager, docbook_xsl, docbook_xsl_ns +, python, libsoup, polkit, clutter, networkmanager, docbook_xsl, docbook_xsl_ns, at_spi2_core , libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit, unzip , pulseaudio, libical, libtool, nss, gobjectIntrospection, gstreamer, makeWrapper , accountsservice, gdk_pixbuf, gdm, upower, ibus, networkmanagerapplet, librsvg }: diff --git a/pkgs/desktops/gnome-3/3.12/default.nix b/pkgs/desktops/gnome-3/3.12/default.nix index b1d06d751871..ee1724e1e250 100644 --- a/pkgs/desktops/gnome-3/3.12/default.nix +++ b/pkgs/desktops/gnome-3/3.12/default.nix @@ -16,10 +16,6 @@ rec { #### Core (http://ftp.acc.umu.se/pub/GNOME/core/) - at_spi2_atk = callPackage ./core/at-spi2-atk { }; - - at_spi2_core = callPackage ./core/at-spi2-core { }; - baobab = callPackage ./core/baobab { }; caribou = callPackage ./core/caribou { }; diff --git a/pkgs/development/compilers/gcc/4.2-apple64/default.nix b/pkgs/development/compilers/gcc/4.2-apple64/default.nix index 229f68fd8411..f5496cb5ef7b 100644 --- a/pkgs/development/compilers/gcc/4.2-apple64/default.nix +++ b/pkgs/development/compilers/gcc/4.2-apple64/default.nix @@ -44,4 +44,6 @@ stdenv.mkDerivation rec { langC = true; buildInputs = stdenv.lib.optionals langF77 [ gmp mpfr bison flex ]; + + meta.broken = true; } diff --git a/pkgs/development/compilers/gcc/4.8/builder.sh b/pkgs/development/compilers/gcc/4.8/builder.sh index 7c9b9420ddaa..3d24d34a2f26 100644 --- a/pkgs/development/compilers/gcc/4.8/builder.sh +++ b/pkgs/development/compilers/gcc/4.8/builder.sh @@ -109,13 +109,11 @@ if test "$noSysDirs" = "1"; then fi fi - # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find # the startfiles. # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx # for the startfiles. - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \ @@ -128,8 +126,7 @@ if test "$noSysDirs" = "1"; then ) if test -z "$targetConfig"; then - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \ BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \ ) @@ -138,13 +135,11 @@ if test "$noSysDirs" = "1"; then if test -n "$targetConfig" -a "$crossStageStatic" == 1; then # We don't want the gcc build to assume there will be a libc providing # limits.h in this stagae - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ LIMITS_H_TEST=false \ ) else - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ LIMITS_H_TEST=true \ ) fi @@ -163,6 +158,7 @@ preConfigure() { # Patch to get armvt5el working: sed -i -e 's/ arm)/ arm*)/' newlib/configure.host fi + # Bug - they packaged zlib if test -d "zlib"; then # This breaks the build without-headers, which should build only @@ -189,8 +185,8 @@ preConfigure() { fi # Eval the preConfigure script from nix expression. - eval $providedPreConfigure; - env; + eval "$providedPreConfigure" + # Perform the build in a different directory. mkdir ../build cd ../build @@ -204,6 +200,15 @@ postConfigure() { } +preInstall() { + # Make ‘lib64’ a symlink to ‘lib’. + if [ -n "$is64bit" -a -z "$enableMultilib" ]; then + mkdir -p $out/lib + ln -s lib $out/lib64 + fi +} + + postInstall() { # Remove precompiled headers for now. They are very big and # probably not very useful yet. diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 62dbad747584..2fb8f9d73b5e 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -67,7 +67,6 @@ let version = "4.8.3"; patches = [] ++ optional enableParallelBuilding ./parallel-bconfig.patch ++ optional (cross != null) ./libstdc++-target.patch - # ++ optional noSysDirs ./no-sys-dirs.patch # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its # target libraries and tools. ++ optional langAda ./gnat-cflags.patch @@ -304,14 +303,21 @@ stdenv.mkDerivation ({ "\"--with-host-libstdcxx=-Wl,-rpath,\$prefix/lib/amd64 -lstdc++\" \"--with-boot-ldflags=-L../prev-x86_64-pc-solaris2.11/libstdc++-v3/src/.libs\""} ); - ${stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) - '' - export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` - export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" - export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" - export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" - ''} - ''; + '' + stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) '' + export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` + export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" + export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" + export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) + makeFlagsArray+=( \ + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ + ) + fi + ''; dontDisableStatic = true; @@ -494,9 +500,11 @@ stdenv.mkDerivation ({ else null; passthru = - { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo enableMultilib version; }; + { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; }; - inherit enableParallelBuilding; + inherit enableParallelBuilding enableMultilib; + + inherit (stdenv) is64bit; meta = { homepage = http://gcc.gnu.org/; diff --git a/pkgs/development/compilers/gcc/4.8/no-sys-dirs.patch b/pkgs/development/compilers/gcc/4.8/no-sys-dirs.patch deleted file mode 100644 index 79901703cb82..000000000000 --- a/pkgs/development/compilers/gcc/4.8/no-sys-dirs.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c ---- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200 -+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200 -@@ -41,6 +41,10 @@ - # undef CROSS_INCLUDE_DIR - #endif - -+#undef LOCAL_INCLUDE_DIR -+#undef SYSTEM_INCLUDE_DIR -+#undef STANDARD_INCLUDE_DIR -+ - const struct default_include cpp_include_defaults[] - #ifdef INCLUDE_DEFAULTS - = INCLUDE_DEFAULTS; -diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c ---- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100 -+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200 -@@ -1478,10 +1478,10 @@ - /* Default prefixes to attach to command names. */ - - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 --#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" -+#define STANDARD_STARTFILE_PREFIX_2 "" - #endif - - #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ ---- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200 -+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200 -@@ -3277,7 +3281,7 @@ - -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ - -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \ - -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ -- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \ - -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \ - -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ - -DPREFIX=\"$(prefix)/\" \ diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix index 8b14dbc5cbfa..7b2e03f8d573 100644 --- a/pkgs/development/compilers/ghdl/default.nix +++ b/pkgs/development/compilers/ghdl/default.nix @@ -34,14 +34,14 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp ghdl_mcode $out/bin - ensureDir $out/share/ghdl_mcode/translate + mkdir -p $out/share/ghdl_mcode/translate cp -R ../lib $out/share/ghdl_mcode/translate cp -R ../../libraries $out/share/ghdl_mcode - ensureDir $out/share/man/man1 + mkdir -p $out/share/man/man1 cp ../../doc/ghdl.1 $out/share/man/man1/ghdl_mcode.1 # Ghdl has some timestamps checks, storing file timestamps in '.cf' files. diff --git a/pkgs/development/compilers/go/1.3.nix b/pkgs/development/compilers/go/1.3.nix index b9178d5e61c1..fafa045e5621 100644 --- a/pkgs/development/compilers/go/1.3.nix +++ b/pkgs/development/compilers/go/1.3.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation { # http://lists.science.uu.nl/pipermail/nix-dev/2013-October/011891.html # Fix for "libgcc_s.so.1 must be installed for pthread_cancel to work" # during tests: - export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib*/libgcc_s.so))" + export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib/libgcc_s.so))" mkdir -p "$out/bin" export GOROOT="$(pwd)/" diff --git a/pkgs/development/compilers/go/gox.nix b/pkgs/development/compilers/go/gox.nix index 705cb6e5c28f..da40b7570fe5 100644 --- a/pkgs/development/compilers/go/gox.nix +++ b/pkgs/development/compilers/go/gox.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ go ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin export GOPATH=$src go build -v -o $out/bin/gox github.com/mitchellh/gox ''; diff --git a/pkgs/development/compilers/gwt/2.4.0.nix b/pkgs/development/compilers/gwt/2.4.0.nix index 65208b062c25..f0dc9378c4f0 100644 --- a/pkgs/development/compilers/gwt/2.4.0.nix +++ b/pkgs/development/compilers/gwt/2.4.0.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { buildInputs = [ unzip ]; installPhase = '' - ensureDir $out + mkdir -p $out unzip $src mv gwt-2.4.0 $out/bin ''; diff --git a/pkgs/development/compilers/mercury/default.nix b/pkgs/development/compilers/mercury/default.nix index 5ea922a371a7..21af582c594b 100644 --- a/pkgs/development/compilers/mercury/default.nix +++ b/pkgs/development/compilers/mercury/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - ensureDir $out/lib/mercury/cgi-bin ; + mkdir -p $out/lib/mercury/cgi-bin ; configureFlags="--enable-deep-profiler=$out/lib/mercury/cgi-bin"; ''; diff --git a/pkgs/development/compilers/ocaml/3.11.2.nix b/pkgs/development/compilers/ocaml/3.11.2.nix index cffd7c3f54a4..64cf8a9f9f7b 100644 --- a/pkgs/development/compilers/ocaml/3.11.2.nix +++ b/pkgs/development/compilers/ocaml/3.11.2.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { patch -p0 < ${./mips64.patch} ''; postBuild = '' - ensureDir $out/include + mkdir -p $out/include ln -sv $out/lib/ocaml/caml $out/include/caml ''; diff --git a/pkgs/development/compilers/openjdk-darwin/default.nix b/pkgs/development/compilers/openjdk-darwin/default.nix index 68708726c852..8d3cbef75d41 100644 --- a/pkgs/development/compilers/openjdk-darwin/default.nix +++ b/pkgs/development/compilers/openjdk-darwin/default.nix @@ -1,16 +1,18 @@ -{ stdenv, fetchurl, setJavaClassPath }: +{ stdenv, fetchurl, unzip, setJavaClassPath }: let jdk = stdenv.mkDerivation { - name = "openjdk6-b16-24_apr_2009-r1"; + name = "openjdk-7u60b30"; + # From https://github.com/alexkasko/openjdk-unofficial-builds src = fetchurl { - url = http://landonf.bikemonkey.org/static/soylatte/bsd-dist/openjdk6_darwin/openjdk6-b16-24_apr_2009-r1.tar.bz2; - sha256 = "14pbv6jjk95k7hbgiwyvjdjv8pccm7m8a130k0q7mjssf4qmpx1v"; + url = https://bitbucket.org/alexkasko/openjdk-unofficial-builds/downloads/openjdk-1.7.0-u60-unofficial-macosx-x86_64-bundle.zip; + sha256 = "af510a4d566712d82c17054bb39f91d98c69a85586e244c6123669a0bd4b7401"; }; + buildInputs = [ unzip ]; + installPhase = '' - mkdir -p $out - cp -vR * $out/ + mv */Contents/Home $out # jni.h expects jni_md.h to be in the header search path. ln -s $out/include/darwin/*_md.h $out/include/ diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix index 60071a8f6fa9..1fb4318ebb92 100644 --- a/pkgs/development/compilers/pakcs/default.nix +++ b/pkgs/development/compilers/pakcs/default.nix @@ -54,13 +54,13 @@ stdenv.mkDerivation rec { export LC_ALL=en_US.UTF-8 # Set up link to cymake, which has been built already. - ensureDir bin/.local + mkdir -p bin/.local ln -s ${curryFront}/bin/cymake bin/.local/ ''; installPhase = '' # Prepare PAKCSHOME directory. - ensureDir $out/pakcs + mkdir -p $out/pakcs for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do cp -r $d $out/pakcs ; done @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { (cd $out/pakcs/www ; make) # Install bin. - ensureDir $out/bin + mkdir -p $out/bin for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \ addtypes cass currybrowse currycreatemake currydoc currytest \ dataToXml erd2curry ; do @@ -88,7 +88,7 @@ stdenv.mkDerivation rec { done # Place emacs lisp files in expected locations. - ensureDir $out/share/emacs/site-lisp/curry-pakcs + mkdir -p $out/share/emacs/site-lisp/curry-pakcs for e in "tools/emacs/"*.el ; do cp $e $out/share/emacs/site-lisp/curry-pakcs/ ; done diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix index c3335ea6d22b..015d7dd95da8 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -15,9 +15,9 @@ stdenv.mkDerivation rec { }; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp -p src/runtime/sbcl $out/bin - ensureDir $out/share/sbcl + mkdir -p $out/share/sbcl cp -p output/sbcl.core $out/share/sbcl ''; diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 7f7a76060bdb..d3892d43d15e 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { preBuild = '' export INSTALL_ROOT=$out - ensureDir test-home + mkdir -p test-home export HOME=$PWD/test-home ''; diff --git a/pkgs/development/compilers/smlnj/bootstrap.nix b/pkgs/development/compilers/smlnj/bootstrap.nix index 27fdf75cc25d..39a1bbd0df35 100644 --- a/pkgs/development/compilers/smlnj/bootstrap.nix +++ b/pkgs/development/compilers/smlnj/bootstrap.nix @@ -22,10 +22,10 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin rsync -av bin/ $out/bin/ - ensureDir $out/lib + mkdir -p $out/lib rsync -av lib/ $out/lib/ ''; diff --git a/pkgs/development/eclipse/ecj/default.nix b/pkgs/development/eclipse/ecj/default.nix index 786fcdba18a8..0f52e879863e 100644 --- a/pkgs/development/eclipse/ecj/default.nix +++ b/pkgs/development/eclipse/ecj/default.nix @@ -54,6 +54,6 @@ stdenv.mkDerivation rec { # http://www.eclipse.org/legal/epl-v10.html (free software, copyleft) license = "EPLv1.0"; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index bbd9e003b2c7..600884db5e67 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -64,29 +64,5 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - doCheck = !stdenv.isDarwin; - - # some network-related tests don't work, mostly probably due to our sandboxing - testsToSkip = '' - lib/Net/hostent.t \ - dist/IO/t/{io_multihomed.t,io_sock.t} \ - dist/Net-Ping/t/*.t \ - cpan/autodie/t/truncate.t \ - t/porting/{maintainers.t,regen.t} \ - cpan/Socket/t/get{name,addr}info.t \ - '' + optionalString stdenv.isFreeBSD '' - cpan/CPANPLUS/t/04_CPANPLUS-Module.t \ - cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t \ - '' + " "; - - postPatch = optionalString (!stdenv.isDarwin) /* this failed on Darwin, no idea why */ '' - for test in ${testsToSkip}; do - echo "Removing test" $test - rm "$test" - pat=`echo "$test" | sed 's,/,\\\\/,g'` # just escape slashes - sed "/^$pat/d" -i MANIFEST - done - ''; - passthru.libPrefix = "lib/perl5/site_perl"; } diff --git a/pkgs/development/libraries/aacskeys/default.nix b/pkgs/development/libraries/aacskeys/default.nix index 088f2cc4b1e0..0b20d8a41ea1 100644 --- a/pkgs/development/libraries/aacskeys/default.nix +++ b/pkgs/development/libraries/aacskeys/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { buildInputs = [openssl jdk premake3]; installPhase = '' - ensureDir $out/{bin,lib,share/${baseName}} + mkdir -p $out/{bin,lib,share/${baseName}} # Install lib install -Dm444 lib/linux/libaacskeys.so $out/lib diff --git a/pkgs/development/libraries/apache-activemq/default.nix b/pkgs/development/libraries/apache-activemq/default.nix index d55ff9049eda..2f2792dec140 100644 --- a/pkgs/development/libraries/apache-activemq/default.nix +++ b/pkgs/development/libraries/apache-activemq/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { phases = [ "unpackPhase" "installPhase" ]; installPhase = '' - ensureDir $out + mkdir -p $out mv * $out/ for j in `find $out/lib -name "*.jar"`; do cp="''${cp:+"$cp:"}$j"; diff --git a/pkgs/desktops/gnome-3/3.12/core/at-spi2-atk/default.nix b/pkgs/development/libraries/at-spi2-atk/default.nix similarity index 100% rename from pkgs/desktops/gnome-3/3.12/core/at-spi2-atk/default.nix rename to pkgs/development/libraries/at-spi2-atk/default.nix diff --git a/pkgs/desktops/gnome-3/3.10/core/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix similarity index 100% rename from pkgs/desktops/gnome-3/3.10/core/at-spi2-core/default.nix rename to pkgs/development/libraries/at-spi2-core/default.nix diff --git a/pkgs/development/libraries/boost/1.55.nix b/pkgs/development/libraries/boost/1.55.nix index df29b2402f8d..bf355f7169c6 100644 --- a/pkgs/development/libraries/boost/1.55.nix +++ b/pkgs/development/libraries/boost/1.55.nix @@ -75,6 +75,7 @@ stdenv.mkDerivation { ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install${withToolset} rm $out/bin/bjam ln -s $out/bin/b2 $out/bin/bjam + rm -rf $out/share/boost-build/example ''; crossAttrs = rec { diff --git a/pkgs/development/libraries/bwidget/default.nix b/pkgs/development/libraries/bwidget/default.nix index 81f4f9a287ec..0d1913bc8e7a 100644 --- a/pkgs/development/libraries/bwidget/default.nix +++ b/pkgs/development/libraries/bwidget/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { dontBuild = true; installPhase = '' - ensureDir "$out/lib/${passthru.libPrefix}" + mkdir -p "$out/lib/${passthru.libPrefix}" cp -R *.tcl lang images "$out/lib/${passthru.libPrefix}" ''; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 5e211c74d5e6..f0c4da755673 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig expat ]; configureFlags = [ + "--sysconfdir=/etc" "--with-cache-dir=/var/cache/fontconfig" "--disable-docs" "--with-default-fonts=" @@ -39,7 +40,7 @@ stdenv.mkDerivation rec { doCheck = true; # Don't try to write to /var/cache/fontconfig at install time. - installFlags = "fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false"; + installFlags = "sysconfdir=$(out)/etc fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false"; postInstall = '' cd "$out/etc/fonts" && tar xvf ${infinality_patch} diff --git a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh index c983f9f6a612..06e820633b84 100644 --- a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh +++ b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh @@ -1,6 +1,6 @@ findGdkPixbufLoaders() { - if [ -z "$IN_NIX_SHELL" ]; then + if [ -n "$out" ] && [ -z "$IN_NIX_SHELL" ]; then # set pixbuf loaders.cache for this package diff --git a/pkgs/development/libraries/glib/darwin-compilation.patch b/pkgs/development/libraries/glib/darwin-compilation.patch new file mode 100644 index 000000000000..f215eef798af --- /dev/null +++ b/pkgs/development/libraries/glib/darwin-compilation.patch @@ -0,0 +1,24 @@ +Fix compilation on Mac OS X with gcc 4.8. + +diff -ru glib-2.40.0-orig/gio/gdummyfile.c glib-2.40.0/gio/gdummyfile.c +--- glib-2.40.0-orig/gio/gdummyfile.c 2014-02-03 18:40:41.000000000 +0100 ++++ glib-2.40.0/gio/gdummyfile.c 2014-07-15 10:58:31.000000000 +0200 +@@ -454,7 +454,8 @@ + result = g_malloc (escaped_string_end - escaped_string + 1); + + out = result; +- for (in = escaped_string; in < escaped_string_end; in++) ++ in = escaped_string; ++ for (; in < escaped_string_end; in++) + { + character = *in; + if (*in == '%') +@@ -551,6 +552,7 @@ + + decoded->scheme = g_malloc (p - uri); + out = decoded->scheme; +- for (in = uri; in < p - 1; in++) ++ in = uri; ++ for (; in < p - 1; in++) + *out++ = g_ascii_tolower (*in); + *out = 0; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 9a592d4f9541..14e724959682 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -49,6 +49,8 @@ stdenv.mkDerivation rec { sha256 = "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd"; }; + patches = optional stdenv.isDarwin ./darwin-compilation.patch; + setupHook = ./setup-hook.sh; buildInputs = [ libelf ] @@ -67,6 +69,11 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl" + optionalString stdenv.isSunOS " -DBSD_COMP"; + preBuild = optionalString stdenv.isDarwin + '' + export MACOSX_DEPLOYMENT_TARGET= + ''; + enableParallelBuilding = true; inherit doCheck; diff --git a/pkgs/development/libraries/glibc/2.19/common.nix b/pkgs/development/libraries/glibc/2.19/common.nix index 43ba2a9ca113..cd1ba747d7c6 100644 --- a/pkgs/development/libraries/glibc/2.19/common.nix +++ b/pkgs/development/libraries/glibc/2.19/common.nix @@ -58,6 +58,8 @@ stdenv.mkDerivation ({ ./fix_path_attribute_in_getconf.patch ./fix-math.patch + + ./cve-2014-0475.patch ]; postPatch = '' diff --git a/pkgs/development/libraries/glibc/2.19/cve-2014-0475.patch b/pkgs/development/libraries/glibc/2.19/cve-2014-0475.patch new file mode 100644 index 000000000000..a4f983de8f6c --- /dev/null +++ b/pkgs/development/libraries/glibc/2.19/cve-2014-0475.patch @@ -0,0 +1,170 @@ +Picked from upstream commits, but excluding changes to news and tests: +d183645616b0533 and 4e8f95a0df7c2 +Also see https://sourceware.org/bugzilla/show_bug.cgi?id=17137 + +diff --git a/locale/setlocale.c b/locale/setlocale.c +index 9458468..6455b8b 100644 +--- a/locale/setlocale.c ++++ b/locale/setlocale.c +@@ -272,6 +272,8 @@ setlocale (int category, const char *locale) + of entries of the form `CATEGORY=VALUE'. */ + const char *newnames[__LC_LAST]; + struct __locale_data *newdata[__LC_LAST]; ++ /* Copy of the locale argument, for in-place splitting. */ ++ char *locale_copy = NULL; + + /* Set all name pointers to the argument name. */ + for (category = 0; category < __LC_LAST; ++category) +@@ -281,7 +283,13 @@ setlocale (int category, const char *locale) + if (__glibc_unlikely (strchr (locale, ';') != NULL)) + { + /* This is a composite name. Make a copy and split it up. */ +- char *np = strdupa (locale); ++ locale_copy = strdup (locale); ++ if (__glibc_unlikely (locale_copy == NULL)) ++ { ++ __libc_rwlock_unlock (__libc_setlocale_lock); ++ return NULL; ++ } ++ char *np = locale_copy; + char *cp; + int cnt; + +@@ -299,6 +307,7 @@ setlocale (int category, const char *locale) + { + error_return: + __libc_rwlock_unlock (__libc_setlocale_lock); ++ free (locale_copy); + + /* Bogus category name. */ + ERROR_RETURN; +@@ -391,8 +400,9 @@ setlocale (int category, const char *locale) + /* Critical section left. */ + __libc_rwlock_unlock (__libc_setlocale_lock); + +- /* Free the resources (the locale path variable). */ ++ /* Free the resources. */ + free (locale_path); ++ free (locale_copy); + + return composite; + } +diff --git a/locale/findlocale.c b/locale/findlocale.c +index bbaf708..22e8b53 100644 +--- a/locale/findlocale.c ++++ b/locale/findlocale.c +@@ -17,6 +17,7 @@ + . */ + + #include ++#include + #include + #include + #include +@@ -57,6 +58,45 @@ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; + + const char _nl_default_locale_path[] attribute_hidden = LOCALEDIR; + ++/* Checks if the name is actually present, that is, not NULL and not ++ empty. */ ++static inline int ++name_present (const char *name) ++{ ++ return name != NULL && name[0] != '\0'; ++} ++ ++/* Checks that the locale name neither extremely long, nor contains a ++ ".." path component (to prevent directory traversal). */ ++static inline int ++valid_locale_name (const char *name) ++{ ++ /* Not set. */ ++ size_t namelen = strlen (name); ++ /* Name too long. The limit is arbitrary and prevents stack overflow ++ issues later. */ ++ if (__glibc_unlikely (namelen > 255)) ++ return 0; ++ /* Directory traversal attempt. */ ++ static const char slashdot[4] = {'/', '.', '.', '/'}; ++ if (__glibc_unlikely (memmem (name, namelen, ++ slashdot, sizeof (slashdot)) != NULL)) ++ return 0; ++ if (namelen == 2 && __glibc_unlikely (name[0] == '.' && name [1] == '.')) ++ return 0; ++ if (namelen >= 3 ++ && __glibc_unlikely (((name[0] == '.' ++ && name[1] == '.' ++ && name[2] == '/') ++ || (name[namelen - 3] == '/' ++ && name[namelen - 2] == '.' ++ && name[namelen - 1] == '.')))) ++ return 0; ++ /* If there is a slash in the name, it must start with one. */ ++ if (__glibc_unlikely (memchr (name, '/', namelen) != NULL) && name[0] != '/') ++ return 0; ++ return 1; ++} + + struct __locale_data * + internal_function +@@ -65,7 +105,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, + { + int mask; + /* Name of the locale for this category. */ +- char *loc_name; ++ char *loc_name = (char *) *name; + const char *language; + const char *modifier; + const char *territory; +@@ -73,31 +113,39 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, + const char *normalized_codeset; + struct loaded_l10nfile *locale_file; + +- if ((*name)[0] == '\0') ++ if (loc_name[0] == '\0') + { + /* The user decides which locale to use by setting environment + variables. */ +- *name = getenv ("LC_ALL"); +- if (*name == NULL || (*name)[0] == '\0') +- *name = getenv (_nl_category_names.str ++ loc_name = getenv ("LC_ALL"); ++ if (!name_present (loc_name)) ++ loc_name = getenv (_nl_category_names.str + + _nl_category_name_idxs[category]); +- if (*name == NULL || (*name)[0] == '\0') +- *name = getenv ("LANG"); ++ if (!name_present (loc_name)) ++ loc_name = getenv ("LANG"); ++ if (!name_present (loc_name)) ++ loc_name = (char *) _nl_C_name; + } + +- if (*name == NULL || (*name)[0] == '\0' +- || (__builtin_expect (__libc_enable_secure, 0) +- && strchr (*name, '/') != NULL)) +- *name = (char *) _nl_C_name; ++ /* We used to fall back to the C locale if the name contains a slash ++ character '/', but we now check for directory traversal in ++ valid_locale_name, so this is no longer necessary. */ + +- if (__builtin_expect (strcmp (*name, _nl_C_name), 1) == 0 +- || __builtin_expect (strcmp (*name, _nl_POSIX_name), 1) == 0) ++ if (__builtin_expect (strcmp (loc_name, _nl_C_name), 1) == 0 ++ || __builtin_expect (strcmp (loc_name, _nl_POSIX_name), 1) == 0) + { + /* We need not load anything. The needed data is contained in + the library itself. */ + *name = (char *) _nl_C_name; + return _nl_C[category]; + } ++ else if (!valid_locale_name (loc_name)) ++ { ++ __set_errno (EINVAL); ++ return NULL; ++ } ++ ++ *name = loc_name; + + /* We really have to load some data. First we try the archive, + but only if there was no LOCPATH environment variable specified. */ diff --git a/pkgs/development/libraries/haskell/ghc-heap-view/default.nix b/pkgs/development/libraries/haskell/ghc-heap-view/default.nix index c32d3be53080..1df6885280c7 100644 --- a/pkgs/development/libraries/haskell/ghc-heap-view/default.nix +++ b/pkgs/development/libraries/haskell/ghc-heap-view/default.nix @@ -8,7 +8,7 @@ cabal.mkDerivation (self: { sha256 = "1qi7f3phj2j63x1wd2cvk36945cxd84s12zs03hlrn49wzx2pf1n"; buildDepends = [ binary transformers ]; postInstall = '' - ensureDir "$out/share/ghci" + mkdir -p "$out/share/ghci" ln -s "$out/share/$pname-$version/ghci" "$out/share/ghci/$pname" ''; meta = { diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix index f876fb5aba85..a9c06e80f8af 100644 --- a/pkgs/development/libraries/haskell/ghc-mod/default.nix +++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix @@ -26,7 +26,7 @@ cabal.mkDerivation (self: { make rm Makefile cd .. - ensureDir "$out/share/emacs" + mkdir -p "$out/share/emacs" mv $pname-$version emacs/site-lisp mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped cat - > $out/bin/ghc-mod < $out/bin/run-test-simulator << "EOF" #! ${stdenv.shell} -e diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix index 71e34ee5127d..fd375d6213c6 100644 --- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix +++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { name = "xcode-wrapper-"+version; buildCommand = '' - ensureDir $out/bin + mkdir -p $out/bin cd $out/bin ln -s /usr/bin/xcode-select ln -s /usr/bin/xcodebuild diff --git a/pkgs/development/ocaml-modules/ocamlmake/default.nix b/pkgs/development/ocaml-modules/ocamlmake/default.nix index 0170119d94e0..3f91901d9b64 100644 --- a/pkgs/development/ocaml-modules/ocamlmake/default.nix +++ b/pkgs/development/ocaml-modules/ocamlmake/default.nix @@ -14,7 +14,7 @@ in stdenv.mkDerivation { }; installPhase = '' - ensureDir "$out/include/" + mkdir -p "$out/include/" cp OCamlMakefile "$out/include/" ''; diff --git a/pkgs/development/tools/apktool/default.nix b/pkgs/development/tools/apktool/default.nix index a415ffd152d7..239416535755 100644 --- a/pkgs/development/tools/apktool/default.nix +++ b/pkgs/development/tools/apktool/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { installPhase = '' install -D apktool.jar "$out/libexec/apktool/apktool.jar" - ensureDir "$out/bin" + mkdir -p "$out/bin" makeWrapper "${jre}/bin/java" "$out/bin/apktool" \ --add-flags "-jar $out/libexec/apktool/apktool.jar" \ --prefix PATH : "${buildTools}/build-tools/android-4.3/" diff --git a/pkgs/development/tools/etcdctl/default.nix b/pkgs/development/tools/etcdctl/default.nix index a37ef26f5412..5e6438d0f5ff 100644 --- a/pkgs/development/tools/etcdctl/default.nix +++ b/pkgs/development/tools/etcdctl/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv etcdctl $out/bin ''; diff --git a/pkgs/development/tools/gocode/default.nix b/pkgs/development/tools/gocode/default.nix index 6057c288cf69..30e4b79ee38b 100644 --- a/pkgs/development/tools/gocode/default.nix +++ b/pkgs/development/tools/gocode/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv gocode $out/bin ''; diff --git a/pkgs/development/tools/literate-programming/noweb/default.nix b/pkgs/development/tools/literate-programming/noweb/default.nix index 291bc29e1b70..4f8691c40adb 100644 --- a/pkgs/development/tools/literate-programming/noweb/default.nix +++ b/pkgs/development/tools/literate-programming/noweb/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "10hdd6mrk26kyh4bnng4ah5h1pnanhsrhqa7qwqy6dyv3rng44y9"; }; preBuild = '' - ensureDir $out/lib/noweb + mkdir -p $out/lib/noweb cd src makeFlags="BIN=$out/bin LIB=$out/lib/noweb MAN=$out/share/man TEXINPUTS=$out/share/texmf/tex/latex" ''; diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix index 38fe289d29a1..4dca332722bf 100644 --- a/pkgs/development/tools/misc/autoconf/default.nix +++ b/pkgs/development/tools/misc/autoconf/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = false; # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the # "fixed" path in generated files! diff --git a/pkgs/development/tools/misc/distcc/masq.nix b/pkgs/development/tools/misc/distcc/masq.nix index 117480670c39..753c35b5d3a2 100644 --- a/pkgs/development/tools/misc/distcc/masq.nix +++ b/pkgs/development/tools/misc/distcc/masq.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { phases = [ "installPhase" ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin bin=${gccRaw}/bin diff --git a/pkgs/development/tools/misc/grafana/default.nix b/pkgs/development/tools/misc/grafana/default.nix index 346c7fb6ad29..b1566684cf0b 100644 --- a/pkgs/development/tools/misc/grafana/default.nix +++ b/pkgs/development/tools/misc/grafana/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { phases = ["unpackPhase" "installPhase"]; installPhase = '' - ensureDir $out && cp -R * $out + mkdir -p $out && cp -R * $out ${optionalString (conf!=null) ''cp ${conf} $out/config.js''} ''; diff --git a/pkgs/development/tools/misc/opengrok/default.nix b/pkgs/development/tools/misc/opengrok/default.nix index 8f77b3d7283a..d38c862ecfb1 100644 --- a/pkgs/development/tools/misc/opengrok/default.nix +++ b/pkgs/development/tools/misc/opengrok/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; installPhase = '' - ensureDir $out + mkdir -p $out cp -a * $out/ substituteInPlace $out/bin/OpenGrok --replace /bin/uname ${coreutils}/bin/uname wrapProgram $out/bin/OpenGrok \ diff --git a/pkgs/development/tools/node-webkit/default.nix b/pkgs/development/tools/node-webkit/default.nix index 04ee29621730..1f1017760642 100644 --- a/pkgs/development/tools/node-webkit/default.nix +++ b/pkgs/development/tools/node-webkit/default.nix @@ -33,8 +33,8 @@ in stdenv.mkDerivation rec { installPhase = let LD_LIBRARY_PATH = "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit"; in '' - ensureDir $out/bin - ensureDir $out/share/node-webkit + mkdir -p $out/bin + mkdir -p $out/share/node-webkit cp -R * $out/share/node-webkit ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0 diff --git a/pkgs/development/tools/ocaml/deriving/default.nix b/pkgs/development/tools/ocaml/deriving/default.nix index d53f41b5da5c..55bbf3748ea9 100644 --- a/pkgs/development/tools/ocaml/deriving/default.nix +++ b/pkgs/development/tools/ocaml/deriving/default.nix @@ -52,7 +52,7 @@ versionedDerivation "ocaml-deriving" version { # not all tests compile !? # (cd tests; make) - ensureDir $out/bin + mkdir -p $out/bin cp -a lib $out/ cp -a syntax $out diff --git a/pkgs/development/tools/packer/default.nix b/pkgs/development/tools/packer/default.nix index 5cea753dd9c3..073de5137f85 100644 --- a/pkgs/development/tools/packer/default.nix +++ b/pkgs/development/tools/packer/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { XC_ARCH=$(go env GOARCH) XC_OS=$(go env GOOS) - ensureDir $out/bin + mkdir -p $out/bin cd $src/src/github.com/mitchellh/packer gox \ diff --git a/pkgs/development/tools/yuicompressor/default.nix b/pkgs/development/tools/yuicompressor/default.nix index 5dcc30811e22..1a5485af541d 100644 --- a/pkgs/development/tools/yuicompressor/default.nix +++ b/pkgs/development/tools/yuicompressor/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { }; buildCommand = '' - ensureDir $out/lib + mkdir -p $out/lib ln -s $src $out/lib/yuicompressor.jar ''; } diff --git a/pkgs/games/0ad/default.nix b/pkgs/games/0ad/default.nix index c0dfe723c81e..78b76f1ac364 100644 --- a/pkgs/games/0ad/default.nix +++ b/pkgs/games/0ad/default.nix @@ -1,4 +1,4 @@ -{ stdenv, stdenvType, callPackage, fetchurl, python27 +{ stdenv, callPackage, fetchurl, python27 , pkgconfig, spidermonkey_24, boost, icu, libxml2, libpng , libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc , openalSoft, mesa, xproto, libX11, libXcursor, nspr, SDL @@ -16,8 +16,8 @@ let zeroadData = callPackage ./data.nix { inherit version releaseType; }; archForPremake = - if stdenv.lib.hasPrefix "x86_64-" stdenvType then "x64" else - if stdenv.lib.hasPrefix "i686-" stdenvType then "x32" else "ERROR"; + if stdenv.lib.hasPrefix "x86_64-" stdenv.system then "x64" else + if stdenv.lib.hasPrefix "i686-" stdenv.system then "x32" else "ERROR"; in stdenv.mkDerivation rec { diff --git a/pkgs/games/andyetitmoves/default.nix b/pkgs/games/andyetitmoves/default.nix index 6f5fc2add3a3..ae04c57aa26d 100644 --- a/pkgs/games/andyetitmoves/default.nix +++ b/pkgs/games/andyetitmoves/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { phases = "unpackPhase installPhase"; installPhase = '' - ensureDir $out/{opt/andyetitmoves,bin} + mkdir -p $out/{opt/andyetitmoves,bin} cp -r * $out/opt/andyetitmoves/ fullPath=${stdenv.gcc.gcc}/lib64 diff --git a/pkgs/games/crafty/default.nix b/pkgs/games/crafty/default.nix index 54deae2ecfe1..0e2796df22d8 100644 --- a/pkgs/games/crafty/default.nix +++ b/pkgs/games/crafty/default.nix @@ -621,10 +621,10 @@ stdenv.mkDerivation rec { else "make"; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp -p ./crafty $out/bin - ensureDir $out/share/crafty + mkdir -p $out/share/crafty cd $out/share/crafty $out/bin/crafty "books create ${startPgn} 60" @@ -635,7 +635,7 @@ stdenv.mkDerivation rec { $out/bin/crafty "book create enormous.pgn 60" rm -f *.001 enormous.pgn - ensureDir $out/share/crafty/TB + mkdir -p $out/share/crafty/TB ${stdenv.lib.fold (tb: acc: acc + "\nln -s " + toString tb diff --git a/pkgs/games/gsb/default.nix b/pkgs/games/gsb/default.nix index 52c3830c22a4..757d3cf7681e 100644 --- a/pkgs/games/gsb/default.nix +++ b/pkgs/games/gsb/default.nix @@ -32,8 +32,8 @@ stdenv.mkDerivation rec { + ":" + stdenv.gcc.gcc + "/lib64"; installPhase = '' - ensureDir $out/libexec/positech/GSB/ - ensureDir $out/bin + mkdir -p $out/libexec/positech/GSB/ + mkdir -p $out/bin patchelf \ --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index b4ec7eb311ff..9f79dd70c6a0 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -1,6 +1,8 @@ -{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm +{ stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm , mesa, openal, alsaOss }: +assert jre ? architecture; + stdenv.mkDerivation { name = "minecraft-2013.07.01"; diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix index b031cb3f0dd0..2dc4dece75f3 100644 --- a/pkgs/games/openlierox/default.nix +++ b/pkgs/games/openlierox/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out/bin $out/share/OpenLieroX + mkdir -p $out/bin $out/share/OpenLieroX cp bin/* $out/bin cp -R ../share/gamedir/* $out/share/OpenLieroX ''; diff --git a/pkgs/games/opentyrian/default.nix b/pkgs/games/opentyrian/default.nix index 6b9c48473673..cfae6a4bb3e8 100644 --- a/pkgs/games/opentyrian/default.nix +++ b/pkgs/games/opentyrian/default.nix @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { "; buildPhase = "make release"; installPhase = " - ensureDir $out/bin + mkdir -p $out/bin cp ./opentyrian $out/bin - ensureDir $out/share/opentyrian/data + mkdir -p $out/share/opentyrian/data unzip -j $data -d $out/share/opentyrian/data "; diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix index 9b9dd6c1f43f..8a92490b6e0c 100644 --- a/pkgs/games/vessel/default.nix +++ b/pkgs/games/vessel/default.nix @@ -24,8 +24,8 @@ stdenv.mkDerivation rec { + ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ; installPhase = '' - ensureDir $out/libexec/strangeloop/vessel/ - ensureDir $out/bin + mkdir -p $out/libexec/strangeloop/vessel/ + mkdir -p $out/bin # allow scripting of the mojoinstaller gcc -fPIC -shared -o isatty.so $ld_preload diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix index 13e7e487c8f0..c39ffb1de058 100644 --- a/pkgs/games/worldofgoo/default.nix +++ b/pkgs/games/worldofgoo/default.nix @@ -50,8 +50,8 @@ stdenv.mkDerivation rec { + ":" + stdenv.gcc.gcc + "/lib64"; installPhase = '' - ensureDir $out/libexec/2dboy/WorldOfGoo/ - ensureDir $out/bin + mkdir -p $out/libexec/2dboy/WorldOfGoo/ + mkdir -p $out/bin patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath $libPath ./WorldOfGoo.bin64 diff --git a/pkgs/misc/emulators/bsod/default.nix b/pkgs/misc/emulators/bsod/default.nix index d15e873422e3..526ea25a04ed 100644 --- a/pkgs/misc/emulators/bsod/default.nix +++ b/pkgs/misc/emulators/bsod/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { buildInputs = [ ncurses ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp bsod $out/bin ''; diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 4142bce3b371..87014a9c7144 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -89,7 +89,7 @@ let vimHelpTags = '' installPhase = '' target=$out/share/vim-plugins/${path} - ensureDir $out/share/vim-plugins + mkdir -p $out/share/vim-plugins cp -r . $target ${vimHelpTags} vimHelpTags $target @@ -408,7 +408,7 @@ in rec }; unpackPhase = ":"; installPhase = '' - ensureDir $out/share/vim-plugins/vim-a + mkdir -p $out/share/vim-plugins/vim-a cp ${src} $out/share/vim-plugins/vim-a/a.vim ''; }; diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 73585d59c0b3..2a48590154e4 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -31,12 +31,12 @@ in stdenv.mkDerivation rec { patches = optional (osxVersion == "10.9") ./gcc-fix-enum-attributes.patch; installPhase = '' - ensureDir "$out/share/sysroot" + mkdir -p "$out/share/sysroot" cp -a * "$out/share/sysroot/" ln -s "$out/share/sysroot/usr/lib" "$out/lib" ln -s "$out/share/sysroot/usr/include" "$out/include" - ensureDir "$toolchain" + mkdir -p "$toolchain" pushd "$toolchain" ${xpwn}/bin/hfsplus "$(dirs +1)/../main.hfs" extractall \ Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr \ diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 12173e20f3f9..8048419a93ba 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { make make check make install - ensureDir $out/lib/perl5/site_perl/ + mkdir -p $out/lib/perl5/site_perl/ cp swig/perl/LibAppArmor.pm $out/lib/perl5/site_perl/ cp swig/perl/LibAppArmor.bs $out/lib/perl5/site_perl/ # this is automatically copied elsewhere.... diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix index e12c80e08864..6c7d6d5330e2 100644 --- a/pkgs/os-specific/linux/bbswitch/default.nix +++ b/pkgs/os-specific/linux/bbswitch/default.nix @@ -22,10 +22,10 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out/lib/modules/${kernel.modDirVersion}/misc + mkdir -p $out/lib/modules/${kernel.modDirVersion}/misc cp bbswitch.ko $out/lib/modules/${kernel.modDirVersion}/misc - ensureDir $out/bin + mkdir -p $out/bin tee $out/bin/discrete_vga_poweroff << EOF #!/bin/sh diff --git a/pkgs/os-specific/linux/frandom/default.nix b/pkgs/os-specific/linux/frandom/default.nix index 20419fe816d3..80ad483b3676 100644 --- a/pkgs/os-specific/linux/frandom/default.nix +++ b/pkgs/os-specific/linux/frandom/default.nix @@ -20,10 +20,10 @@ stdenv.mkDerivation rec { installPhase = '' kernelVersion=${kernel.modDirVersion} - ensureDir $out/lib/modules/$kernelVersion/misc + mkdir -p $out/lib/modules/$kernelVersion/misc cp frandom.ko $out/lib/modules/$kernelVersion/misc - ensureDir $out/lib/udev/rules.d + mkdir -p $out/lib/udev/rules.d tee $out/lib/udev/rules.d/10-frandom.rules <<-EOF # # These are the rules for the frandom devices. In theory, we could let diff --git a/pkgs/os-specific/linux/gogoclient/default.nix b/pkgs/os-specific/linux/gogoclient/default.nix index 09a449bbede9..a627a8cbcc94 100644 --- a/pkgs/os-specific/linux/gogoclient/default.nix +++ b/pkgs/os-specific/linux/gogoclient/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [openssl]; preFixup = '' - ensureDir $out/share/${name} + mkdir -p $out/share/${name} chmod 444 $out/bin/gogoc.conf mv $out/bin/gogoc.conf $out/share/${name}/gogoc.conf.sample rm $out/bin/gogoc.conf.sample diff --git a/pkgs/os-specific/linux/google-authenticator/default.nix b/pkgs/os-specific/linux/google-authenticator/default.nix index e2a5cb37c942..0e38d94e1ede 100644 --- a/pkgs/os-specific/linux/google-authenticator/default.nix +++ b/pkgs/os-specific/linux/google-authenticator/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin $out/lib/security + mkdir -p $out/bin $out/lib/security cp pam_google_authenticator.so $out/lib/security cp google-authenticator $out/bin ''; diff --git a/pkgs/os-specific/linux/i7z/default.nix b/pkgs/os-specific/linux/i7z/default.nix index 1aa10648861d..1fe1f48f4ef3 100644 --- a/pkgs/os-specific/linux/i7z/default.nix +++ b/pkgs/os-specific/linux/i7z/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/sbin + mkdir -p $out/sbin make install prefix=$out install -Dm755 GUI/i7z_GUI $out/sbin/i7z-gui ''; diff --git a/pkgs/os-specific/linux/iomelt/default.nix b/pkgs/os-specific/linux/iomelt/default.nix index df267d304c15..fccf7b6b1cd1 100644 --- a/pkgs/os-specific/linux/iomelt/default.nix +++ b/pkgs/os-specific/linux/iomelt/default.nix @@ -9,8 +9,8 @@ in stdenv.mkDerivation { }; preBuild = '' - ensureDir $out/bin - ensureDir $out/share/man/man1 + mkdir -p $out/bin + mkdir -p $out/share/man/man1 substituteInPlace Makefile \ --replace /usr $out diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 5c36bb097812..463722d2c961 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation { makeFlags = "prefix=$(out) etcprefix=$(out) DOCDIR=$(out)/share/doc"; preInstall = '' - ensureDir $out/share/doc + mkdir -p $out/share/doc ''; meta = { diff --git a/pkgs/os-specific/linux/microcode/converter.nix b/pkgs/os-specific/linux/microcode/converter.nix index 49babc6ca57b..da4d96772171 100644 --- a/pkgs/os-specific/linux/microcode/converter.nix +++ b/pkgs/os-specific/linux/microcode/converter.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir "$out/bin" + mkdir -p "$out/bin" cp intel-microcode2ucode "$out/bin/" ''; diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index e843658dfc28..c77faa6a9e70 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation { ''; preInstall = '' - ensureDir $out/bin $out/sbin $out/share/man/man{4,8} - ensureDir $out/lib/modules/${kernel.modDirVersion}/extra + mkdir -p $out/bin $out/sbin $out/share/man/man{4,8} + mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra ''; meta = { diff --git a/pkgs/os-specific/linux/otpw/default.nix b/pkgs/os-specific/linux/otpw/default.nix index 2cf375c8368b..27d0510a657a 100644 --- a/pkgs/os-specific/linux/otpw/default.nix +++ b/pkgs/os-specific/linux/otpw/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin $out/lib/security $out/share/man/man{1,8} + mkdir -p $out/bin $out/lib/security $out/share/man/man{1,8} cp pam_*.so $out/lib/security cp otpw-gen $out/bin cp *.1 $out/share/man/man1 diff --git a/pkgs/os-specific/linux/rfkill/udev.nix b/pkgs/os-specific/linux/rfkill/udev.nix index 6cf6e4adfa07..054ed471eaaf 100644 --- a/pkgs/os-specific/linux/rfkill/udev.nix +++ b/pkgs/os-specific/linux/rfkill/udev.nix @@ -31,12 +31,12 @@ stdenv.mkDerivation { dontBuild = true; installPhase = '' - ensureDir "$out/etc/udev/rules.d/"; + mkdir -p "$out/etc/udev/rules.d/"; cat > "$out/etc/udev/rules.d/90-rfkill.rules" << EOF SUBSYSTEM=="rfkill", ATTR{type}=="wlan", RUN+="$out/bin/rfkill-hook.sh" EOF - ensureDir "$out/bin/"; + mkdir -p "$out/bin/"; cp ${./rfkill-hook.sh} "$out/bin/rfkill-hook.sh" chmod +x "$out/bin/rfkill-hook.sh"; ''; diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index cdc384f3ee8c..1dd7c0c089fa 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }: stdenv.mkDerivation rec { - name = "util-linux-2.24.1"; + name = "util-linux-2.24.2"; src = fetchurl { url = "http://www.kernel.org/pub/linux/utils/util-linux/v2.24/${name}.tar.xz"; - sha256 = "0444xhfm9525v3aagyfbp38mp7xsw2fn9zg4ya713c7s5hivcpl3"; + sha256 = "1w0g8q5aj5pjdf8l52g0mxyvlk62f4dch51q9jm3hnqwgz0dchqj"; }; crossAttrs = { diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix index 6cd2a431a605..eaec63f98bfc 100644 --- a/pkgs/os-specific/linux/x86info/default.nix +++ b/pkgs/os-specific/linux/x86info/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ pciutils python ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp x86info lsmsr $out/bin ''; diff --git a/pkgs/servers/dict/dictd-wiktionary.nix b/pkgs/servers/dict/dictd-wiktionary.nix index 9e9c05d2f915..370bfd39137a 100644 --- a/pkgs/servers/dict/dictd-wiktionary.nix +++ b/pkgs/servers/dict/dictd-wiktionary.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { builder = writeScript "wiktionary-builder.sh" '' source $stdenv/setup - ensureDir $out/share/dictd/ + mkdir -p $out/share/dictd/ cd $out/share/dictd export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive diff --git a/pkgs/servers/dict/dictd-wordnet.nix b/pkgs/servers/dict/dictd-wordnet.nix index 063868ddc6e8..b6680e8b21c4 100644 --- a/pkgs/servers/dict/dictd-wordnet.nix +++ b/pkgs/servers/dict/dictd-wordnet.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { builder = writeScript "builder.sh" '' . ${stdenv}/setup - ensureDir $out/share/dictd/ + mkdir -p $out/share/dictd/ cd $out/share/dictd for i in ${wordnet}/dict/data.*; do diff --git a/pkgs/servers/etcd/default.nix b/pkgs/servers/etcd/default.nix index 1fb21f2b8ab6..8b4903c86022 100644 --- a/pkgs/servers/etcd/default.nix +++ b/pkgs/servers/etcd/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv etcd $out/bin/etcd ''; diff --git a/pkgs/servers/fleet/default.nix b/pkgs/servers/fleet/default.nix index 627c1ff0cf90..e3a53c85052e 100644 --- a/pkgs/servers/fleet/default.nix +++ b/pkgs/servers/fleet/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv fleet $out/bin ''; diff --git a/pkgs/servers/http/thttpd/default.nix b/pkgs/servers/http/thttpd/default.nix index e03183cbe49d..0bb3d96b37b7 100644 --- a/pkgs/servers/http/thttpd/default.nix +++ b/pkgs/servers/http/thttpd/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ''; preInstall = '' - ensureDir "$out/man/man1" + mkdir -p "$out/man/man1" sed -i -e 's/-o bin -g bin *//' Makefile sed -i -e '/chgrp/d' extras/Makefile ''; diff --git a/pkgs/servers/monitoring/seyren/default.nix b/pkgs/servers/monitoring/seyren/default.nix index 541c377c4049..e6e151295687 100644 --- a/pkgs/servers/monitoring/seyren/default.nix +++ b/pkgs/servers/monitoring/seyren/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper jre src ]; installPhase = '' - ensureDir "$out"/bin + mkdir -p "$out"/bin makeWrapper "${jre}/bin/java" "$out"/bin/seyren --add-flags "-jar $src" ''; diff --git a/pkgs/servers/nosql/influxdb/default.nix b/pkgs/servers/nosql/influxdb/default.nix index fa9c48c6ea92..77852b6d2ed9 100644 --- a/pkgs/servers/nosql/influxdb/default.nix +++ b/pkgs/servers/nosql/influxdb/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { wrapProgram "$out/bin/influxdb" \ --prefix LD_LIBRARY_PATH : "${stdenv.gcc.gcc}/lib:${stdenv.gcc.gcc}/lib64" - ensureDir $out/share/influxdb + mkdir -p $out/share/influxdb cp -R admin scripts config.toml $out/share/influxdb ''; diff --git a/pkgs/servers/nsq/default.nix b/pkgs/servers/nsq/default.nix index b1570d96c7b6..4d32c3203c7d 100644 --- a/pkgs/servers/nsq/default.nix +++ b/pkgs/servers/nsq/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv build/* $out/bin ''; diff --git a/pkgs/servers/serfdom/default.nix b/pkgs/servers/serfdom/default.nix index 92ab3bd780ad..48e5f2cea227 100644 --- a/pkgs/servers/serfdom/default.nix +++ b/pkgs/servers/serfdom/default.nix @@ -16,12 +16,12 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin mv serf $out/bin/serf ''; meta = with stdenv.lib; { - description = "Serf is a service discovery and orchestration tool that is decentralized, highly available, and fault tolerant"; + description = "A service discovery and orchestration tool that is decentralized, highly available, and fault tolerant"; homepage = http://www.serfdom.io/; license = licenses.mpl20; maintainers = with maintainers; [ msackman cstrahan ]; diff --git a/pkgs/shells/bash/bash-4.2-patches.nix b/pkgs/shells/bash/bash-4.2-patches.nix index ac6e9e97f180..567ec3c551cf 100644 --- a/pkgs/shells/bash/bash-4.2-patches.nix +++ b/pkgs/shells/bash/bash-4.2-patches.nix @@ -46,4 +46,6 @@ patch: [ (patch "043" "0mswgjk3z80qm1mb93jmbql27nbczxk86cw5byf0m29y1y2869nw") (patch "044" "1rk6jywzfvg1crvhib1zk37rsps73minhr7l4vcb3vfdkin2vlqh") (patch "045" "0vcqn9rb26bahhrarbwhpa0ny0nrf4vyrzh97d44lfcxypqfzdyx") +(patch "046" "0vc1ngkxkamwr022ww3vjp9ww9c647az4pjn175c1v60d0xk5hcm") +(patch "047" "0ymgimqz65sx2izg1dvm1h5cc01arl3j9j5137212l1ls00r55y1") ] diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index a2723f5575c0..47d1fb6d9f75 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -5,14 +5,7 @@ # Posix utilities, the GNU C compiler, and so on. On other systems, # we use the native C library. - -# stdenvType exists to support multiple kinds of stdenvs on the same -# system, e.g., cygwin and mingw builds on i686-cygwin. Most people -# can ignore it. - -{ system, stdenvType ? system, allPackages ? import ../.., platform, config }: - -assert system != "i686-cygwin" -> system == stdenvType; +{ system, allPackages ? import ../.., platform, config }: rec { @@ -45,23 +38,16 @@ rec { stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux; - # MinGW/MSYS standard environment. - stdenvMinGW = import ./mingw { - inherit system; - }; - - # Select the appropriate stdenv for the platform `system'. stdenv = - if stdenvType == "i686-linux" then stdenvLinux else - if stdenvType == "x86_64-linux" then stdenvLinux else - if stdenvType == "armv5tel-linux" then stdenvLinux else - if stdenvType == "armv6l-linux" then stdenvLinux else - if stdenvType == "armv7l-linux" then stdenvLinux else - if stdenvType == "mips64el-linux" then stdenvLinux else - if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else - if stdenvType == "i686-mingw" then stdenvMinGW else - if stdenvType == "x86_64-darwin" then stdenvNix else - if stdenvType == "x86_64-solaris" then stdenvNix else + if system == "i686-linux" then stdenvLinux else + if system == "x86_64-linux" then stdenvLinux else + if system == "armv5tel-linux" then stdenvLinux else + if system == "armv6l-linux" then stdenvLinux else + if system == "armv7l-linux" then stdenvLinux else + if system == "mips64el-linux" then stdenvLinux else + if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else + if system == "x86_64-darwin" then stdenvNix else + if system == "x86_64-solaris" then stdenvNix else stdenvNative; } diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 6047ecf853c5..0d8355e89cc3 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -55,8 +55,6 @@ let propagatedUserEnvPkgs = [gcc] ++ lib.filter lib.isDerivation initialPath; - - __ignoreNulls = true; } // rec { @@ -103,6 +101,7 @@ let stdenv = result; system = result.system; userHook = config.stdenv.userHook or null; + __ignoreNulls = true; # Inputs built by the cross compiler. buildInputs = lib.optionals (crossConfig != null) (buildInputs ++ extraBuildInputs); diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index ce83b1f69610..c3b9033b49a6 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -103,6 +103,7 @@ fi # Execute the pre-hook. export SHELL=@shell@ +export CONFIG_SHELL="$SHELL" if [ -z "$shell" ]; then export shell=@shell@; fi runHook preHook @@ -120,6 +121,7 @@ fi # Ensure that the given directories exists. ensureDir() { + echo "warning: ‘ensureDir’ is deprecated; use ‘mkdir’ instead" >&2 local dir for dir in "$@"; do if ! [ -x "$dir" ]; then mkdir -p "$dir"; fi diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix index 9ea63a46be3e..3abffc469269 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix @@ -116,7 +116,7 @@ rec { buildCommand = '' set -x - ensureDir $out/bin $out/lib $out/libexec + mkdir -p $out/bin $out/lib $out/libexec # Copy what we need of Glibc. cp -d ${glibc}/lib/ld-*.so* $out/lib diff --git a/pkgs/stdenv/mingw/builder.sh b/pkgs/stdenv/mingw/builder.sh deleted file mode 100755 index 5a9f9749a4f8..000000000000 --- a/pkgs/stdenv/mingw/builder.sh +++ /dev/null @@ -1,18 +0,0 @@ -# the other stdenv could change the SHELL variable, -# so we have to remember its value. -origShell=$SHELL -origGcc=$GCC - -source $STDENV/setup - -mkdir $OUT - -SHELL=$origShell -GCC=$origGcc - -export NIX_BUILD_TOP=$(pwd) - -substitute "$SETUP" "$OUT/setup" \ - --subst-var INITIALPATH \ - --subst-var GCC \ - --subst-var SHELL diff --git a/pkgs/stdenv/mingw/cygpath/builder.sh b/pkgs/stdenv/mingw/cygpath/builder.sh deleted file mode 100755 index 3061900ee0c9..000000000000 --- a/pkgs/stdenv/mingw/cygpath/builder.sh +++ /dev/null @@ -1,5 +0,0 @@ -source $stdenv/setup - -mkdir $out -result="$(cygpath --mixed $path)" -echo "\"$result\"" > $out/default.nix diff --git a/pkgs/stdenv/mingw/cygpath/default.nix b/pkgs/stdenv/mingw/cygpath/default.nix deleted file mode 100644 index a0554c1d41de..000000000000 --- a/pkgs/stdenv/mingw/cygpath/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{stdenv}: path : - -import ( - stdenv.mkDerivation { - name = "cygpath"; - builder = ./builder.sh; - inherit path; - } -) diff --git a/pkgs/stdenv/mingw/default-builder.sh b/pkgs/stdenv/mingw/default-builder.sh deleted file mode 100755 index 422699971ed6..000000000000 --- a/pkgs/stdenv/mingw/default-builder.sh +++ /dev/null @@ -1,2 +0,0 @@ -source $STDENV/setup -genericBuild diff --git a/pkgs/stdenv/mingw/default.nix b/pkgs/stdenv/mingw/default.nix deleted file mode 100644 index 947db5f10a89..000000000000 --- a/pkgs/stdenv/mingw/default.nix +++ /dev/null @@ -1,233 +0,0 @@ -{system} : - -let { - body = - stdenvFinal; - - /** - * Initial standard environment based on native Cygwin tools. - * GCC is not required. - * Required (approx): bash, mkdir, gnu tar, curl. - */ - stdenvInit1 = - import ./simple-stdenv { - inherit system; - name = "stdenv-init1-mingw"; - shell = "/bin/bash.exe"; - path = ["/usr/bin" "/bin" "/usr/local/bin"]; - }; - - /** - * Initial standard environment based on MSYS tools. - */ - stdenvInit2 = - import ./simple-stdenv { - inherit system; - name = "stdenv-init2-mingw"; - shell = msysShell; - path = [(msys + "/bin")]; - }; - - /** - * Initial standard environment with the most basic MinGW packages. - */ - stdenvInit3 = - (import ./simple-stdenv) { - inherit system; - name = "stdenv-init3-mingw"; - shell = msysShell; - path = [ - (make + "/bin") - (tar + "/bin") - (binutils + "/bin") - (gccFull + "/bin") - (mingwRuntimeBin + "/bin") - (w32apiBin + "/bin") - (msys + "/bin") - ]; - - extraEnv = { - C_INCLUDE_PATH = mingwRuntimeBin + "/include" + ":" + w32apiBin + "/include"; - LIBRARY_PATH = mingwRuntimeBin + "/lib" + ":" + w32apiBin + "/lib"; - }; - }; - - /** - * Final standard environment, based on generic stdenv. - * It would be better to make the generic stdenv usable on - * MINGW (i.e. make all environment variables CAPS). - */ - stdenvFinal = - let { - body = - stdenv // mkDerivationFun // { - inherit fetchurl; - overrides.pkgconfig = pkgconfigBin; - }; - - shell = - msys + "/bin/sh.exe"; - - stdenv = - stdenvInit2.mkDerivation { - name = "stdenv-mingw"; - builder = ./builder.sh; - setup = ./setup.sh; - - /** - * binutils is on the path because it contains dlltool, which - * is invoked on the PATH by some packages. - */ - initialPath = [make tar binutils gccFull mingwRuntimeSrc w32apiSrc msys]; - gcc = gccFull; - shell = msysShell; - inherit curl; - isDarwin = false; - isMinGW = true; - }; - - mkDerivationFun = { - mkDerivation = attrs: - (derivation ( - (removeAttrs attrs ["meta"]) - // - { - builder = - if attrs ? realBuilder then attrs.realBuilder else shell; - args = - if attrs ? args then - attrs.args - else - ["-e"] ++ ( - if attrs ? builder then - [./fix-builder.sh attrs.builder] - else - [./fix-builder.sh ./default-builder.sh] - ); - inherit stdenv system; - C_INCLUDE_PATH = mingwRuntimeSrc + "/include" + ":" + w32apiSrc + "/include"; - CPLUS_INCLUDE_PATH = mingwRuntimeSrc + "/include" + ":" + w32apiSrc + "/include"; - LIBRARY_PATH = mingwRuntimeSrc + "/lib" + ":" + w32apiSrc + "/lib"; - }) - ) - // { meta = if attrs ? meta then attrs.meta else {}; }; - }; - }; - - /** - * fetchurl - */ - fetchurlInit1 = - import ../../build-support/fetchurl { - stdenv = stdenvInit1; - curl = - (import ./pkgs).curl { - stdenv = stdenvInit1; - }; - }; - - cygpath = - import ./cygpath { - stdenv = stdenvInit1; - }; - - /** - * Hack: we need the cygpath of the Cygwin chmod. - */ - fetchurl = - import ./fetchurl { - stdenv = stdenvInit2; - curl = curl + "/bin/curl.exe"; - chmod = cygpath "/usr/bin/chmod"; - }; - - /** - * MSYS, installed using stdenvInit1 - * - * @todo Maybe remove the make of msys? - */ - msys = - stdenvInit1.mkDerivation { - name = "msys-1.0.11"; - builder = ./msys-builder.sh; - src = - fetchurlInit1 { - url = ftp://ftp.strategoxt.org/pub/mingw/msys-1.0.11.tar.gz; - sha256 = "08qp4jk279i66q6ngksg58fx3cfv1r6p5n394h2kfrs56qs9zvz4"; - }; - }; - - msysShell = - msys + "/bin/sh.exe"; - - /** - * Binary packages, based on stdenvInit2 - */ - curl = - (import ./pkgs).curl { - stdenv = stdenvInit2; - }; - - gccFull = - (import ./pkgs).gccFull { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - make = - (import ./pkgs).make { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - tar = - (import ./pkgs).tar { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - binutils = - (import ./pkgs).binutils { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - mingwRuntimeBin = - (import ./pkgs).mingwRuntimeBin { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - w32apiBin = - (import ./pkgs).w32apiBin { - stdenv = stdenvInit2; - inherit fetchurl; - }; - - pkgconfigBin = - (import ./pkgs).pkgconfigBin { - stdenv = stdenvInit3; - inherit fetchurl; - }; - - /** - * Source packages, based on stdenvInit3 - */ - mingwRuntimeSrc = - (import ./pkgs).mingwRuntimeSrc { - stdenv = stdenvInit3; - inherit fetchurl; - }; - - w32apiSrc = - (import ./pkgs).w32apiSrc { - stdenv = stdenvInit3; - inherit fetchurl; - }; - - replace = - (import ./pkgs).replace { - stdenv = stdenvInit3; - inherit fetchurl; - }; -} diff --git a/pkgs/stdenv/mingw/fetchurl/builder.sh b/pkgs/stdenv/mingw/fetchurl/builder.sh deleted file mode 100755 index e9f2669a097f..000000000000 --- a/pkgs/stdenv/mingw/fetchurl/builder.sh +++ /dev/null @@ -1,34 +0,0 @@ -if test -z "$out"; then - stdenv="$STDENV" - url="$URL" - id="$ID" - outputHashAlgo="$OUTPUTHASHALGO" - outputHash="$OUTPUTHASH" - chmod=$CHMOD - curl=$CURL -fi - -source $stdenv/setup - -if test -z "$out"; then - out="$OUT" -fi - -header "downloading $out from $url" -$curl --fail --location --max-redirs 20 "$url" > "$out" - -if test "$NIX_OUTPUT_CHECKED" != "1"; then - if test "$outputHashAlgo" != "md5"; then - echo "hashes other than md5 are unsupported in Nix <= 0.7, upgrade to Nix 0.8" - exit 1 - fi - actual=$(md5sum -b "$out" | cut -c1-32) - if test "$actual" != "$id"; then - echo "hash is $actual, expected $id" - exit 1 - fi -fi - -$chmod a-x $out - -stopNest diff --git a/pkgs/stdenv/mingw/fetchurl/default.nix b/pkgs/stdenv/mingw/fetchurl/default.nix deleted file mode 100644 index b4d278b2686f..000000000000 --- a/pkgs/stdenv/mingw/fetchurl/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{stdenv, curl, chmod}: - -{url, outputHash ? "", outputHashAlgo ? "", md5 ? "", sha1 ? "", sha256 ? ""}: - -assert (outputHash != "" && outputHashAlgo != "") - || md5 != "" || sha1 != "" || sha256 != ""; - -stdenv.mkDerivation { - name = baseNameOf (toString url); - builder = ./builder.sh; - - # Compatibility with Nix <= 0.7. - id = md5; - - # New-style output content requirements. - outputHashAlgo = if outputHashAlgo != "" then outputHashAlgo else - if sha256 != "" then "sha256" else if sha1 != "" then "sha1" else "md5"; - outputHash = if outputHash != "" then outputHash else - if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5; - - inherit url chmod curl; - - # We borrow these environment variables from the caller to allow - # easy proxy configuration. This is impure, but a fixed-output - # derivation like fetchurl is allowed to do so since its result is - # by definition pure. - impureEnvVars = ["http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"]; -} diff --git a/pkgs/stdenv/mingw/fix-builder.sh b/pkgs/stdenv/mingw/fix-builder.sh deleted file mode 100755 index 09d933bd17b2..000000000000 --- a/pkgs/stdenv/mingw/fix-builder.sh +++ /dev/null @@ -1,23 +0,0 @@ -# Workaround MSYS shell problem - -if test -z "$out"; then - buildInputs=$BUILDINPUTS - buildUtilities=$BUILDUTILITIES - configureFlags=$CONFIGUREFLAGS - doCheck=$DOCHECK - doCoverageAnalysis=$DOCOVERAGEANALYSIS - dontInstall=$DONTINSTALL - dontLogThroughTee=$DONTLOGTHROUGHTEE - lcov=$LCOV - logPhases=$LOGPHASES - out=$OUT - patches=$PATCHES - propagatedBuildInputs=$PROPAGATEDBUILDINPUTS - stdenv=$STDENV - src=$SRC - srcs=$SRCS - succeedOnFailure=$SUCCEEDONFAILURE - system=$SYSTEM -fi - -source $@ diff --git a/pkgs/stdenv/mingw/msys-builder.sh b/pkgs/stdenv/mingw/msys-builder.sh deleted file mode 100644 index a801e7fbcab1..000000000000 --- a/pkgs/stdenv/mingw/msys-builder.sh +++ /dev/null @@ -1,15 +0,0 @@ -source $stdenv/setup - -mkdir $out -cd $out -tar zxvf $src - -# Make the Nix store available to MSYS. -# Hack: we are assuming that the stdenv is based on Cygwin. - -nixdir="$(cygpath --windows /nix)" -mkdir $out/nix -cat > $out/etc/fstab < "$NIX_BUILD_TOP/.times" - local -a times=($(cat "$NIX_BUILD_TOP/.times")) - # Print the following statistics: - # - user time for the shell - # - system time for the shell - # - user time for all child processes - # - system time for all child processes - echo "build time elapsed: " ${times[*]} - fi - - if test $exitCode != 0; then - runHook failureHook - - # If the builder had a non-zero exit code and - # $succeedOnFailure is set, create the file - # `$out/nix-support/failed' to signal failure, and exit - # normally. Otherwise, return the original exit code. - if test -n "$succeedOnFailure"; then - echo "build failed with exit code $exitCode (ignored)" - mkdir -p "$out/nix-support" - echo -n $exitCode > "$out/nix-support/failed" - exit 0 - fi - - else - runHook exitHook - fi - - exit $exitCode -} - -trap "exitHandler" EXIT - - -###################################################################### -# Helper functions that might be useful in setup hooks. - - -addToSearchPathWithCustomDelimiter() { - local delimiter=$1 - local varName=$2 - local dir=$3 - if [ -d "$dir" ]; then - eval export ${varName}=${!varName}${!varName:+$delimiter}${dir} - fi -} - -PATH_DELIMITER=':' - -addToSearchPath() { - addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" -} - - -###################################################################### -# Initialisation. - -set -e - -test -z $NIX_GCC && NIX_GCC=@GCC@ - - -# Wildcard expansions that don't match should expand to an empty list. -# This ensures that, for instance, "for i in *; do ...; done" does the -# right thing. -shopt -s nullglob - - -# Set up the initial path. -PATH= -for i in $NIX_GCC @INITIALPATH@; do - if test "$i" = /; then i=; fi - addToSearchPath PATH $i/bin -done - -# Hack: the /tmp of Cygwin is different from the /tmp in MSYS -if test -d $NIX_BUILD_TOP; then - echo "Nix build top already exists. Strange." -else - mkdir $NIX_BUILD_TOP - cd $NIX_BUILD_TOP -fi - -if test "$NIX_DEBUG" = "1"; then - echo "initial path: $PATH" -fi - - -# Execute the pre-hook. -export SHELL=@SHELL@ -if test -z "$shell"; then - export shell=@SHELL@ -fi - -# Check that the pre-hook initialised SHELL. -if test -z "$SHELL"; then echo "SHELL not set"; exit 1; fi - - -# Hack: run gcc's setup hook. -envHooks=() -if test -f $NIX_GCC/nix-support/setup-hook; then - source $NIX_GCC/nix-support/setup-hook -fi - - -# Ensure that the given directories exists. -ensureDir() { - local dir - for dir in "$@"; do - if ! test -x "$dir"; then mkdir -p "$dir"; fi - done -} - -installBin() { - mkdir -p $out/bin - cp "$@" $out/bin -} - - -# Allow the caller to augment buildInputs (it's not always possible to -# do this before the call to setup.sh, since the PATH is empty at that -# point; here we have a basic Unix environment). -runHook addInputsHook - - -# Recursively find all build inputs. -findInputs() { - local pkg=$1 - - case $pkgs in - *\ $pkg\ *) - return 0 - ;; - esac - - pkgs="$pkgs $pkg " - - if test -f $pkg/nix-support/setup-hook; then - source $pkg/nix-support/setup-hook - fi - - if test -f $pkg/nix-support/propagated-build-inputs; then - for i in $(cat $pkg/nix-support/propagated-build-inputs); do - findInputs $i - done - fi -} - -pkgs="" -for i in $buildInputs $propagatedBuildInputs; do - findInputs $i -done - - -# Set the relevant environment variables to point to the build inputs -# found above. -addToEnv() { - local pkg=$1 - - if test -d $1/bin; then - addToSearchPath _PATH $1/bin - fi - - # Run the package-specific hooks set by the setup-hook scripts. - for i in "${envHooks[@]}"; do - $i $pkg - done -} - -for i in $pkgs; do - addToEnv $i -done - - -# Add the output as an rpath. -if test "$NIX_NO_SELF_RPATH" != "1"; then - export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS" - if test -n "$NIX_LIB64_IN_SELF_RPATH"; then - export NIX_LDFLAGS="-rpath $out/lib64 $NIX_LDFLAGS" - fi -fi - - -# Set the TZ (timezone) environment variable, otherwise commands like -# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must -# be set--see zic manual page 2004'). -export TZ=UTC - - -# Set the prefix. This is generally $out, but it can be overriden, -# for instance if we just want to perform a test build/install to a -# temporary location and write a build report to $out. -if test -z "$prefix"; then - prefix="$out"; -fi - -if test "$useTempPrefix" = "1"; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; -fi - - -PATH=$_PATH${_PATH:+:}$PATH -if test "$NIX_DEBUG" = "1"; then - echo "final path: $PATH" -fi - - -# Make GNU Make produce nested output. -export NIX_INDENT_MAKE=1 - - -###################################################################### -# Misc. helper functions. - - -stripDirs() { - local dirs="$1" - local stripFlags="$2" - local dirsNew= - - for d in ${dirs}; do - if test -d "$prefix/$d"; then - dirsNew="${dirsNew} $prefix/$d " - fi - done - dirs=${dirsNew} - - if test -n "${dirs}"; then - header "stripping (with flags $stripFlags) in $dirs" - find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $stripFlags || true - stopNest - fi -} - - -###################################################################### -# Textual substitution functions. - - -substitute() { - local input="$1" - local output="$2" - - local -a params=("$@") - local -a args=() - - local n p pattern replacement varName - - for ((n = 2; n < ${#params[*]}; n += 1)); do - p=${params[$n]} - - if test "$p" = "--replace"; then - pattern="${params[$((n + 1))]}" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - if test "$p" = "--subst-var"; then - varName="${params[$((n + 1))]}" - pattern="@$varName@" - replacement="${!varName}" - n=$((n + 1)) - fi - - if test "$p" = "--subst-var-by"; then - pattern="@${params[$((n + 1))]}@" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - if test ${#args[@]} != 0; then - args[${#args[@]}]="-a" - fi - args[${#args[@]}]="$pattern" - args[${#args[@]}]="$replacement" - done - - replace-literal -e -s -- "${args[@]}" < "$input" > "$output".tmp - if test -x "$output"; then - chmod +x "$output".tmp - fi - mv -f "$output".tmp "$output" -} - - -substituteInPlace() { - local fileName="$1" - shift - substitute "$fileName" "$fileName" "$@" -} - - -substituteAll() { - local input="$1" - local output="$2" - - # Select all environment variables that start with a lowercase character. - for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do - if test "$NIX_DEBUG" = "1"; then - echo "$envVar -> ${!envVar}" - fi - args="$args --subst-var $envVar" - done - - substitute "$input" "$output" $args -} - - -###################################################################### -# What follows is the generic builder. - - -nestingLevel=0 - -startNest() { - nestingLevel=$(($nestingLevel + 1)) - echo -en "\e[$1p" -} - -stopNest() { - nestingLevel=$(($nestingLevel - 1)) - echo -en "\e[q" -} - -header() { - startNest "$2" - echo "$1" -} - -# Make sure that even when we exit abnormally, the original nesting -# level is properly restored. -closeNest() { - while test $nestingLevel -gt 0; do - stopNest - done -} - - -# This function is useful for debugging broken Nix builds. It dumps -# all environment variables to a file `env-vars' in the build -# directory. If the build fails and the `-K' option is used, you can -# then go to the build directory and source in `env-vars' to reproduce -# the environment used for building. -dumpVars() { - echo "Dumping env-vars to $NIX_BUILD_TOP/env-vars" - if test "$noDumpEnvVars" != "1"; then - export > "$NIX_BUILD_TOP/env-vars" - fi -} - - -# Utility function: return the base name of the given path, with the -# prefix `HASH-' removed, if present. -stripHash() { - strippedName=$(basename $1); - if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then - strippedName=$(echo "$strippedName" | cut -c34-) - fi -} - - -unpackFile() { - curSrc="$1" - local cmd - - header "unpacking source archive $curSrc" 3 - - case "$curSrc" in - *.tar) - tar xvf $curSrc - ;; - *.tar.gz | *.tgz | *.tar.Z) - gzip -d < $curSrc | tar xvf - - ;; - *.tar.bz2 | *.tbz2) - bzip2 -d < $curSrc | tar xvf - - ;; - *.zip) - unzip $curSrc - ;; - *) - if test -d "$curSrc"; then - stripHash $curSrc - cp -prvd $curSrc $strippedName - else - if test -z "$unpackCmd"; then - echo "source archive $curSrc has unknown type" - exit 1 - fi - runHook unpackCmd - fi - ;; - esac - - stopNest -} - - -unpackPhase() { - runHook preUnpack - - if test -z "$srcs"; then - if test -z "$src"; then - echo 'variable $src or $srcs should point to the source' - exit 1 - fi - srcs="$src" - fi - - # To determine the source directory created by unpacking the - # source archives, we record the contents of the current - # directory, then look below which directory got added. Yeah, - # it's rather hacky. - local dirsBefore="" - for i in *; do - if test -d "$i"; then - dirsBefore="$dirsBefore $i " - fi - done - - # Unpack all source archives. - for i in $srcs; do - unpackFile $i - done - - # Find the source directory. - if test -n "$setSourceRoot"; then - runHook setSourceRoot - elif test -z "$sourceRoot"; then - sourceRoot= - for i in *; do - if test -d "$i"; then - case $dirsBefore in - *\ $i\ *) - ;; - *) - if test -n "$sourceRoot"; then - echo "unpacker produced multiple directories" - exit 1 - fi - sourceRoot="$i" - ;; - esac - fi - done - fi - - if test -z "$sourceRoot"; then - echo "unpacker appears to have produced no directories" - exit 1 - fi - - echo "source root is $sourceRoot" - - # By default, add write permission to the sources. This is often - # necessary when sources have been copied from other store - # locations. - if test "$dontMakeSourcesWritable" != 1; then - chmod -R u+w "$sourceRoot" - fi - - runHook postUnpack -} - - -patchPhase() { - runHook prePatch - - for i in $patches; do - header "applying patch $i" 3 - local uncompress=cat - case $i in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - esac - $uncompress < $i | patch ${patchFlags:--p1} - stopNest - done - - runHook postPatch -} - - -configurePhase() { - runHook preConfigure - - if test -z "$configureScript"; then - configureScript=./configure - if ! test -x $configureScript; then - echo "no configure script, doing nothing" - return - fi - fi - - if test -z "$dontAddPrefix"; then - configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" - fi - - # Add --disable-dependency-tracking to speed up some builds. - if test -z "$dontAddDisableDepTrack"; then - if grep -q dependency-tracking $configureScript; then - configureFlags="--disable-dependency-tracking $configureFlags" - fi - fi - - # By default, disable static builds. - if test -z "$dontDisableStatic"; then - if grep -q enable-static $configureScript; then - configureFlags="--disable-static $configureFlags" - fi - fi - - echo "configure flags: $configureFlags ${configureFlagsArray[@]}" - $configureScript $configureFlags "${configureFlagsArray[@]}" - - runHook postConfigure -} - - -buildPhase() { - runHook preBuild - - if test -z "$makeFlags" && ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then - echo "no Makefile, doing nothing" - return - fi - - echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" - make ${makefile:+-f $makefile} \ - $makeFlags "${makeFlagsArray[@]}" \ - $buildFlags "${buildFlagsArray[@]}" - - runHook postBuild -} - - -checkPhase() { - runHook preCheck - - echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" - make ${makefile:+-f $makefile} \ - $makeFlags "${makeFlagsArray[@]}" \ - $checkFlags "${checkFlagsArray[@]}" ${checkTarget:-check} - - runHook postCheck -} - - -patchELF() { - # Patch all ELF executables and shared libraries. - header "patching ELF executables and libraries" - if test -e "$prefix"; then - find "$prefix" \( \ - \( -type f -a -name "*.so*" \) -o \ - \( -type f -a -perm +0100 \) \ - \) -print -exec patchelf --shrink-rpath {} \; - fi - stopNest -} - - -patchShebangs() { - # Rewrite all script interpreter file names (`#! /path') under the - # specified directory tree to paths found in $PATH. E.g., - # /bin/sh will be rewritten to /nix/store/-some-bash/bin/sh. - # Interpreters that are already in the store are left untouched. - header "patching script interpreter paths" - local dir="$1" - local f - for f in $(find "$dir" -type f -perm +0100); do - local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f") - if test -n "$oldPath" -a "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE"; then - local newPath=$(type -P $(basename $oldPath) || true) - if test -n "$newPath" -a "$newPath" != "$oldPath"; then - echo "$f: interpreter changed from $oldPath to $newPath" - sed -i -e "1 s,$oldPath,$newPath," "$f" - fi - fi - done - stopNest -} - - -installPhase() { - runHook preInstall - - mkdir -p "$prefix" - - installTargets=${installTargets:-install} - echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" - make ${makefile:+-f $makefile} $installTargets \ - $makeFlags "${makeFlagsArray[@]}" \ - $installFlags "${installFlagsArray[@]}" - - runHook postInstall -} - - -# The fixup phase performs generic, package-independent, Nix-related -# stuff, like running patchelf and setting the -# propagated-build-inputs. It should rarely be overriden. -fixupPhase() { - runHook preFixup - - # Put man/doc/info under $out/share. - forceShare=${forceShare:=man doc info} - if test -n "$forceShare"; then - for d in $forceShare; do - if test -d "$prefix/$d"; then - if test -d "$prefix/share/$d"; then - echo "both $d/ and share/$d/ exists!" - else - echo "fixing location of $d/ subdirectory" - mkdir -p $prefix/share - if test -w $prefix/share; then - mv -v $prefix/$d $prefix/share - ln -sv $prefix/share/$d $prefix/$d - fi - fi - fi - done; - fi - - # TODO: strip _only_ ELF executables, and return || fail here... - if test -z "$dontStrip"; then - stripDebugList=${stripDebugList:-lib lib64 libexec bin sbin} - if test -n "$stripDebugList"; then - stripDirs "$stripDebugList" "${stripDebugFlags:--S}" - fi - - stripAllList=${stripAllList:-} - if test -n "$stripAllList"; then - stripDirs "$stripAllList" "${stripAllFlags:--s}" - fi - fi - - if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then - patchELF "$prefix" - fi - - if test -z "$dontPatchShebangs"; then - patchShebangs "$prefix" - fi - - if test -n "$propagatedBuildInputs"; then - mkdir -p "$out/nix-support" - echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" - fi - - if test -n "$setupHook"; then - mkdir -p "$out/nix-support" - substituteAll "$setupHook" "$out/nix-support/setup-hook" - fi - - runHook postFixup -} - - -distPhase() { - runHook preDist - - echo "dist flags: $distFlags ${distFlagsArray[@]}" - make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" ${distTarget:-dist} - - if test "$dontCopyDist" != 1; then - mkdir -p "$out/tarballs" - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - cp -pvd ${tarballs:-*.tar.gz} $out/tarballs - fi - - runHook postDist -} - - -showPhaseHeader() { - local phase="$1" - case $phase in - unpackPhase) header "unpacking sources";; - patchPhase) header "patching sources";; - configurePhase) header "configuring";; - buildPhase) header "building";; - checkPhase) header "running tests";; - installPhase) header "installing";; - fixupPhase) header "post-installation fixup";; - *) header "$phase";; - esac -} - - -genericBuild() { - header "building $out" - - if test -n "$buildCommand"; then - eval "$buildCommand" - return - fi - - if test -z "$phases"; then - phases="$prePhases unpackPhase patchPhase $preConfigurePhases \ - configurePhase $preBuildPhases buildPhase checkPhase \ - $preInstallPhases installPhase $preFixupPhases fixupPhase \ - $preDistPhases distPhase $postPhases"; - fi - - for curPhase in $phases; do - if test "$curPhase" = buildPhase -a -n "$dontBuild"; then continue; fi - if test "$curPhase" = checkPhase -a -z "$doCheck"; then continue; fi - if test "$curPhase" = installPhase -a -n "$dontInstall"; then continue; fi - if test "$curPhase" = fixupPhase -a -n "$dontFixup"; then continue; fi - if test "$curPhase" = distPhase -a -z "$doDist"; then continue; fi - - showPhaseHeader "$curPhase" - dumpVars - - # Evaluate the variable named $curPhase if it exists, otherwise the - # function named $curPhase. - eval "${!curPhase:-$curPhase}" - - if test "$curPhase" = unpackPhase; then - cd "${sourceRoot:-.}" - fi - - stopNest - done - - stopNest -} - - - - -dumpVars diff --git a/pkgs/stdenv/mingw/simple-stdenv/builder.sh b/pkgs/stdenv/mingw/simple-stdenv/builder.sh deleted file mode 100644 index 0cbc13e4fab3..000000000000 --- a/pkgs/stdenv/mingw/simple-stdenv/builder.sh +++ /dev/null @@ -1,80 +0,0 @@ -if test -z "$out"; then - out="$OUT" - initialPath="$INITIALPATH" - shell="$SHELL" -fi - -setupPath= -for i in $initialPath; do - setupPath=$setupPath${setupPath:+:}$i -done - -PATH=$setupPath -export PATH - -mkdir $out - -cat > $out/setup <> \$sedScript - sedArgs=("\${sedArgs[@]}" "-e" ) - fi - - if test "\$p" = "--subst-var"; then - varName=\${params[\$((n + 1))]} - n=\$((n + 1)) - echo "s^@\${varName}@^\${!varName}^g" >> \$sedScript - fi - - if test "\$p" = "--subst-var-by"; then - varName=\${params[\$((n + 1))]} - replacement=\${params[\$((n + 2))]} - n=\$((n + 2)) - echo "s^@\${varName}@^\$replacement^g" >> \$sedScript - fi - - done - - sed -f \$sedScript < "\$input" > "\$output".tmp - if test -x "\$output"; then - chmod +x "\$output".tmp - fi - mv -f "\$output".tmp "\$output" -} -EOF - -chmod +x $out/setup diff --git a/pkgs/stdenv/mingw/simple-stdenv/default.nix b/pkgs/stdenv/mingw/simple-stdenv/default.nix deleted file mode 100644 index 379cda0a598b..000000000000 --- a/pkgs/stdenv/mingw/simple-stdenv/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ system -, name -, shell -, path -, extraEnv ? {} -, extraShellOptions ? [] -}: - -let { - body = - derivation ({ - inherit system name; - initialPath = path; - builder = shell; - args = extraShellOptions ++ ["-e" ./builder.sh]; - } // extraEnv) - - // { - mkDerivation = attrs: - derivation ((removeAttrs attrs ["meta"]) // { - builder = shell; - args = extraShellOptions ++ ["-e" ] ++ [attrs.builder]; # (if attrs ? builder then [attrs.builder] else [ ../fix-builder.sh ../default-builder.sh] ) ; - stdenv = body; - system = body.system; - } - - // extraEnv); - - inherit shell; - }; -} diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 78e5b84a841e..a496a819a6df 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -7,16 +7,18 @@ import ../generic rec { '' export NIX_ENFORCE_PURITY=1 export NIX_IGNORE_LD_THROUGH_GCC=1 - - if [ "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-darwin" ]; then - export NIX_ENFORCE_PURITY= - export NIX_DONT_SET_RPATH=1 - export NIX_NO_SELF_RPATH=1 - dontFixLibtool=1 - stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" - xargsFlags=" " - fi - ''; + '' + (if stdenv.isDarwin then '' + export NIX_ENFORCE_PURITY= + export NIX_DONT_SET_RPATH=1 + export NIX_NO_SELF_RPATH=1 + dontFixLibtool=1 + stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" + xargsFlags=" " + export MACOSX_DEPLOYMENT_TARGET=10.6 + export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true) + export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" + export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" + '' else ""); initialPath = (import ../common-path.nix) {pkgs = pkgs;}; diff --git a/pkgs/tools/backup/store-backup/default.nix b/pkgs/tools/backup/store-backup/default.nix index e9b98fec7100..c986adeafdcc 100644 --- a/pkgs/tools/backup/store-backup/default.nix +++ b/pkgs/tools/backup/store-backup/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { }; installPhase = '' - ensureDir $out/scripts + mkdir -p $out/scripts mv * $out mv $out/_ATTENTION_ $out/doc mv $out/{correct.sh,cron-storebackup} $out/scripts diff --git a/pkgs/tools/filesystems/unionfs-fuse/default.nix b/pkgs/tools/filesystems/unionfs-fuse/default.nix index bff5aaf242ba..23340f88376b 100644 --- a/pkgs/tools/filesystems/unionfs-fuse/default.nix +++ b/pkgs/tools/filesystems/unionfs-fuse/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # This must be done in preConfigure because the build process removes # helper from the source directory during the build. preConfigure = '' - ensureDir $out/sbin + mkdir -p $out/sbin cp -a mount.unionfs $out/sbin/mount.unionfs-fuse substituteInPlace $out/sbin/mount.unionfs-fuse --replace mount.fuse ${fuse}/sbin/mount.fuse substituteInPlace $out/sbin/mount.unionfs-fuse --replace unionfs $out/bin/unionfs diff --git a/pkgs/tools/misc/debootstrap/default.nix b/pkgs/tools/misc/debootstrap/default.nix index d37febcf506a..16b1858e91df 100644 --- a/pkgs/tools/misc/debootstrap/default.nix +++ b/pkgs/tools/misc/debootstrap/default.nix @@ -20,7 +20,7 @@ let ]; # TODO install man installPhase = '' - ensureDir $out/sbin + mkdir -p $out/sbin ls -l t=$out/sbin/MAKEDEV cp MAKEDEV $t @@ -78,7 +78,7 @@ stdenv.mkDerivation { functions d=$out/share/debootstrap - ensureDir $out/{share/debootstrap,bin} + mkdir -p $out/{share/debootstrap,bin} ${fakeroot}/bin/fakeroot -- make devices.tar.gz MAKEDEV=${makedev}/sbin/MAKEDEV @@ -94,7 +94,7 @@ stdenv.mkDerivation { EOF chmod +x $out/bin/debootstrap - ensureDir $out/man/man8 + mkdir -p $out/man/man8 mv debootstrap.8 $out/man/man8 ''; diff --git a/pkgs/tools/misc/logstash/default.nix b/pkgs/tools/misc/logstash/default.nix index 15c99fff54c8..7f43ccdb6258 100644 --- a/pkgs/tools/misc/logstash/default.nix +++ b/pkgs/tools/misc/logstash/default.nix @@ -15,11 +15,11 @@ stdenv.mkDerivation rec { dontPatchShebangs = true; installPhase = '' - ensureDir $out/bin - ensureDir $out/vendor - ensureDir $out/lib - ensureDir $out/locales - ensureDir $out/patterns + mkdir -p $out/bin + mkdir -p $out/vendor + mkdir -p $out/lib + mkdir -p $out/locales + mkdir -p $out/patterns cp -a bin $out cp -a vendor $out cp -a lib $out diff --git a/pkgs/tools/misc/megacli/default.nix b/pkgs/tools/misc/megacli/default.nix index 82650999b730..7fd6ce966d6d 100644 --- a/pkgs/tools/misc/megacli/default.nix +++ b/pkgs/tools/misc/megacli/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { [ stdenv.gcc.gcc stdenv.gcc.libc ncurses ]; buildCommand = '' - ensureDir $out/bin + mkdir -p $out/bin cd $out unzip ${src} rpm2cpio linux/MegaCli-8.07.07-1.noarch.rpm | cpio -idmv diff --git a/pkgs/tools/misc/multitail/default.nix b/pkgs/tools/misc/multitail/default.nix index a81df014f0d1..f3f90143bda9 100644 --- a/pkgs/tools/misc/multitail/default.nix +++ b/pkgs/tools/misc/multitail/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { makeFlags = stdenv.lib.optionalString stdenv.isDarwin "-f makefile.macosx"; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp multitail $out/bin ''; diff --git a/pkgs/tools/misc/picocom/default.nix b/pkgs/tools/misc/picocom/default.nix index 6b4a0e3018fe..303fdb3dbe07 100644 --- a/pkgs/tools/misc/picocom/default.nix +++ b/pkgs/tools/misc/picocom/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; installPhase = '' - ensureDir $out/bin $out/share/man/man8 + mkdir -p $out/bin $out/share/man/man8 cp picocom $out/bin cp picocom.8 $out/share/man/man8 diff --git a/pkgs/tools/misc/rkflashtool/default.nix b/pkgs/tools/misc/rkflashtool/default.nix index c985183c1c00..6b74f9ac5d34 100644 --- a/pkgs/tools/misc/rkflashtool/default.nix +++ b/pkgs/tools/misc/rkflashtool/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp rkunpack rkcrc rkflashtool $out/bin ''; diff --git a/pkgs/tools/misc/sl/default.nix b/pkgs/tools/misc/sl/default.nix index 7880b3e883f3..a2dab4e0eb80 100644 --- a/pkgs/tools/misc/sl/default.nix +++ b/pkgs/tools/misc/sl/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { buildInputs = [ ncurses ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp sl $out/bin ''; diff --git a/pkgs/tools/networking/connect/default.nix b/pkgs/tools/networking/connect/default.nix index c6291efad312..8723c53c3229 100644 --- a/pkgs/tools/networking/connect/default.nix +++ b/pkgs/tools/networking/connect/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; buildPhase = '' - ensureDir $out/bin + mkdir -p $out/bin gcc -o $out/bin/connect connect.c ''; diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix index 35cd66761329..d7d867cc8df5 100644 --- a/pkgs/tools/networking/filegive/default.nix +++ b/pkgs/tools/networking/filegive/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp filegive $out/bin ''; diff --git a/pkgs/tools/networking/reaver-wps/default.nix b/pkgs/tools/networking/reaver-wps/default.nix index 0c290db78a77..afce95fbd449 100644 --- a/pkgs/tools/networking/reaver-wps/default.nix +++ b/pkgs/tools/networking/reaver-wps/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; preInstall = '' - ensureDir $out/bin + mkdir -p $out/bin ''; meta = { diff --git a/pkgs/tools/networking/udptunnel/default.nix b/pkgs/tools/networking/udptunnel/default.nix index 36fdbfac7231..b12ce573d1c4 100644 --- a/pkgs/tools/networking/udptunnel/default.nix +++ b/pkgs/tools/networking/udptunnel/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; installPhase = '' - ensureDir $out/bin $out/share/udptunnel + mkdir -p $out/bin $out/share/udptunnel cp udptunnel $out/bin cp README COPYING* $out/share/udptunnel ''; diff --git a/pkgs/tools/security/fprot/default.nix b/pkgs/tools/security/fprot/default.nix index 2a8531a17954..b43ea402f6dc 100644 --- a/pkgs/tools/security/fprot/default.nix +++ b/pkgs/tools/security/fprot/default.nix @@ -11,10 +11,10 @@ stdenv.mkDerivation rec { }; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp fpscan $out/bin - ensureDir $out/opt/f-prot + mkdir -p $out/opt/f-prot cp fpupdate $out/opt/f-prot cp product.data.default $out/opt/f-prot/product.data cp license.key $out/opt/f-prot/ @@ -23,12 +23,12 @@ stdenv.mkDerivation rec { patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate - ensureDir $out/share/man/ - ensureDir $out/share/man/man1 + mkdir -p $out/share/man/ + mkdir -p $out/share/man/man1 cp doc/man/fpscan.1 $out/share/man/man1 - ensureDir $out/share/man/man5 + mkdir -p $out/share/man/man5 cp doc/man/f-prot.conf.5 $out/share/man/man5 - ensureDir $out/share/man/man8 + mkdir -p $out/share/man/man8 cp doc/man/fpupdate.8 $out/share/man/man8 ''; diff --git a/pkgs/tools/security/meo/default.nix b/pkgs/tools/security/meo/default.nix index 0a96dbadff75..be678b18dda0 100644 --- a/pkgs/tools/security/meo/default.nix +++ b/pkgs/tools/security/meo/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp tools/{meo,p11} $out/bin cp meo-gui/meo-gui $out/bin cp meo-gui/meo-gui $out/bin diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix index 7be7c79888ea..f220a46bddcf 100644 --- a/pkgs/tools/security/tor/torbrowser.nix +++ b/pkgs/tools/security/tor/torbrowser.nix @@ -45,8 +45,8 @@ in stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/share/tor-browser - ensureDir $out/bin + mkdir -p $out/share/tor-browser + mkdir -p $out/bin cp -R * $out/share/tor-browser cat > "$out/bin/tor-browser" << EOF diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index dc30c601750a..041dd96e1ca8 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp storebrowse $out/bin ''; diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix index e1c4734bbdaf..087a3212fc2e 100644 --- a/pkgs/tools/system/vboot_reference/default.nix +++ b/pkgs/tools/system/vboot_reference/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp build/cgpt/cgpt $out/bin cp build/utility/vbutil_kernel $out/bin cp build/utility/vbutil_key $out/bin diff --git a/pkgs/tools/text/enscript/default.nix b/pkgs/tools/text/enscript/default.nix index df49e5788eb5..fe11ec592463 100644 --- a/pkgs/tools/text/enscript/default.nix +++ b/pkgs/tools/text/enscript/default.nix @@ -8,6 +8,13 @@ stdenv.mkDerivation rec { sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd"; }; + preBuild = + '' + # Fix building on Darwin with GCC. + substituteInPlace compat/regex.c --replace \ + __private_extern__ '__attribute__ ((visibility ("hidden")))' + ''; + buildInputs = [ gettext ]; doCheck = true; diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index e8c5472d2cb8..8866888a7367 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -8,8 +8,6 @@ stdenv.mkDerivation rec { sha256 = "0hin2hswbbd6kd6i4zzvgciwpl5fba8d2s524z8y5qagyz3x010q"; }; - patches = []; - doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 buildInputs = [ libsigsegv ] @@ -20,6 +18,8 @@ stdenv.mkDerivation rec { # only darwin where reported, seems OK on non-chrooted Fedora (don't rebuild stdenv) ++ stdenv.lib.optional (!readlineSupport && stdenv.isDarwin) "--without-readline"; + postInstall = "rm $out/bin/gawk-*"; + meta = { homepage = http://www.gnu.org/software/gawk/; description = "GNU implementation of the Awk programming language"; diff --git a/pkgs/tools/typesetting/djvu2pdf/default.nix b/pkgs/tools/typesetting/djvu2pdf/default.nix index c7729ac676f8..5455df5f106e 100644 --- a/pkgs/tools/typesetting/djvu2pdf/default.nix +++ b/pkgs/tools/typesetting/djvu2pdf/default.nix @@ -13,9 +13,9 @@ stdenv.mkDerivation rec { propagatedUserEnvPkgs = [ djvulibre ghostscript ]; installPhase = '' - ensureDir $out/bin + mkdir -p $out/bin cp -p djvu2pdf $out/bin - ensureDir $out/man/man1 + mkdir -p $out/man/man1 cp -p djvu2pdf.1.gz $out/man/man1 ''; diff --git a/pkgs/tools/typesetting/tex/pgfplots/default.nix b/pkgs/tools/typesetting/tex/pgfplots/default.nix index bc47244a5fa8..67739350c6f6 100644 --- a/pkgs/tools/typesetting/tex/pgfplots/default.nix +++ b/pkgs/tools/typesetting/tex/pgfplots/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { buildPhase = "true"; installPhase = " - ensureDir $out/share/texmf-nix + mkdir -p $out/share/texmf-nix cp -prd * $out/share/texmf-nix "; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30f7acb93605..3e77a1231bf8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8,15 +8,6 @@ { # The system (e.g., `i686-linux') for which to build the packages. system ? builtins.currentSystem - # Usually, the system type uniquely determines the stdenv and thus - # how to build the packages. But on some platforms we have - # different stdenvs, leading to different ways to build the - # packages. For instance, on Windows we support both Cygwin and - # Mingw builds. In both cases, `system' is `i686-cygwin'. The - # attribute `stdenvType' is used to select the specific kind of - # stdenv to use, e.g., `i686-mingw'. -, stdenvType ? system - , # The standard environment to use. Only used for bootstrapping. If # null, the default standard environment is used. bootStdenv ? null @@ -137,7 +128,7 @@ let self_ = with self; helperFunctions // { # Make some arguments passed to all-packages.nix available - inherit system stdenvType platform; + inherit system platform; # Allow callPackage to fill in the pkgs argument inherit pkgs; @@ -214,7 +205,7 @@ let allStdenvs = import ../stdenv { - inherit system stdenvType platform config; + inherit system platform config; allPackages = args: import ./all-packages.nix ({ inherit config system; } // args); }; @@ -977,12 +968,7 @@ let encfs = callPackage ../tools/filesystems/encfs { }; - enscript = callPackage ../tools/text/enscript { - # fix syntax errors - stdenv = if stdenv.isDarwin - then clangStdenv - else stdenv; - }; + enscript = callPackage ../tools/text/enscript { }; ethtool = callPackage ../tools/misc/ethtool { }; @@ -4266,15 +4252,15 @@ let attr = callPackage ../development/libraries/attr { }; + at_spi2_core = callPackage ../development/libraries/at-spi2-core { }; + + at_spi2_atk = callPackage ../development/libraries/at-spi2-atk { }; + aqbanking = callPackage ../development/libraries/aqbanking { }; aubio = callPackage ../development/libraries/aubio { }; - audiofile = callPackage ../development/libraries/audiofile { - stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + audiofile = callPackage ../development/libraries/audiofile { }; axis = callPackage ../development/libraries/axis { }; @@ -4816,11 +4802,7 @@ let gtkmm; }; - glib = callPackage ../development/libraries/glib { - stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + glib = callPackage ../development/libraries/glib { }; glib-tested = glib.override { doCheck = true; }; # checked version separate to break cycles glibmm = callPackage ../development/libraries/glibmm { }; @@ -4853,9 +4835,7 @@ let cupsSupport = config.gtk2.cups or stdenv.isLinux; }; - gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { - inherit (gnome3) at_spi2_atk; - }; + gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { }; gtk = pkgs.gtk2; @@ -5284,11 +5264,7 @@ let librevisa = callPackage ../development/libraries/librevisa { }; - libsamplerate = callPackage ../development/libraries/libsamplerate { - stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + libsamplerate = callPackage ../development/libraries/libsamplerate { }; libspectre = callPackage ../development/libraries/libspectre { }; @@ -5483,11 +5459,7 @@ let # To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5 libsigsegv_25 = callPackage ../development/libraries/libsigsegv/2.5.nix { }; - libsndfile = callPackage ../development/libraries/libsndfile { - stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + libsndfile = callPackage ../development/libraries/libsndfile { }; libsodium = callPackage ../development/libraries/libsodium { }; @@ -5782,13 +5754,6 @@ let ncurses = callPackage ../development/libraries/ncurses { unicode = system != "i686-cygwin"; - stdenv = - # On Darwin, NCurses uses `-no-cpp-precomp', which is specific to - # Apple-GCC. Since NCurses is part of stdenv, always use - # `stdenvNative' to build it. - if stdenv.isDarwin - then allStdenvs.stdenvNative - else stdenv; }; neon = callPackage ../development/libraries/neon { @@ -6066,23 +6031,9 @@ let readline5 = callPackage ../development/libraries/readline/readline5.nix { }; - readline6 = callPackage ../development/libraries/readline/readline6.nix { - stdenv = - # On Darwin, Readline uses `-arch_only', which is specific to - # Apple-GCC. So give it what it expects. - if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + readline6 = callPackage ../development/libraries/readline/readline6.nix { }; - readline63 = callPackage ../development/libraries/readline/readline6.3.nix { - stdenv = - # On Darwin, Readline uses `-arch_only', which is specific to - # Apple-GCC. So give it what it expects. - if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + readline63 = callPackage ../development/libraries/readline/readline6.3.nix { }; librdf_raptor = callPackage ../development/libraries/librdf/raptor.nix { }; @@ -9788,7 +9739,6 @@ let thunderbird-bin = callPackage ../applications/networking/mailreaders/thunderbird-bin { gconf = pkgs.gnome.GConf; - inherit (pkgs.gnome3) at_spi2_atk; inherit (pkgs.gnome) libgnome libgnomeui; inherit (pkgs.xlibs) libX11 libXScrnSaver libXext libXinerama libXrender libXt; diff --git a/pkgs/top-level/mingw.nix b/pkgs/top-level/mingw.nix deleted file mode 100644 index 6c744bfd8612..000000000000 --- a/pkgs/top-level/mingw.nix +++ /dev/null @@ -1,27 +0,0 @@ -let { - pkgs = - import ./all-packages.nix { - stdenvType = "i686-mingw"; - }; - - body = { - inherit (pkgs) - aterm - getopt - pkgconfig - realCurl - strategoLibraries - zlib; -# inherit profileTest; - }; - -# profileTest = -# pkgs.stdenv.mkDerivation { -# name = "profile-test"; -# src = ./char-test.c; -# builder = ./profile-builder.sh; -# strlib = pkgs.strategoLibraries; -# aterm = pkgs.aterm; -# buildInputs = [pkgs.aterm pkgs.strategoLibraries]; -# }; -}