diff options
653 files changed, 3778 insertions, 1961 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index bf6cbd2cbfa83..4b6b91cbf0c0c 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -50,7 +50,9 @@ rec { # Construct a library search path (such as RPATH) containing the # libraries for a set of packages, e.g. "${pkg1}/lib:${pkg2}/lib:...". - makeLibraryPath = makeSearchPath "lib"; + makeLibraryPath = pkgs: makeSearchPath "lib" + # try to guess the right output of each pkg + (map (pkg: pkg.lib or (pkg.out or pkg)) pkgs); # Idem for Perl search paths. diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 844cba57cd857..4bfd08869b7f1 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -43,7 +43,7 @@ let echo "for hints about the offending path)." exit 1 fi - ${libxslt}/bin/xsltproc \ + ${libxslt.bin}/bin/xsltproc \ --stringparam revision '${revision}' \ -o $out ${./options-to-docbook.xsl} $optionsXML ''; diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index be6662decea6e..c027796d54767 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -228,7 +228,7 @@ with lib; # Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig. # Otherwise specify only font directories. environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source = - "${pkgs.fontconfig}/etc/fonts/fonts.conf"; + "${pkgs.fontconfig.out}/etc/fonts/fonts.conf"; environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text = '' diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index b49f8a156d1d1..e76f15f233768 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -128,7 +128,7 @@ in "protocols".source = pkgs.iana_etc + "/etc/protocols"; # /etc/rpc: RPC program numbers. - "rpc".source = pkgs.glibc + "/etc/rpc"; + "rpc".source = pkgs.glibc.out + "/etc/rpc"; # /etc/hosts: Hostname-to-IP mappings. "hosts".text = diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 2ebc612605586..2c40895296c64 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -26,7 +26,7 @@ let # are built with PulseAudio support (like KDE). clientConf = writeText "client.conf" '' autospawn=${if nonSystemWide then "yes" else "no"} - ${optionalString nonSystemWide "daemon-binary=${cfg.package}/bin/pulseaudio"} + ${optionalString nonSystemWide "daemon-binary=${cfg.package.out}/bin/pulseaudio"} ''; # Write an /etc/asound.conf that causes all ALSA applications to @@ -129,11 +129,11 @@ in { source = clientConf; }; - hardware.pulseaudio.configFile = mkDefault "${cfg.package}/etc/pulse/default.pa"; + hardware.pulseaudio.configFile = mkDefault "${cfg.package.out}/etc/pulse/default.pa"; } (mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = [ cfg.package.out ]; environment.etc = singleton { target = "asound.conf"; @@ -170,7 +170,7 @@ in { before = [ "sound.target" ]; environment.PULSE_RUNTIME_PATH = stateDir; serviceConfig = { - ExecStart = "${cfg.package}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}"; + ExecStart = "${cfg.package.out}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}"; PIDFile = "${stateDir}/pid"; }; }; diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index e14e4cf13147e..da558a25d99b7 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -122,8 +122,16 @@ in system.path = pkgs.buildEnv { name = "system-path"; - paths = config.environment.systemPackages; + paths = let inherit (config.environment) pathsToLink outputsToLink; + #outputs TODO: some code already merged by Eelco? make it user-customizable? + pkgOutputFun = pkg: lib.filter (p: p!=null) [ + (pkg.bin or (pkg.out or pkg)) + (pkg.man or null) + (pkg.info or null) + (pkg.doc or null) + ]; + in lib.concatMap pkgOutputFun config.environment.systemPackages; ignoreCollisions = true; # !!! Hacky, should modularise. postBuild = diff --git a/nixos/modules/installer/tools/auto-upgrade.nix b/nixos/modules/installer/tools/auto-upgrade.nix index e14653dc4eb09..1fa9282b909e1 100644 --- a/nixos/modules/installer/tools/auto-upgrade.nix +++ b/nixos/modules/installer/tools/auto-upgrade.nix @@ -67,7 +67,7 @@ let cfg = config.system.autoUpgrade; in HOME = "/root"; }; - path = [ pkgs.gnutar pkgs.xz config.nix.package ]; + path = [ pkgs.gnutar pkgs.xz.bin config.nix.package ]; script = '' ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags} diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix index b8057cadce25c..20a1f7f1ed8c2 100644 --- a/nixos/modules/profiles/base.nix +++ b/nixos/modules/profiles/base.nix @@ -35,7 +35,7 @@ # Tools to create / manipulate filesystems. pkgs.ntfsprogs # for resizing NTFS partitions pkgs.dosfstools - pkgs.xfsprogs + pkgs.xfsprogs.bin pkgs.jfsutils pkgs.f2fs-tools diff --git a/nixos/modules/security/apparmor-suid.nix b/nixos/modules/security/apparmor-suid.nix index b89b379ae6668..3da6a81158d02 100644 --- a/nixos/modules/security/apparmor-suid.nix +++ b/nixos/modules/security/apparmor-suid.nix @@ -28,7 +28,7 @@ with lib; capability setuid, network inet raw, - ${pkgs.glibc}/lib/*.so mr, + ${pkgs.glibc.out}/lib/*.so mr, ${pkgs.libcap}/lib/libcap.so* mr, ${pkgs.attr}/lib/libattr.so* mr, diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index 95b659d96f0f2..300dc600d8848 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -79,7 +79,7 @@ in ${cfg.extraConfig} ''; #TODO: validation on compilation (at least against typos) - services.dbus.packages = [ pkgs.polkit ]; + services.dbus.packages = [ pkgs.polkit.out ]; security.pam.services.polkit-1 = {}; @@ -90,7 +90,7 @@ in owner = "root"; group = "root"; setuid = true; - source = "${pkgs.polkit}/lib/polkit-1/polkit-agent-helper-1"; + source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1"; } ]; diff --git a/nixos/modules/security/setuid-wrappers.nix b/nixos/modules/security/setuid-wrappers.nix index 2a289dc402ce8..7d69f9b1183da 100644 --- a/nixos/modules/security/setuid-wrappers.nix +++ b/nixos/modules/security/setuid-wrappers.nix @@ -8,12 +8,12 @@ let setuidWrapper = pkgs.stdenv.mkDerivation { name = "setuid-wrapper"; - buildCommand = '' + unpackPhase = "true"; + installPhase = '' mkdir -p $out/bin cp ${./setuid-wrapper.c} setuid-wrapper.c gcc -Wall -O2 -DWRAPPER_DIR=\"${wrapperDir}\" \ setuid-wrapper.c -o $out/bin/setuid-wrapper - strip -S $out/bin/setuid-wrapper ''; }; diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index 9bd511ad3ae3c..0568b1af7d5c0 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -138,11 +138,11 @@ in { ''; postStart = '' - until ${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port} ; do + until ${pkgs.curl.bin}/bin/curl -s -L localhost:${toString cfg.port} ; do sleep 10 done while true ; do - index=`${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port}` + index=`${pkgs.curl.bin}/bin/curl -s -L localhost:${toString cfg.port}` if [[ !("$index" =~ 'Please wait while Jenkins is restarting' || "$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then exit 0 diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 29bdb20175231..7eecf5d8e446a 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -28,10 +28,10 @@ in example = literalExample '' openldap.enable = true; openldap.extraConfig = ''' - include ''${pkgs.openldap}/etc/openldap/schema/core.schema - include ''${pkgs.openldap}/etc/openldap/schema/cosine.schema - include ''${pkgs.openldap}/etc/openldap/schema/inetorgperson.schema - include ''${pkgs.openldap}/etc/openldap/schema/nis.schema + include ''${pkgs.openldap.out}/etc/openldap/schema/core.schema + include ''${pkgs.openldap.out}/etc/openldap/schema/cosine.schema + include ''${pkgs.openldap.out}/etc/openldap/schema/inetorgperson.schema + include ''${pkgs.openldap.out}/etc/openldap/schema/nis.schema database bdb suffix dc=example,dc=org @@ -89,7 +89,7 @@ in mkdir -p ${cfg.dataDir} chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir} ''; - serviceConfig.ExecStart = "${openldap}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -f ${configFile}"; + serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -f ${configFile}"; }; users.extraUsers.openldap = diff --git a/nixos/modules/services/desktops/gnome3/gvfs.nix b/nixos/modules/services/desktops/gnome3/gvfs.nix index c4f41a6125c71..a07cdadbb12bf 100644 --- a/nixos/modules/services/desktops/gnome3/gvfs.nix +++ b/nixos/modules/services/desktops/gnome3/gvfs.nix @@ -37,7 +37,7 @@ in services.dbus.packages = [ gnome3.gvfs ]; - services.udev.packages = [ pkgs.libmtp ]; + services.udev.packages = [ pkgs.libmtp.bin ]; }; diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index c747c24db67df..107e1012b88df 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -64,7 +64,7 @@ let run_progs=$(grep -v '^[[:space:]]*#' $out/* | grep 'RUN+="[^/$]' | sed -e 's/.*RUN+="\([^ "]*\)[ "].*/\1/' | uniq) for i in $import_progs $run_progs; do - if [[ ! -x ${pkgs.udev}/lib/udev/$i && ! $i =~ socket:.* ]]; then + if [[ ! -x ${udev}/lib/udev/$i && ! $i =~ socket:.* ]]; then echo "FAIL" echo "$i is called in udev rules but not installed by udev" exit 1 diff --git a/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix index 0b6a101efa0bd..46481a86a1423 100644 --- a/nixos/modules/services/hardware/upower.nix +++ b/nixos/modules/services/hardware/upower.nix @@ -50,7 +50,7 @@ in systemd.services.upower = { description = "Power Management Daemon"; - path = [ pkgs.glib ]; # needed for gdbus + path = [ pkgs.glib.out ]; # needed for gdbus serviceConfig = { Type = "dbus"; BusName = "org.freedesktop.UPower"; diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index f472e530a70ba..d0431e546e499 100644 --- a/nixos/modules/services/misc/docker-registry.nix +++ b/nixos/modules/services/misc/docker-registry.nix @@ -65,7 +65,7 @@ in { }; postStart = '' - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/'; do + until ${pkgs.curl.bin}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/'; do sleep 1; done ''; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 4aed91c349788..ceffdbead4e43 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -359,7 +359,7 @@ in systemd.sockets.nix-daemon.wantedBy = [ "sockets.target" ]; systemd.services.nix-daemon = - { path = [ nix pkgs.openssl pkgs.utillinux config.programs.ssh.package ] + { path = [ nix pkgs.openssl.bin pkgs.utillinux config.programs.ssh.package ] ++ optionals cfg.distributedBuilds [ pkgs.gzip ]; environment = cfg.envVars diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix index 4d164ad8d65f4..b737a0b8e74f1 100644 --- a/nixos/modules/services/misc/subsonic.nix +++ b/nixos/modules/services/misc/subsonic.nix @@ -153,7 +153,7 @@ in users.extraGroups.subsonic.gid = config.ids.gids.subsonic; - services.subsonic.transcoders = mkDefault [ "${pkgs.ffmpeg}/bin/ffmpeg" ]; + services.subsonic.transcoders = mkDefault [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ]; }; } diff --git a/nixos/modules/services/misc/svnserve.nix b/nixos/modules/services/misc/svnserve.nix index 848905ca457f7..601d50a3e268b 100644 --- a/nixos/modules/services/misc/svnserve.nix +++ b/nixos/modules/services/misc/svnserve.nix @@ -40,7 +40,7 @@ in preStart = "mkdir -p ${cfg.svnBaseDir}"; - exec = "${pkgs.subversion}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid"; + exec = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid"; }; }; } diff --git a/nixos/modules/services/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix index b6cf397f35c07..031558a373c93 100644 --- a/nixos/modules/services/monitoring/cadvisor.nix +++ b/nixos/modules/services/monitoring/cadvisor.nix @@ -71,7 +71,7 @@ in { after = [ "network.target" "docker.service" "influxdb.service" ]; postStart = mkBefore '' - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/containers/'; do + until ${pkgs.curl.bin}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/containers/'; do sleep 1; done ''; diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index 218bce2dbb31e..9340be28205a4 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy.nix @@ -113,7 +113,7 @@ in /etc/group r, ${config.environment.etc."nsswitch.conf".source} r, - ${pkgs.glibc}/lib/*.so mr, + ${pkgs.glibc.out}/lib/*.so mr, ${pkgs.tzdata}/share/zoneinfo/** r, network inet stream, @@ -121,12 +121,12 @@ in network inet dgram, network inet6 dgram, - ${pkgs.gcc.cc}/lib/libssp.so.* mr, - ${pkgs.libsodium}/lib/libsodium.so.* mr, + ${pkgs.gcc.cc.lib}/lib/libssp.so.* mr, + ${pkgs.libsodium.out}/lib/libsodium.so.* mr, ${pkgs.systemd}/lib/libsystemd.so.* mr, - ${pkgs.xz}/lib/liblzma.so.* mr, - ${pkgs.libgcrypt}/lib/libgcrypt.so.* mr, - ${pkgs.libgpgerror}/lib/libgpg-error.so.* mr, + ${pkgs.xz.out}/lib/liblzma.so.* mr, + ${pkgs.libgcrypt.out}/lib/libgcrypt.so.* mr, + ${pkgs.libgpgerror.out}/lib/libgpg-error.so.* mr, ${resolverListFile} r, } diff --git a/nixos/modules/services/networking/i2pd.nix b/nixos/modules/services/networking/i2pd.nix index af9424ecfeaf1..c467402dbcf69 100644 --- a/nixos/modules/services/networking/i2pd.nix +++ b/nixos/modules/services/networking/i2pd.nix @@ -8,7 +8,7 @@ let homeDir = "/var/lib/i2pd"; - extip = "EXTIP=\$(${pkgs.curl}/bin/curl -sf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')"; + extip = "EXTIP=\$(${pkgs.curl.bin}/bin/curl -sf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')"; toOneZero = b: if b then "1" else "0"; diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index 3436bd01d8484..968739877074b 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -142,7 +142,7 @@ in { ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins ''; postStart = mkBefore '' - until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do + until ${pkgs.curl.bin}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do sleep 1 done ''; diff --git a/nixos/modules/services/system/nscd.nix b/nixos/modules/services/system/nscd.nix index 3c0d2043ed5d5..d98ef8a306d57 100644 --- a/nixos/modules/services/system/nscd.nix +++ b/nixos/modules/services/system/nscd.nix @@ -64,14 +64,14 @@ in restartTriggers = [ config.environment.etc.hosts.source config.environment.etc."nsswitch.conf".source ]; serviceConfig = - { ExecStart = "@${pkgs.glibc}/sbin/nscd nscd -f ${cfgFile}"; + { ExecStart = "@${pkgs.glibc.bin}/sbin/nscd nscd -f ${cfgFile}"; Type = "forking"; PIDFile = "/run/nscd/nscd.pid"; Restart = "always"; ExecReload = - [ "${pkgs.glibc}/sbin/nscd --invalidate passwd" - "${pkgs.glibc}/sbin/nscd --invalidate group" - "${pkgs.glibc}/sbin/nscd --invalidate hosts" + [ "${pkgs.glibc.bin}/sbin/nscd --invalidate passwd" + "${pkgs.glibc.bin}/sbin/nscd --invalidate group" + "${pkgs.glibc.bin}/sbin/nscd --invalidate hosts" ]; }; @@ -79,7 +79,7 @@ in # its pid. So wait until it's ready. postStart = '' - while ! ${pkgs.glibc}/sbin/nscd -g -f ${cfgFile} > /dev/null; do + while ! ${pkgs.glibc.bin}/sbin/nscd -g -f ${cfgFile} > /dev/null; do sleep 0.2 done ''; diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 1c91492240497..5822fb111b82c 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -113,17 +113,17 @@ in #include <abstractions/base> #include <abstractions/nameservice> - ${pkgs.glibc}/lib/*.so mr, - ${pkgs.libevent}/lib/libevent*.so* mr, - ${pkgs.curl}/lib/libcurl*.so* mr, - ${pkgs.openssl}/lib/libssl*.so* mr, - ${pkgs.openssl}/lib/libcrypto*.so* mr, - ${pkgs.zlib}/lib/libz*.so* mr, - ${pkgs.libssh2}/lib/libssh2*.so* mr, + ${pkgs.glibc.out}/lib/*.so mr, + ${pkgs.libevent.out}/lib/libevent*.so* mr, + ${pkgs.curl.out}/lib/libcurl*.so* mr, + ${pkgs.openssl.out}/lib/libssl*.so* mr, + ${pkgs.openssl.out}/lib/libcrypto*.so* mr, + ${pkgs.zlib.out}/lib/libz*.so* mr, + ${pkgs.libssh2.out}/lib/libssh2*.so* mr, ${pkgs.systemd}/lib/libsystemd*.so* mr, - ${pkgs.xz}/lib/liblzma*.so* mr, - ${pkgs.libgcrypt}/lib/libgcrypt*.so* mr, - ${pkgs.libgpgerror}/lib/libgpg-error*.so* mr, + ${pkgs.xz.out}/lib/liblzma*.so* mr, + ${pkgs.libgcrypt.out}/lib/libgcrypt*.so* mr, + ${pkgs.libgpgerror.out}/lib/libgpg-error*.so* mr, @{PROC}/sys/kernel/random/uuid r, @{PROC}/sys/vm/overcommit_memory r, diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 7350a6a68c707..9908aea1a66f1 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -6,7 +6,7 @@ let mainCfg = config.services.httpd; - httpd = mainCfg.package; + httpd = mainCfg.package.out; version24 = !versionOlder httpd.version "2.4"; diff --git a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix b/nixos/modules/services/web-servers/apache-httpd/phabricator.nix index e4e3aac8d411a..efd4a7b5f0fb9 100644 --- a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix +++ b/nixos/modules/services/web-servers/apache-httpd/phabricator.nix @@ -39,7 +39,7 @@ in { "${pkgs.diffutils}" ] ++ (if config.mercurial then ["${pkgs.mercurial}"] else []) ++ - (if config.subversion then ["${pkgs.subversion}"] else []) ++ + (if config.subversion then ["${pkgs.subversion.out}"] else []) ++ (if config.git then ["${pkgs.git}"] else []); startupScript = pkgs.writeScript "activatePhabricator" '' diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 886a6c884013a..e32d6669b0468 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -149,7 +149,7 @@ in { }; environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" - "${gnome3.glib_networking}/lib/gio/modules" + "${gnome3.glib_networking.out}/lib/gio/modules" "${gnome3.gvfs}/lib/gio/modules" ]; environment.systemPackages = gnome3.corePackages ++ cfg.sessionPath ++ (removePackagesByName gnome3.optionalPackages config.environment.gnome3.excludePackages); diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index ca0832e5b0c8e..4f6d490bd91d4 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -52,7 +52,7 @@ let ${optionalString cfg.startDbusSession '' if test -z "$DBUS_SESSION_BUS_ADDRESS"; then - exec ${pkgs.dbus.tools}/bin/dbus-launch --exit-with-session "$0" "$sessionType" + exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$sessionType" fi ''} @@ -85,14 +85,14 @@ let # Start PulseAudio if enabled. ${optionalString (config.hardware.pulseaudio.enable) '' ${optionalString (!config.hardware.pulseaudio.systemWide) - "${config.hardware.pulseaudio.package}/bin/pulseaudio --start" + "${config.hardware.pulseaudio.package.out}/bin/pulseaudio --start" } # Publish access credentials in the root window. - ${config.hardware.pulseaudio.package}/bin/pactl load-module module-x11-publish "display=$DISPLAY" + ${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-x11-publish "display=$DISPLAY" # Keep track of devices. Mostly useful for Phonon/KDE. - ${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1" + ${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-device-manager "do_routing=1" ''} # Tell systemd about our $DISPLAY. This is needed by the @@ -322,7 +322,7 @@ in config = { - services.xserver.displayManager.xserverBin = "${xorg.xorgserver}/bin/X"; + services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X"; }; diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 8452b1ec33cd0..48fab02435665 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -32,9 +32,9 @@ let # This wrapper ensures that we actually get themes makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \ $out/greeter \ - --prefix PATH : "${pkgs.glibc}/bin" \ - --set GDK_PIXBUF_MODULE_FILE "${pkgs.gdk_pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \ - --set GTK_PATH "${theme}:${pkgs.gtk3}" \ + --prefix PATH : "${pkgs.glibc.bin}/bin" \ + --set GDK_PIXBUF_MODULE_FILE "${pkgs.gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \ + --set GTK_PATH "${theme}:${pkgs.gtk3.out}" \ --set GTK_EXE_PREFIX "${theme}" \ --set GTK_DATA_PREFIX "${theme}" \ --set XDG_DATA_DIRS "${theme}/share:${icons}/share" \ diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index 5ca3a44324f6a..16a0d1b6d9632 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -31,7 +31,7 @@ let [XDisplay] MinimumVT=${toString xcfg.tty} ServerPath=${xserverWrapper} - XephyrPath=${pkgs.xorg.xorgserver}/bin/Xephyr + XephyrPath=${pkgs.xorg.xorgserver.out}/bin/Xephyr SessionCommand=${dmcfg.session.script} SessionDir=${dmcfg.session.desktops} XauthPath=${pkgs.xorg.xauth}/bin/xauth diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix index a036e085b0bfe..810cc0c4688df 100644 --- a/nixos/modules/services/x11/terminal-server.nix +++ b/nixos/modules/services/x11/terminal-server.nix @@ -17,7 +17,7 @@ let #! ${pkgs.stdenv.shell} export XKB_BINDIR=${pkgs.xorg.xkbcomp}/bin export XORG_DRI_DRIVER_PATH=${pkgs.mesa}/lib/dri - exec ${pkgs.xorg.xorgserver}/bin/Xvfb "$@" -xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb + exec ${pkgs.xorg.xorgserver.out}/bin/Xvfb "$@" -xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb ''; in diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 3348e8d0582c9..3860b50f24972 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -458,7 +458,7 @@ in ]); environment.systemPackages = - [ xorg.xorgserver + [ xorg.xorgserver.out xorg.xrandr xorg.xrdb xorg.setxkbmap @@ -495,7 +495,7 @@ in XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension. XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. LD_LIBRARY_PATH = concatStringsSep ":" ( - [ "${xorg.libX11}/lib" "${xorg.libXext}/lib" ] + [ "${xorg.libX11.out}/lib" "${xorg.libXext.out}/lib" ] ++ concatLists (catAttrs "libPath" cfg.drivers)); } // cfg.displayManager.job.environment; @@ -525,7 +525,7 @@ in services.xserver.modules = concatLists (catAttrs "modules" cfg.drivers) ++ - [ xorg.xorgserver + [ xorg.xorgserver.out xorg.xf86inputevdev ]; diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 02b3e25a313de..dd2ce1894ae60 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -12,7 +12,8 @@ let ''; }); - path = + path = map # outputs TODO? + (pkg: (pkg.bin or (pkg.out or pkg))) [ pkgs.coreutils pkgs.gnugrep pkgs.findutils pkgs.glibc # needed for getent pkgs.shadow diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 58a0749c74e2d..0bd5387a7c0ff 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -79,7 +79,7 @@ let ${config.boot.initrd.extraUtilsCommands} # Copy ld manually since it isn't detected correctly - cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib + cp -pv ${pkgs.glibc.out}/lib/ld*.so.? $out/lib # Copy all of the needed libraries for the binaries for BIN in $(find $out/{bin,sbin} -type f); do diff --git a/nixos/modules/system/boot/stage-2.nix b/nixos/modules/system/boot/stage-2.nix index c0ef4e02d1ffa..b67f42a017e69 100644 --- a/nixos/modules/system/boot/stage-2.nix +++ b/nixos/modules/system/boot/stage-2.nix @@ -7,11 +7,14 @@ let kernel = config.boot.kernelPackages.kernel; activateConfiguration = config.system.activationScripts.script; - readonlyMountpoint = pkgs.runCommand "readonly-mountpoint" {} '' - mkdir -p $out/bin - cc -O3 ${./readonly-mountpoint.c} -o $out/bin/readonly-mountpoint - strip -s $out/bin/readonly-mountpoint - ''; + readonlyMountpoint = pkgs.stdenv.mkDerivation { + name = "readonly-mountpoint"; + unpackPhase = "true"; + installPhase = '' + mkdir -p $out/bin + cc -O3 ${./readonly-mountpoint.c} -o $out/bin/readonly-mountpoint + ''; + }; bootStage2 = pkgs.substituteAll { src = ./stage-2-init.sh; diff --git a/nixos/modules/tasks/filesystems/unionfs-fuse.nix b/nixos/modules/tasks/filesystems/unionfs-fuse.nix index 3e38bffa3ba2c..1dcc4c87e3cec 100644 --- a/nixos/modules/tasks/filesystems/unionfs-fuse.nix +++ b/nixos/modules/tasks/filesystems/unionfs-fuse.nix @@ -18,9 +18,9 @@ boot.initrd.postDeviceCommands = '' # Hacky!!! fuse hard-codes the path to mount - mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin - ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin - ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin + mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin + ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin + ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin ''; }) diff --git a/nixos/modules/tasks/filesystems/xfs.nix b/nixos/modules/tasks/filesystems/xfs.nix index d7c3930f4a3c0..c6a90bcf1a518 100644 --- a/nixos/modules/tasks/filesystems/xfs.nix +++ b/nixos/modules/tasks/filesystems/xfs.nix @@ -11,13 +11,13 @@ in { config = mkIf (any (fs: fs == "xfs") config.boot.supportedFilesystems) { - system.fsPackages = [ pkgs.xfsprogs ]; + system.fsPackages = [ pkgs.xfsprogs.bin ]; boot.initrd.availableKernelModules = mkIf inInitrd [ "xfs" "crc32c" ]; boot.initrd.extraUtilsCommands = mkIf inInitrd '' - copy_bin_and_libs ${pkgs.xfsprogs}/sbin/fsck.xfs + copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/fsck.xfs ''; # Trick just to set 'sh' after the extraUtils nuke-refs. diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index a025aee7cfeb6..9733bd6fac462 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -66,7 +66,7 @@ in services.xserver.displayManager.sessionCommands = '' - PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver ]}:$PATH \ + PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver.out ]}:$PATH \ ${kernel.virtualboxGuestAdditions}/bin/VBoxClient-all ''; diff --git a/nixos/tests/cadvisor.nix b/nixos/tests/cadvisor.nix index 1644cb856cece..c55b08c0e9249 100644 --- a/nixos/tests/cadvisor.nix +++ b/nixos/tests/cadvisor.nix @@ -14,7 +14,7 @@ import ./make-test.nix ({ pkgs, ... } : { services.cadvisor.storageDriver = "influxdb"; services.influxdb.enable = true; systemd.services.influxdb.postStart = mkAfter '' - ${pkgs.curl}/bin/curl -X POST 'http://localhost:8086/db?u=root&p=root' \ + ${pkgs.curl.bin}/bin/curl -X POST 'http://localhost:8086/db?u=root&p=root' \ -d '{"name": "root"}' ''; }; diff --git a/pkgs/applications/altcoins/bitcoin-xt.nix b/pkgs/applications/altcoins/bitcoin-xt.nix index e6c95729c6ec2..c141130766853 100644 --- a/pkgs/applications/altcoins/bitcoin-xt.nix +++ b/pkgs/applications/altcoins/bitcoin-xt.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec{ configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" - "--with-libcurl-headers=${curl}/include" + "--with-libcurl-headers=${curl.dev}/include" ] ++ optionals withGui [ "--with-gui=qt4" ]; meta = { diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index f44f1a2b78a01..c10a0d8a4ce45 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { # have to do that ourself. patchPhase = '' printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-${builtins.substring 0 8 src.rev}\"; }\n' > libs/ardour/revision.cc - sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript + sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript patchShebangs ./tools/ ''; diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 8b15fea8b8661..1bf8b0e5c7dc9 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -12,6 +12,12 @@ stdenv.mkDerivation rec { sha256 = "15c5ff7ac1c0b19b08f4bdcb0f4988743da2f9ed3fab41d6f07600e67cb9ddb6"; }; + # fix with gcc-5 from http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2012-December/245884.html + postPatch = '' + substituteInPlace lib-src/libnyquist/nyquist/ffts/src/fftlib.c \ + --replace 'inline void' 'static inline void' + ''; + preConfigure = /* we prefer system-wide libs */ '' mv lib-src lib-src-rm mkdir lib-src diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 18fb48a17ba1d..80e4e49fb1830 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -8,12 +8,12 @@ stdenv.mkDerivation rec { sha256 = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c"; }; - outputs = [ "out" "doc" ]; - buildInputs = [ libogg ]; #doCheck = true; # takes lots of time + outputs = [ "dev" "out" "bin" "doc" ]; + meta = with stdenv.lib; { homepage = http://xiph.org/flac/; description = "Library and tools for encoding and decoding the FLAC lossless audio file format"; diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix index 7c69a25eb0422..8127579f0229d 100644 --- a/pkgs/applications/audio/google-musicmanager/default.nix +++ b/pkgs/applications/audio/google-musicmanager/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { buildPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager + --set-rpath "$out/opt/google/musicmanager:${stdenv.lib.makeLibraryPath [ readline ncurses stdenv.cc.libc.out qt48 stdenv.cc.cc libidn expat flac libvorbis ]}" opt/google/musicmanager/MusicManager ''; dontPatchELF = true; diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 2868d76097385..d9983a3268541 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -66,10 +66,10 @@ stdenv.mkDerivation { # Work around Spotify referring to a specific minor version of # OpenSSL. - ln -s ${openssl}/lib/libssl.so $libdir/libssl.so.1.0.0 - ln -s ${openssl}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0 - ln -s ${nspr}/lib/libnspr4.so $libdir/libnspr4.so - ln -s ${nspr}/lib/libplc4.so $libdir/libplc4.so + ln -s ${openssl.out}/lib/libssl.so $libdir/libssl.so.1.0.0 + ln -s ${openssl.out}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0 + ln -s ${nspr.out}/lib/libnspr4.so $libdir/libnspr4.so + ln -s ${nspr.out}/lib/libplc4.so $libdir/libplc4.so mkdir -p $out/bin diff --git a/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix index 2955a9371ff6f..4bc7801637c6d 100644 --- a/pkgs/applications/audio/swh-lv2/default.nix +++ b/pkgs/applications/audio/swh-lv2/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; patchPhase = '' - sed -e "s#xsltproc#${libxslt}/bin/xsltproc#" -i Makefile + sed -e "s#xsltproc#${libxslt.bin}/bin/xsltproc#" -i Makefile sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile ''; diff --git a/pkgs/applications/audio/yoshimi/default.nix b/pkgs/applications/audio/yoshimi/default.nix index dc2fe0ba64929..f26434f6f2055 100644 --- a/pkgs/applications/audio/yoshimi/default.nix +++ b/pkgs/applications/audio/yoshimi/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { preConfigure = "cd src"; - cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc}/lib/libm.so" ]; + cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so" ]; meta = with stdenv.lib; { description = "high quality software synthesizer based on ZynAddSubFX"; diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix index 42d2c777aea20..f3147ca5187c0 100644 --- a/pkgs/applications/display-managers/slim/default.nix +++ b/pkgs/applications/display-managers/slim/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng -, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs }: +, fontconfig, freetype, pam, dbus_libs, makeWrapper }: stdenv.mkDerivation rec { name = "slim-1.3.6"; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ cmake pkgconfig libjpeg libpng fontconfig freetype - pam dbus_libs + pam dbus_libs (stdenv.cc.libc.out or null) xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper ]; diff --git a/pkgs/applications/editors/codeblocks/default.nix b/pkgs/applications/editors/codeblocks/default.nix index 53b7b5750a047..76df6d4d2b999 100644 --- a/pkgs/applications/editors/codeblocks/default.nix +++ b/pkgs/applications/editors/codeblocks/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; patches = [ ./writable-projects.patch ]; preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; - postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig"; + postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; configureFlags = [ "--enable-pch=no" ] ++ optional contribPlugins "--with-contrib-plugins"; diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index 7d543c4ed55f4..9d47cc5993ac9 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeDesktopItem, makeWrapper +{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper , freetype, fontconfig, libX11, libXext, libXrender, zlib , glib, gtk, libXtst, jre , webkitgtk2 ? null # for internal web browser @@ -34,10 +34,10 @@ let tar xfvz $src -C $out # Patch binaries. - interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2) + interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) libCairo=$out/eclipse/libcairo-swt.so patchelf --set-interpreter $interpreter $out/eclipse/eclipse - [ -f $libCairo ] && patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $libCairo + [ -f $libCairo ] && patchelf --set-rpath ${lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]} "$libCairo" # Create wrapper script. Pass -configuration to store # settings in ~/.eclipse/org.eclipse.platform_<version> rather @@ -47,7 +47,7 @@ let makeWrapper $out/eclipse/eclipse $out/bin/eclipse \ --prefix PATH : ${jre}/bin \ - --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib${stdenv.lib.optionalString (webkitgtk2 != null) ":${webkitgtk2}/lib"} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk libXtst ] ++ lib.optional (webkitgtk2 != null) webkitgtk2)} \ --add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration" # Create desktop item. diff --git a/pkgs/applications/editors/edbrowse/default.nix b/pkgs/applications/editors/edbrowse/default.nix index d969552ecde42..712ede2e316f0 100644 --- a/pkgs/applications/editors/edbrowse/default.nix +++ b/pkgs/applications/editors/edbrowse/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { substituteInPlace src/ebjs.c --replace \"edbrowse-js\" \"$out/bin/edbrowse-js\" ''; - NIX_CFLAGS_COMPILE = "-I${spidermonkey_24}/include/mozjs-24"; + NIX_CFLAGS_COMPILE = "-I${spidermonkey_24.dev}/include/mozjs-24"; makeFlags = "-C src prefix=$(out)"; src = fetchurl { diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix index 59f9f7110043e..5dd477f2981ae 100644 --- a/pkgs/applications/editors/emacs-24/default.nix +++ b/pkgs/applications/editors/emacs-24/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { "--with-gif=no" "--with-tiff=no" ]; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX) - "-I${cairo}/include/cairo"; + "-I${cairo.dev}/include/cairo"; postInstall = '' mkdir -p $out/share/emacs/site-lisp/ diff --git a/pkgs/applications/editors/emacs-24/macport-24.3.nix b/pkgs/applications/editors/emacs-24/macport-24.3.nix index 191969eef5b0a..edf8a28d6ff46 100644 --- a/pkgs/applications/editors/emacs-24/macport-24.3.nix +++ b/pkgs/applications/editors/emacs-24/macport-24.3.nix @@ -33,12 +33,12 @@ stdenv.mkDerivation rec { # Further, we need to make sure that the -L option occurs before mention # of the library, so that it finds it within the Nix store. sed -i 's/tinfo ncurses/tinfo ncursesw/' configure - ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g') + ncurseslib=$(echo ${ncurses.lib}/lib | sed 's#/#\\/#g') sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure configureFlagsArray=( - LDFLAGS=-L${ncurses}/lib + LDFLAGS=-L${ncurses.lib}/lib --with-xml2=yes --with-gnutls=yes --with-mac @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ) makeFlagsArray=( CFLAGS=-O3 - LDFLAGS="-O3 -L${ncurses}/lib" + LDFLAGS="-O3 -L${ncurses.lib}/lib" ); ''; diff --git a/pkgs/applications/editors/heme/default.nix b/pkgs/applications/editors/heme/default.nix index d377e5cb36f67..19c4183ea6721 100644 --- a/pkgs/applications/editors/heme/default.nix +++ b/pkgs/applications/editors/heme/default.nix @@ -10,10 +10,11 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile \ --replace "/usr/local" "$out" \ - --replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \ - --replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib " \ + --replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \ + --replace "LDFLAGS = " "LDFLAGS = -L${ncurses.lib}/lib " \ --replace "-lcurses" "-lncurses" ''; + buildInputs = [ ncurses ]; preBuild = '' mkdir -p $out/bin mkdir -p $out/man/man1 diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix index fdf54ea662c3f..ca8aca5c1e397 100644 --- a/pkgs/applications/editors/idea/default.nix +++ b/pkgs/applications/editors/idea/default.nix @@ -41,7 +41,7 @@ let truncate --size=$size $fname } - interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2) + interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) if [ "${stdenv.system}" == "x86_64-linux" ]; then target_size=$(get_file_size bin/fsnotifier64) patchelf --set-interpreter "$interpreter" bin/fsnotifier64 diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix index 6dbeff55063c4..72ecbbc59839c 100644 --- a/pkgs/applications/editors/lighttable/default.nix +++ b/pkgs/applications/editors/lighttable/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf -, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, udev +, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, libudev }: let @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ $out/LightTable/ltbin - ln -sf ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0 + ln -sf ${libudev.out}/lib/libudev.so.1 $out/LightTable/libudev.so.0 makeWrapper $out/LightTable/ltbin $out/bin/lighttable \ --prefix "LD_LIBRARY_PATH" : $out/LightTable diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix index 768842a3875da..65ea62b33686a 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/applications/editors/music/tuxguitar/default.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation rec { wrapProgram $out/bin/tuxguitar \ --set JAVA "${jdk}/bin/java" \ - --prefix LD_LIBRARY_PATH : "$out/lib/:${swt}/lib:${alsaLib}/lib" \ + --prefix LD_LIBRARY_PATH : "$out/lib/:${swt}/lib:${alsaLib.out}/lib" \ --prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar" ''; diff --git a/pkgs/applications/graphics/darktable/default.nix b/pkgs/applications/graphics/darktable/default.nix index 1cf24e109dd24..7d5d4cc7acb97 100644 --- a/pkgs/applications/graphics/darktable/default.nix +++ b/pkgs/applications/graphics/darktable/default.nix @@ -26,21 +26,21 @@ stdenv.mkDerivation rec { ]; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/include/gtk-2.0" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/lib/gtk-2.0/include" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo}/include/cairo" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk}/include/atk-1.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.dev}/include/gtk-2.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.out}/lib/gtk-2.0/include" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo.dev}/include/cairo" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk.dev}/include/atk-1.0" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${ilmbase}/include/OpenEXR" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${openexr}/include/OpenEXR" ''; cmakeFlags = [ - "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include" - "-DPTHREAD_LIBRARY=${stdenv.glibc}/lib/libpthread.so" + "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc.dev}/include" + "-DPTHREAD_LIBRARY=${stdenv.glibc.out}/lib/libpthread.so" "-DCMAKE_BUILD_TYPE=Release" "-DBINARY_PACKAGE_BUILD=1" - "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include" - "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include" + "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" + "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk.out}/lib/gtk-2.0/include" "-DBUILD_USERMANUAL=False" ]; diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix index 8602a9a04f853..39132bb9b6f87 100644 --- a/pkgs/applications/graphics/feh/default.nix +++ b/pkgs/applications/graphics/feh/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0j5wxpqccnd0hl74z2vwv25n7qnik1n2mcm2jn0c0z7cjn4wsa9q"; }; + outputs = [ "out" "doc" ]; + nativeBuildInputs = [ makeWrapper ]; buildInputs = [ xlibsWrapper imlib2 libjpeg libpng libXinerama curl libexif ]; @@ -17,7 +19,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg}/bin" \ + wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \ --add-flags '--theme=feh' ''; diff --git a/pkgs/applications/graphics/seg3d/default.nix b/pkgs/applications/graphics/seg3d/default.nix index 23a2d23b1ae16..d645a15b02eac 100644 --- a/pkgs/applications/graphics/seg3d/default.nix +++ b/pkgs/applications/graphics/seg3d/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation { patches = [ ./cstdio.patch ]; cmakeFlags = [ - "-DM_LIBRARY=${stdenv.glibc}/lib/libm.so" - "-DDL_LIBRARY=${stdenv.glibc}/lib/libdl.so" + "-DM_LIBRARY=${stdenv.glibc.out}/lib/libm.so" + "-DDL_LIBRARY=${stdenv.glibc.out}/lib/libdl.so" "-DBUILD_UTILS=1" "-DBUILD_SEG3D=1" "-DBUILD_DATAFLOW=0" diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix index c3f43e4b94d8d..5e5371166eee4 100644 --- a/pkgs/applications/graphics/shotwell/default.nix +++ b/pkgs/applications/graphics/shotwell/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/shotwell" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules" ''; diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix index 9e53fe3efe2c6..ca1d5345fb6ac 100644 --- a/pkgs/applications/graphics/xfig/default.nix +++ b/pkgs/applications/graphics/xfig/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ imake makeWrapper ]; - NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11"; + NIX_CFLAGS_COMPILE = "-I${libXpm.dev}/include/X11"; patches = let diff --git a/pkgs/applications/kde-apps-15.08/kdelibs/default.nix b/pkgs/applications/kde-apps-15.08/kdelibs/default.nix index 18d51e94d7cae..49a8e1a11c37c 100644 --- a/pkgs/applications/kde-apps-15.08/kdelibs/default.nix +++ b/pkgs/applications/kde-apps-15.08/kdelibs/default.nix @@ -2,7 +2,7 @@ , docbook_xml_dtd_42, docbook_xsl, flex, giflib, herqq, ilmbase , libdbusmenu_qt, libjpeg, libxml2, libxslt, perl, phonon, pkgconfig , polkit_qt4, qca2, qt4, shared_desktop_ontologies, shared_mime_info -, soprano, strigi, udev, xz +, soprano, strigi, udev, xz, pcre , lib }: @@ -11,7 +11,7 @@ kdeApp { buildInputs = [ attica attr avahi giflib herqq libdbusmenu_qt libjpeg libxml2 - polkit_qt4 qca2 shared_desktop_ontologies udev xz + polkit_qt4 qca2 shared_desktop_ontologies udev xz pcre ]; propagatedBuildInputs = [ qt4 soprano phonon strigi ]; nativeBuildInputs = [ diff --git a/pkgs/applications/misc/audio/soxr/default.nix b/pkgs/applications/misc/audio/soxr/default.nix index 135ae47aa846e..941e1a393b158 100644 --- a/pkgs/applications/misc/audio/soxr/default.nix +++ b/pkgs/applications/misc/audio/soxr/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0xf2w3piwz9gfr1xqyrj4k685q5dy53kq3igv663i4f4y4sg9rjl"; }; + outputs = [ "out" "doc" ]; # headers are just two and very small + preConfigure = if stdenv.isDarwin then '' export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:"`pwd`/build/src '' else '' diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index eeff01e7ab66d..f394b6e8105e4 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { export POPPLER_LIB_DIR=${poppler_utils}/lib export MAGICK_INC=${imagemagick}/include/ImageMagick export MAGICK_LIB=${imagemagick}/lib - export FC_INC_DIR=${fontconfig}/include/fontconfig - export FC_LIB_DIR=${fontconfig}/lib + export FC_INC_DIR=${fontconfig.dev}/include/fontconfig + export FC_LIB_DIR=${fontconfig.lib}/lib export PODOFO_INC_DIR=${podofo}/include/podofo export PODOFO_LIB_DIR=${podofo}/lib export SIP_BIN=${sip_4_16}/bin/sip diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index b0f89cc5ea036..910b24358b484 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"; }; + outputs = [ "dev" "out" "bin" ]; + buildInputs = [ libjpeg libtiff librsvg ] ++ libintlOrEmpty; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/applications/misc/get_iplayer/default.nix b/pkgs/applications/misc/get_iplayer/default.nix index 08fad5a021d0b..d3dfd000c1052 100644 --- a/pkgs/applications/misc/get_iplayer/default.nix +++ b/pkgs/applications/misc/get_iplayer/default.nix @@ -12,7 +12,7 @@ buildPerlPackage { mkdir -p $out/bin cp get_iplayer $out/bin sed -i 's|^update_script|#update_script|' $out/bin/get_iplayer - wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB + wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg.bin}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB ''; src = fetchurl { diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index e91e94695f5a0..7bb5fb7ddcc03 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig gtk gettext ]; makeFlags = [ "PREFIX=$(out)" ] - ++ optional withBuildColors "TPUT=${ncurses}/bin/tput" + ++ optional withBuildColors "TPUT=${ncurses.dev}/bin/tput" ++ optional (!withBuildColors) "TPUT_AVAILABLE=0" ; diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix index 1f78355ca3a1a..3e35b7bde4b84 100644 --- a/pkgs/applications/misc/ikiwiki/default.nix +++ b/pkgs/applications/misc/ikiwiki/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation { ${lib.optionalString bazaarSupport ''--prefix PATH : ${bazaar}/bin \''} ${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin \''} ${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin \''} - ${lib.optionalString subversionSupport ''--prefix PATH : ${subversion}/bin \''} + ${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin \''} ${lib.optionalString mercurialSupport ''--prefix PATH : ${mercurial}/bin \''} ${lib.concatMapStrings (x: "--prefix PATH : ${x}/bin ") extraUtils} done diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index eddf9b8ac717f..d9ce635f80bb1 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { mysql.lib paramiko pcre pexpect pkgconfig pycrypto python sqlite ]; preConfigure = '' - substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc}/bin/catchsegv" + substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc.bin}/bin/catchsegv" ''; postConfigure = '' diff --git a/pkgs/applications/misc/pinfo/default.nix b/pkgs/applications/misc/pinfo/default.nix index 658ff410d3790..222dddc0e8974 100644 --- a/pkgs/applications/misc/pinfo/default.nix +++ b/pkgs/applications/misc/pinfo/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { buildInputs = [ autoreconfHook gettext texinfo ncurses readline ]; - configureFlags = [ "--with-curses=${ncurses}" "--with-readline=${readline}" ]; + configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline}" ]; meta = with stdenv.lib; { description = "A viewer for info files"; diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix index 60322c2b911e9..096ee9381c739 100644 --- a/pkgs/applications/misc/roxterm/default.nix +++ b/pkgs/applications/misc/roxterm/default.nix @@ -24,9 +24,9 @@ in stdenv.mkDerivation rec { propagatedBuildInputs = [ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ]; - NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; # Fix up python path so the lockfile library is on it. PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.libPrefix}/site-packages" [ @@ -35,7 +35,7 @@ in stdenv.mkDerivation rec { buildPhase = '' # Fix up the LD_LIBRARY_PATH so that expat is on it - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${expat}/lib" + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${expat.out}/lib" python mscript.py configure --prefix="$out" python mscript.py build diff --git a/pkgs/applications/misc/surf/default.nix b/pkgs/applications/misc/surf/default.nix index 983fbde0c4593..089bc1b23db73 100644 --- a/pkgs/applications/misc/surf/default.nix +++ b/pkgs/applications/misc/surf/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/surf" \ - --prefix GIO_EXTRA_MODULES : ${glib_networking}/lib/gio/modules \ + --prefix GIO_EXTRA_MODULES : ${glib_networking.out}/lib/gio/modules \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix index 0c9b6e8c08a0c..f55d8ed34eeb7 100644 --- a/pkgs/applications/misc/sweethome3d/default.nix +++ b/pkgs/applications/misc/sweethome3d/default.nix @@ -31,7 +31,7 @@ let cp install/${module}-${version}.jar $out/share/java/. cp "${sweethome3dItem}/share/applications/"* $out/share/applications makeWrapper ${jre}/bin/java $out/bin/$exec \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ --add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" ''; diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix index 87da1c6643b2c..204e5eeae5953 100644 --- a/pkgs/applications/misc/sweethome3d/editors.nix +++ b/pkgs/applications/misc/sweethome3d/editors.nix @@ -40,7 +40,7 @@ let cp ${module}-${version}.jar $out/share/java/. cp "${editorItem}/share/applications/"* $out/share/applications makeWrapper ${jre}/bin/java $out/bin/$exec \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ --add-flags "-jar $out/share/java/${module}-${version}.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" ''; diff --git a/pkgs/applications/misc/tilda/default.nix b/pkgs/applications/misc/tilda/default.nix index bf99f0f5f6517..43b7312cda64e 100644 --- a/pkgs/applications/misc/tilda/default.nix +++ b/pkgs/applications/misc/tilda/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig autoreconfHook gettext confuse vte gtk makeWrapper ]; - LD_LIBRARY_PATH = "${expat}/lib"; # ugly hack for xgettext to work during build + LD_LIBRARY_PATH = "${expat.out}/lib"; # ugly hack for xgettext to work during build # The config locking scheme relies on the binary being called "tilda", # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice: diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix index 76de3627630a6..64b9009f15217 100644 --- a/pkgs/applications/misc/xca/default.nix +++ b/pkgs/applications/misc/xca/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/xca" \ - --prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.cc}/lib:${gcc.cc}/lib64:${openssl}/lib:${libtool}/lib" + --prefix LD_LIBRARY_PATH : \ + "${gcc.cc.lib}/lib64:${stdenv.lib.makeLibraryPath [ qt4 gcc.cc openssl libtool ]}" ''; buildInputs = [ openssl qt4 libtool gcc makeWrapper ]; diff --git a/pkgs/applications/misc/xneur/default.nix b/pkgs/applications/misc/xneur/default.nix index cc08436fa0331..8e3165b75d26b 100644 --- a/pkgs/applications/misc/xneur/default.nix +++ b/pkgs/applications/misc/xneur/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { sed -e 's@for imlib2_dir in@for imlib2_dir in ${imlib2} @' -i configure sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/include/gtk-2.0" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/lib/gtk-2.0/include" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo}/include/cairo" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango}/include/pango-1.0" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk}/include/atk-1.0" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf}/include/gdk-pixbuf-2.0" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf}/lib/gdk-pixbuf-2.0/include" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.dev}/include/gtk-2.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.out}/lib/gtk-2.0/include" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo.dev}/include/cairo" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango.dev}/include/pango-1.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk.dev}/include/atk-1.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/include" export NIX_LDFLAGS="$NIX_LDFLAGS -lnotify" ''; diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index cab6423b77e5e..92892b54845c6 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" - "TPUT=${ncurses}/bin/tput" + "TPUT=${ncurses.dev}/bin/tput" ]; postInstall = '' diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 0490afc04bcc5..943c87bd0a3df 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -8,7 +8,7 @@ , libusb1, libexif, pciutils , python, pythonPackages, perl, pkgconfig -, nspr, udev, kerberos +, nspr, libudev, kerberos , utillinux, alsaLib , bison, gperf , glib, gtk, dbus_glib @@ -107,7 +107,7 @@ let buildInputs = defaultDependencies ++ [ which python perl pkgconfig - nspr udev + nspr libudev (if useOpenSSL then openssl else nss) utillinux alsaLib bison gperf kerberos @@ -135,7 +135,7 @@ let s|= [^;]*|= base::FilePath().AppendASCII("${libexif}/lib/libexif.so")| }' chrome/utility/media_galleries/image_metadata_extractor.cc - sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${udev}/lib/\1!' \ + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${libudev.out}/lib/\1!' \ device/udev_linux/udev?_loader.cc sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ diff --git a/pkgs/applications/networking/browsers/dwb/default.nix b/pkgs/applications/networking/browsers/dwb/default.nix index d79a5215ce218..8a8478d3867aa 100644 --- a/pkgs/applications/networking/browsers/dwb/default.nix +++ b/pkgs/applications/networking/browsers/dwb/default.nix @@ -18,10 +18,10 @@ stdenv.mkDerivation { preFixup='' wrapProgram "$out/bin/dwb" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules:${dconf}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules:${dconf}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" wrapProgram "$out/bin/dwbem" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/browsers/jumanji/default.nix b/pkgs/applications/networking/browsers/jumanji/default.nix index 1969a1f502f2a..3555a712cc300 100644 --- a/pkgs/applications/networking/browsers/jumanji/default.nix +++ b/pkgs/applications/networking/browsers/jumanji/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { preFixup='' wrapProgram "$out/bin/jumanji" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/applications/networking/browsers/luakit/default.nix b/pkgs/applications/networking/browsers/luakit/default.nix index a3edaad37d40b..2777cb15fca93 100644 --- a/pkgs/applications/networking/browsers/luakit/default.nix +++ b/pkgs/applications/networking/browsers/luakit/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { in '' make DEVELOPMENT_PATHS=0 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1 install wrapProgram $out/bin/luakit \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/usr/share/:$out/share/:$GSETTINGS_SCHEMAS_PATH" \ --prefix XDG_CONFIG_DIRS : "$out/etc/xdg" \ --set LUA_PATH '"${luaKitPath};${luaPath};"' \ diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix index 5cdfcf5e975a0..d5e73c3be7d06 100644 --- a/pkgs/applications/networking/browsers/midori/default.nix +++ b/pkgs/applications/networking/browsers/midori/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram $out/bin/midori \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; } diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix index ba40925e1d1eb..f59de7db9f5c0 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # !!! fix this preBuild = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${browser}/include/xulrunner-*) -I${browser.nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${browser}/include/xulrunner-*) -I${browser.nspr.dev}/include/nspr" echo $NIX_CFLAGS_COMPILE ''; diff --git a/pkgs/applications/networking/browsers/uzbl/default.nix b/pkgs/applications/networking/browsers/uzbl/default.nix index 318b957639208..1a46b1adce8af 100644 --- a/pkgs/applications/networking/browsers/uzbl/default.nix +++ b/pkgs/applications/networking/browsers/uzbl/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { preFixup = '' for f in $out/bin/*; do wrapProgram $f \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix PYTHONPATH : "$PYTHONPATH" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" done diff --git a/pkgs/applications/networking/browsers/vimb/default.nix b/pkgs/applications/networking/browsers/vimb/default.nix index 84a2870b6d0aa..d67c8abf4569d 100644 --- a/pkgs/applications/networking/browsers/vimb/default.nix +++ b/pkgs/applications/networking/browsers/vimb/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/vimb" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/applications/networking/browsers/vimprobable2/default.nix b/pkgs/applications/networking/browsers/vimprobable2/default.nix index 6f8eede9b3f81..45aa2a9c2d124 100644 --- a/pkgs/applications/networking/browsers/vimprobable2/default.nix +++ b/pkgs/applications/networking/browsers/vimprobable2/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/vimprobable2" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/applications/networking/copy-com/default.nix b/pkgs/applications/networking/copy-com/default.nix index 968218309ed72..c9fecd9daeda2 100644 --- a/pkgs/applications/networking/copy-com/default.nix +++ b/pkgs/applications/networking/copy-com/default.nix @@ -41,7 +41,7 @@ in stdenv.mkDerivation { for binary in Copy{Agent,Console,Cmd}; do binary="$out/${appdir}/$binary" ln -sv "$binary" "$out/bin" - patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} "$binary" + patchelf --set-interpreter ${stdenv.glibc.out}/lib/${interpreter} "$binary" done # Older versions of this package happily installed broken copies of diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix index a254535dd703c..99196cdf796b9 100644 --- a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix +++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; NIX_CFLAGS_COMPILE = - "-I${libxml2}/include/libxml2 -I${json-c-0-11}/include/json-c"; + "-I${libxml2.dev}/include/libxml2 -I${json-c-0-11}/include/json-c"; NIX_LDFLAGS = "-lsqlite3 -lcurl -lxml2 -lstfl -ljson"; diff --git a/pkgs/applications/networking/ike/default.nix b/pkgs/applications/networking/ike/default.nix index 56341b64d6ce2..afb8c22272e43 100644 --- a/pkgs/applications/networking/ike/default.nix +++ b/pkgs/applications/networking/ike/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { installPhase = '' make install for file in "$out"/bin/* "$out"/sbin/*; do - wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc}/lib::${gcc.cc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib" + wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc.out}/lib::${gcc.cc}/lib64:${stdenv.glibc.out}/lib64:${libedit}/lib:${qt4}/lib" done ''; diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix index 7bb14efc1bb51..233eb38ae86e3 100644 --- a/pkgs/applications/networking/instant-messengers/blink/default.nix +++ b/pkgs/applications/networking/instant-messengers/blink/default.nix @@ -22,7 +22,7 @@ pythonPackages.buildPythonPackage rec { postInstall = '' wrapProgram $out/bin/blink \ - --prefix LD_LIBRARY_PATH ":" ${gnutls}/lib + --prefix LD_LIBRARY_PATH ":" ${gnutls.out}/lib ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix index 7368a8842147e..d29ec7ab8d3b1 100644 --- a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix +++ b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix @@ -1,4 +1,4 @@ -args @ { fetchurl, stdenv, pkgconfig, perl, perlXMLParser, libxml2, openssl, nss +args @ { fetchurl, stdenv, pkgconfig, perl, perlXMLParser, libxml2, openssl, nss, nspr , gtkspell, aspell, gettext, ncurses, avahi, dbus, dbus_glib, python , libtool, automake, autoconf, gstreamer , gtk, glib @@ -19,7 +19,7 @@ rec { buildInputs = [gtkspell aspell gstreamer startupnotification - libxml2 openssl nss + libxml2 openssl nss nspr libXScrnSaver ncurses scrnsaverproto libX11 xproto kbproto GConf avahi dbus dbus_glib glib python @@ -29,9 +29,9 @@ rec { pkgconfig gtk perl perlXMLParser gettext ]; - configureFlags="--with-nspr-includes=${nss}/include/nspr" - + " --with-nspr-libs=${nss}/lib --with-nss-includes=${nss}/include/nss" - + " --with-nss-libs=${nss}/lib --with-ncurses-headers=${ncurses}/include" + configureFlags="--with-nspr-includes=${nspr.dev}/include/nspr" + + " --with-nspr-libs=${nspr.out}/lib --with-nss-includes=${nss.dev}/include/nss" + + " --with-nss-libs=${nss.out}/lib --with-ncurses-headers=${ncurses.dev}/include" + " --enable-screensaver --disable-meanwhile --disable-nm --disable-tcl"; preBuild = fullDepEntry ('' diff --git a/pkgs/applications/networking/instant-messengers/oneteam/default.nix b/pkgs/applications/networking/instant-messengers/oneteam/default.nix index 2ab0930842bc0..bec367818e2ff 100644 --- a/pkgs/applications/networking/instant-messengers/oneteam/default.nix +++ b/pkgs/applications/networking/instant-messengers/oneteam/default.nix @@ -43,7 +43,7 @@ rec { '' ["minInit" "doUnpack"]; setVars=a.noDepEntry '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" ''; cmakeBuildDir="cmake-build"; diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index 5e8f266930ff7..ebb82a7826252 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -41,11 +41,11 @@ stdenv.mkDerivation rec { patches = [./pidgin-makefile.patch ./add-search-path.patch ]; configureFlags = [ - "--with-nspr-includes=${nspr}/include/nspr" - "--with-nspr-libs=${nspr}/lib" - "--with-nss-includes=${nss}/include/nss" - "--with-nss-libs=${nss}/lib" - "--with-ncurses-headers=${ncurses}/include" + "--with-nspr-includes=${nspr.dev}/include/nspr" + "--with-nspr-libs=${nspr.out}/lib" + "--with-nss-includes=${nss.dev}/include/nss" + "--with-nss-libs=${nss.out}/lib" + "--with-ncurses-headers=${ncurses.dev}/include" "--disable-meanwhile" "--disable-nm" "--disable-tcl" diff --git a/pkgs/applications/networking/instant-messengers/sflphone/default.nix b/pkgs/applications/networking/instant-messengers/sflphone/default.nix index 8b259c90fe508..7322ff2bb345a 100644 --- a/pkgs/applications/networking/instant-messengers/sflphone/default.nix +++ b/pkgs/applications/networking/instant-messengers/sflphone/default.nix @@ -40,7 +40,7 @@ rec { cd .. ''; - configureFlags = "--with-expat --with-expat-inc=${expat}/include " + + configureFlags = "--with-expat --with-expat-inc=${expat.dev}/include " + "--with-expat-lib=-lexpat --with-opus "; buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig libpulseaudio libsamplerate diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix index 532d68ad66050..84ced8f62c6ee 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix @@ -11,11 +11,11 @@ let call_ui = x : x // { NIX_CFLAGS_COMPILE = "-I${telepathy_glib}/include/telepathy-1.0" - + " -I${dbus_glib}/include/dbus-1.0" - + " -I${dbus_libs}/include/dbus-1.0"; + + " -I${dbus_glib.dev}/include/dbus-1.0" + + " -I${dbus_libs.dev}/include/dbus-1.0"; }; telepathy_logger_qt = x : x // { - NIX_CFLAGS_COMPILE = "-I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_libs.dev}/include/dbus-1.0"; }; }; diff --git a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix index 173dfe9c929f1..aaff39ccb44d1 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "18i00l8lnp5dghqmgmpxnn0is2a20pkisxy0sb78hnd2dz0z6xnl"; }; - NIX_CFLAGS_COMPILE = "-I${dbus_glib}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; buildInputs = [ dbus_glib libxml2 sqlite telepathy_glib pkgconfig intltool gobjectIntrospection dbus_libs ]; diff --git a/pkgs/applications/networking/newsreaders/liferea/default.nix b/pkgs/applications/networking/newsreaders/liferea/default.nix index def45c7e7565b..f2844edd4f034 100644 --- a/pkgs/applications/networking/newsreaders/liferea/default.nix +++ b/pkgs/applications/networking/newsreaders/liferea/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { wrapProgram "$f" \ --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ - --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" done ''; diff --git a/pkgs/applications/networking/p2p/retroshare/0.6.nix b/pkgs/applications/networking/p2p/retroshare/0.6.nix index 855ebdd059365..020d001705310 100644 --- a/pkgs/applications/networking/p2p/retroshare/0.6.nix +++ b/pkgs/applications/networking/p2p/retroshare/0.6.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "189qndkfq9kgv3qi3wx8ivla4j8fxr4iv7c8y9rjrjaz8jwdkn5x"; }; - NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2 -I${sqlcipher}/include/sqlcipher"; + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2 -I${sqlcipher}/include/sqlcipher"; patchPhase = '' # Fix build error diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix index a139531b19a63..e7fe79d66a564 100644 --- a/pkgs/applications/networking/p2p/retroshare/default.nix +++ b/pkgs/applications/networking/p2p/retroshare/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "0l2n4pr1hq66q6qa073hrdx3s3d7iw54z8ay1zy82zhk2rwhsavp"; }; - NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2"; patchPhase = '' sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \ diff --git a/pkgs/applications/networking/spideroak/default.nix b/pkgs/applications/networking/spideroak/default.nix index 525e154702320..fd060ad08801e 100644 --- a/pkgs/applications/networking/spideroak/default.nix +++ b/pkgs/applications/networking/spideroak/default.nix @@ -41,7 +41,7 @@ in stdenv.mkDerivation { mkdir "$out/bin" rm "$out/usr/bin/SpiderOakONE" - patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ + patchelf --set-interpreter ${stdenv.glibc.out}/lib/${interpreter} \ "$out/opt/SpiderOakONE/lib/SpiderOakONE" RPATH=$out/opt/SpiderOakONE/lib:${ldpath} diff --git a/pkgs/applications/science/astronomy/celestia/default.nix b/pkgs/applications/science/astronomy/celestia/default.nix index d4da5c113c999..0213348a593c7 100644 --- a/pkgs/applications/science/astronomy/celestia/default.nix +++ b/pkgs/applications/science/astronomy/celestia/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation { CPPFLAGS="-DNDEBUG" CFLAGS="-O2 -fsigned-char" CXXFLAGS="-O2 -fsigned-char" - GTK_CFLAGS="-I${gtk2}/include/gtk-2.0 -I${gtk2}/lib/gtk-2.0/include -I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${cairo}/include/cairo -I${pango}/include/pango-1.0 -I${gdk_pixbuf}/include/gdk-pixbuf-2.0 -I${atk}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include" + GTK_CFLAGS="-I${gtk2.dev}/include/gtk-2.0 -I${gtk2.out}/lib/gtk-2.0/include -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0 -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0 -I${atk.dev}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include" GTK_LIBS="-lgtk-x11-2.0 -lgtkglext-x11-1.0 -lcairo -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0" ) ''; diff --git a/pkgs/applications/science/electronics/tkgate/1.x.nix b/pkgs/applications/science/electronics/tkgate/1.x.nix index e9849d0460c8a..c62ecdcd1e2a4 100644 --- a/pkgs/applications/science/electronics/tkgate/1.x.nix +++ b/pkgs/applications/science/electronics/tkgate/1.x.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl, tcl, tk, libX11, glibc, which, yacc, flex, imake, xproto, gccmakedep }: let - libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include"; - libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib"; + libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc.dev}/include"; + libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc.out}/lib"; in stdenv.mkDerivation rec { name = "tkgate-1.8.7"; diff --git a/pkgs/applications/science/electronics/tkgate/2.x.nix b/pkgs/applications/science/electronics/tkgate/2.x.nix index 108986ddefe4b..166047a984136 100644 --- a/pkgs/applications/science/electronics/tkgate/2.x.nix +++ b/pkgs/applications/science/electronics/tkgate/2.x.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl, tcl, tk, libX11, glibc }: let - libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include"; - libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib"; + libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc.dev}/include"; + libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc.out}/lib"; in stdenv.mkDerivation rec { name = "tkgate-2.0-b10"; diff --git a/pkgs/applications/science/logic/hol/default.nix b/pkgs/applications/science/logic/hol/default.nix index f8a57aebb6dcb..c7fb4ffbb978a 100644 --- a/pkgs/applications/science/logic/hol/default.nix +++ b/pkgs/applications/science/logic/hol/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { buildCommand = '' mkdir chroot-fontconfig - cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf + cat ${fontconfig.out}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf echo "</fontconfig>" >> chroot-fontconfig/fonts.conf diff --git a/pkgs/applications/science/logic/saw-tools/default.nix b/pkgs/applications/science/logic/saw-tools/default.nix index eebe6ff0a06c8..97a06bf093d35 100644 --- a/pkgs/applications/science/logic/saw-tools/default.nix +++ b/pkgs/applications/science/logic/saw-tools/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { mv doc $out/share # Hack around lack of libtinfo in NixOS - ln -s ${ncurses}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5 + ln -s ${ncurses.lib}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5 ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0 # Add a clang symlink for easy building with a suitable compiler. diff --git a/pkgs/applications/science/logic/tptp/default.nix b/pkgs/applications/science/logic/tptp/default.nix index d4c6285875354..f3c0a7917cf30 100644 --- a/pkgs/applications/science/logic/tptp/default.nix +++ b/pkgs/applications/science/logic/tptp/default.nix @@ -65,7 +65,7 @@ rec { '' ["defEnsureDir" "minInit"]; patchBinaries = a.fullDepEntry '' - patchelf --set-interpreter "${pkgsi686Linux.glibc}"/lib/ld-linux.so.* \ + patchelf --set-interpreter "${pkgsi686Linux.glibc.out}"/lib/ld-linux.so.* \ "Scripts/tptp4X" '' ["addInputs"]; diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix index 5daaa444c1272..f495ee257ff05 100644 --- a/pkgs/applications/science/logic/yices/default.nix +++ b/pkgs/applications/science/logic/yices/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gmp, gperf, autoreconfHook }: +{ stdenv, fetchurl, gmp-static, gperf, autoreconfHook }: stdenv.mkDerivation rec { name = "yices-${version}"; @@ -10,10 +10,10 @@ stdenv.mkDerivation rec { sha256 = "1da70n0cah0dh3pk7fcrvjkszx9qmhc0csgl15jqa7bdh707k2zs"; }; - configureFlags = [ "--with-static-gmp=${gmp}/lib/libgmp.a" - "--with-static-gmp-include-dir=${gmp}/include" + configureFlags = [ "--with-static-gmp=${gmp-static.out}/lib/libgmp.a" + "--with-static-gmp-include-dir=${gmp-static.dev}/include" ]; - buildInputs = [ gmp gperf autoreconfHook ]; + buildInputs = [ gmp-static gperf autoreconfHook ]; meta = { description = "A high-performance theorem prover and SMT solver"; diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 555da3de6d533..631555234cee2 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -27,12 +27,12 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace antiword ${antiword}/bin/antiword substituteInPlace $f --replace awk ${gawk}/bin/awk substituteInPlace $f --replace catppt ${catdoc}/bin/catppt - substituteInPlace $f --replace djvused ${djvulibre}/bin/djvused - substituteInPlace $f --replace djvutxt ${djvulibre}/bin/djvutxt + substituteInPlace $f --replace djvused ${djvulibre.bin}/bin/djvused + substituteInPlace $f --replace djvutxt ${djvulibre.bin}/bin/djvutxt substituteInPlace $f --replace grep ${gnugrep}/bin/grep substituteInPlace $f --replace groff ${groff}/bin/groff substituteInPlace $f --replace gunzip ${gzip}/bin/gunzip - substituteInPlace $f --replace iconv ${libiconv}/bin/iconv + substituteInPlace $f --replace iconv ${libiconv.bin}/bin/iconv substituteInPlace $f --replace lyx ${lyx}/bin/lyx substituteInPlace $f --replace pdftotext ${poppler_utils}/bin/pdftotext substituteInPlace $f --replace pstotext ${ghostscript}/bin/ps2ascii @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace tar ${gnutar}/bin/tar substituteInPlace $f --replace unzip ${unzip}/bin/unzip substituteInPlace $f --replace xls2csv ${catdoc}/bin/xls2csv - substituteInPlace $f --replace xsltproc ${libxslt}/bin/xsltproc + substituteInPlace $f --replace xsltproc ${libxslt.bin}/bin/xsltproc substituteInPlace $f --replace unrtf ${unrtf}/bin/unrtf substituteInPlace $f --replace untex ${untex}/bin/untex substituteInPlace $f --replace wpd2html ${libwpd}/bin/wpd2html 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 91fe1662efec8..f282fa6635b81 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 @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildPhase = '' sed -i 's|/bin/cat|cat|' ./src/repository.cpp qmake - make CXXFLAGS='-I${apr}/include/apr-1 -I${subversion}/include/subversion-1 -DVER="\"${src.rev}\""' + make CXXFLAGS='-I${apr}/include/apr-1 -I${subversion.dev}/include/subversion-1 -DVER="\"${src.rev}\""' ''; installPhase = '' diff --git a/pkgs/applications/version-management/rabbitvcs/default.nix b/pkgs/applications/version-management/rabbitvcs/default.nix index 100e854f29b87..9f817a397f0e1 100644 --- a/pkgs/applications/version-management/rabbitvcs/default.nix +++ b/pkgs/applications/version-management/rabbitvcs/default.nix @@ -17,7 +17,7 @@ python2Packages.buildPythonPackage rec { sed -ie 's|if sys\.argv\[1\] == "install":|if False:|' ./setup.py sed -ie "s|PREFIX = sys.prefix|PREFIX = \"$out\"|" ./setup.py sed -ie 's|/usr/bin/meld|${meld}/bin/meld|' ./rabbitvcs/util/configspec/configspec.ini - sed -ie 's|/usr/bin/svnadmin|${subversion}/bin/svnadmin|' ./rabbitvcs/ui/create.py + sed -ie 's|/usr/bin/svnadmin|${subversion.out}/bin/svnadmin|' ./rabbitvcs/ui/create.py sed -ie "s|/usr/share/doc|$out/share/doc|" ./rabbitvcs/ui/about.py sed -ie "s|gnome-open|xdg-open|" ./rabbitvcs/util/helper.py ''; diff --git a/pkgs/applications/version-management/rapidsvn/default.nix b/pkgs/applications/version-management/rapidsvn/default.nix index 843fe9ad3230d..9397aa8a1e19c 100644 --- a/pkgs/applications/version-management/rapidsvn/default.nix +++ b/pkgs/applications/version-management/rapidsvn/default.nix @@ -10,8 +10,8 @@ stdenv.mkDerivation { buildInputs = [ wxGTK subversion apr aprutil python ]; - configureFlags = [ "--with-svn-include=${subversion}/include" - "--with-svn-lib=${subversion}/lib" ]; + configureFlags = [ "--with-svn-include=${subversion.dev}/include" + "--with-svn-lib=${subversion.out}/lib" ]; meta = { description = "Multi-platform GUI front-end for the Subversion revision system"; diff --git a/pkgs/applications/version-management/redmine/bootstrap.nix b/pkgs/applications/version-management/redmine/bootstrap.nix index 5971f2e9cddcc..82643f18a554b 100644 --- a/pkgs/applications/version-management/redmine/bootstrap.nix +++ b/pkgs/applications/version-management/redmine/bootstrap.nix @@ -32,8 +32,8 @@ in stdenv.mkDerivation rec { bundle config --local build.nokogiri --use-system-libraries \ --with-iconv-dir=${libiconv} \ - --with-xslt-dir=${libxslt} \ - --with-xml2-dir=${libxml2} \ + --with-xslt-dir=${libxslt.out} \ + --with-xml2-dir=${libxml2.out} \ --with-pkg-config \ --with-pg-config=${postgresql}/bin/pg_config diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index f563bebd9db83..30af36b4880ff 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -38,6 +38,9 @@ stdenv.mkDerivation (rec { inherit (config.${branch}) sha1; }; + # Can't do separate $lib and $bin, as libs reference bins + outputs = [ "dev" "out" "man" ]; + buildInputs = [ zlib apr aprutil sqlite ] ++ stdenv.lib.optional httpSupport serf ++ stdenv.lib.optional pythonBindings python @@ -77,6 +80,12 @@ stdenv.mkDerivation (rec { mkdir -p $out/share/bash-completion/completions cp tools/client-side/bash_completion $out/share/bash-completion/completions/subversion + + for f in $out/lib/*.la; do + substituteInPlace $f --replace "${expat.dev}/lib" "${expat.out}/lib" + substituteInPlace $f --replace "${zlib.dev}/lib" "${zlib.out}/lib" + substituteInPlace $f --replace "${sqlite.dev}/lib" "${sqlite.out}/lib" + done ''; inherit perlBindings pythonBindings; diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix index 89773be9adaf6..e2aaf30d0c323 100644 --- a/pkgs/applications/video/avidemux/default.nix +++ b/pkgs/applications/video/avidemux/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation { lame faad2 libvorbis yasm libvpx xvidcore libva ] ++ stdenv.lib.optional faacSupport faac; - cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include" + + cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc.dev}/include" + " -DGETTEXT_INCLUDE_DIR=${gettext}/include" + - " -DSDL_INCLUDE_DIR=${SDL}/include/SDL"; + " -DSDL_INCLUDE_DIR=${SDL.dev}/include/SDL"; NIX_LDFLAGS="-lpthread"; diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix index 7d136de779a4c..5bd2087b3458e 100644 --- a/pkgs/applications/video/clipgrab/default.nix +++ b/pkgs/applications/video/clipgrab/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { postPatch = stdenv.lib.optionalString (ffmpeg != null) '' substituteInPlace converter_ffmpeg.cpp \ - --replace '"ffmpeg"' '"${ffmpeg}/bin/ffmpeg"' \ - --replace '"ffmpeg ' '"${ffmpeg}/bin/ffmpeg ' + --replace '"ffmpeg"' '"${ffmpeg.bin}/bin/ffmpeg"' \ + --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg ' ''; configurePhase = '' diff --git a/pkgs/applications/video/dvd-slideshow/default.nix b/pkgs/applications/video/dvd-slideshow/default.nix index a6197c2e6e13b..96de3412ea061 100644 --- a/pkgs/applications/video/dvd-slideshow/default.nix +++ b/pkgs/applications/video/dvd-slideshow/default.nix @@ -4,7 +4,7 @@ let wrapper = writeScript "dvd-slideshow.sh" '' #!/bin/bash # wrapper script for dvd-slideshow programs - export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbisTools}/bin:$PATH + export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg.bin}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbisTools}/bin:$PATH dir=`dirname "$0"` exe=`basename "$0"` diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix index f53ce93328bfb..0200b0c70f4e9 100644 --- a/pkgs/applications/video/gnash/default.nix +++ b/pkgs/applications/video/gnash/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { for lib in $libs; do echo -n "$lib " >> macros/libslist done - echo -n "${stdenv.glibc}/lib" >> macros/libslist + echo -n "${stdenv.glibc.out}/lib" >> macros/libslist # Make sure to honor $TMPDIR, for chroot builds. for file in configure gui/Makefile.in Makefile.in @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { preConfigure = '' configureFlags=" \ - --with-sdl-incl=${SDL}/include/SDL \ + --with-sdl-incl=${SDL.dev}/include/SDL \ --with-npapi-plugindir=$out/plugins \ --enable-media=gst \ --without-gconf diff --git a/pkgs/applications/video/kazam/default.nix b/pkgs/applications/video/kazam/default.nix index 17bf282a459ad..1e3f5d57a0642 100644 --- a/pkgs/applications/video/kazam/default.nix +++ b/pkgs/applications/video/kazam/default.nix @@ -34,9 +34,9 @@ python3Packages.buildPythonPackage rec { preFixup = '' wrapProgram $out/bin/kazam \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ - --prefix LD_LIBRARY_PATH ":" "${gtk3}/lib:${gst_all_1.gstreamer}/lib:${keybinder}/lib" \ + --prefix LD_LIBRARY_PATH ":" "${gtk3.out}/lib:${gst_all_1.gstreamer}/lib:${keybinder}/lib" \ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share" \ + --prefix XDG_DATA_DIRS : "${gtk3.out}/share" \ --set GST_REGISTRY "/tmp/kazam.gstreamer.registry"; ''; diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index e1dc182ba0b97..792cb67f81240 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -104,14 +104,10 @@ in stdenv.mkDerivation rec { --prefix PATH ":" "${pythonFull}/bin" \ --prefix PATH ":" "${glxinfo}/bin" \ --prefix PATH ":" "${xdpyinfo}/bin" \ - --prefix LD_LIBRARY_PATH ":" "${curl}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${systemd}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${libmad}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${libcec}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${libcec_platform}/lib" \ + --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath + [ curl systemd libmad libvdpau libcec libcec_platform rtmpdump ] + }" --prefix LD_LIBRARY_PATH ":" "${libass}/lib" \ - --prefix LD_LIBRARY_PATH ":" "${rtmpdump}/lib" done ''; diff --git a/pkgs/applications/video/miro/default.nix b/pkgs/applications/video/miro/default.nix index 6585306b2898d..5209cce36a111 100644 --- a/pkgs/applications/video/miro/default.nix +++ b/pkgs/applications/video/miro/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { sed -i -e 's|/usr/bin/||' -e 's|/usr||' \ -e 's/BUILD_TIME[^,]*/BUILD_TIME=0/' setup.py - sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg}/bin/ffmpeg"|' \ + sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg.bin}/bin/ffmpeg"|' \ plat/options.py sed -i -e 's|/usr/share/miro/themes|'"$out/share/miro/themes"'|' \ @@ -64,7 +64,7 @@ buildPythonPackage rec { mv "$out/bin/miro.real" "$out/bin/miro" wrapProgram "$out/bin/miro" \ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" ''; diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index 9f2ed3c3c5d1f..37583648a74db 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { sha256 = "1jqzrzrpw6932lbkf863xk8cfmn4z2ngbxz7w8ggmh4f6xz9sgal"; }; + # outputs TODO: some modules are "corrupt", even without splitting vlc + buildInputs = [ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix index b876403d63279..d1150d7024b29 100644 --- a/pkgs/applications/virtualization/bochs/default.nix +++ b/pkgs/applications/virtualization/bochs/default.nix @@ -143,8 +143,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional busMouse "--enable-busmouse" ; - NIX_CFLAGS_COMPILE="-I${gtk}/include/gtk-2.0/ -I${libtool}/include/"; - NIX_LDFLAGS="-L${libtool}/lib"; + NIX_CFLAGS_COMPILE="-I${gtk.dev}/include/gtk-2.0/ -I${libtool}/include/"; + NIX_LDFLAGS="-L${libtool.lib}/lib"; meta = with stdenv.lib; { description = "An open-source IA-32 (x86) PC emulator"; diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index b84272b7547fc..5e1986076765d 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -81,14 +81,14 @@ in stdenv.mkDerivation { -e 's@MKISOFS --version@MKISOFS -version@' \ -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \ -i configure - ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 - ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 + ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 + ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 find . -type f -iname '*makefile*' -exec sed -i -e 's/depmod -a/:/g' {} + sed -i -e ' - s@"libdbus-1\.so\.3"@"${dbus}/lib/libdbus-1.so.3"@g - s@"libasound\.so\.2"@"${alsaLib}/lib/libasound.so.2"@g + s@"libdbus-1\.so\.3"@"${dbus.lib}/lib/libdbus-1.so.3"@g + s@"libasound\.so\.2"@"${alsaLib.out}/lib/libasound.so.2"@g ${optionalString pulseSupport '' - s@"libpulse\.so\.0"@"${libpulseaudio}/lib/libpulse.so.0"@g + s@"libpulse\.so\.0"@"${libpulseaudio.out}/lib/libpulse.so.0"@g ''} ' src/VBox/Main/xml/Settings.cpp \ src/VBox/Devices/Audio/{alsa,pulse}_stubs.c \ diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 4ef62baa3d9fe..0d2e0568523ac 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -63,19 +63,19 @@ stdenv.mkDerivation { for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} lib/VBoxGuestAdditions/mount.vboxsf do ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $i + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $i + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i '' else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") } - patchelf --set-rpath ${stdenv.cc.cc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i + patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i done for i in lib/VBoxOGL*.so do - patchelf --set-rpath $out/lib:${dbus}/lib $i + patchelf --set-rpath $out/lib:${dbus.lib}/lib $i done # FIXME: Virtualbox 4.3.22 moved VBoxClient-all (required by Guest Additions diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix index 71c26c5f99c91..5f4147ea2cfa7 100644 --- a/pkgs/applications/virtualization/xen/generic.nix +++ b/pkgs/applications/virtualization/xen/generic.nix @@ -130,7 +130,7 @@ stdenv.mkDerivation { --replace /usr/bin/pkill ${procps}/bin/pkill substituteInPlace tools/xenstat/Makefile \ - --replace /usr/include/curses.h ${ncurses}/include/curses.h + --replace /usr/include/curses.h ${ncurses.dev}/include/curses.h substituteInPlace tools/qemu-xen-traditional/xen-hooks.mak \ --replace /usr/include/pci ${pciutils}/include/pci diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix index 9c9d3d5f45144..0e05afa0d60e6 100644 --- a/pkgs/applications/window-managers/awesome/default.nix +++ b/pkgs/applications/window-managers/awesome/default.nix @@ -60,8 +60,8 @@ stdenv.mkDerivation rec { #cmakeFlags = "-DGENERATE_MANPAGES=ON"; - LD_LIBRARY_PATH = "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib"; - GI_TYPELIB_PATH = "${pango}/lib/girepository-1.0"; + LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ cairo pango gobjectIntrospection ]}"; + GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0"; LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so"; LUA_PATH = "${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua"; @@ -70,8 +70,8 @@ stdenv.mkDerivation rec { --prefix LUA_CPATH ";" '"${lgi}/lib/lua/${lua.luaversion}/?.so"' \ --prefix LUA_PATH ";" '"${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua"' \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ - --prefix LD_LIBRARY_PATH : "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib" \ - --prefix PATH : "${compton}/bin:${unclutter}/bin:${procps}/bin:${iproute}/sbin:${coreutils}/bin:${curl}/bin:${alsaUtils}/bin:${findutils}/bin:${xterm}/bin" + --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \ + --prefix PATH : "${compton}/bin:${unclutter}/bin:${procps}/bin:${iproute}/sbin:${coreutils}/bin:${curl.bin}/bin:${alsaUtils}/bin:${findutils}/bin:${xterm}/bin" wrapProgram $out/bin/awesome-client \ --prefix PATH : "${which}/bin" diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix index 743530e3998b6..1043e3a1f64b3 100644 --- a/pkgs/applications/window-managers/qtile/default.nix +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildPythonPackage, python27Packages, pkgs }: +{ stdenv, lib, fetchFromGitHub, buildPythonPackage, python27Packages, pkgs }: buildPythonPackage rec { name = "qtile-${version}"; @@ -20,20 +20,18 @@ buildPythonPackage rec { buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ]; cairocffi-xcffib = python27Packages.cairocffi.override { - LD_LIBRARY_PATH = "${pkgs.xorg.libxcb}/lib:${pkgs.cairo}/lib"; + inherit LD_LIBRARY_PATH; pythonPath = [ python27Packages.xcffib ]; }; pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline ]; - LD_LIBRARY_PATH = "${pkgs.xorg.libxcb}/lib:${pkgs.cairo}/lib"; + LD_LIBRARY_PATH = "${lib.makeLibraryPath [ pkgs.xorg.libxcb pkgs.cairo ]}"; postInstall = '' wrapProgram $out/bin/qtile \ - --prefix LD_LIBRARY_PATH : ${pkgs.xorg.libxcb}/lib \ - --prefix LD_LIBRARY_PATH : ${pkgs.glib}/lib \ - --prefix LD_LIBRARY_PATH : ${pkgs.cairo}/lib \ - --prefix LD_LIBRARY_PATH : ${pkgs.pango}/lib + --prefix LD_LIBRARY_PATH : \ + "${LD_LIBRARY_PATH}:${lib.makeLibraryPath [ pkgs.glib pkgs.pango ]}" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index 862e8b0ea01ea..0720368222dcd 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ wayland mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm - mtdev libjpeg pam dbus.libs libinput pango libunwind freerdp vaapi libva + mtdev libjpeg pam dbus libinput pango libunwind freerdp vaapi libva libwebp ]; diff --git a/pkgs/build-support/cc-wrapper/add-flags b/pkgs/build-support/cc-wrapper/add-flags index d483615390477..59d9614fd21fc 100644 --- a/pkgs/build-support/cc-wrapper/add-flags +++ b/pkgs/build-support/cc-wrapper/add-flags @@ -5,7 +5,7 @@ if [ -e @out@/nix-support/libc-cflags ]; then export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/libc-cflags) $NIX_CFLAGS_COMPILE" fi -if [ -e @out@/nix-support/gcc-cflags ]; then +if [ -e @out@/nix-support/cc-cflags ]; then export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE" fi @@ -17,7 +17,7 @@ if [ -e @out@/nix-support/libc-ldflags ]; then export NIX_LDFLAGS+=" $(cat @out@/nix-support/libc-ldflags)" fi -if [ -e @out@/nix-support/gcc-ldflags ]; then +if [ -e @out@/nix-support/cc-ldflags ]; then export NIX_LDFLAGS+=" $(cat @out@/nix-support/cc-ldflags)" fi diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 9822b1a026a18..0c7bf5b667f35 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -26,6 +26,13 @@ let ccVersion = (builtins.parseDrvName cc.name).version; ccName = (builtins.parseDrvName cc.name).name; + libc_bin = if nativeLibc then null else libc.bin or libc; + libc_dev = if nativeLibc then null else libc.dev or libc; + libc_lib = if nativeLibc then null else libc.out or libc; + cc_solib = cc.lib or cc; + binutils_bin = if nativeTools then null else binutils.bin or binutils; + # The wrapper scripts use 'cat', so we may need coreutils. + coreutils_bin = if nativeTools then null else coreutils.bin or coreutils; in stdenv.mkDerivation { @@ -35,13 +42,9 @@ stdenv.mkDerivation { preferLocalBuild = true; - inherit cc shell; - libc = if nativeLibc then null else libc; - binutils = if nativeTools then null else binutils; - # The wrapper scripts use 'cat', so we may need coreutils. - coreutils = if nativeTools then null else coreutils; + inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin; - passthru = { inherit nativeTools nativeLibc nativePrefix isGNU isClang; }; + passthru = { inherit libc nativeTools nativeLibc nativePrefix isGNU isClang; }; buildCommand = '' @@ -57,11 +60,11 @@ stdenv.mkDerivation { '' + optionalString (!nativeLibc) (if (!stdenv.isDarwin) then '' - dynamicLinker="$libc/lib/$dynamicLinker" + dynamicLinker="${libc_lib}/lib/$dynamicLinker" echo $dynamicLinker > $out/nix-support/dynamic-linker - if [ -e $libc/lib/32/ld-linux.so.2 ]; then - echo $libc/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32 + if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then + echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32 fi # The dynamic linker is passed in `ldflagsBefore' to allow @@ -86,11 +89,11 @@ stdenv.mkDerivation { # compile, because it uses "#include_next <limits.h>" to find the # limits.h file in ../includes-fixed. To remedy the problem, # another -idirafter is necessary to add that directory again. - echo "-B$libc/lib/ -idirafter $libc/include -idirafter $cc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags + echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include -idirafter $cc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags - echo "-L$libc/lib" > $out/nix-support/libc-ldflags + echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags - echo $libc > $out/nix-support/orig-libc + echo "${libc_lib}" > $out/nix-support/orig-libc '' + (if nativeTools then '' @@ -103,14 +106,14 @@ stdenv.mkDerivation { # $cc/lib64 (even though it does actually search there...).. # This confuses libtool. So add it to the compiler tool search # path explicitly. - if [ -e "$cc/lib64" -a ! -L "$cc/lib64" ]; then - ccLDFlags+=" -L$cc/lib64" - ccCFlags+=" -B$cc/lib64" + if [ -e "${cc.out}/lib64" -a ! -L "${cc.out}/lib64" ]; then + ccLDFlags+=" -L${cc_solib}/lib64" + ccCFlags+=" -B${cc.out}/lib64" fi - ccLDFlags+=" -L$cc/lib" + ccLDFlags+=" -L${cc_solib}/lib" ${optionalString cc.langVhdl or false '' - ccLDFlags+=" -L${zlib}/lib" + ccLDFlags+=" -L${zlib.out}/lib" ''} # Find the gcc libraries path (may work only without multilib). @@ -132,12 +135,12 @@ stdenv.mkDerivation { echo "$ccCFlags" > $out/nix-support/cc-cflags ccPath="$cc/bin" - ldPath="$binutils/bin" + ldPath="${binutils_bin}/bin" # Propagate the wrapped cc so that if you install the wrapper, # you get tools like gcov, the manpages, etc. as well (including # for binutils and Glibc). - echo $cc $binutils $libc > $out/nix-support/propagated-user-env-packages + echo ${cc} ${cc.man or ""} ${binutils_bin} ${libc_bin} > $out/nix-support/propagated-user-env-packages echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs '' @@ -159,12 +162,12 @@ stdenv.mkDerivation { wrap ld ${./ld-wrapper.sh} ''${ld:-$ldPath/ld} - if [ -e $binutils/bin/ld.gold ]; then - wrap ld.gold ${./ld-wrapper.sh} $binutils/bin/ld.gold + if [ -e ${binutils_bin}/bin/ld.gold ]; then + wrap ld.gold ${./ld-wrapper.sh} ${binutils_bin}/bin/ld.gold fi - if [ -e $binutils/bin/ld.bfd ]; then - wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd + if [ -e ${binutils_bin}/bin/ld.bfd ]; then + wrap ld.bfd ${./ld-wrapper.sh} ${binutils_bin}/bin/ld.bfd fi export real_cc=cc diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index 3d0b2fdfe8ae6..d8fb88b41d18b 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -26,16 +26,16 @@ if [ -n "@cc@" ]; then addToSearchPath PATH @cc@/bin fi -if [ -n "@binutils@" ]; then - addToSearchPath PATH @binutils@/bin +if [ -n "@binutils_bin@" ]; then + addToSearchPath PATH @binutils_bin@/bin fi -if [ -n "@libc@" ]; then - addToSearchPath PATH @libc@/bin +if [ -n "@libc_bin@" ]; then + addToSearchPath PATH @libc_bin@/bin fi -if [ -n "@coreutils@" ]; then - addToSearchPath PATH @coreutils@/bin +if [ -n "@coreutils_bin@" ]; then + addToSearchPath PATH @coreutils_bin@/bin fi if [ -z "$crossConfig" ]; then diff --git a/pkgs/build-support/gcc-wrapper-old/builder.sh b/pkgs/build-support/gcc-wrapper-old/builder.sh index 59cdd3f84ad22..1fa72deb234e3 100644 --- a/pkgs/build-support/gcc-wrapper-old/builder.sh +++ b/pkgs/build-support/gcc-wrapper-old/builder.sh @@ -24,7 +24,7 @@ if test -z "$nativeLibc"; then # compile, because it uses "#include_next <limits.h>" to find the # limits.h file in ../includes-fixed. To remedy the problem, # another -idirafter is necessary to add that directory again. - echo "-B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags + echo "-B$libc/lib/ -idirafter $libc_dev/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags echo "-L$libc/lib" > $out/nix-support/libc-ldflags @@ -39,9 +39,9 @@ if test -n "$nativeTools"; then ldPath="$nativePrefix/bin" else if test -e "$gcc/lib64"; then - gccLDFlags="$gccLDFlags -L$gcc/lib64" + gccLDFlags="$gccLDFlags -L$gcc_lib/lib64" fi - gccLDFlags="$gccLDFlags -L$gcc/lib" + gccLDFlags="$gccLDFlags -L$gcc_lib/lib" if [ -n "$langVhdl" ]; then gccLDFlags="$gccLDFlags -L$zlib/lib" fi @@ -95,6 +95,7 @@ doSubstitute() { -e "s^@binutils@^$binutils^g" \ -e "s^@coreutils@^$coreutils^g" \ -e "s^@libc@^$libc^g" \ + -e "s^@libc_bin@^$libc_bin^g" \ -e "s^@ld@^$ld^g" \ < "$src" > "$dst" } @@ -210,5 +211,5 @@ cp -p $utils $out/nix-support/utils.sh # tools like gcov, the manpages, etc. as well (including for binutils # and Glibc). if test -z "$nativeTools"; then - echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages + echo $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages fi diff --git a/pkgs/build-support/gcc-wrapper-old/default.nix b/pkgs/build-support/gcc-wrapper-old/default.nix index 20f1bc97ad1b8..f44aaec5d9d77 100644 --- a/pkgs/build-support/gcc-wrapper-old/default.nix +++ b/pkgs/build-support/gcc-wrapper-old/default.nix @@ -41,7 +41,10 @@ stdenv.mkDerivation { addFlags = ./add-flags; inherit nativeTools nativeLibc nativePrefix gcc; + gcc_lib = gcc.lib or gcc; libc = if nativeLibc then null else libc; + libc_dev = if nativeLibc then null else libc.dev or libc; + libc_bin = if nativeLibc then null else libc.bin or libc; binutils = if nativeTools then null else binutils; # The wrapper scripts use 'cat', so we may need coreutils coreutils = if nativeTools then null else coreutils; diff --git a/pkgs/build-support/gcc-wrapper-old/setup-hook.sh b/pkgs/build-support/gcc-wrapper-old/setup-hook.sh index 298ade21d1f59..d8bdf858ae58c 100644 --- a/pkgs/build-support/gcc-wrapper-old/setup-hook.sh +++ b/pkgs/build-support/gcc-wrapper-old/setup-hook.sh @@ -25,7 +25,7 @@ if test -n "@binutils@"; then fi if test -n "@libc@"; then - addToSearchPath PATH @libc@/bin + addToSearchPath PATH @libc_bin@/bin fi if test -n "@coreutils@"; then diff --git a/pkgs/build-support/grsecurity/default.nix b/pkgs/build-support/grsecurity/default.nix index 3bf40a2e8d6b2..e3b257a82d0b1 100644 --- a/pkgs/build-support/grsecurity/default.nix +++ b/pkgs/build-support/grsecurity/default.nix @@ -126,9 +126,9 @@ let buildInputs = args.buildInputs ++ [ pkgs.gmp ]; preConfigure = '' ${args.preConfigure or ""} - sed -i 's|-I|-I${pkgs.gmp}/include -I|' scripts/gcc-plugin.sh - sed -i 's|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile - sed -i 's|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile + sed -i 's|-I|-I${pkgs.gmp.dev}/include -I|' scripts/gcc-plugin.sh + sed -i 's|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += -I${pkgs.gmp.dev}/include|' tools/gcc/Makefile + sed -i 's|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += -I${pkgs.gmp.dev}/include|' tools/gcc/Makefile rm localversion-grsec echo ${localver grkern} > localversion-grsec ''; diff --git a/pkgs/build-support/setup-hooks/compress-man-pages.sh b/pkgs/build-support/setup-hooks/compress-man-pages.sh index 1dd9788419b84..f1d9cf3a3696d 100644 --- a/pkgs/build-support/setup-hooks/compress-man-pages.sh +++ b/pkgs/build-support/setup-hooks/compress-man-pages.sh @@ -3,6 +3,7 @@ fixupOutputHooks+=('if [ -z "$dontGzipMan" ]; then compressManPages "$prefix"; f compressManPages() { local dir="$1" + if [ ! -d "$dir/share/man" ]; then return; fi echo "gzipping man pages in $dir" GLOBIGNORE=.:..:*.gz:*.bz2 diff --git a/pkgs/build-support/setup-hooks/move-docs.sh b/pkgs/build-support/setup-hooks/move-docs.sh index 57b71c15691d0..ef31dcdce2747 100644 --- a/pkgs/build-support/setup-hooks/move-docs.sh +++ b/pkgs/build-support/setup-hooks/move-docs.sh @@ -2,7 +2,7 @@ # $out/share/man to $man/share/man; and moves $out/share/doc to # $man/share/doc. -preFixupHooks+=(_moveDocs) +preFixupHooks+=(_moveToShare) _moveToShare() { forceShare=${forceShare:=man doc info} @@ -21,31 +21,3 @@ _moveToShare() { done } -_moveToOutput() { - local d="$1" - local dst="$2" - if [ -z "$dst" -a ! -e $dst/$d ]; then return; fi - local output - for output in $outputs; do - if [ "${!output}" = "$dst" ]; then continue; fi - if [ -d "${!output}/$d" ]; then - echo "moving ${!output}/$d to $dst/$d" - mkdir -p $dst/share - mv ${!output}/$d $dst/$d - break - fi - done -} - -_moveDocs() { - _moveToShare - _moveToOutput share/man "$man" - _moveToOutput share/info "$info" - _moveToOutput share/doc "$doc" - _moveToOutput share/gtk-doc "$doc" - - # Remove empty share directory. - if [ -d "$out/share" ]; then - rmdir $out/share 2> /dev/null || true - fi -} diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh new file mode 100644 index 0000000000000..d8a9763a0c2fa --- /dev/null +++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh @@ -0,0 +1,178 @@ +# The base package for automatic multiple-output splitting. Used in stdenv as well. +preConfigureHooks+=(_multioutConfig) +preFixupHooks+=(_multioutDocs) +preFixupHooks+=(_multioutDevs) +postFixupHooks+=(_multioutPropagateDev) + +# Assign the first string containing nonempty variable to the variable named $1 +_assignFirst() { + local varName="$1" + local REMOVE=REMOVE # slightly hacky - we allow REMOVE (i.e. not a variable name) + shift + while [ $# -ge 1 ]; do + if [ -n "${!1}" ]; then eval "${varName}"="$1"; return; fi + shift + done + echo "Error: _assignFirst found no valid variant!" + return 1 # none found +} +# Same as _assignFirst, but only if "$1" = "" +_overrideFirst() { + if [ -z "${!1}" ]; then + _assignFirst "$@" + fi +} + + +# Setup chains of sane default values with easy overridability. +# The variables are global to be usable anywhere during the build. +# Typical usage in package is defining outputBin = "dev"; + +_overrideFirst outputDev "dev" "out" +_overrideFirst outputBin "bin" "out" + +_overrideFirst outputInclude "$outputDev" + +# so-libs are often among the main things to keep, and so go to $out +_overrideFirst outputLib "lib" "out" + +_overrideFirst outputDoc "doc" "out" +_overrideFirst outputDocdev "docdev" REMOVE # documentation for developers +# man and info pages are small and often useful to distribute with binaries +_overrideFirst outputMan "man" "doc" "$outputBin" +_overrideFirst outputInfo "info" "doc" "$outputMan" + + +# Add standard flags to put files into the desired outputs. +_multioutConfig() { + if [ "$outputs" = "out" ] || [ -z "${setOutputFlags-1}" ]; then return; fi; + + configureFlags="\ + --bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \ + --includedir=${!outputInclude}/include --oldincludedir=${!outputInclude}/include \ + --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \ + --docdir=${!outputDoc}/share/doc \ + --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \ + --localedir=${!outputLib}/share/locale \ + $configureFlags" + + installFlags="\ + pkgconfigdir=${!outputDev}/lib/pkgconfig \ + m4datadir=${!outputDev}/share/aclocal aclocaldir=${!outputDev}/share/aclocal \ + $installFlags" +} + +# Add rpath prefixes to library paths, and avoid stdenv doing it for $out. +_addRpathPrefix "${!outputLib}" +NIX_NO_SELF_RPATH=1 + + +# Move subpaths that match pattern $1 from under any output/ to the $2 output/ +# Beware: only globbing patterns are accepted, e.g.: * ? {foo,bar} +# A special target "REMOVE" is allowed: _moveToOutput foo REMOVE +_moveToOutput() { + local patt="$1" + local dstOut="$2" + local output + for output in $outputs; do + if [ "${!output}" = "$dstOut" ]; then continue; fi + local srcPath + for srcPath in "${!output}"/$patt; do + if [ ! -e "$srcPath" ]; then continue; fi + + if [ "$dstOut" = REMOVE ]; then + echo "Removing $srcPath" + rm -r "$srcPath" + else + local dstPath="$dstOut${srcPath#${!output}}" + echo "Moving $srcPath to $dstPath" + + if [ -d "$dstPath" ] && [ -d "$srcPath" ] + then # attempt directory merge + # check the case of trying to move an empty directory + rmdir "$srcPath" --ignore-fail-on-non-empty + if [ -d "$srcPath" ]; then + mv -t "$dstPath" "$srcPath"/* + rmdir "$srcPath" + fi + else # usual move + mkdir -p "$(readlink -m "$dstPath/..")" + mv "$srcPath" "$dstPath" + fi + fi + + # remove empty directories, printing iff at least one gets removed + local srcParent="$(readlink -m "$srcPath/..")" + if rmdir "$srcParent"; then + echo "Removing empty $srcParent/ and (possibly) its parents" + rmdir -p --ignore-fail-on-non-empty "$(readlink -m "$srcParent/..")" \ + > /dev/null || true # doesn't ignore failure for some reason + fi + done + done +} + +# Move documentation to the desired outputs. +_multioutDocs() { + if [ "$outputs" = "out" ]; then return; fi; + local REMOVE=REMOVE # slightly hacky - we expand ${!outputFoo} + + _moveToOutput share/info "${!outputInfo}" + _moveToOutput share/doc "${!outputDoc}" + _moveToOutput share/gtk-doc "${!outputDocdev}" + + # the default outputMan is in $bin + _moveToOutput share/man "${!outputMan}" + _moveToOutput share/man/man3 "${!outputDocdev}" +} + +# Move development-only stuff to the desired outputs. +_multioutDevs() { + if [ "$outputs" = "out" ] || [ -z "${moveToDev-1}" ]; then return; fi; + _moveToOutput include "${!outputInclude}" + # these files are sometimes provided even without using the corresponding tool + _moveToOutput lib/pkgconfig "${!outputDev}" + _moveToOutput share/pkgconfig "${!outputDev}" + _moveToOutput lib/cmake "${!outputDev}" + _moveToOutput share/aclocal "${!outputDev}" + # don't move *.la, as libtool needs them in the directory of the library + + for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; do + echo "Patching '$f' includedir to output ${!outputInclude}" + sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f" + done +} + +# Make the first output (typically "dev") propagate other outputs needed for development. +# Take the first, because that's what one gets when putting the package into buildInputs. +# Note: during the build, probably only the "native" development packages are useful. +# With current cross-building setup, all packages are "native" if not cross-building. +_multioutPropagateDev() { + if [ "$outputs" = "out" ]; then return; fi; + + local outputFirst + for outputFirst in $outputs; do + break + done + + # Default value: propagate binaries, includes and libraries + if [ -z "${propagatedOutputs+1}" ]; then + local po_dirty="$outputBin $outputInclude $outputLib" + set +o pipefail + propagatedOutputs=`echo "$po_dirty" \ + | tr -s ' ' '\n' | grep -v -F "$outputFirst" \ + | sort -u | tr '\n' ' ' ` + set -o pipefail + fi + + # The variable was explicitly set to empty or we resolved it so + if [ -z "$propagatedOutputs" ]; then + return + fi + + mkdir -p "${!outputFirst}"/nix-support + for output in $propagatedOutputs; do + echo -n " ${!output}" >> "${!outputFirst}"/nix-support/propagated-native-build-inputs + done +} + diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 250f2b0fbce7a..317594d8f9fe8 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -31,9 +31,9 @@ rec { mkdir -p $out/lib # Copy what we need from Glibc. - cp -p ${pkgs.stdenv.glibc}/lib/ld-linux*.so.? $out/lib - cp -p ${pkgs.stdenv.glibc}/lib/libc.so.* $out/lib - cp -p ${pkgs.stdenv.glibc}/lib/libm.so.* $out/lib + cp -p ${pkgs.stdenv.glibc.out}/lib/ld-linux*.so.? $out/lib + cp -p ${pkgs.stdenv.glibc.out}/lib/libc.so.* $out/lib + cp -p ${pkgs.stdenv.glibc.out}/lib/libm.so.* $out/lib # Copy BusyBox. cp -pd ${pkgs.busybox}/bin/* $out/bin @@ -574,7 +574,7 @@ rec { buildCommand = '' ${createRootFS} - PATH=$PATH:${dpkg}/bin:${dpkg}/bin:${glibc}/bin:${lzma}/bin + PATH=$PATH:${dpkg}/bin:${dpkg}/bin:${glibc.bin}/bin:${lzma}/bin # Unpack the .debs. We do this to prevent pre-install scripts # (which have lots of circular dependencies) from barfing. diff --git a/pkgs/data/misc/media-player-info/default.nix b/pkgs/data/misc/media-player-info/default.nix index 9abe5d6ea8e70..ddb53d728202f 100644 --- a/pkgs/data/misc/media-player-info/default.nix +++ b/pkgs/data/misc/media-player-info/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python3, udev }: +{ stdenv, fetchurl, pkgconfig, python3, udev, systemd }: let name = "media-player-info-22"; @@ -12,7 +12,7 @@ in sha256 = "0di3gfx5z8c34yspzyllydr5snzg71r985kbqhrhb1il51qxgrvy"; }; - buildInputs = [ udev ]; + buildInputs = [ udev systemd ]; nativeBuildInputs = [ pkgconfig python3 ]; postPatch = '' diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 045a9eef00a6f..ad80d0d2224ec 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl }: -let version = "2015g"; in +let version = "2015g"; -stdenv.mkDerivation rec { +self = stdenv.mkDerivation rec { name = "tzdata-${version}"; srcs = @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { ]; sourceRoot = "."; - outputs = [ "out" "lib" ]; + #outputs = [ "out" "lib" ]; # TODO: maybe resurrect, and maybe install man pages? - makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk CFLAGS=-DHAVE_LINK=0"; + makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(out)/lib MANDIR=$(TMPDIR)/man AWK=awk CFLAGS=-DHAVE_LINK=0"; postInstall = '' @@ -27,8 +27,8 @@ stdenv.mkDerivation rec { ln -s . $out/share/zoneinfo/posix mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right - mkdir -p "$lib/include" - cp tzfile.h "$lib/include/tzfile.h" + mkdir -p "$out/include" + cp tzfile.h "$out/include/tzfile.h" ''; meta = { @@ -37,3 +37,6 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.all; }; } + +;in self // { lib = self; } + diff --git a/pkgs/desktops/e19/efl.nix b/pkgs/desktops/e19/efl.nix index 16c934b3b3af5..3afb76dccf108 100644 --- a/pkgs/desktops/e19/efl.nix +++ b/pkgs/desktops/e19/efl.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { "--disable-tslib" "--with-systemdunitdir=$out/systemd/user" "ac_ct_CXX=foo" ]; - NIX_CFLAGS_COMPILE = [ "-I${xorg.libXtst}" "-I${dbus_libs}/include/dbus-1.0" "-I${dbus_libs}/lib/dbus-1.0/include" ]; + NIX_CFLAGS_COMPILE = [ "-I${xorg.libXtst}" "-I${dbus_libs.dev}/include/dbus-1.0" "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; patches = [ ./efl-elua.patch ]; diff --git a/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix b/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix index f31875bed91c3..50f2cd0813323 100644 --- a/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix +++ b/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "02r9gv3a4a705jf3h7c0bizn33c73wz0iw2500m7z291nrnmqkmj"; }; - buildInputs = [ dbus.libs libgcrypt pam python gtk GConf libgnome_keyring ]; + buildInputs = [ dbus libgcrypt pam python gtk GConf libgnome_keyring ]; propagatedBuildInputs = [ glib libtasn1 ]; diff --git a/pkgs/desktops/gnome-3/3.16/apps/evolution/default.nix b/pkgs/desktops/gnome-3/3.16/apps/evolution/default.nix index d77740d35075f..1aa9dd62d41e3 100644 --- a/pkgs/desktops/gnome-3/3.16/apps/evolution/default.nix +++ b/pkgs/desktops/gnome-3/3.16/apps/evolution/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--disable-spamassassin" "--disable-pst-import" "--disable-autoar" "--disable-libcryptui" ]; - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix b/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix index 4c42c6c026d3c..48b45f28522e1 100644 --- a/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { gnome3.defaultIconTheme gnome3.gsettings_desktop_schemas file libtool librsvg ]; - NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; preFixup = '' for f in $out/bin/* $out/libexec/*; do diff --git a/pkgs/desktops/gnome-3/3.16/core/epiphany/default.nix b/pkgs/desktops/gnome-3/3.16/core/epiphany/default.nix index 5ec07d01b2e0b..bab4cb672e5e3 100644 --- a/pkgs/desktops/gnome-3/3.16/core/epiphany/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/epiphany/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { gdk_pixbuf gnome3.defaultIconTheme librsvg which gnome_common gcr avahi gnome3.gsettings_desktop_schemas makeWrapper ]; - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.16/core/evince/default.nix b/pkgs/desktops/gnome-3/3.16/core/evince/default.nix index aa75b55358b51..483f5104d8d10 100644 --- a/pkgs/desktops/gnome-3/3.16/core/evince/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/evince/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "--enable-introspection" ]; - NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0"; preConfigure = with stdenv.lib; optionalString doCheck '' @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # by `g_file_info_get_content_type ()'. wrapProgram "$out/bin/evince" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${shared_mime_info}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${shared_mime_info}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/desktops/gnome-3/3.16/core/folks/default.nix b/pkgs/desktops/gnome-3/3.16/core/folks/default.nix index 6e200bdb3188f..4385c6b6f75b8 100644 --- a/pkgs/desktops/gnome-3/3.16/core/folks/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/folks/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { configureFlags = "--disable-fatal-warnings"; - NIX_CFLAGS_COMPILE = ["-I${nspr}/include/nspr" "-I${nss}/include/nss" - "-I${dbus_glib}/include/dbus-1.0" "-I${dbus_libs}/include/dbus-1.0"]; + NIX_CFLAGS_COMPILE = ["-I${nspr.dev}/include/nspr" "-I${nss.dev}/include/nss" + "-I${dbus_glib.dev}/include/dbus-1.0" "-I${dbus_libs.dev}/include/dbus-1.0"]; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix b/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix index 51b67afb01fd7..3749be2de27f7 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix @@ -11,9 +11,9 @@ stdenv.mkDerivation rec { }; preConfigure = '' - substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" + substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X" substituteInPlace daemon/gdm-simple-slave.c --replace 'BINDIR "/gnome-session' '"${gnome_session}/bin/gnome-session' - substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.tools}/bin/dbus-launch' + substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.dbus-launch}' substituteInPlace data/gdm.conf-custom.in --replace '#WaylandEnable=false' 'WaylandEnable=false' sed 's/#Enable=true/Enable=true/' -i data/gdm.conf-custom.in ''; diff --git a/pkgs/desktops/gnome-3/3.16/core/gdm/default.nix b/pkgs/desktops/gnome-3/3.16/core/gdm/default.nix index d3d6f4e471c45..7759d21960cb0 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gdm/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gdm/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # Only needed to make it build preConfigure = '' - substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" + substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X" ''; configureFlags = [ "--sysconfdir=/etc" diff --git a/pkgs/desktops/gnome-3/3.16/core/gjs/default.nix b/pkgs/desktops/gnome-3/3.16/core/gjs/default.nix index 792e34c7b1480..ac53726bc537a 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gjs/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gjs/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ spidermonkey_24 ]; postInstall = '' - sed 's|-lreadline|-L${readline}/lib -lreadline|g' -i $out/lib/libgjs.la + sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-dictionary/default.nix index 9e3906dbed135..18b89279696e0 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-dictionary/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-dictionary/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-dictionary" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix index ac285819e8f44..8bb21feb54ab8 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1mpzj6fc42hhx77lki8cdycgfj9gjrm611rh0wsaqam4qq2c9a9c"; }; - NIX_CFLAGS_COMPILE = "-I${dbus_glib}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-screenshot/default.nix index 8b4e7be9c4110..0c18826086704 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-screenshot/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-screenshot/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { doCheck = true; - NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0"; propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ]; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-screenshot" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-system-log/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-system-log/default.nix index 716f92a072d46..50ee229cfa498 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-system-log/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-system-log/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { doCheck = true; - NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0"; propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ]; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-system-log" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-user-share/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-user-share/default.nix index 381f7d7c41685..cd02dcb821f84 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-user-share/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-user-share/default.nix @@ -21,8 +21,8 @@ in stdenv.mkDerivation rec { sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' -i data/dav_user_2.2.conf ''; - configureFlags = [ "--with-httpd=${apacheHttpd_2_2}/bin/httpd" - "--with-modules-path=${apacheHttpd_2_2}/modules" + configureFlags = [ "--with-httpd=${apacheHttpd_2_2.out}/bin/httpd" + "--with-modules-path=${apacheHttpd_2_2.out}/modules" "--disable-bluetooth" "--with-nautilusdir=$(out)/lib/nautilus/extensions-3.0" ]; diff --git a/pkgs/desktops/gnome-3/3.16/core/libcroco/default.nix b/pkgs/desktops/gnome-3/3.16/core/libcroco/default.nix index e8ddf7096e622..76d9118c4b956 100644 --- a/pkgs/desktops/gnome-3/3.16/core/libcroco/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/libcroco/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0w453f3nnkbkrly7spx5lx5pf6mwynzmd5qhszprq8amij2invpa"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic"; diff --git a/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix b/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix index 5ccca36bcaad5..663d6b9e35242 100644 --- a/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix +++ b/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/vte/default.nix b/pkgs/desktops/gnome-3/3.16/core/vte/default.nix index 89a1405f62b7b..2f0062101f2ed 100644 --- a/pkgs/desktops/gnome-3/3.16/core/vte/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/vte/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/misc/gitg/default.nix b/pkgs/desktops/gnome-3/3.16/misc/gitg/default.nix index 998f1f5f735fe..6295773d4587a 100644 --- a/pkgs/desktops/gnome-3/3.16/misc/gitg/default.nix +++ b/pkgs/desktops/gnome-3/3.16/misc/gitg/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { wrapProgram "$out/bin/gitg" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/misc/gnome-tweak-tool/default.nix b/pkgs/desktops/gnome-3/3.16/misc/gnome-tweak-tool/default.nix index 6600345060f96..c790d41f10737 100644 --- a/pkgs/desktops/gnome-3/3.16/misc/gnome-tweak-tool/default.nix +++ b/pkgs/desktops/gnome-3/3.16/misc/gnome-tweak-tool/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-tweak-tool" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --suffix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ + --suffix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)" ''; diff --git a/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix index 6563f79797005..0d6551216cf85 100644 --- a/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ intltool autoreconfHook pkgconfig vala glib - gtk3 gnome3.gnome_control_center dbus.libs + gtk3 gnome3.gnome_control_center dbus clutter pango appstream-glib makeWrapper ]; preConfigure = "intltoolize -f"; diff --git a/pkgs/desktops/gnome-3/3.18/apps/evolution/default.nix b/pkgs/desktops/gnome-3/3.18/apps/evolution/default.nix index a9bb87d4dddfc..100dfbf3acec5 100644 --- a/pkgs/desktops/gnome-3/3.18/apps/evolution/default.nix +++ b/pkgs/desktops/gnome-3/3.18/apps/evolution/default.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--disable-spamassassin" "--disable-pst-import" "--disable-autoar" "--disable-libcryptui" ]; - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix b/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix index 4c42c6c026d3c..48b45f28522e1 100644 --- a/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { gnome3.defaultIconTheme gnome3.gsettings_desktop_schemas file libtool librsvg ]; - NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; preFixup = '' for f in $out/bin/* $out/libexec/*; do diff --git a/pkgs/desktops/gnome-3/3.18/core/epiphany/default.nix b/pkgs/desktops/gnome-3/3.18/core/epiphany/default.nix index 5a98770b6632c..33e724ce99756 100644 --- a/pkgs/desktops/gnome-3/3.18/core/epiphany/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/epiphany/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { gdk_pixbuf gnome3.defaultIconTheme librsvg which gnome_common gcr avahi gnome3.gsettings_desktop_schemas makeWrapper ]; - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${glib}/include/gio-unix-2.0"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.18/core/evince/default.nix b/pkgs/desktops/gnome-3/3.18/core/evince/default.nix index 154182eef8875..bed67184eeb02 100644 --- a/pkgs/desktops/gnome-3/3.18/core/evince/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/evince/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # by `g_file_info_get_content_type ()'. wrapProgram "$out/bin/evince" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${shared_mime_info}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${shared_mime_info}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" ''; diff --git a/pkgs/desktops/gnome-3/3.18/core/folks/default.nix b/pkgs/desktops/gnome-3/3.18/core/folks/default.nix index 6e200bdb3188f..4385c6b6f75b8 100644 --- a/pkgs/desktops/gnome-3/3.18/core/folks/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/folks/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { configureFlags = "--disable-fatal-warnings"; - NIX_CFLAGS_COMPILE = ["-I${nspr}/include/nspr" "-I${nss}/include/nss" - "-I${dbus_glib}/include/dbus-1.0" "-I${dbus_libs}/include/dbus-1.0"]; + NIX_CFLAGS_COMPILE = ["-I${nspr.dev}/include/nspr" "-I${nss.dev}/include/nss" + "-I${dbus_glib.dev}/include/dbus-1.0" "-I${dbus_libs.dev}/include/dbus-1.0"]; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix b/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix index 51b67afb01fd7..3749be2de27f7 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix @@ -11,9 +11,9 @@ stdenv.mkDerivation rec { }; preConfigure = '' - substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" + substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X" substituteInPlace daemon/gdm-simple-slave.c --replace 'BINDIR "/gnome-session' '"${gnome_session}/bin/gnome-session' - substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.tools}/bin/dbus-launch' + substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.dbus-launch}' substituteInPlace data/gdm.conf-custom.in --replace '#WaylandEnable=false' 'WaylandEnable=false' sed 's/#Enable=true/Enable=true/' -i data/gdm.conf-custom.in ''; diff --git a/pkgs/desktops/gnome-3/3.18/core/gdm/default.nix b/pkgs/desktops/gnome-3/3.18/core/gdm/default.nix index 1db969651317c..a13370e5c9a9d 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gdm/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gdm/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { # Only needed to make it build preConfigure = '' - substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" + substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver.out}/bin/X" ''; configureFlags = [ "--sysconfdir=/etc" diff --git a/pkgs/desktops/gnome-3/3.18/core/gjs/default.nix b/pkgs/desktops/gnome-3/3.18/core/gjs/default.nix index 792e34c7b1480..ac53726bc537a 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gjs/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gjs/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ spidermonkey_24 ]; postInstall = '' - sed 's|-lreadline|-L${readline}/lib -lreadline|g' -i $out/lib/libgjs.la + sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix index 1d1f9d18c5662..51e3f6ab31332 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-dictionary" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix index d810fbb862b72..c6688fd30cd77 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name src; - NIX_CFLAGS_COMPILE = "-I${dbus_glib}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix index 763fc990bdab1..15d93793088bb 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-screenshot" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix index 716f92a072d46..6b7b28ad4000e 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-system-log" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix index 49ad40912c66b..e8f6498350627 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' -i data/dav_user_2.2.conf ''; - configureFlags = [ "--with-httpd=${apacheHttpd_2_2}/bin/httpd" - "--with-modules-path=${apacheHttpd_2_2}/modules" + configureFlags = [ "--with-httpd=${apacheHttpd_2_2.out}/bin/httpd" + "--with-modules-path=${apacheHttpd_2_2.out}/modules" "--disable-bluetooth" "--with-nautilusdir=$(out)/lib/nautilus/extensions-3.0" ]; diff --git a/pkgs/desktops/gnome-3/3.18/core/libcroco/default.nix b/pkgs/desktops/gnome-3/3.18/core/libcroco/default.nix index e8ddf7096e622..76d9118c4b956 100644 --- a/pkgs/desktops/gnome-3/3.18/core/libcroco/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/libcroco/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0w453f3nnkbkrly7spx5lx5pf6mwynzmd5qhszprq8amij2invpa"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic"; diff --git a/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix b/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix index 5ccca36bcaad5..663d6b9e35242 100644 --- a/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix +++ b/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/vte/default.nix b/pkgs/desktops/gnome-3/3.18/core/vte/default.nix index b47381cf61b8f..e1e260f1e0216 100644 --- a/pkgs/desktops/gnome-3/3.18/core/vte/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/vte/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/misc/gitg/default.nix b/pkgs/desktops/gnome-3/3.18/misc/gitg/default.nix index 19f340ac291e1..e7f833bf71723 100644 --- a/pkgs/desktops/gnome-3/3.18/misc/gitg/default.nix +++ b/pkgs/desktops/gnome-3/3.18/misc/gitg/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { wrapProgram "$out/bin/gitg" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/misc/gnome-tweak-tool/default.nix b/pkgs/desktops/gnome-3/3.18/misc/gnome-tweak-tool/default.nix index 986d4058af92e..d0c6674ad9bde 100644 --- a/pkgs/desktops/gnome-3/3.18/misc/gnome-tweak-tool/default.nix +++ b/pkgs/desktops/gnome-3/3.18/misc/gnome-tweak-tool/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/gnome-tweak-tool" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --suffix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ + --suffix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)" ''; diff --git a/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix index dee9caf444c57..6c36f892bcc91 100644 --- a/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ intltool autoreconfHook pkgconfig vala glib - gtk3 gnome3.gnome_control_center dbus.libs + gtk3 gnome3.gnome_control_center dbus clutter pango appstream-glib makeWrapper ]; preConfigure = "intltoolize -f"; diff --git a/pkgs/desktops/plasma-5.4/kde-gtk-config/default.nix b/pkgs/desktops/plasma-5.4/kde-gtk-config/default.nix index 6b41599994d5f..ab8867520b380 100644 --- a/pkgs/desktops/plasma-5.4/kde-gtk-config/default.nix +++ b/pkgs/desktops/plasma-5.4/kde-gtk-config/default.nix @@ -22,7 +22,7 @@ plasmaPackage { ]; propagatedBuildInputs = [ ki18n kio ]; cmakeFlags = [ - "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include" - "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include" + "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" + "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" ]; } diff --git a/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch b/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch index f66cb6189270f..443d7ec907947 100644 --- a/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch +++ b/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch @@ -177,7 +177,7 @@ index 2c4c315..7733721 100644 +# Make sure that D-Bus is running +# D-Bus autolaunch is broken +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then -+ eval `@dbus_tools@/bin/dbus-launch --sh-syntax --exit-with-session` ++ eval `@dbus-launch@ --sh-syntax --exit-with-session` +fi +if @qttools@/bin/qdbus >/dev/null 2>/dev/null; then + : # ok diff --git a/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix b/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix index 85f38b24e8cca..309c3593a7c7a 100644 --- a/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix @@ -6,7 +6,7 @@ , libdbusmenu, libkscreen, libSM, libXcursor, networkmanager-qt , pam, phonon, plasma-framework, qtquick1, qtscript, qtx11extras, wayland , libksysguard, bash, coreutils, gnused, gnugrep, socat, kconfig -, kinit, kservice, makeQtWrapper, qttools, dbus_tools, mkfontdir, xmessage +, kinit, kservice, makeQtWrapper, qttools, dbus, mkfontdir, xmessage , xprop, xrdb, xset, xsetroot, solid, qtquickcontrols }: @@ -35,7 +35,8 @@ plasmaPackage rec { inherit bash coreutils gnused gnugrep socat; inherit kconfig kinit kservice qttools; - inherit dbus_tools mkfontdir xmessage xprop xrdb xset xsetroot; + inherit mkfontdir xmessage xprop xrdb xset xsetroot; + inherit (dbus) dbus-launch; postPatch = '' substituteAllInPlace startkde/startkde.cmake substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ diff --git a/pkgs/desktops/xfce/core/exo.nix b/pkgs/desktops/xfce/core/exo.nix index 83610a4e4a652..4d3f09105433c 100644 --- a/pkgs/desktops/xfce/core/exo.nix +++ b/pkgs/desktops/xfce/core/exo.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, intltool, URI, glib, gtk, libxfce4ui, libxfce4util }: +{ stdenv, fetchurl, pkgconfig, intltool, URI, glib, gtk, libxfce4ui, libxfce4util +, hicolor_icon_theme }: stdenv.mkDerivation rec { p_name = "exo"; @@ -11,9 +12,11 @@ stdenv.mkDerivation rec { }; name = "${p_name}-${ver_maj}.${ver_min}"; - buildInputs = [ pkgconfig intltool URI glib gtk libxfce4ui libxfce4util ]; + outputs = [ "dev" "out" "docdev" ]; + # lib/xfce4/exo-1/exo-compose-mail-1 is a perl script :-/ - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; + nativeBuildInputs = [ pkgconfig intltool ]; + buildInputs = [ URI glib gtk libxfce4ui libxfce4util hicolor_icon_theme ]; meta = with stdenv.lib; { homepage = "http://www.xfce.org/projects/${p_name}"; diff --git a/pkgs/desktops/xfce/core/garcon.nix b/pkgs/desktops/xfce/core/garcon.nix index 8f8cfff76cd45..4fffc9e1ec9f8 100644 --- a/pkgs/desktops/xfce/core/garcon.nix +++ b/pkgs/desktops/xfce/core/garcon.nix @@ -1,22 +1,26 @@ { stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, libxfce4ui, gtk }: - -stdenv.mkDerivation rec { +let p_name = "garcon"; ver_maj = "0.4"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "0wm9pjbwq53s3n3nwvsyf0q8lbmhiy2ln3bn5ncihr9vf5cwhzbq"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; + + outputs = [ "dev" "out" ]; buildInputs = [ pkgconfig intltool glib libxfce4util gtk libxfce4ui ]; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/; description = "Xfce menu support library"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + platforms = platforms.linux; }; } + diff --git a/pkgs/desktops/xfce/core/libxfce4ui.nix b/pkgs/desktops/xfce/core/libxfce4ui.nix index 2cb20febcb943..6bdeb50f83993 100644 --- a/pkgs/desktops/xfce/core/libxfce4ui.nix +++ b/pkgs/desktops/xfce/core/libxfce4ui.nix @@ -1,40 +1,38 @@ { stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, xfconf -, libglade, libstartup_notification +, libglade, libstartup_notification, hicolor_icon_theme , withGtk3 ? false, gtk3 }: - -with { inherit (stdenv.lib) optional; }; - -stdenv.mkDerivation rec { +let p_name = "libxfce4ui"; ver_maj = "4.12"; ver_min = "1"; + inherit (stdenv.lib) optional; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "3d619811bfbe7478bb984c16543d980cadd08586365a7bc25e59e3ca6384ff43"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; - #TODO: gladeui - # Install into our own prefix instead. - configureFlags = [ - "--with-libglade-module-path=$out/lib/libglade/2.0" - ] ++ optional withGtk3 "--enable-gtk3"; + outputs = [ "dev" "out" "docdev" ]; buildInputs = [ pkgconfig intltool gtk libxfce4util xfconf libglade - libstartup_notification + libstartup_notification hicolor_icon_theme ] ++ optional withGtk3 gtk3; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; + #TODO: glade? + configureFlags = optional withGtk3 "--enable-gtk3"; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/; description = "Basic GUI library for Xfce"; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl2Plus; + platforms = platforms.linux; }; } + diff --git a/pkgs/desktops/xfce/core/libxfce4util.nix b/pkgs/desktops/xfce/core/libxfce4util.nix index 6893d7cfb20b2..cab904f551070 100644 --- a/pkgs/desktops/xfce/core/libxfce4util.nix +++ b/pkgs/desktops/xfce/core/libxfce4util.nix @@ -1,15 +1,18 @@ { stdenv, fetchurl, pkgconfig, glib, intltool }: - -stdenv.mkDerivation rec { +let p_name = "libxfce4util"; ver_maj = "4.12"; ver_min = "1"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "07c8r3xwx5is298zk77m3r784gmr5y4mh8bbca5zdjqk5vxdwsw7"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; + + outputs = [ "dev" "out" "docdev" ]; buildInputs = [ pkgconfig glib intltool ]; @@ -20,3 +23,4 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.linux; }; } + diff --git a/pkgs/desktops/xfce/core/libxfcegui4.nix b/pkgs/desktops/xfce/core/libxfcegui4.nix index 32a320c779bf5..d9e5cce25e852 100644 --- a/pkgs/desktops/xfce/core/libxfcegui4.nix +++ b/pkgs/desktops/xfce/core/libxfcegui4.nix @@ -1,31 +1,32 @@ { stdenv, fetchurl, pkgconfig, intltool, gtk -, libxfce4util, xfconf, libglade, libstartup_notification }: - -stdenv.mkDerivation rec { +, libxfce4util, xfconf, libglade, libstartup_notification, hicolor_icon_theme }: +let p_name = "libxfcegui4"; ver_maj = "4.10"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "0cs5im0ib0cmr1lhr5765yliqjfyxvk4kwy8h1l8bn3mj6bzk0ib"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; + + outputs = [ "dev" "out" "docdev" ]; #TODO: gladeui # By default, libxfcegui4 tries to install into libglade's prefix. # Install into our own prefix instead. - preConfigure = - '' - configureFlags="--with-libglade-module-path=$out/lib/libglade/2.0" - ''; + configureFlags = [ + "--with-libglade-module-path=$(out)/lib/libglade/2.0" + ]; #NOTE: missing keyboard library support is OK according to the mailing-list buildInputs = [ pkgconfig intltool gtk libxfce4util xfconf libglade - libstartup_notification + libstartup_notification hicolor_icon_theme ]; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; meta = { homepage = http://www.xfce.org/; diff --git a/pkgs/desktops/xfce/core/tumbler.nix b/pkgs/desktops/xfce/core/tumbler.nix index 1fc895ea412ab..132003d3fc920 100644 --- a/pkgs/desktops/xfce/core/tumbler.nix +++ b/pkgs/desktops/xfce/core/tumbler.nix @@ -1,19 +1,24 @@ -{ stdenv, fetchurl, pkgconfig, intltool, dbus_glib, gdk_pixbuf, curl, freetype, -libgsf, poppler, bzip2 }: - -stdenv.mkDerivation rec { +{ stdenv, fetchurl, pkgconfig, intltool, dbus_glib, gdk_pixbuf, curl, freetype +, libgsf, poppler, bzip2 }: +let p_name = "tumbler"; ver_maj = "0.1"; ver_min = "31"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "0wvip28gm2w061hn84zp2q4dv947ihylrppahn4cjspzff935zfh"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; - buildInputs = [ pkgconfig intltool dbus_glib gdk_pixbuf curl freetype - poppler libgsf bzip2]; + outputs = [ "dev" "out" "docdev" ]; + + buildInputs = [ + pkgconfig intltool dbus_glib gdk_pixbuf curl freetype + poppler libgsf bzip2 + ]; configureFlags = [ # Needs gst-tag @@ -21,15 +26,16 @@ stdenv.mkDerivation rec { # Needs libffmpegthumbnailer # "--enable-ffmpeg-thumbnailer" - + "--enable-odf-thumbnailer" "--enable-poppler-thumbnailer" ]; - meta = { + meta = with stdenv.lib; { homepage = http://git.xfce.org/xfce/tumbler/; description = "A D-Bus thumbnailer service"; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.gpl2; + platforms = platforms.linux; + license = licenses.gpl2; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-appfinder.nix b/pkgs/desktops/xfce/core/xfce4-appfinder.nix index 25bd04f9ec400..d39708dd523fe 100644 --- a/pkgs/desktops/xfce/core/xfce4-appfinder.nix +++ b/pkgs/desktops/xfce/core/xfce4-appfinder.nix @@ -1,27 +1,29 @@ { stdenv, fetchurl, pkgconfig, intltool, glib, gtk, libxfce4util , libxfce4ui, garcon, xfconf }: - -stdenv.mkDerivation rec { +let p_name = "xfce4-appfinder"; ver_maj = "4.12"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "0ry5hin8xhgnkmm9vs7jq8blk1cnbyr0s18nm1j6nsm7360abm1a"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = [ pkgconfig intltool glib gtk libxfce4util libxfce4ui garcon xfconf ]; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://docs.xfce.org/xfce/xfce4-appfinder/; description = "Xfce application finder, a tool to locate and launch programs on your system"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-dev-tools.nix b/pkgs/desktops/xfce/core/xfce4-dev-tools.nix index 5541011a50194..da7369decc46d 100644 --- a/pkgs/desktops/xfce/core/xfce4-dev-tools.nix +++ b/pkgs/desktops/xfce/core/xfce4-dev-tools.nix @@ -1,15 +1,16 @@ { stdenv, fetchurl, pkgconfig, glib, autoconf, automake, libtool, intltool }: - -stdenv.mkDerivation rec { +let p_name = "xfce4-dev-tools"; ver_maj = "4.12"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "1jxmyp80pwbfgmqmwpjxs7z5dmm6pyf3qj62z20xy44izraadqz2"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = [ pkgconfig glib ]; @@ -22,3 +23,4 @@ stdenv.mkDerivation rec { license = stdenv.lib.licenses.gpl2Plus; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-panel.nix b/pkgs/desktops/xfce/core/xfce4-panel.nix index 0f9066876c66b..816bbc05735f2 100644 --- a/pkgs/desktops/xfce/core/xfce4-panel.nix +++ b/pkgs/desktops/xfce/core/xfce4-panel.nix @@ -1,49 +1,50 @@ { stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui , libxfce4ui_gtk3, libwnck, exo, garcon, xfconf, libstartup_notification -, makeWrapper, xfce4mixer +, makeWrapper, xfce4mixer, hicolor_icon_theme , withGtk3 ? false, gtk3 }: - -with { inherit (stdenv.lib) optional; }; - -stdenv.mkDerivation rec { +let + inherit (stdenv.lib) optional; p_name = "xfce4-panel"; ver_maj = "4.12"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "1c4p3ckghvsad1sj5v8wmar5mh9cbhail9mmhad2f9pwwb10z4ih"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; patches = [ ./xfce4-panel-datadir.patch ]; patchFlags = "-p1"; - configureFlags = optional withGtk3 "--enable-gtk3"; + outputs = [ "dev" "out" "docdev" ]; buildInputs = [ pkgconfig intltool gtk libxfce4util exo libwnck - garcon xfconf libstartup_notification makeWrapper + garcon xfconf libstartup_notification makeWrapper hicolor_icon_theme ] ++ xfce4mixer.gst_plugins ++ optional withGtk3 gtk3; propagatedBuildInputs = [ (if withGtk3 then libxfce4ui_gtk3 else libxfce4ui) ]; + configureFlags = optional withGtk3 "--enable-gtk3"; + postInstall = '' wrapProgram "$out/bin/xfce4-panel" \ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" ''; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; - enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/projects/xfce4-panel; description = "Xfce panel"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-power-manager.nix b/pkgs/desktops/xfce/core/xfce4-power-manager.nix index 9a3116463c63c..7695f906d317d 100644 --- a/pkgs/desktops/xfce/core/xfce4-power-manager.nix +++ b/pkgs/desktops/xfce/core/xfce4-power-manager.nix @@ -1,29 +1,29 @@ { stdenv, fetchurl, pkgconfig, intltool, gtk, dbus_glib, upower, xfconf -, libxfce4ui, libxfce4util, libnotify, xfce4panel }: - -stdenv.mkDerivation rec { +, libxfce4ui, libxfce4util, libnotify, xfce4panel, hicolor_icon_theme }: +let p_name = "xfce4-power-manager"; ver_maj = "1.4"; ver_min = "4"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "01rvqy1cif4s8lkidb7hhmsz7d9f2fwcwvc51xycaj3qgsmch3n5"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; - buildInputs = [ pkgconfig intltool gtk dbus_glib upower xfconf libxfce4ui libxfce4util - libnotify xfce4panel + libnotify xfce4panel hicolor_icon_theme ]; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; - meta = { + meta = with stdenv.lib; { homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager; description = "A power manager for the Xfce Desktop Environment"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-session.nix b/pkgs/desktops/xfce/core/xfce4-session.nix index 7599826e8f02b..a0568b0dd3954 100644 --- a/pkgs/desktops/xfce/core/xfce4-session.nix +++ b/pkgs/desktops/xfce/core/xfce4-session.nix @@ -1,25 +1,26 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, intltool, gtk, polkit , libxfce4util, libxfce4ui, xfce4panel, libwnck, dbus_glib, xfconf, libglade, xorg +, hicolor_icon_theme }: -#TODO: gnome stuff: gconf (assistive?), keyring - -stdenv.mkDerivation rec { +let p_name = "xfce4-session"; ver_maj = "4.12"; ver_min = "1"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "97d7f2a2d0af7f3623b68d1f04091e02913b28f9555dab8b0d26c8a1299d08fd"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck dbus_glib - xfconf xfce4panel libglade xorg.iceauth - polkit - ]; + xfconf xfce4panel libglade xorg.iceauth xorg.libSM + polkit hicolor_icon_theme + ]; #TODO: upower-glib, gconf (assistive?), gnome keyring preBuild = '' sed '/^PATH=/d' -i scripts/xflock4 @@ -28,13 +29,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-xsession-prefix=$(out)" ]; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; - - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/projects/xfce4-session; description = "Session manager for Xfce"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfce4-settings.nix b/pkgs/desktops/xfce/core/xfce4-settings.nix index 4c2de64561d5c..f6f7c4c3a54b2 100644 --- a/pkgs/desktops/xfce/core/xfce4-settings.nix +++ b/pkgs/desktops/xfce/core/xfce4-settings.nix @@ -1,33 +1,33 @@ { stdenv, fetchurl, pkgconfig, intltool, exo, gtk, libxfce4util, libxfce4ui , libglade, xfconf, xorg, libwnck, libnotify, libxklavier, garcon, upower }: - -#TODO: optional packages -stdenv.mkDerivation rec { +let p_name = "xfce4-settings"; ver_maj = "4.12"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "108za1cmjslwzkdl76x9kwxkq8z734kg9nz8rxk057f10pqwxgh4"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; - patches = [ ./xfce4-settings-default-icon-theme.patch ]; buildInputs = [ pkgconfig intltool exo gtk libxfce4util libxfce4ui libglade upower xfconf xorg.libXi xorg.libXcursor libwnck libnotify libxklavier garcon - ]; + ]; #TODO: optional packages - configureFlags = "--enable-pluggable-dialogs --enable-sound-settings"; + configureFlags = [ "--enable-pluggable-dialogs" "--enable-sound-settings" ]; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/projects/xfce4-settings; description = "Settings manager for Xfce"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfconf.nix b/pkgs/desktops/xfce/core/xfconf.nix index f12f96895cd92..13902fa4428c7 100644 --- a/pkgs/desktops/xfce/core/xfconf.nix +++ b/pkgs/desktops/xfce/core/xfconf.nix @@ -1,24 +1,28 @@ { stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, dbus_glib }: - -stdenv.mkDerivation rec { +let p_name = "xfconf"; ver_maj = "4.12"; ver_min = "0"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "0mmi0g30aln3x98y5p507g17pipq0dj0bwypshan8cq5hkmfl44r"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; + + outputs = [ "dev" "out" "docdev" ]; #TODO: no perl bingings yet (ExtUtils::Depends, ExtUtils::PkgConfig, Glib) buildInputs = [ pkgconfig intltool glib libxfce4util ]; propagatedBuildInputs = [ dbus_glib ]; - meta = { + meta = with stdenv.lib; { homepage = http://docs.xfce.org/xfce/xfconf/start; description = "Simple client-server configuration storage and query system for Xfce"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; + platforms = platforms.linux; }; } + diff --git a/pkgs/desktops/xfce/core/xfdesktop.nix b/pkgs/desktops/xfce/core/xfdesktop.nix index e5d04879008e7..8802862edddea 100644 --- a/pkgs/desktops/xfce/core/xfdesktop.nix +++ b/pkgs/desktops/xfce/core/xfdesktop.nix @@ -1,30 +1,32 @@ { stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui -, libwnck, xfconf, libglade, xfce4panel, thunar, exo, garcon, libnotify }: - -stdenv.mkDerivation rec { +, libwnck, xfconf, libglade, xfce4panel, thunar, exo, garcon, libnotify +, hicolor_icon_theme }: +let p_name = "xfdesktop"; ver_maj = "4.12"; ver_min = "3"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "a8a8d93744d842ca6ac1f9bd2c8789ee178937bca7e170e5239cbdbef30520ac"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck xfconf - libglade xfce4panel thunar exo garcon libnotify + libglade xfce4panel thunar exo garcon libnotify hicolor_icon_theme ]; - preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/projects/xfdesktop; description = "Xfce desktop manager"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/desktops/xfce/core/xfwm4.nix b/pkgs/desktops/xfce/core/xfwm4.nix index dd18b1355f798..d861e5f2d5570 100644 --- a/pkgs/desktops/xfce/core/xfwm4.nix +++ b/pkgs/desktops/xfce/core/xfwm4.nix @@ -1,16 +1,17 @@ { stdenv, fetchurl, pkgconfig, gtk, intltool, libglade, libxfce4util , libxfce4ui, xfconf, libwnck, libstartup_notification, xorg }: - -stdenv.mkDerivation rec { +let p_name = "xfwm4"; ver_maj = "4.12"; ver_min = "3"; +in +stdenv.mkDerivation rec { + name = "${p_name}-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "f4a988fbc4e0df7e8583c781d271559e56fd28696092f94ae052e9e6edb09eac"; }; - name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = [ pkgconfig intltool gtk libglade libxfce4util libxfce4ui xfconf @@ -20,11 +21,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.xfce.org/projects/xfwm4; description = "Window manager for Xfce"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; }; } + diff --git a/pkgs/development/compilers/gcc-arm-embedded/default.nix b/pkgs/development/compilers/gcc-arm-embedded/default.nix index b6f6ac51ba2a9..3f9a2a1f2fbb9 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/default.nix @@ -30,8 +30,8 @@ stdenv.mkDerivation { for f in $(find $out); do if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then - patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \ - --set-rpath $out/lib:${gcc}/lib:${ncurses}/lib \ + patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \ + --set-rpath $out/lib:${gcc.lib or gcc}/lib:${ncurses.lib}/lib \ "$f" || true fi done diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh index af2e97b1e4e55..af36ec33b70a9 100644 --- a/pkgs/development/compilers/gcc/4.6/builder.sh +++ b/pkgs/development/compilers/gcc/4.6/builder.sh @@ -8,9 +8,10 @@ mkdir $NIX_FIXINC_DUMMY if test "$staticCompiler" = "1"; then EXTRA_LDFLAGS="-static" else - EXTRA_LDFLAGS="" + EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib" fi + # GCC interprets empty paths as ".", which we don't want. if test -z "$CPATH"; then unset CPATH; fi if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi @@ -29,7 +30,7 @@ if test "$noSysDirs" = "1"; then # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). - export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include + export NIX_FIXINC_DUMMY=$libc_dev/include # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib" @@ -50,10 +51,10 @@ if test "$noSysDirs" = "1"; then # bootstrap compiler are optimized and (optionally) contain # debugging information (info "(gccinstall) Building"). if test -n "$dontStrip"; then - extraFlags="-O2 -g $extraFlags" + extraFlags="-O2 -g $extraFlags" else - # Don't pass `-g' at all; this saves space while building. - extraFlags="-O2 $extraFlags" + # Don't pass `-g' at all; this saves space while building. + extraFlags="-O2 $extraFlags" fi EXTRA_FLAGS="$extraFlags" @@ -170,9 +171,8 @@ preConfigure() { # Patch the configure script so it finds glibc headers. It's # important for example in order not to get libssp built, # because its functionality is in glibc already. - glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include" sed -i \ - -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \ + -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \ gcc/configure fi @@ -206,6 +206,14 @@ preInstall() { postInstall() { + # Move runtime libraries to $lib. + mkdir -p $lib/lib + ln -s lib $lib/lib64 + mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ + for i in $lib/lib/*.la; do + substituteInPlace $i --replace $out $lib + done + # Remove precompiled headers for now. They are very big and # probably not very useful yet. find $out/include -name "*.gch" -exec rm -rf {} \; -prune @@ -217,6 +225,7 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug + # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out for i in $out/libexec/gcc/*/*/*; do if PREV_RPATH=`patchelf --print-rpath $i`; then @@ -225,7 +234,7 @@ postInstall() { done # Get rid of some "fixed" header files - rm -rf $out/lib/gcc/*/*/include/root + rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux} # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks. for i in $out/bin/*-gcc*; do diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index b3caad11b7167..bc968d1f66e31 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -170,7 +170,7 @@ let version = "4.6.4"; "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; in @@ -182,13 +182,19 @@ stdenv.mkDerivation ({ builder = ./builder.sh; - src = (import ./sources.nix) { + srcs = (import ./sources.nix) { inherit fetchurl optional version; inherit langC langCC langFortran langJava langAda langGo; }; + outputs = [ "out" "lib" ]; + + setOutputFlags = false; + inherit patches enableMultilib; + libc_dev = stdenv.cc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index ff1d388b6e231..a90d9e7c8ec4e 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -197,7 +197,7 @@ let version = "4.8.5"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; in @@ -209,8 +209,6 @@ stdenv.mkDerivation ({ builder = ../builder.sh; - outputs = [ "out" "info" ]; - src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; sha256 = "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"; @@ -218,6 +216,12 @@ stdenv.mkDerivation ({ inherit patches; + outputs = [ "out" "lib" "doc" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.cc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' @@ -359,7 +363,7 @@ stdenv.mkDerivation ({ ) } ${if (stdenv ? glibc && cross == null) - then " --with-native-system-header-dir=${stdenv.glibc}/include" + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 13154ddd27a69..07dca989c9bac 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -196,7 +196,7 @@ let version = "4.9.3"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null; in @@ -208,8 +208,6 @@ stdenv.mkDerivation ({ builder = ../builder.sh; - outputs = [ "out" "info" ]; - src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; sha256 = "0zmnm00d2a1hsd41g34bhvxzvxisa2l584q3p447bd91lfjv4ci3"; @@ -217,6 +215,12 @@ stdenv.mkDerivation ({ inherit patches; + outputs = [ "out" "lib" "doc" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.cc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' @@ -358,7 +362,7 @@ stdenv.mkDerivation ({ ) } ${if (stdenv ? glibc && cross == null) - then " --with-native-system-header-dir=${stdenv.glibc}/include" + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 6decc4c8cc3f0..6b54d31cb0191 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -34,6 +34,7 @@ , stripped ? true , gnused ? null , binutils ? null +, cloog # unused; just for compat with gcc4, as we override the parameter on some places }: assert langJava -> zip != null && unzip != null @@ -196,7 +197,7 @@ let version = "5.2.0"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null; in @@ -208,8 +209,6 @@ stdenv.mkDerivation ({ builder = ../builder.sh; - outputs = [ "out" "info" ]; - src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; sha256 = "1bccp8a106xwz3wkixn65ngxif112vn90qf95m6lzpgpnl25p0sz"; @@ -217,6 +216,12 @@ stdenv.mkDerivation ({ inherit patches; + outputs = [ "out" "lib" "man" "info" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.cc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' @@ -357,7 +362,7 @@ stdenv.mkDerivation ({ ) } ${if (stdenv ? glibc && cross == null) - then " --with-native-system-header-dir=${stdenv.glibc}/include" + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index dd77c67a023e5..2f19f4219da6a 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -8,9 +8,10 @@ mkdir $NIX_FIXINC_DUMMY if test "$staticCompiler" = "1"; then EXTRA_LDFLAGS="-static" else - EXTRA_LDFLAGS="" + EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib" fi + # GCC interprets empty paths as ".", which we don't want. if test -z "$CPATH"; then unset CPATH; fi if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi @@ -29,7 +30,7 @@ if test "$noSysDirs" = "1"; then # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). - export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include + export NIX_FIXINC_DUMMY=$libc_dev/include # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib" @@ -171,9 +172,8 @@ preConfigure() { # Patch the configure script so it finds glibc headers. It's # important for example in order not to get libssp built, # because its functionality is in glibc already. - glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include" sed -i \ - -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \ + -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \ gcc/configure fi @@ -210,9 +210,15 @@ preInstall() { postInstall() { - # Remove precompiled headers for now. They are very big and - # probably not very useful yet. - find $out/include -name "*.gch" -exec rm -rf {} \; -prune + # Move runtime libraries to $lib. + _moveToOutput "lib/lib*.so*" "$lib" + _moveToOutput "lib/lib*.la" "$lib" + ln -s lib "$lib/lib64" # for *.la + _moveToOutput "share/gcc-*/python" "$lib" + + for i in "$lib"/lib/*.{la,py}; do + substituteInPlace "$i" --replace "$out" "$lib" + done # Remove `fixincl' to prevent a retained dependency on the # previous gcc. @@ -221,15 +227,23 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug + # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out - for i in $out/libexec/gcc/*/*/*; do - if PREV_RPATH=`patchelf --print-rpath $i`; then - patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i - fi + for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK + done + + # For some reason the libs retain RPATH to $out + for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK done # Get rid of some "fixed" header files - rm -rf $out/lib/gcc/*/*/include/root + rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux} # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks. for i in $out/bin/*-gcc*; do @@ -250,6 +264,9 @@ postInstall() { paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus} eval "$postInstallGhdl" + + # Two identical man pages are shipped (moving and compressing is done later) + ln -sf gcc.1 "$out"/share/man/man1/g++.1 } genericBuild diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 96ec4e6c114a0..5a3ddc97587ec 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -40,14 +40,14 @@ stdenv.mkDerivation rec { (if stdenv.isLinux then '' find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \; + --set-rpath "${libedit}/lib:${ncurses.lib}/lib:${gmp.out}/lib" {} \; for prog in ld ar gcc strip ranlib; do find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; done '' else ""); configurePhase = '' - ./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include + ./configure --prefix=$out --with-gmp-libraries=${gmp.out}/lib --with-gmp-includes=${gmp.dev}/include ''; # Stripping combined with patchelf breaks the executables (they die @@ -65,8 +65,8 @@ stdenv.mkDerivation rec { (if stdenv.isDarwin then '' mkdir -p $out/frameworks/GMP.framework/Versions/A - ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP - ln -s ${gmp}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP + ln -s ${gmp.out}/lib/libgmp.dylib $out/frameworks/GMP.framework/GMP + ln -s ${gmp.out}/lib/libgmp.dylib $out/frameworks/GMP.framework/Versions/A/GMP # !!! fix this mkdir -p $out/frameworks/GNUeditline.framework/Versions/A ln -s ${libedit}/lib/libeditline.dylib $out/frameworks/GNUeditline.framework/GNUeditline @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { + '' # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way - sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp}/lib\",\2@" $out/lib/ghc-${version}/package.conf + sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf # Sanity check, can ghc create executables? cd $TMP diff --git a/pkgs/development/compilers/ghc/6.10.4.nix b/pkgs/development/compilers/ghc/6.10.4.nix index d8157673fbc39..d8d25ef8082c4 100644 --- a/pkgs/development/compilers/ghc/6.10.4.nix +++ b/pkgs/development/compilers/ghc/6.10.4.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { buildInputs = [ghc libedit perl gmp]; configureFlags = [ - "--with-gmp-libraries=${gmp}/lib" - "--with-gmp-includes=${gmp}/include" + "--with-gmp-libraries=${gmp.out}/lib" + "--with-gmp-includes=${gmp.dev}/include" "--with-gcc=${stdenv.cc}/bin/gcc" ]; diff --git a/pkgs/development/compilers/ghc/6.12.3.nix b/pkgs/development/compilers/ghc/6.12.3.nix index f6beaf3a00672..e8e9b55a88571 100644 --- a/pkgs/development/compilers/ghc/6.12.3.nix +++ b/pkgs/development/compilers/ghc/6.12.3.nix @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { buildInputs = [ghc perl gmp ncurses]; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ''; preConfigure = '' diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index 31df7f1fa355b..874cf627864e6 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { # We have to patch the GMP paths for the integer-gmp package. '' find . -name integer-gmp.buildinfo \ - -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp}/lib@" {} \; + -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; '' + stdenv.lib.optionalString stdenv.isDarwin '' find . -name base.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { stdenv.lib.optionalString stdenv.isLinux '' find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${ncurses}/lib:${gmp}/lib" {} \; + --set-rpath "${ncurses.lib}/lib:${gmp.out}/lib" {} \; sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 for prog in ld ar gcc strip ranlib; do @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { configurePhase = '' ./configure --prefix=$out \ - --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \ + --with-gmp-libraries=${gmp.out}/lib --with-gmp-includes=${gmp}/include \ ${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"} ''; diff --git a/pkgs/development/compilers/ghc/7.0.4.nix b/pkgs/development/compilers/ghc/7.0.4.nix index 281e5ca66a2cd..79b5f654ae9db 100644 --- a/pkgs/development/compilers/ghc/7.0.4.nix +++ b/pkgs/development/compilers/ghc/7.0.4.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { buildInputs = [ ghc perl gmp ncurses ]; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix index 73fcd788c74f8..7a1f7ec8c6bff 100644 --- a/pkgs/development/compilers/ghc/7.10.2.nix +++ b/pkgs/development/compilers/ghc/7.10.2.nix @@ -5,10 +5,10 @@ let buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib" + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ]; # required, because otherwise all symbols from HSffi.o are stripped, and diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix index 7276f413967fa..20d80753afad0 100644 --- a/pkgs/development/compilers/ghc/7.2.2.nix +++ b/pkgs/development/compilers/ghc/7.2.2.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { buildInputs = [ ghc perl gmp ncurses ]; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index 03dd4dcd35bbf..a57aff4d864f6 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { # find editline/gmp. stdenv.lib.optionalString stdenv.isLinux '' mkdir -p "$out/lib" - ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" + ln -sv "${ncurses.lib}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$out/lib:${gmp}/lib" {} \; diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix index b2abcb08ec3a5..46855e86d3363 100644 --- a/pkgs/development/compilers/ghc/7.4.2.nix +++ b/pkgs/development/compilers/ghc/7.4.2.nix @@ -15,10 +15,10 @@ stdenv.mkDerivation rec { buildInputs = [ ghc perl gmp ncurses ]; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix index 366c0044a67ad..8e630641abfc3 100644 --- a/pkgs/development/compilers/ghc/7.6.3.nix +++ b/pkgs/development/compilers/ghc/7.6.3.nix @@ -22,10 +22,10 @@ in stdenv.mkDerivation rec { buildInputs = [ ghc perl gmp ncurses ]; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.8.3.nix b/pkgs/development/compilers/ghc/7.8.3.nix index 2e0f5ba07e4d0..5d74af99dcaa1 100644 --- a/pkgs/development/compilers/ghc/7.8.3.nix +++ b/pkgs/development/compilers/ghc/7.8.3.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" diff --git a/pkgs/development/compilers/ghc/7.8.4.nix b/pkgs/development/compilers/ghc/7.8.4.nix index 4323341dc4a49..9020df2f053a0 100644 --- a/pkgs/development/compilers/ghc/7.8.4.nix +++ b/pkgs/development/compilers/ghc/7.8.4.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation (rec { enableParallelBuilding = true; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index fe0d0b37371ec..43c32538b1a6f 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -3,10 +3,10 @@ let buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib" + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ]; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/ghc/nokinds.nix b/pkgs/development/compilers/ghc/nokinds.nix index 6334759496f09..cad827060adf7 100644 --- a/pkgs/development/compilers/ghc/nokinds.nix +++ b/pkgs/development/compilers/ghc/nokinds.nix @@ -3,10 +3,10 @@ let buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO SRC_HC_OPTS = -H64m -O -fasm GhcLibHcOpts = -O -dcore-lint @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib" + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ]; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/ghcjs/default.nix b/pkgs/development/compilers/ghcjs/default.nix index 3fecf26e832f8..fbacd45709afa 100644 --- a/pkgs/development/compilers/ghcjs/default.nix +++ b/pkgs/development/compilers/ghcjs/default.nix @@ -101,12 +101,12 @@ mkDerivation (rec { done ''; postInstall = '' - PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \ + PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp.out}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \ env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \ --dev \ --with-cabal ${cabal-install}/bin/cabal \ - --with-gmp-includes ${gmp}/include \ - --with-gmp-libraries ${gmp}/lib + --with-gmp-includes ${gmp.dev}/include \ + --with-gmp-libraries ${gmp.out}/lib ''; passthru = { isGhcjs = true; diff --git a/pkgs/development/compilers/go/1.1.nix b/pkgs/development/compilers/go/1.1.nix new file mode 100644 index 0000000000000..0c6d412641491 --- /dev/null +++ b/pkgs/development/compilers/go/1.1.nix @@ -0,0 +1,101 @@ +{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc +, removeGodocExternals ? false }: + +let + loader386 = "${glibc.out}/lib/ld-linux.so.2"; + loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; + loaderArm = "${glibc.out}/lib/ld-linux.so.3"; +in + +stdenv.mkDerivation { + name = "go-1.1.2"; + + src = fetchurl { + url = http://go.googlecode.com/files/go1.1.2.src.tar.gz; + sha256 = "0w7bchhb4b053az3wjp6z342rs9lp9nxf4w2mnfd1b89d6sb7izz"; + }; + + buildInputs = [ bison glibc bash makeWrapper ]; + + NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + + # I'm not sure what go wants from its 'src', but the go installation manual + # describes an installation keeping the src. + preUnpack = '' + mkdir -p $out/share + cd $out/share + ''; + + prePatch = '' + cd .. + if [ ! -d go ]; then + mv * go + fi + cd go + + patchShebangs ./ # replace /bin/bash + # !!! substituteInPlace does not seems to be effective. + sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c + sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go + sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go + + #sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \ + # -e 's,/bin/echo,${coreutils}/bin/echo,' \ + # src/pkg/exec/exec_test.go + + # Disabling the 'os/http/net' tests (they want files not available in + # chroot builds) + rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} + # The os test wants to read files in an existing path. Just it don't be /usr/bin. + sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go + sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go + # Disable the hostname test + sed -i '/TestHostname/areturn' src/pkg/os/os_test.go + # ParseInLocation fails the test + sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go + '' + stdenv.lib.optionalString removeGodocExternals '' + sed -i -e '/googleapi/d' -e '/javascript">$/,+6d' lib/godoc/godoc.html + ''; + + patches = [ ./cacert.patch ]; + + GOOS = "linux"; + GOARCH = if stdenv.system == "i686-linux" then "386" + else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.system == "armv5tel-linux" then "arm" + else throw "Unsupported system"; + GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; + + installPhase = '' + mkdir -p "$out/bin" + export GOROOT="$(pwd)/" + export GOBIN="$out/bin" + export PATH="$GOBIN:$PATH" + cd ./src + ./all.bash + cd - + + # Wrap the tools to define the location of the + # libraries. + for a in go gofmt godoc; do + wrapProgram "$out/bin/$a" \ + --set "GOROOT" $out/share/go \ + ${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""} + done + + # Copy the emacs configuration for Go files. + mkdir -p "$out/share/emacs/site-lisp" + cp ./misc/emacs/* $out/share/emacs/site-lisp/ + ''; + + meta = { + branch = "1.1"; + homepage = http://golang.org/; + description = "The Go Programming language"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [ pierron viric ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix new file mode 100644 index 0000000000000..0454ea96d892e --- /dev/null +++ b/pkgs/development/compilers/go/1.2.nix @@ -0,0 +1,91 @@ +{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc }: + +let + loader386 = "${glibc.out}/lib/ld-linux.so.2"; + loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; + loaderArm = "${glibc.out}/lib/ld-linux.so.3"; +in + +stdenv.mkDerivation { + name = "go-1.2.2"; + + src = fetchurl { + url = https://storage.googleapis.com/golang/go1.2.2.src.tar.gz; + sha1 = "3ce0ac4db434fc1546fec074841ff40dc48c1167"; + }; + + buildInputs = [ bison glibc bash makeWrapper ]; + + NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + + # I'm not sure what go wants from its 'src', but the go installation manual + # describes an installation keeping the src. + preUnpack = '' + mkdir -p $out/share + cd $out/share + ''; + + prePatch = '' + cd .. + if [ ! -d go ]; then + mv * go + fi + cd go + + patchShebangs ./ # replace /bin/bash + # !!! substituteInPlace does not seems to be effective. + sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c + sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go + sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go + + #sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \ + # -e 's,/bin/echo,${coreutils}/bin/echo,' \ + # src/pkg/exec/exec_test.go + + # Disabling the 'os/http/net' tests (they want files not available in + # chroot builds) + rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} + # The os test wants to read files in an existing path. Just it don't be /usr/bin. + sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go + sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go + # Disable the hostname test + sed -i '/TestHostname/areturn' src/pkg/os/os_test.go + # ParseInLocation fails the test + sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go + ''; + + patches = [ ./cacert-1.2.patch ]; + + GOOS = "linux"; + GOARCH = if stdenv.system == "i686-linux" then "386" + else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.system == "armv5tel-linux" then "arm" + else throw "Unsupported system"; + GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; + GO386 = 387; # from Arch: don't assume sse2 on i686 + + installPhase = '' + mkdir -p "$out/bin" + export GOROOT="$(pwd)/" + export GOBIN="$out/bin" + export PATH="$GOBIN:$PATH" + cd ./src + ./all.bash + cd - + + # Copy the emacs configuration for Go files. + mkdir -p "$out/share/emacs/site-lisp" + cp ./misc/emacs/* $out/share/emacs/site-lisp/ + ''; + + meta = { + branch = "1.2"; + homepage = http://golang.org/; + description = "The Go Programming language"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [ pierron viric ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/development/compilers/go/1.3.nix b/pkgs/development/compilers/go/1.3.nix new file mode 100644 index 0000000000000..a9a3c10584b08 --- /dev/null +++ b/pkgs/development/compilers/go/1.3.nix @@ -0,0 +1,113 @@ +{ stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }: + +let + loader386 = "${glibc.out}/lib/ld-linux.so.2"; + loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; + loaderArm = "${glibc.out}/lib/ld-linux.so.3"; + srcs = { + golang = fetchurl { + url = https://storage.googleapis.com/golang/go1.3.3.src.tar.gz; + sha1 = "b54b7deb7b7afe9f5d9a3f5dd830c7dede35393a"; + }; + tools = fetchhg { + url = https://code.google.com/p/go.tools/; + rev = "e1c276c4e679"; + sha256 = "0x62njflwkd99i2ixbksg6mjppl1wfg86f0g3swn350l1h0xzp76"; + }; + }; +in + +stdenv.mkDerivation { + name = "go-1.3.3"; + + src = srcs.golang; + + # perl is used for testing go vet + buildInputs = [ bison bash makeWrapper perl ] ++ lib.optionals stdenv.isLinux [ glibc ] ; + + # I'm not sure what go wants from its 'src', but the go installation manual + # describes an installation keeping the src. + preUnpack = '' + mkdir -p $out/share + cd $out/share + ''; + postUnpack = '' + mkdir -p $out/share/go/src/pkg/code.google.com/p/ + cp -rv --no-preserve=mode,ownership ${srcs.tools} $out/share/go/src/pkg/code.google.com/p/go.tools + ''; + + prePatch = '' + # Ensure that the source directory is named go + cd .. + if [ ! -d go ]; then + mv * go + fi + cd go + patchShebangs ./ # replace /bin/bash + + # Disabling the 'os/http/net' tests (they want files not available in + # chroot builds) + rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} + # !!! substituteInPlace does not seems to be effective. + # The os test wants to read files in an existing path. Just don't let it be /usr/bin. + sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go + sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go + # Disable the unix socket test + sed -i '/TestShutdownUnix/areturn' src/pkg/net/net_test.go + # Disable the hostname test + sed -i '/TestHostname/areturn' src/pkg/os/os_test.go + sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go + # ParseInLocation fails the test + sed -i '/TestParseInSydney/areturn' src/pkg/time/format_test.go + '' + lib.optionalString stdenv.isLinux '' + sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go + sed -i 's,/lib/ld-linux.so.3,${loaderArm},' src/cmd/5l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c + sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c + ''; + + patches = [ ./cacert-1.2.patch ]; + + GOOS = if stdenv.isDarwin then "darwin" else "linux"; + GOARCH = if stdenv.isDarwin then "amd64" + else if stdenv.system == "i686-linux" then "386" + else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.system == "armv5tel-linux" then "arm" + else throw "Unsupported system"; + GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; + GO386 = 387; # from Arch: don't assume sse2 on i686 + CGO_ENABLED = if stdenv.isDarwin then 0 else 1; + + installPhase = '' + export CC=cc + mkdir -p "$out/bin" + unset GOPATH + export GOROOT="$(pwd)/" + export GOBIN="$out/bin" + export PATH="$GOBIN:$PATH" + cd ./src + ./all.bash + cd - + + # Build extra tooling + # TODO: Fix godoc tests + TOOL_ROOT=code.google.com/p/go.tools/cmd + go install -v $TOOL_ROOT/cover $TOOL_ROOT/vet $TOOL_ROOT/godoc + go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc + + # Copy the emacs configuration for Go files. + mkdir -p "$out/share/emacs/site-lisp" + cp ./misc/emacs/* $out/share/emacs/site-lisp/ + ''; + + setupHook = ./setup-hook.sh; + + meta = { + branch = "1.3"; + homepage = http://golang.org/; + description = "The Go Programming language"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [ cstrahan ]; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + }; +} diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix index d250016974430..a31ef704e6a0b 100644 --- a/pkgs/development/compilers/go/1.4.nix +++ b/pkgs/development/compilers/go/1.4.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go # Find the loader dynamically - LOADER="$(find ${libc}/lib -name ld-linux\* | head -n 1)" + LOADER="$(find ${libc.out or libc}/lib -name ld-linux\* | head -n 1)" # Replace references to the loader find src/cmd -name asm.c -exec sed -i "s,/lib/ld-linux.*\.so\.[0-9],$LOADER," {} \; diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix new file mode 100644 index 0000000000000..c684d7d5ee5db --- /dev/null +++ b/pkgs/development/compilers/go/default.nix @@ -0,0 +1,95 @@ +{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata}: + +let + loader386 = "${glibc.out}/lib/ld-linux.so.2"; + loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; + loaderArm = "${glibc.out}/lib/ld-linux.so.3"; +in + +stdenv.mkDerivation { + name = "go-1.0.3"; + + src = fetchurl { + url = http://go.googlecode.com/files/go1.0.3.src.tar.gz; + sha256 = "1pz31az3icwqfqfy3avms05jnqr0qrbrx9yqsclkdwbjs4rkbfkz"; + }; + + buildInputs = [ bison glibc bash makeWrapper ]; + + # I'm not sure what go wants from its 'src', but the go installation manual + # describes an installation keeping the src. + preUnpack = '' + mkdir -p $out/share + cd $out/share + ''; + + prePatch = '' + cd .. + if [ ! -d go ]; then + mv * go + fi + cd go + + patchShebangs ./ # replace /bin/bash + # !!! substituteInPlace does not seems to be effective. + sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c + sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c + sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go + + #sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \ + # -e 's,/bin/echo,${coreutils}/bin/echo,' \ + # src/pkg/exec/exec_test.go + + # Disabling the 'os/http/net' tests (they want files not available in + # chroot builds) + rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} + # The os test wants to read files in an existing path. Just it don't be /usr/bin. + sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go + sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go + # Disable the hostname test + sed -i '/TestHostname/areturn' src/pkg/os/os_test.go + ''; + + patches = [ ./cacert.patch ./1_0-opt-error.patch ./1_0-gcc-bug.patch ]; + + GOOS = "linux"; + GOARCH = if stdenv.system == "i686-linux" then "386" + else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.system == "armv5tel-linux" then "arm" + else throw "Unsupported system"; + GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; + + NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + + installPhase = '' + mkdir -p "$out/bin" + export GOROOT="$(pwd)/" + export GOBIN="$out/bin" + export PATH="$GOBIN:$PATH" + cd ./src + ./all.bash + cd - + + # Wrap the tools to define the location of the + # libraries. + for a in go gofmt godoc; do + wrapProgram "$out/bin/$a" \ + --set "GOROOT" $out/share/go \ + ${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""} + done + + # Copy the emacs configuration for Go files. + mkdir -p "$out/share/emacs/site-lisp" + cp ./misc/emacs/* $out/share/emacs/site-lisp/ + ''; + + meta = { + branch = "1.0"; + homepage = http://golang.org/; + description = "The Go Programming language"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [ pierron viric ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix index ff038024d10f6..57fd3433fa5ee 100644 --- a/pkgs/development/compilers/llvm/3.7/llvm.nix +++ b/pkgs/development/compilers/llvm/3.7/llvm.nix @@ -54,6 +54,8 @@ in stdenv.mkDerivation rec { "-DCAN_TARGET_i386=false" ]; + NIX_LDFLAGS = "-lpthread"; # no idea what's the problem + postBuild = '' rm -fR $out diff --git a/pkgs/development/compilers/mentor/default.nix b/pkgs/development/compilers/mentor/default.nix index 7ff013b234410..573bf82103197 100644 --- a/pkgs/development/compilers/mentor/default.nix +++ b/pkgs/development/compilers/mentor/default.nix @@ -34,7 +34,7 @@ let # GDB needs ncurses case "$file" in - *gdb) patchelf --set-rpath "${ncurses}/lib" "$file";; + *gdb) patchelf --set-rpath "${ncurses.lib}/lib" "$file";; esac done diff --git a/pkgs/development/compilers/mkcl/default.nix b/pkgs/development/compilers/mkcl/default.nix index 6d17d5a8b25d9..7158ffab9185f 100644 --- a/pkgs/development/compilers/mkcl/default.nix +++ b/pkgs/development/compilers/mkcl/default.nix @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gmp ]; configureFlags = [ - "GMP_CFLAGS=-I${gmp}/include" - "GMP_LDFLAGS=-L${gmp}/lib" + "GMP_CFLAGS=-I${gmp.dev}/include" + "GMP_LDFLAGS=-L${gmp.out}/lib" ]; postInstall = '' diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix index 381941acc20e5..c4890c1ca886e 100644 --- a/pkgs/development/compilers/mlton/default.nix +++ b/pkgs/development/compilers/mlton/default.nix @@ -6,8 +6,8 @@ let usr_prefix = if stdenv.isDarwin then "usr/local" else "usr"; dynamic_linker = - if stdenv.isx86_64 then "${stdenv.glibc}/lib/ld-linux-x86-64.so.2" - else "${stdenv.glibc}/lib/ld-linux.so.2"; + if stdenv.isx86_64 then "${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2" + else "${stdenv.glibc.out}/lib/ld-linux.so.2"; in stdenv.mkDerivation rec { @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { chmod u+x $(pwd)/../${usr_prefix}/bin/mlton # So the builder runs the binary compiler with gmp. - export LD_LIBRARY_PATH=${gmp}/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${gmp.out}/lib:$LD_LIBRARY_PATH '' + stdenv.lib.optionalString stdenv.isLinux '' # Patch ELF interpreter. @@ -92,10 +92,10 @@ stdenv.mkDerivation rec { substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $out/lib/mlton # Path to libgmp. - substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-link-opt '-lm -lgmp'" "-link-opt '-lm -lgmp -L${gmp}/lib'" + substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-link-opt '-lm -lgmp'" "-link-opt '-lm -lgmp -L${gmp.out}/lib'" # Path to gmp.h. - substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp}/include'" + substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp.dev}/include'" # Path to the same cc used in the build; needed at runtime. substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "gcc='gcc'" "gcc='"$(type -p cc)"'" diff --git a/pkgs/development/compilers/nvidia-cg-toolkit/default.nix b/pkgs/development/compilers/nvidia-cg-toolkit/default.nix index 9c6d07c4681e9..ab71090b35802 100644 --- a/pkgs/development/compilers/nvidia-cg-toolkit/default.nix +++ b/pkgs/development/compilers/nvidia-cg-toolkit/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { installPhase = '' for b in cgc cgfxcat cginfo do - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux*.so.? "bin/$b" + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux*.so.? "bin/$b" done # FIXME: cgfxcat and cginfo need more patchelf mkdir -p "$out/bin/" diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix index 97ffbf9f0993e..de803a5d90c51 100644 --- a/pkgs/development/compilers/openjdk/7.nix +++ b/pkgs/development/compilers/openjdk/7.nix @@ -106,9 +106,9 @@ let makeFlags = [ "SORT=${coreutils}/bin/sort" - "ALSA_INCLUDE=${alsaLib}/include/alsa/version.h" - "FREETYPE_HEADERS_PATH=${freetype}/include" - "FREETYPE_LIB_PATH=${freetype}/lib" + "ALSA_INCLUDE=${alsaLib.dev}/include/alsa/version.h" + "FREETYPE_HEADERS_PATH=${freetype.dev}/include" + "FREETYPE_LIB_PATH=${freetype.out}/lib" "MILESTONE=${update}" "BUILD_NUMBER=b${build}" "USRBIN_PATH=" diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index bbbae38f6b8ea..48d7dd5dffbf5 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cpio, file, which, unzip, zip, xorg, cups, freetype +{ stdenv, fetchurl, cpio, pkgconfig, file, which, unzip, zip, xorg, cups, freetype , alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib , setJavaClassPath , minimal ? false @@ -63,6 +63,7 @@ let outputs = [ "out" "jre" ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ cpio file which unzip zip xorg.libX11 xorg.libXt xorg.libXext xorg.libXrender xorg.libXtst @@ -93,7 +94,6 @@ let ''; configureFlags = [ - "--with-freetype=${freetype}" "--with-boot-jdk=${bootjdk.home}" "--with-update-version=${update}" "--with-build-number=${build}" diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix index a9ca7673dfe99..48a22638813f7 100644 --- a/pkgs/development/compilers/openjdk/bootstrap.nix +++ b/pkgs/development/compilers/openjdk/bootstrap.nix @@ -40,13 +40,13 @@ let LIBDIRS="$(find $out -name \*.so\* -exec dirname {} \; | sort | uniq | tr '\n' ':')" for i in $out/bin/*; do - patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $i || true - patchelf --set-rpath "${glibc}/lib:$LIBDIRS" $i || true + patchelf --set-interpreter ${glibc.out}/lib/ld-linux*.so.2 $i || true + patchelf --set-rpath "${glibc.out}/lib:$LIBDIRS" $i || true done find $out -name \*.so\* | while read lib; do - patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $lib || true - patchelf --set-rpath "${glibc}/lib:${stdenv.cc.cc}/lib:$LIBDIRS" $lib || true + patchelf --set-interpreter ${glibc.out}/lib/ld-linux*.so.2 $lib || true + patchelf --set-rpath "${glibc.out}/lib:${stdenv.cc.cc.lib}/lib:$LIBDIRS" $lib || true done # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings: diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix index 3b8916c67e90a..22fb400a1ea59 100644 --- a/pkgs/development/compilers/orc/default.nix +++ b/pkgs/development/compilers/orc/default.nix @@ -8,20 +8,25 @@ stdenv.mkDerivation rec { sha256 = "1ryz1gfgrxcj806cakcblxf0bcwq8p2mw8k86fs3f5wlwayawzkn"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; # compilation tools + + postInstall = '' + sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc + ''; # building memcpy_speed.log # ../test-driver: line 107: 4495 Segmentation fault "$@" > $log_file 2>&1 # FAIL: memcpy_speed doCheck = false; # see https://bugzilla.gnome.org/show_bug.cgi?id=728129#c7 - meta = { + meta = with stdenv.lib; { description = "The Oil Runtime Compiler"; homepage = "http://code.entropywave.com/orc/"; # The source code implementing the Marsenne Twister algorithm is licensed # under the 3-clause BSD license. The rest is 2-clause BSD license. - license = stdenv.lib.licenses.bsd3; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = [ maintainers.fuuzetsu ]; }; } diff --git a/pkgs/development/compilers/path64/default.nix b/pkgs/development/compilers/path64/default.nix index d6112dcdfc482..694bdc8990fd7 100644 --- a/pkgs/development/compilers/path64/default.nix +++ b/pkgs/development/compilers/path64/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { patchPhase = '' sed -i s,/usr/bin/ld,$(type -P ld), src/driver/phases.c - sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in + sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in ''; cmakeFlags = '' @@ -22,7 +22,7 @@ stdenv.mkDerivation { -DPATH64_ENABLE_PSCRUNTIME=OFF -DPATH64_ENABLE_PROFILING=OFF -DPATH64_ENABLE_TARGETS=x8664 -DCMAKE_BUILD_TYPE=Debug -DPATH64_ENABLE_FORTRAN=OFF - -DPSC_CRT_PATH=${stdenv.cc.libc}/lib + -DPSC_CRT_PATH=${stdenv.cc.libc.out}/lib ''; makeFlags = "-j4"; diff --git a/pkgs/development/compilers/rustc/generic.nix b/pkgs/development/compilers/rustc/generic.nix index 9b3dca42b6282..2b4a7717016d6 100644 --- a/pkgs/development/compilers/rustc/generic.nix +++ b/pkgs/development/compilers/rustc/generic.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps -, llvmPackages_37, jemalloc, ncurses +, llvmPackages_37, jemalloc, ncurses, binutils , shortVersion, isRelease , forceBundledLLVM ? false @@ -108,8 +108,8 @@ with stdenv.lib; stdenv.mkDerivation { mkdir -p "$out" cp -r bin "$out/bin" '' + optionalString stdenv.isLinux '' - patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ - --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \ + patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \ + --set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \ "$out/bin/rustc" ''; }; @@ -117,7 +117,7 @@ with stdenv.lib; stdenv.mkDerivation { configureFlags = configureFlags ++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ] # ++ [ "--jemalloc-root=${jemalloc}/lib" - ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ] + ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils}/bin/ar" ] ++ optional (stdenv.cc.cc ? isClang) "--enable-clang" ++ optional (!forceBundledLLVM) "--llvm-root=${llvmPackages_37.llvm}"; diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index c9378451d1ffd..9da1ef0dd9af1 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation rec { preConfigure = '' configureFlagsArray+=("--elfinterp=$(cat $NIX_CC/nix-support/dynamic-linker)") - configureFlagsArray+=("--crtprefix=${stdenv.glibc}/lib") - configureFlagsArray+=("--sysincludepaths=${stdenv.glibc}/include:{B}/include") - configureFlagsArray+=("--libpaths=${stdenv.glibc}/lib") + configureFlagsArray+=("--crtprefix=${stdenv.glibc.out}/lib") + configureFlagsArray+=("--sysincludepaths=${stdenv.glibc.dev}/include:{B}/include") + configureFlagsArray+=("--libpaths=${stdenv.glibc.out}/lib") ''; doCheck = true; diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix index 3e4b0bcae5b98..c53cddc0ad1aa 100644 --- a/pkgs/development/compilers/urweb/default.nix +++ b/pkgs/development/compilers/urweb/default.nix @@ -22,12 +22,12 @@ stdenv.mkDerivation rec { preConfigure = '' export PGHEADER="${postgresql}/include/libpq-fe.h"; export MSHEADER="${mysql.lib}/include/mysql/mysql.h"; - export SQHEADER="${sqlite}/include/sqlite3.h"; + export SQHEADER="${sqlite.dev}/include/sqlite3.h"; export CCARGS="-I$out/include \ -L${mysql.lib}/lib/mysql \ - -L${postgresql}/lib \ - -L${sqlite}/lib"; + -L${postgresql.lib}/lib \ + -L${sqlite.out}/lib"; ''; # Be sure to keep the statically linked libraries diff --git a/pkgs/development/interpreters/elixir/default.nix b/pkgs/development/interpreters/elixir/default.nix index 380da51da77d5..21523899b92d8 100644 --- a/pkgs/development/interpreters/elixir/default.nix +++ b/pkgs/development/interpreters/elixir/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { b=$(basename $f) if [ $b == "mix" ]; then continue; fi wrapProgram $f \ - --prefix PATH ":" "${erlang}/bin:${coreutils}/bin:${curl}/bin:${bash}/bin" \ + --prefix PATH ":" "${erlang}/bin:${coreutils}/bin:${curl.bin}/bin:${bash}/bin" \ --set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt done diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index c4634de5d3f20..bb0ef7594a4f5 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -49,7 +49,7 @@ sed -i "$out/lib/pkgconfig/guile-2.0.pc" \ -e 's|-lunistring|-L${libunistring}/lib -lunistring|g ; s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ; - s|-lltdl|-L${libtool}/lib -lltdl|g' + s|-lltdl|-L${libtool.lib}/lib -lltdl|g' ''; # make check doesn't work on darwin diff --git a/pkgs/development/interpreters/love/default.nix b/pkgs/development/interpreters/love/default.nix index fc1f01cb3730c..b12c2c405780e 100644 --- a/pkgs/development/interpreters/love/default.nix +++ b/pkgs/development/interpreters/love/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { ''; NIX_CFLAGS_COMPILE = '' - -I${SDL}/include/SDL + -I${SDL.dev}/include/SDL -I${freetype}include/freetype2 ''; diff --git a/pkgs/development/interpreters/lua-5/expat.nix b/pkgs/development/interpreters/lua-5/expat.nix index 0dbbaf8a16143..243abae331a63 100644 --- a/pkgs/development/interpreters/lua-5/expat.nix +++ b/pkgs/development/interpreters/lua-5/expat.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { makeFlagsArray=( LUA_LDIR="$out/share/lua/${lua5.luaversion}" LUA_INC="-I${lua5}/include" LUA_CDIR="$out/lib/lua/${lua5.luaversion}" - EXPAT_INC="-I${expat}/include"); + EXPAT_INC="-I${expat.dev}/include"); ''; meta = { diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 8e148f1189cdc..0d4a5ef2d6a63 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { '' + stdenv.lib.optionalString (stdenv.cc.libc != null) '' substituteInPlace Makefile \ - --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig + --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig ''; configurePhase = false; diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index 568025edfd4c2..989d24950b99b 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -14,6 +14,11 @@ stdenv.mkDerivation rec { sha256 = "1dpd9lhc4723wmsn4dsn4m320qlqgyw28bvcbhnfqp2nl3f0ikv9"; }; + # TODO: Add a "dev" output containing the header files. + outputs = [ "out" "man" ]; + + setOutputFlags = false; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch @@ -45,8 +50,8 @@ stdenv.mkDerivation rec { "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" - "-Dlocincpth=${libc}/include" - "-Dloclibpth=${libc}/lib" + "-Dlocincpth=${libc.dev or libc}/include" + "-Dloclibpth=${libc.out or libc}/lib" ] ++ lib.optional enableThreading "-Dusethreads"; @@ -58,7 +63,7 @@ stdenv.mkDerivation rec { preConfigure = '' - configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" + configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$man/share/man/man1 -Dman3dir=$man/share/man/man3" ${lib.optionalString stdenv.isArm '' configureFlagsArray=(-Dldflags="-lm -lrt") @@ -77,6 +82,17 @@ stdenv.mkDerivation rec { substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" ''; + postInstall = + '' + # Remove dependency between "out" and "man" outputs. + rm $out/lib/perl5/*/*/.packlist + + # Remove dependencies on glibc.dev and coreutils. + substituteInPlace $out/lib/perl5/*/*/Config_heavy.pl \ + --replace ${stdenv.glibc.dev or "/blabla"} /no-such-path \ + --replace $man /no-such-path + ''; # */ + setupHook = ./setup-hook.sh; passthru.libPrefix = "lib/perl5/site_perl"; diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index 141484814ea3a..d5c8efa5a61cc 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -28,8 +28,11 @@ stdenv.mkDerivation rec { sha256 = "17cvplgpxbm1hshxlkra2fldn4da1iap1lsnb04hdm8ply93k95i"; }; + # TODO: Add a "dev" output containing the header files. outputs = [ "out" "man" ]; + setOutputFlags = false; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch @@ -61,8 +64,8 @@ stdenv.mkDerivation rec { "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" - "-Dlocincpth=${libc}/include" - "-Dloclibpth=${libc}/lib" + "-Dlocincpth=${libc.dev or libc}/include" + "-Dloclibpth=${libc.out or libc}/lib" ] ++ optional enableThreading "-Dusethreads"; @@ -89,6 +92,17 @@ stdenv.mkDerivation rec { substituteInPlace dist/PathTools/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" ''; + postInstall = + '' + # Remove dependency between "out" and "man" outputs. + rm $out/lib/perl5/*/*/.packlist + + # Remove dependencies on glibc.dev and coreutils. + substituteInPlace $out/lib/perl5/*/*/Config_heavy.pl \ + --replace ${stdenv.glibc.dev or "/blabla"} /no-such-path \ + --replace $man /no-such-path + ''; # */ + setupHook = ./setup-hook.sh; passthru.libPrefix = "lib/perl5/site_perl"; diff --git a/pkgs/development/interpreters/perl/5.22/default.nix b/pkgs/development/interpreters/perl/5.22/default.nix index 4b0f4364ea222..59afe27ba3cc5 100644 --- a/pkgs/development/interpreters/perl/5.22/default.nix +++ b/pkgs/development/interpreters/perl/5.22/default.nix @@ -15,7 +15,8 @@ assert enableThreading -> (stdenv ? glibc); let libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr"; - + libcInc = libc.dev or libc; + libcLib = libc.out or libc; in with stdenv.lib; @@ -28,7 +29,8 @@ stdenv.mkDerivation rec { sha256 = "0g5bl8sdpzx9gx2g5jq3py4bj07z2ylk7s1qn0fvsss2yl3hhs8c"; }; - outputs = [ "out" "man" ]; + outputs = [ "out" "man" "docdev" ]; + setOutputFlags = false; patches = [ # Do not look in /usr etc. for dependencies. @@ -48,8 +50,8 @@ stdenv.mkDerivation rec { "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" - "-Dlocincpth=${libc}/include" - "-Dloclibpth=${libc}/lib" + "-Dlocincpth=${libcInc}/include" + "-Dloclibpth=${libcLib}/lib" ] ++ optional enableThreading "-Dusethreads"; @@ -68,10 +70,8 @@ stdenv.mkDerivation rec { preConfigure = '' configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" - - ${optionalString stdenv.isArm '' - configureFlagsArray=(-Dldflags="-lm -lrt") - ''} + '' + optionalString stdenv.isArm '' + configureFlagsArray=(-Dldflags="-lm -lrt") '' + optionalString stdenv.isDarwin '' substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" "" '' + optionalString (!enableThreading) '' @@ -91,9 +91,9 @@ stdenv.mkDerivation rec { preCheck = '' # Try and setup a local hosts file - if [ -f "${libc}/lib/libnss_files.so" ]; then + if [ -f "${libcLib}/lib/libnss_files.so" ]; then mkdir $TMPDIR/fakelib - cp "${libc}/lib/libnss_files.so" $TMPDIR/fakelib + cp "${libcLib}/lib/libnss_files.so" $TMPDIR/fakelib sed -i 's,/etc/hosts,/dev/fd/3,g' $TMPDIR/fakelib/libnss_files.so export LD_LIBRARY_PATH=$TMPDIR/fakelib fi @@ -103,6 +103,22 @@ stdenv.mkDerivation rec { unset LD_LIBRARY_PATH ''; + # TODO: it seems like absolute paths to some coreutils is required. + postInstall = + '' + # Remove dependency between "out" and "man" outputs. + rm "$out"/lib/perl5/*/*/.packlist + + # Remove dependencies on glibc and gcc + sed "/ *libpth =>/c libpth => ' '," \ + -i "$out"/lib/perl5/*/*/Config.pm + # TODO: removing those paths would be cleaner than overwriting with nonsense. + substituteInPlace "$out"/lib/perl5/*/*/Config_heavy.pl \ + --replace "${libcInc}" /no-such-path \ + --replace "${stdenv.cc.cc or "/no-such-path"}" /no-such-path \ + --replace "$man" /no-such-path + ''; # */ + meta = { homepage = https://www.perl.org/; description = "The standard implementation of the Perl 5 programmming language"; diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 565a9a73a2fc4..458437058f78f 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -42,7 +42,13 @@ let }; ldap = { - configureFlags = ["--with-ldap=${openldap}"]; + configureFlags = [ + "--with-ldap" + "LDAP_DIR=${openldap.dev}" + "LDAP_INCDIR=${openldap.dev}/include" + "LDAP_LIBDIR=${openldap.out}/lib" + "--with-ldap-sasl=${cyrus_sasl.dev}" + ]; buildInputs = [openldap cyrus_sasl openssl]; }; @@ -67,7 +73,7 @@ let libxml2 = { configureFlags = [ - "--with-libxml-dir=${libxml2}" + "--with-libxml-dir=${libxml2.dev}" ]; buildInputs = [ libxml2 ]; }; @@ -146,7 +152,7 @@ let }; openssl = { - configureFlags = ["--with-openssl=${openssl}"]; + configureFlags = ["--enable-openssl"]; buildInputs = [openssl]; }; diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix index fe209f6f11489..c6e2c5270d537 100644 --- a/pkgs/development/interpreters/pypy/default.nix +++ b/pkgs/development/interpreters/pypy/default.nix @@ -43,9 +43,9 @@ let # hint pypy to find nix ncurses substituteInPlace pypy/module/_minimal_curses/fficurses.py \ - --replace "/usr/include/ncurses/curses.h" "${ncurses}/include/curses.h" \ - --replace "ncurses/curses.h" "${ncurses}/include/curses.h" \ - --replace "ncurses/term.h" "${ncurses}/include/term.h" \ + --replace "/usr/include/ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ + --replace "ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ + --replace "ncurses/term.h" "${ncurses.dev}/include/term.h" \ --replace "libraries=['curses']" "libraries=['ncurses']" # tkinter hints @@ -54,7 +54,7 @@ let --replace "linklibs = ['tcl' + _ver, 'tk' + _ver]" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \ --replace "libdirs = []" "libdirs = ['${tk}/lib', '${tcl}/lib']" - sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3_build.py + sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py ''; setupHook = ./setup-hook.sh; @@ -72,7 +72,7 @@ let doCheck = true; checkPhase = '' - export TERMINFO="${ncurses}/share/terminfo/"; + export TERMINFO="${ncurses.out}/share/terminfo/"; export TERM="xterm"; export HOME="$TMPDIR"; # disable shutils because it assumes gid 0 exists diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix index 32974778168b5..96b44ddc17f38 100644 --- a/pkgs/development/interpreters/python/2.6/default.nix +++ b/pkgs/development/interpreters/python/2.6/default.nix @@ -52,6 +52,10 @@ let [ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline xlibsWrapper tcl tk sqlite ] ++ optional zlibSupport zlib; + mkPaths = paths: { + C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths); + LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths); + }; # Build the basic Python interpreter without modules that have # external dependencies. @@ -62,8 +66,7 @@ let inherit majorVersion version src patches buildInputs preConfigure configureFlags; - C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs); - LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs); + inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"; @@ -83,9 +86,9 @@ let ln -s $out/lib/python${majorVersion}/pdb.py $out/bin/pdb${majorVersion} mv $out/share/man/man1/{python.1,python2.6.1} ln -s $out/share/man/man1/{python2.6.1,python.1} - + paxmark E $out/bin/python${majorVersion} - + ${ optionalString includeModules "$out/bin/python ./setup.py build_ext"} ''; @@ -139,8 +142,7 @@ let buildInputs = [ python ] ++ deps; - C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs); - LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs); + inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; buildPhase = '' diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index e08fde3c8bfcc..f96327f3b91c7 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -99,6 +99,11 @@ let ++ optional zlibSupport zlib ++ optionals stdenv.isDarwin [ CF configd ]; + mkPaths = paths: { + C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths); + LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths); + }; + # Build the basic Python interpreter without modules that have # external dependencies. python = stdenv.mkDerivation { @@ -109,8 +114,7 @@ let configureFlags; LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; - C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs); - LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs); + inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"; DETERMINISTIC_BUILD = 1; @@ -136,6 +140,8 @@ let paxmark E $out/bin/python${majorVersion} ${ optionalString includeModules "$out/bin/python ./setup.py build_ext"} + + rm "$out"/lib/python*/plat-linux2/regen # refers to glibc.dev ''; passthru = rec { @@ -184,8 +190,7 @@ let buildInputs = [ python ] ++ deps; - C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs); - LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs); + inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; # non-python gdbm has a libintl dependency on i686-cygwin, not on x86_64-cygwin buildPhase = (if (stdenv.system == "i686-cygwin" && moduleName == "gdbm") then '' diff --git a/pkgs/development/interpreters/python/3.2/default.nix b/pkgs/development/interpreters/python/3.2/default.nix index f4103662316ec..c0b5d3401ddd3 100644 --- a/pkgs/development/interpreters/python/3.2/default.nix +++ b/pkgs/development/interpreters/python/3.2/default.nix @@ -44,8 +44,8 @@ stdenv.mkDerivation { ${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''} configureFlagsArray=( --enable-shared --with-threads --with-wide-unicode - CPPFLAGS="${concatStringsSep " " (map (p: "-I${p}/include") buildInputs)}" - LDFLAGS="${concatStringsSep " " (map (p: "-L${p}/lib") buildInputs)}" + CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}" LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}" ) ''; diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix index a8953f38245a0..a46ef7c056b2d 100644 --- a/pkgs/development/interpreters/python/3.3/default.nix +++ b/pkgs/development/interpreters/python/3.3/default.nix @@ -46,8 +46,8 @@ stdenv.mkDerivation { ${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''} configureFlagsArray=( --enable-shared --with-threads - CPPFLAGS="${concatStringsSep " " (map (p: "-I${p}/include") buildInputs)}" - LDFLAGS="${concatStringsSep " " (map (p: "-L${p}/lib") buildInputs)}" + CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}" LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}" ) ''; diff --git a/pkgs/development/interpreters/python/3.4/default.nix b/pkgs/development/interpreters/python/3.4/default.nix index 570c7cc35d13b..7c979b0ebe9af 100644 --- a/pkgs/development/interpreters/python/3.4/default.nix +++ b/pkgs/development/interpreters/python/3.4/default.nix @@ -58,8 +58,8 @@ stdenv.mkDerivation { ''} configureFlagsArray=( --enable-shared --with-threads - CPPFLAGS="${concatStringsSep " " (map (p: "-I${p}/include") buildInputs)}" - LDFLAGS="${concatStringsSep " " (map (p: "-L${p}/lib") buildInputs)}" + CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}" LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}" ) ''; diff --git a/pkgs/development/interpreters/python/3.5/default.nix b/pkgs/development/interpreters/python/3.5/default.nix index 2d85a52a2e9e1..f17a6764202b3 100644 --- a/pkgs/development/interpreters/python/3.5/default.nix +++ b/pkgs/development/interpreters/python/3.5/default.nix @@ -58,8 +58,8 @@ stdenv.mkDerivation { ''} configureFlagsArray=( --enable-shared --with-threads - CPPFLAGS="${concatStringsSep " " (map (p: "-I${p}/include") buildInputs)}" - LDFLAGS="${concatStringsSep " " (map (p: "-L${p}/lib") buildInputs)}" + CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}" LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}" ) ''; diff --git a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix index 3ae74057a54f7..29fa3454d1959 100644 --- a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix +++ b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix @@ -54,8 +54,8 @@ in ncursesw = attrs: { buildInputs = [ ncurses ]; buildFlags = [ - "--with-cflags=-I${ncurses}/include" - "--with-ldflags=-L${ncurses}/lib" + "--with-cflags=-I${ncurses.dev}/include" + "--with-ldflags=-L${ncurses.lib}/lib" ]; }; @@ -63,12 +63,12 @@ in buildFlags = [ "--use-system-libraries" "--with-zlib-dir=${zlib}" - "--with-xml2-lib=${libxml2}/lib" - "--with-xml2-include=${libxml2}/include/libxml2" - "--with-xslt-lib=${libxslt}/lib" - "--with-xslt-include=${libxslt}/include" - "--with-exslt-lib=${libxslt}/lib" - "--with-exslt-include=${libxslt}/include" + "--with-xml2-lib=${libxml2.out}/lib" + "--with-xml2-include=${libxml2.dev}/include/libxml2" + "--with-xslt-lib=${libxslt.out}/lib" + "--with-xslt-include=${libxslt.dev}/include" + "--with-exslt-lib=${libxslt.out}/lib" + "--with-exslt-include=${libxslt.dev}/include" ] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}"; buildInputs = lib.optional stdenv.isDarwin darwin.libobjc; }; @@ -89,8 +89,8 @@ in sqlite3 = attrs: { buildFlags = [ - "--with-sqlite3-include=${sqlite}/include" - "--with-sqlite3-lib=${sqlite}/lib" + "--with-sqlite3-include=${sqlite.dev}/include" + "--with-sqlite3-lib=${sqlite.out}/lib" ]; }; diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix index 0cc477c991efc..be79c5c957abf 100644 --- a/pkgs/development/interpreters/ruby/patches.nix +++ b/pkgs/development/interpreters/ruby/patches.nix @@ -82,8 +82,8 @@ in nokogiri = { buildInputs = [ libxml2 ]; buildFlags = - [ "--with-xml2-dir=${libxml2} --with-xml2-include=${libxml2}/include/libxml2" - "--with-xslt-dir=${libxslt} --use-system-libraries" + [ "--with-xml2-dir=${libxml2.out} --with-xml2-include=${libxml2.dev}/include/libxml2" + "--with-xslt-dir=${libxslt.out} --use-system-libraries" libiconv ]; }; diff --git a/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix b/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix index ecaed5077121e..99f66199d939d 100644 --- a/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix +++ b/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" ''; makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1 JS_THREADSAFE=1"; diff --git a/pkgs/development/interpreters/spidermonkey/17.0.nix b/pkgs/development/interpreters/spidermonkey/17.0.nix index 7573b546164b0..8ef3d953bfa4b 100644 --- a/pkgs/development/interpreters/spidermonkey/17.0.nix +++ b/pkgs/development/interpreters/spidermonkey/17.0.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"; }; + outputs = [ "dev" "out" "lib" ]; + propagatedBuildInputs = [ nspr ]; buildInputs = [ pkgconfig perl python zip libffi readline ]; @@ -21,11 +23,14 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" export LIBXUL_DIST=$out ''; + setOutputFlags = false; configureFlags = [ + "--libdir=$(lib)/lib" + "--includedir=$(dev)/include" "--enable-threadsafe" "--with-system-nspr" "--with-system-ffi" @@ -49,7 +54,10 @@ stdenv.mkDerivation rec { paxmark mr jsapi-tests/jsapi-tests ''; - postInstall = ''rm "$out"/lib/*.a''; # halve the output size + postInstall = '' + rm "$lib"/lib/*.a # halve the output size + _moveToOutput "bin/js*-config" "$dev" # break the cycle + ''; meta = with stdenv.lib; { description = "Mozilla's JavaScript engine written in C/C++"; diff --git a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix index a036388f15eed..94f070d1a91d3 100644 --- a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix +++ b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { postUnpack = "sourceRoot=\${sourceRoot}/js/src"; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" export LIBXUL_DIST=$out ''; diff --git a/pkgs/development/interpreters/spidermonkey/24.2.nix b/pkgs/development/interpreters/spidermonkey/24.2.nix index 3a9bd8ad7a462..d235ab04526be 100644 --- a/pkgs/development/interpreters/spidermonkey/24.2.nix +++ b/pkgs/development/interpreters/spidermonkey/24.2.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"; }; + outputs = [ "dev" "out" "lib" ]; + propagatedBuildInputs = [ nspr ]; buildInputs = [ pkgconfig perl python zip libffi readline ]; @@ -21,11 +23,14 @@ stdenv.mkDerivation rec { postUnpack = "sourceRoot=\${sourceRoot}/js/src"; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" export LIBXUL_DIST=$out ''; + setOutputFlags = false; configureFlags = [ + "--libdir=$(lib)/lib" + "--includedir=$(dev)/include" "--enable-threadsafe" "--with-system-nspr" "--with-system-ffi" @@ -40,6 +45,11 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = "rm jit-test/tests/sunspider/check-date-format-tofte.js"; # https://bugzil.la/600522 + postInstall = '' + rm "$lib"/lib/*.a # halve the output size + _moveToOutput "bin/js*-config" "$dev" # break the cycle + ''; + meta = with stdenv.lib; { description = "Mozilla's JavaScript engine written in C/C++"; homepage = https://developer.mozilla.org/en/SpiderMonkey; diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index 7006eb10f7ed9..92d7779ba3474 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -27,7 +27,8 @@ stdenv.mkDerivation rec { sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"; }; - outputs = [ "out" "man" ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; # sdl-config nativeBuildInputs = [ pkgconfig ]; @@ -57,7 +58,7 @@ stdenv.mkDerivation rec { "--disable-osmesa-shared" ] ++ stdenv.lib.optionals (stdenv ? cross) ([ "--without-x" - ] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib}/lib"); + ] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib"); # Fix a build failure on OS X Mavericks # Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085 @@ -66,6 +67,8 @@ stdenv.mkDerivation rec { sha1 = "3137feb503a89a8d606405373905b92dcf7e293b"; }) ]; + postFixup = ''_moveToOutput share/aclocal "$dev" ''; + crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { patches = let f = rev: sha256: fetchurl { diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 529c485930b3f..1c260c2ba911a 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -19,7 +19,7 @@ let configureFlagsFun = attrs: '' --disable-oss --disable-x11-shared --disable-pulseaudio-shared --disable-alsa-shared - ${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""} + ${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib.out}/lib" else ""} ${if (!x11Support) then "--without-x" else ""} ''; in diff --git a/pkgs/development/libraries/aalib/default.nix b/pkgs/development/libraries/aalib/default.nix index d7dcbeba330b6..fb8edd27bf8b6 100644 --- a/pkgs/development/libraries/aalib/default.nix +++ b/pkgs/development/libraries/aalib/default.nix @@ -8,16 +8,30 @@ stdenv.mkDerivation { sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + setOutputFlags = false; # Doesn't support all the flags + + patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ]; + # The fuloong2f is not supported by aalib still preConfigure = '' cp ${automake}/share/automake*/config.{sub,guess} . + configureFlagsArray+=( + "--bindir=$bin/bin" + "--includedir=$dev/include" + "--libdir=$out/lib" + ) ''; buildInputs = [ ncurses ]; configureFlags = "--without-x --with-ncurses=${ncurses}"; - patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ]; + postInstall = '' + mkdir -p $dev/bin + mv $bin/bin/aalib-config $dev/bin/aalib-config + substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.lib}/lib" + ''; meta = { description = "ASCII art graphics library"; diff --git a/pkgs/development/libraries/acl/default.nix b/pkgs/development/libraries/acl/default.nix index d37d8926fbdc6..4055708907b9f 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + nativeBuildInputs = [ gettext ]; buildInputs = [ attr ]; diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index c35520f22fd38..f1c0807144bec 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -19,15 +19,20 @@ stdenv.mkDerivation rec { sha256 = "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6"; }; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + configureFlags = '' --with-apr=${apr} --with-expat=${expat} ${optionalString (!stdenv.isCygwin) "--with-crypto"} - ${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"} + ${stdenv.lib.optionalString sslSupport "--with-openssl"} ${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db}"} ${stdenv.lib.optionalString ldapSupport "--with-ldap"}${ optionalString stdenv.isCygwin "--without-pgsql --without-sqlite2 --without-sqlite3 --without-freetds --without-berkeley-db --without-crypto"} ''; + buildInputs = stdenv.lib.optional sslSupport openssl; + propagatedBuildInputs = [ makeWrapper apr expat libiconv ] ++ optional sslSupport openssl ++ optional bdbSupport db @@ -35,7 +40,10 @@ stdenv.mkDerivation rec { # Give apr1 access to sed for runtime invocations postInstall = '' - wrapProgram $out/bin/apu-1-config --prefix PATH : "${gnused}/bin" + for f in $out/lib/*.la $out/lib/apr-util-1/*.la; do + substituteInPlace $f --replace "${expat.dev}/lib" "${expat.out}/lib" + done + wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin" ''; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index 08fd1fe4d5f39..c6e505f43d231 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -10,6 +10,14 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + + preConfigure = + '' + configureFlagsArray+=("--with-installbuilddir=$dev/share/build") + ''; + configureFlags = # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 @@ -17,10 +25,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://apr.apache.org/; description = "The Apache Portable Runtime library"; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = platforms.all; + maintainers = [ maintainers.eelco ]; }; } diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix index b49d1ddb8040d..a4707ef433428 100644 --- a/pkgs/development/libraries/at-spi2-core/default.nix +++ b/pkgs/development/libraries/at-spi2-core/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0xna0gnlqvzy6209klirywcm7ianazshg6pkk828g07bnrywgvhs"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" ]; buildInputs = [ python pkgconfig popt intltool dbus_glib diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index dcb90aa16cd18..14e2e71c0bd0b 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -12,6 +12,10 @@ stdenv.mkDerivation rec { sha256 = "ce6c48d77bf951083029d5a396dd552d836fff3c1715d3a7022e917e46d0c92b"; }; + enableParallelBuilding = true; + + outputs = [ "dev" "out" ]; + buildInputs = libintlOrEmpty; nativeBuildInputs = [ pkgconfig perl ]; @@ -20,8 +24,6 @@ stdenv.mkDerivation rec { #doCheck = true; # no checks in there (2.10.0) - postInstall = "rm -rf $out/share/gtk-doc"; - meta = { description = "Accessibility toolkit"; diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 8d87e2ee50dd1..e4e9142b63285 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + nativeBuildInputs = [ gettext ]; configureFlags = "MAKE=make MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ECHO=echo SED=sed AWK=gawk"; diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index 158f4b227dd32..4839bedd8bb06 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -7,9 +7,10 @@ stdenv.mkDerivation rec { url = http://www.hboehm.info/gc/gc_source/gc-7.2f.tar.gz; sha256 = "119x7p1cqw40mpwj80xfq879l9m1dkc7vbc1f3bz3kvkf8bf6p16"; }; - patches = if stdenv.isCygwin then [ ./cygwin.patch ] else null; + outputs = [ "dev" "out" "doc" ]; + configureFlags = [ "--enable-cplusplus" ] ++ lib.optional enableLargeConfig "--enable-large-config"; @@ -19,6 +20,12 @@ stdenv.mkDerivation rec { # Don't run the native `strip' when cross-compiling. dontStrip = stdenv ? cross; + postInstall = + '' + mkdir -p $out/share/doc + mv $out/share/gc $out/share/doc/gc + ''; + meta = { description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++"; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 2a83d7c4142d6..f933fa6bc3e51 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -64,8 +64,8 @@ let ] ++ optional (variant == "release") "debug-symbols=off"; nativeB2Flags = [ - "-sEXPAT_INCLUDE=${expat}/include" - "-sEXPAT_LIBPATH=${expat}/lib" + "-sEXPAT_INCLUDE=${expat.dev}/include" + "-sEXPAT_LIBPATH=${expat.out}/lib" ] ++ optional (toolset != null) "toolset=${toolset}" ++ optional (mpi != null) "--user-config=user-config.jam"; nativeB2Args = concatStringsSep " " (genericB2Flags ++ nativeB2Flags); @@ -148,7 +148,7 @@ stdenv.mkDerivation { configureScript = "./bootstrap.sh"; configureFlags = commonConfigureFlags ++ [ - "--with-icu=${icu}" + "--with-icu=${icu.dev}" "--with-python=${python.interpreter}" ] ++ optional (toolset != null) "--with-toolset=${toolset}"; @@ -159,6 +159,7 @@ stdenv.mkDerivation { postFixup = fixup; outputs = [ "out" "dev" "lib" ]; + setOutputFlags = false; crossAttrs = rec { buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ]; diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 5add4e4512978..5f705ea50a35a 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -18,15 +18,18 @@ stdenv.mkDerivation rec { sha256 = "05p75r914d809711yg9rapgmmi4hymzbarhd3w0yrfadhiy9rv7n"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; # very small + nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty; propagatedBuildInputs = - with xorg; [ xorg.xlibsWrapper fontconfig expat freetype pixman zlib libpng ] + with xorg; [ libXext fontconfig expat freetype pixman zlib libpng ] ++ optional (!stdenv.isDarwin) libXrender ++ optionals xcbSupport [ libxcb xcbutil ] ++ optional gobjectSupport glib - ++ optionals glSupport [ mesa_noglu ] - ; + ++ optional glSupport mesa_noglu + ; # TODO: maybe liblzo but what would it be for here? configureFlags = [ "--enable-tee" ] ++ optional xcbSupport "--enable-xcb" @@ -36,29 +39,24 @@ stdenv.mkDerivation rec { preConfigure = # On FreeBSD, `-ldl' doesn't exist. - (stdenv.lib.optionalString stdenv.isFreeBSD + stdenv.lib.optionalString stdenv.isFreeBSD '' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in do cat "$i" | sed -es/-ldl//g > t mv t "$i" done - '') - + + '' + + '' # Work around broken `Requires.private' that prevents Freetype # `-I' flags to be propagated. sed -i "src/cairo.pc.in" \ - -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g' + -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g' ''; enableParallelBuilding = true; - # The default `--disable-gtk-doc' is ignored. - postInstall = "rm -rf $out/share/gtk-doc" - + stdenv.lib.optionalString stdenv.isDarwin ('' - #newline - '' + glib.flattenInclude - ); + postInstall = stdenv.lib.optionalString stdenv.isDarwin glib.flattenInclude; meta = with stdenv.lib; { description = "A 2D graphics library with support for multiple output devices"; diff --git a/pkgs/development/libraries/cogl/1.20.nix b/pkgs/development/libraries/cogl/1.20.nix index 5eb12fe299891..ae202b0937773 100644 --- a/pkgs/development/libraries/cogl/1.20.nix +++ b/pkgs/development/libraries/cogl/1.20.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { COGL_PANGO_DEP_CFLAGS = stdenv.lib.optionalString (stdenv.isDarwin && pangoSupport) - "-I${pango}/include/pango-1.0 -I${cairo}/include/cairo"; + "-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/development/libraries/cogl/1.22.nix b/pkgs/development/libraries/cogl/1.22.nix index ce4fda5bd4686..88bb670774906 100644 --- a/pkgs/development/libraries/cogl/1.22.nix +++ b/pkgs/development/libraries/cogl/1.22.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { COGL_PANGO_DEP_CFLAGS = stdenv.lib.optionalString (stdenv.isDarwin && pangoSupport) - "-I${pango}/include/pango-1.0 -I${cairo}/include/cairo"; + "-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index a4a20fce023aa..e457020906650 100644 --- a/pkgs/development/libraries/cogl/default.nix +++ b/pkgs/development/libraries/cogl/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { COGL_PANGO_DEP_CFLAGS = stdenv.lib.optionalString (stdenv.isDarwin && pangoSupport) - "-I${pango}/include/pango-1.0 -I${cairo}/include/cairo"; + "-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 2be98f3d5e87b..b7155f286c5cb 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1hvvbcsg21nlncbgs0cgn3iwlnb3vannzwsp6rwvnn9ba4v53g4g"; }; + outputs = [ "dev" "bin" "out" "man" "docdev" ]; + buildInputs = [ openssl db gettext kerberos ] ++ lib.optional stdenv.isLinux pam @@ -32,6 +34,12 @@ stdenv.mkDerivation rec { installFlags = lib.optional stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; + postInstall = '' + for f in $out/lib/*.la $out/lib/sasl2/*.la; do + substituteInPlace $f --replace "${openssl.dev}/lib" "${openssl.out}/lib" + done + ''; + meta = { homepage = "http://cyrusimap.web.cmu.edu/"; description = "library for adding authentication support to connection-based protocols"; diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 480dc61897bb5..59d227f0e8689 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -8,13 +8,14 @@ stdenv.mkDerivation rec { sha256 = "1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; nativeBuildInputs = [ pkgconfig gettext ]; buildInputs = [ expat libiconv ]; - propagatedBuildInputs = [ dbus.libs glib ]; + propagatedBuildInputs = [ dbus glib ]; doCheck = true; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 4a0f98d262a02..7dbc76456fdb2 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool -, expat, systemd, glib, dbus_glib, python +{ stdenv, lib, fetchurl, pkgconfig, expat, systemd, glib, dbus_glib, python , libX11 ? null, libICE ? null, libSM ? null, x11Support ? (stdenv.isLinux || stdenv.isDarwin) }: assert x11Support -> libX11 != null @@ -10,107 +9,77 @@ let version = "1.8.20"; sha256 = "0fkh3d5r57a659hw9lqnw4v0bc5556vx54fsf7l9c732ci6byksw"; - inherit (stdenv) lib; - - buildInputsX = lib.optionals x11Support [ libX11 libICE libSM ]; - - # also other parts than "libs" need this statically linked lib - makeInternalLib = "(cd dbus && make libdbus-internal.la)"; - - systemdOrEmpty = lib.optional stdenv.isLinux systemd; - - # A generic builder for individual parts (subdirs) of D-Bus - dbus_drv = name: subdirs: merge: stdenv.mkDerivation (lib.mergeAttrsByFuncDefaultsClean [{ - - name = "dbus-${name}-${version}"; +self = stdenv.mkDerivation { + name = "dbus-${version}"; src = fetchurl { url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; inherit sha256; }; - patches = [ - ./ignore-missing-includedirs.patch - ./ucred-dirty-hack.patch - ./no-create-dirs.patch - ] - ++ lib.optional (stdenv.isSunOS || stdenv.isLinux) ./implement-getgrouplist.patch - ; - - # build only the specified subdirs - postPatch = "sed '/SUBDIRS/s/=.*/=" + subdirs + "/' -i Makefile.am\n" - # use already packaged libdbus instead of trying to build it again - + lib.optionalString (name != "libs") '' - for mfile in */Makefile.am; do - sed 's,\$(top_builddir)/dbus/\(libdbus-[0-9]\),${libs}/lib/\1,g' -i "$mfile" - done - ''; + patches = [ ./ignore-missing-includedirs.patch ] + ++ lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; + postPatch = '' + substituteInPlace tools/Makefile.in \ + --replace 'install-localstatelibDATA:' 'disabled:' \ + --replace 'install-data-local:' 'disabled:' \ + --replace 'installcheck-local:' 'disabled:' + substituteInPlace bus/Makefile.in \ + --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':' + '' + /* cleanup of runtime references */ '' + substituteInPlace ./dbus/dbus-sysdeps-unix.c \ + --replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\"" + substituteInPlace ./tools/dbus-launch.c \ + --replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"' + ''; + + outputs = [ "dev" "out" "lib" "doc" ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ expat ]; - buildInputs = [ autoconf automake libtool ]; # ToDo: optional selinux? - - preConfigure = '' - patchShebangs . - substituteInPlace tools/Makefile.am --replace 'install-localstatelibDATA:' 'disabled:' - autoreconf -fi - ''; + buildInputs = lib.optional stdenv.isLinux systemd + ++ lib.optionals x11Support [ libX11 libICE libSM ]; + # ToDo: optional selinux? configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc" "--with-session-socket-dir=/tmp" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + # this package installs nothing into those dirs and they create a dependency + "--datadir=/run/current-system/sw/share" + "--libexecdir=$(out)/libexec" # we don't need dbus-daemon-launch-helper ] ++ lib.optional (!x11Support) "--without-x"; - enableParallelBuilding = true; - - doCheck = true; - - installFlags = "sysconfdir=$(out)/etc"; - - } merge ]); - - libs = dbus_drv "libs" "dbus" { # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11 # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands. - NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; - buildInputs = [ systemdOrEmpty ]; - meta.platforms = stdenv.lib.platforms.all; - }; - - - attrs = rec { - # If you change much fix indentation + # problems building without x11Support so disabled in that case for now + NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; + NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed"; - # This package has been split because most applications only need dbus.lib - # which serves as an interface to a *system-wide* daemon, - # see e.g. http://en.wikipedia.org/wiki/D-Bus#Architecture . + enableParallelBuilding = true; - inherit libs; + doCheck = true; - tools = dbus_drv "tools" "tools bus" { - preBuild = makeInternalLib; - buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs ]; - NIX_CFLAGS_LINK = - stdenv.lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed " - + "-ldbus-1"; + installFlags = "sysconfdir=$(out)/etc datadir=$(out)/share"; - # don't provide another dbus-1.pc (with incorrect include and link dirs), - # also remove useless empty dirs - postInstall = '' - rm "$out"/lib/pkgconfig/dbus-1.pc - rmdir --parents --ignore-fail-on-non-empty "$out"/{lib/pkgconfig,share/dbus-1/*} + # it's executed from $lib by absolute path + postFixup = '' + _moveToOutput bin/dbus-launch "$lib" + ln -s "$lib/bin/dbus-launch" "$out/bin/" ''; - meta.platforms = with stdenv.lib.platforms; allBut darwin; - }; - - daemon = tools; + passthru = { + dbus-launch = "${self.lib}/bin/dbus-launch"; + daemon = self.out; + }; - docs = dbus_drv "docs" "doc" { - postInstall = ''rm -r "$out/lib"''; + meta = with stdenv.lib; { + description = "Simple interprocess messaging system"; + homepage = http://www.freedesktop.org/wiki/Software/dbus/; + license = licenses.gpl2Plus; # most is also under AFL-2.1 + platforms = platforms.unix; + }; }; -}; -in attrs.libs // attrs +in self diff --git a/pkgs/development/libraries/dbus/no-create-dirs.patch b/pkgs/development/libraries/dbus/no-create-dirs.patch deleted file mode 100644 index cf10d97759918..0000000000000 --- a/pkgs/development/libraries/dbus/no-create-dirs.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/bus/Makefile.am b/bus/Makefile.am -index 6cbc09a..be60bb8 100644 ---- a/bus/Makefile.am -+++ b/bus/Makefile.am -@@ -212,7 +212,6 @@ clean-local: - /bin/rm *.bb *.bbg *.da *.gcov || true - - install-data-hook: -- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d - $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d - $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services -diff --git a/tools/Makefile.am b/tools/Makefile.am -index cfd54b8..b6e28f9 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -74,7 +74,7 @@ CLEANFILES = \ - - # create the /var/lib/dbus directory for dbus-uuidgen - install-data-local: -- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus -+ : - - installcheck-local: -- test -d $(DESTDIR)$(localstatedir)/lib/dbus -+ : diff --git a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch deleted file mode 100644 index a07abcc15fb0e..0000000000000 --- a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c -index b4ecc96..267984a 100644 ---- a/dbus/dbus-sysdeps-unix.c -+++ b/dbus/dbus-sysdeps-unix.c -@@ -1635,6 +1635,13 @@ write_credentials_byte (int server_fd, - } - } - -+struct ucred -+{ -+ pid_t pid; /* PID of sending process. */ -+ uid_t uid; /* UID of sending process. */ -+ gid_t gid; /* GID of sending process. */ -+}; -+ - /** - * Reads a single byte which must be nul (an error occurs otherwise), - * and reads unix credentials if available. Clears the credentials diff --git a/pkgs/development/libraries/epoxy/default.nix b/pkgs/development/libraries/epoxy/default.nix index daffae90b1273..009624096605f 100644 --- a/pkgs/development/libraries/epoxy/default.nix +++ b/pkgs/development/libraries/epoxy/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { sha256 = "0dfkd4xbp7v5gwsf6qwaraz54yzizf3lj5ymyc0msjn0adq3j5yl"; }; + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ]; buildInputs = [ mesa libX11 ]; diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 05cfeaee42320..082f651a3fc6f 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -10,6 +10,10 @@ stdenv.mkDerivation rec { patches = [ ./CVE-2015-1283.patch ]; + outputs = [ "dev" "out" ]; # TODO: fix referrers + outputBin = "dev"; + outputMan = "dev"; # tiny page for a dev tool + meta = with stdenv.lib; { homepage = http://www.libexpat.org/; description = "A stream-oriented XML parser library written in C"; diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 1113db5c13672..0b45851cc9301 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -69,6 +69,10 @@ stdenv.mkDerivation rec { patchPhase = ''patchShebangs .''; + outputs = [ "dev" "out" "bin" ] + ++ optional (reqMin "1.0") "doc" ; # just dev-doc + setOutputFlags = false; # doesn't accept all and stores configureFlags in libs! + configureFlags = [ # License "--enable-gpl" @@ -148,6 +152,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postFixup = '' + _moveToOutput bin "$bin" + _moveToOutput share/ffmpeg/examples "$doc" + ''; + /* Cross-compilation is untested, consider this an outline, more work needs to be done to portions of the build to get it to work correctly */ crossAttrs = let diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index 2bcc1cd69a703..0e07519da1166 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation rec { sha256 = "10h9mzjxnwlsjziah4lri85scc05rlajz39nqf3mbh4vja8dw34g"; }; + outputs = [ "dev" "out" "doc" ]; # it's dev-doc only + outputBin = "dev"; # fftw-wisdom + configureFlags = [ "--enable-shared" "--disable-static" "--enable-threads" diff --git a/pkgs/development/libraries/fontconfig/2.10.nix b/pkgs/development/libraries/fontconfig/2.10.nix index 2951dbb44d4f4..fea9efde1cfd2 100644 --- a/pkgs/development/libraries/fontconfig/2.10.nix +++ b/pkgs/development/libraries/fontconfig/2.10.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { } ; + outputs = [ "dev" "lib" "bin" "out" ]; # $out contains all the config + propagatedBuildInputs = [ freetype ]; buildInputs = [ pkgconfig expat ]; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index b03528de2d5db..6acf1ebce29c5 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { }) ]; + outputs = [ "dev" "lib" "bin" "out" ]; # $out contains all the config + propagatedBuildInputs = [ freetype ]; buildInputs = [ pkgconfig expat ]; @@ -65,7 +67,7 @@ stdenv.mkDerivation rec { postInstall = '' cd "$out/etc/fonts" rm conf.d/{50-user,51-local}.conf - "${libxslt}/bin/xsltproc" --stringparam fontDirectories "${fontbhttf}" \ + "${libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${fontbhttf}" \ --stringparam fontconfig "$out" \ --stringparam fontconfigConfigVersion "${configVersion}" \ --path $out/share/xml/fontconfig \ diff --git a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix index 2b02e0df7a04c..2d0a21ea9ddfe 100644 --- a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix +++ b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix @@ -8,9 +8,9 @@ runCommand "fonts.conf" } '' xsltproc --stringparam fontDirectories "$fontDirectories" \ - --stringparam fontconfig "${fontconfig}" \ + --stringparam fontconfig "${fontconfig.out}" \ --stringparam fontconfigConfigVersion "${fontconfig.configVersion}" \ - --path ${fontconfig}/share/xml/fontconfig \ - ${./make-fonts-conf.xsl} ${fontconfig}/etc/fonts/fonts.conf \ + --path ${fontconfig.out}/share/xml/fontconfig \ + ${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \ > $out '' diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index e9e393075b3ed..dccde33efcf2b 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -31,12 +31,16 @@ stdenv.mkDerivation rec { (fetch_bohoomil "04-infinality-2.5.4-2014.12.07.patch" "1gph7z9s2221gy5dxn01v3lga0m9yib8yqsaqj5km74bqx1vlalh") ]; + outputs = [ "dev" "out" ]; + propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence buildInputs = [ pkgconfig which ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; + configureFlags = "--disable-static --bindir=$(dev)/bin"; + # from Gentoo, see https://bugzilla.redhat.com/show_bug.cgi?id=506840 NIX_CFLAGS_COMPILE = "-fno-strict-aliasing"; # The asm for armel is written with the 'asm' keyword. @@ -47,8 +51,8 @@ stdenv.mkDerivation rec { doCheck = true; # compat hacks - postInstall = glib.flattenInclude + '' - ln -s . "$out"/include/freetype + postFixup = glib.flattenInclude + '' + ln -s . "$dev"/include/freetype ''; crossAttrs = { diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index dbd3a679d4823..b0f2a5e877e59 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -13,12 +13,17 @@ stdenv.mkDerivation rec { sha256 = "1g7kjxv67jcdasi14n7jan4icrnnppd1m99wrdmpv32k4m7vfcj4"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + setupHook = ./setup-hook.sh; + enableParallelBuilding = true; + # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. - buildInputs = [ libX11 libintlOrEmpty ]; + buildInputs = [ libX11 gobjectIntrospection ] ++ libintlOrEmpty; - nativeBuildInputs = [ pkgconfig gobjectIntrospection ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ]; @@ -34,12 +39,11 @@ stdenv.mkDerivation rec { # The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB). inherit (doCheck); - postInstall = "rm -rf $out/share/gtk-doc"; - - meta = { + meta = with stdenv.lib; { description = "A library for image loading and manipulation"; homepage = http://library.gnome.org/devel/gdk-pixbuf/; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.unix; + maintainers = [ maintainers.eelco ]; + platforms = platforms.unix; }; } + diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 874c767046b2c..b32b126cfe8c5 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (rec { sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in ''; - buildInputs = [ xz ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; + buildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gettext/expat.nix b/pkgs/development/libraries/gettext/expat.nix index fc6116b391609..35d2e1a0950f2 100644 --- a/pkgs/development/libraries/gettext/expat.nix +++ b/pkgs/development/libraries/gettext/expat.nix @@ -5,6 +5,6 @@ runCommand "gettext-expat-${gettext.name}" { buildInputs = [ makeWrapper ]; } '' cp -rf ${gettext}/* $out/ chmod a+w $out/bin for p in $out/bin/*; do - wrapProgram $p --prefix LD_LIBRARY_PATH : ${expat}/lib + wrapProgram $p --prefix LD_LIBRARY_PATH : ${expat.out}/lib done '' diff --git a/pkgs/development/libraries/git2/default.nix b/pkgs/development/libraries/git2/default.nix index 3c433511fc1ad..4ec2903b90070 100644 --- a/pkgs/development/libraries/git2/default.nix +++ b/pkgs/development/libraries/git2/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, http-parser}: +{ stdenv, fetchurl, cmake, pkgconfig, zlib, python, libssh2, openssl, http-parser }: stdenv.mkDerivation rec { version = "0.23.2"; diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index a17b7a21409bc..869fdcc70a12d 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -13,10 +13,12 @@ stdenv.mkDerivation rec { sha256 = "8f8a340d3ba99bfdef38b653da929652ea6640e27969d29f7ac51fbbe11a4346"; }; + outputs = [ "dev" "out" ]; # to deal with propagatedBuildInputs + configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"; preBuild = '' - sed -e "s@${glib}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile) + sed -e "s@${glib.out}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile) ''; nativeBuildInputs = [ pkgconfig intltool ]; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index bafe8949e93c5..aabf351890e87 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -31,12 +31,12 @@ let # This is intended to be run in postInstall of any package # which has $out/include/ containing just some disjunct directories. flattenInclude = '' - for dir in "$out"/include/*; do - cp -r "$dir"/* "$out/include/" + for dir in "''${!outputInclude}"/include/*; do + cp -r "$dir"/* "''${!outputInclude}/include/" rm -r "$dir" ln -s . "$dir" done - ln -sr -t "$out/include/" "$out"/lib/*/include/* 2>/dev/null || true + ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; ver_maj = "2.46"; @@ -53,18 +53,22 @@ stdenv.mkDerivation rec { patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + setupHook = ./setup-hook.sh; - buildInputs = [ libelf ] + buildInputs = [ libelf setupHook pcre ] ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ]; nativeBuildInputs = [ pkgconfig gettext perl python ]; - propagatedBuildInputs = [ pcre zlib libffi libiconv ] + propagatedBuildInputs = [ zlib libffi libiconv ] ++ libintlOrEmpty; - configureFlags = - optional stdenv.isDarwin "--disable-compile-warnings" + # internal pcre would only add <200kB, but it's relatively common + configureFlags = [ "--with-pcre=system" ] + ++ optional stdenv.isDarwin "--disable-compile-warnings" ++ optional stdenv.isSunOS "--disable-modular-tests"; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl" @@ -78,6 +82,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; DETERMINISTIC_BUILD = 1; + postInstall = '' + _moveToOutput "share/glib-2.0" "$dev" + substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev" + ''; + inherit doCheck; preCheck = optionalString doCheck '' export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH" @@ -99,8 +108,6 @@ stdenv.mkDerivation rec { sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c ''; - postInstall = ''rm -rvf $out/share/gtk-doc''; - passthru = { gioModuleDir = "lib/gio/modules"; inherit flattenInclude; diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index ca7e326bd02e3..c5cf293902cd4 100644 --- a/pkgs/development/libraries/glib/setup-hook.sh +++ b/pkgs/development/libraries/glib/setup-hook.sh @@ -1,5 +1,3 @@ -# Install gschemas, if any, in a package-specific directory -installFlagsArray+=("gsettingsschemadir=$out/share/gsettings-schemas/$name/glib-2.0/schemas/") make_glib_find_gsettings_schemas() { # For packages that need gschemas of other packages (e.g. empathy) @@ -7,17 +5,22 @@ make_glib_find_gsettings_schemas() { addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"* fi } - envHooks+=(make_glib_find_gsettings_schemas) +# Install gschemas, if any, in a package-specific directory +glibPreInstallPhase() { + installFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/") +} +preInstallPhases+=(glibPreInstallPhase) + glibPreFixupPhase() { # Move gschemas in case the install flag didn't help - if [ -d "$out/share/glib-2.0/schemas" ]; then - mkdir -p "$out/share/gsettings-schemas/$name/glib-2.0" - mv "$out/share/glib-2.0/schemas" "$out/share/gsettings-schemas/$name/glib-2.0/" + if [ -d "${!outputLib}/share/glib-2.0/schemas" ]; then + mkdir -p "${!outputLib}/share/gsettings-schemas/$name/glib-2.0" + mv "${!outputLib}/share/glib-2.0/schemas" "${!outputLib}/share/gsettings-schemas/$name/glib-2.0/" fi - addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name" + addToSearchPath GSETTINGS_SCHEMAS_PATH "${!outputLib}/share/gsettings-schemas/$name" } +preFixupPhases+=(glibPreFixupPhase) -preFixupPhases="$preFixupPhases glibPreFixupPhase" diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh index 2836063e3bf49..46f47d9b99c20 100644 --- a/pkgs/development/libraries/glibc/builder.sh +++ b/pkgs/development/libraries/glibc/builder.sh @@ -12,8 +12,10 @@ postConfigure() { export NIX_DONT_SET_RPATH=1 unset CFLAGS -} + # Apparently --bindir is not respected. + makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin") +} postInstall() { if test -n "$installLocales"; then @@ -27,7 +29,7 @@ postInstall() { if test -z "$hurdHeaders"; then # Include the Linux kernel headers in Glibc, except the `scsi' # subdirectory, which Glibc provides itself. - (cd $out/include && \ + (cd $dev/include && \ ln -sv $(ls -d $kernelHeaders/include/* | grep -v 'scsi$') .) fi @@ -48,6 +50,17 @@ postInstall() { # Get rid of more unnecessary stuff. rm -rf $out/var $out/sbin/sln + + # Put libraries for static linking in a separate output. Note + # that libc_nonshared.a and libpthread_nonshared.a are required + # for dynamically-linked applications. + mkdir -p $static/lib + mv $out/lib/*.a $static/lib + mv $static/lib/lib*_nonshared.a $out/lib + + # Work around a Nix bug: hard links across outputs cause a build failure. + cp $bin/bin/getconf $bin/bin/getconf_ + mv $bin/bin/getconf_ $bin/bin/getconf } genericBuild diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index cf356ccefbedd..03881a41aa5c5 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -124,7 +124,10 @@ stdenv.mkDerivation ({ installFlags = [ "sysconfdir=$(out)/etc" ]; - buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ] + outputs = [ "dev" "out" "bin" "static" ]; + + buildInputs = [ ] + ++ stdenv.lib.optionals (cross != null) [ gccCross ] ++ stdenv.lib.optional (mig != null) mig ++ stdenv.lib.optionals withGd [ gd libpng ]; diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 08eaf555e02d9..26d2bda2aeb51 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -97,7 +97,7 @@ in # To avoid a dependency on the build system 'bash'. preFixup = '' - rm $out/bin/{ldd,tzselect,catchsegv,xtrace} + rm $bin/bin/{ldd,tzselect,catchsegv,xtrace} ''; } else {})) diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix index cbf7af22cac15..0cf074323fb90 100644 --- a/pkgs/development/libraries/glibc/locales.nix +++ b/pkgs/development/libraries/glibc/locales.nix @@ -18,6 +18,8 @@ build null { builder = ./locales-builder.sh; + outputs = [ "out" ]; + # Awful hack: `localedef' doesn't allow the path to `locale-archive' # to be overriden, but you *can* specify a prefix, i.e. it will use # <prefix>/<path-to-glibc>/lib/locale/locale-archive. So we use @@ -25,7 +27,7 @@ build null { # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive. buildPhase = '' - mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale" + mkdir -p $TMPDIR/"${stdenv.cc.libc.out}/lib/locale" # Hack to allow building of the locales (needed since glibc-2.12) sed -i -e 's,^$(rtld-prefix) $(common-objpfx)locale/localedef,localedef --prefix='$TMPDIR',' ../glibc-2*/localedata/Makefile diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/default.nix index 6564fc5118675..ee81aec07976d 100644 --- a/pkgs/development/libraries/gmime/default.nix +++ b/pkgs/development/libraries/gmime/default.nix @@ -8,9 +8,13 @@ stdenv.mkDerivation rec { sha256 = "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"; }; + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib zlib libgpgerror ]; + enableParallelBuilding = true; + meta = { homepage = http://spruce.sourceforge.net/gmime/; description = "A C/C++ library for manipulating MIME messages"; diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 7b393067ff525..0768df60a794e 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sha256 = "0q5i39pxrasgn9qdxzpfbwhh11ph80p57x6hf48m74261d97j83m"; }; + outputs = [ "out" "info" ]; + nativeBuildInputs = [ m4 ]; patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null; diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index 5025557458cd3..a7443c02c5b6c 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }: +{ stdenv, fetchurl, m4, cxx ? true, withStatic ? false }: with { inherit (stdenv.lib) optional optionalString; }; -stdenv.mkDerivation rec { +let self = stdenv.mkDerivation rec { name = "gmp-6.1.0"; src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { sha256 = "1s3kddydvngqrpc6i1vbz39raya2jdcl042wi0ksbszgjjllk129"; }; + #outputs TODO: split $cxx due to libstdc++ dependency; maybe port to gmp5; + # maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added + # - see #5855 for related discussion + outputs = [ "dev" "out" "info" ]; + passthru.static = self.out; + nativeBuildInputs = [ m4 ]; configureFlags = @@ -69,4 +75,5 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = [ maintainers.simons ]; }; -} +}; + in self diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index f1eb62e0083ee..3bcc521504e24 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation { inherit src patches postPatch; - outputs = [ "out" "man" ]; + outputs = [ "dev" "out" "bin" "man" "docdev" ]; + outputInfo = "docdev"; configureFlags = # FIXME: perhaps use $SSL_CERT_FILE instead @@ -35,8 +36,6 @@ stdenv.mkDerivation { ++ [ unbound ] ++ lib.optional guileBindings guile; - # AutoreconfHook is temporary until the patch lands upstream to fix - # header file generation with parallel building nativeBuildInputs = [ perl pkgconfig ] ++ nativeBuildInputs; # XXX: Gnulib's `test-select' fails on FreeBSD: @@ -46,9 +45,10 @@ stdenv.mkDerivation { # Fixup broken libtool and pkgconfig files preFixup = lib.optionalString (!stdenv.isDarwin) '' sed ${lib.optionalString tpmSupport "-e 's,-ltspi,-L${trousers}/lib -ltspi,'"} \ - -e 's,-lz,-L${zlib}/lib -lz,' \ - -e 's,-lgmp,-L${gmp}/lib -lgmp,' \ - -i $out/lib/libgnutls.la $out/lib/pkgconfig/gnutls.pc + -e 's,-lz,-L${zlib.out}/lib -lz,' \ + -e 's,-L${gmp.dev}/lib,-L${gmp.out}/lib,' \ + -e 's,-lgmp,-L${gmp.out}/lib -lgmp,' \ + -i $out/lib/*.la "$dev/lib/pkgconfig/gnutls.pc" ''; meta = with lib; { diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index f429e1dc6c36b..1a2ba3db29a96 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -15,26 +15,31 @@ stdenv.mkDerivation rec { url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz"; sha256 = "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233"; }; + patches = [ ./absolute_shlib_path.patch ]; + + outputs = [ "dev" "out" ]; + outputBin = "dev"; + outputMan = "dev"; # tiny pages - buildInputs = [ flex bison pkgconfig python ] + buildInputs = [ flex bison pkgconfig python setupHook/*move .gir*/ ] ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isDarwin otool; propagatedBuildInputs = [ libffi glib ]; - # Tests depend on cairo, which is undesirable (it pulls in lots of - # other dependencies). - configureFlags = [ "--disable-tests" ]; - preConfigure = '' sed 's|/usr/bin/env ||' -i tools/g-ir-tool-template.in ''; + configureFlags = [ + # Tests depend on cairo, which is undesirable (it pulls in lots of + # other dependencies). + "--disable-tests" + ]; - postInstall = "rm -rf $out/share/gtk-doc"; + # outputs TODO: share/gobject-introspection-1.0/tests is needed during build + # by pygobject3 (and maybe others), but it's only searched in $out setupHook = ./setup-hook.sh; - patches = [ ./absolute_shlib_path.patch ]; - meta = with stdenv.lib; { description = "A middleware layer between C libraries and language bindings"; homepage = http://live.gnome.org/GObjectIntrospection; diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh index d411ad69dc43f..78a8ccf19d34e 100644 --- a/pkgs/development/libraries/gobject-introspection/setup-hook.sh +++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh @@ -12,3 +12,10 @@ make_gobject_introspection_find_gir_files() { } envHooks+=(make_gobject_introspection_find_gir_files) + +_multioutMoveGlibGir() { + _moveToOutput share/gir-1.0 "${!outputDev}" +} + +preFixupHooks+=(_multioutMoveGlibGir) + diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 1657ceaeece69..8d8b9a9149433 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -18,17 +18,20 @@ stdenv.mkDerivation rec { sha256 = "17892sclz3yg45wbyqqrzzpq3l0icbnfl28f101b3062g8cy97dh"; }; + outputs = [ "dev" "out" "info" ]; + outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool + propagatedBuildInputs = [ libgpgerror glib libassuan pth ]; nativeBuildInputs = [ pkgconfig gnupg ]; configureFlags = "--with-gpg=${gpgPath}"; - meta = { + meta = with stdenv.lib; { homepage = "http://www.gnupg.org/related_software/gpgme"; description = "Library for making GnuPG easier to use"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = [ maintainers.fuuzetsu ]; }; } diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index 7d349f31e044c..07ce30d631955 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -1,4 +1,4 @@ -{ callPackage }: +{ callPackage, libva-full }: rec { gstreamer = callPackage ./core { }; @@ -17,5 +17,8 @@ rec { gst-editing-services = callPackage ./ges { inherit gnonlin; }; - gst-vaapi = callPackage ./vaapi { inherit gst-plugins-base gstreamer gst-plugins-bad; }; + gst-vaapi = callPackage ./vaapi { + inherit gst-plugins-base gstreamer gst-plugins-bad; + libva = libva-full; # looks also for libva-{x11,wayland} + }; } diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix index deca854008a04..25f530ecfef61 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, pkgconfig, gst_plugins_base, aalib, cairo , flac, libjpeg, zlib, speex, libpng, libdv, libcaca, libvpx , libiec61883, libavc1394, taglib, libpulseaudio, gdk_pixbuf, orc -, glib, gstreamer, bzip2, libsoup, libintlOrEmpty +, glib, gstreamer, bzip2, libsoup, libintlOrEmpty, ncurses , # Whether to build no plugins that have external dependencies # (except the PulseAudio plugin). minimalDeps ? false @@ -34,6 +34,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = '' + substituteInPlace $out/lib/gstreamer-0.10/libgstaasink.la \ + --replace "${ncurses.dev}/lib" "${ncurses.lib}/lib" + ''; + meta = { homepage = http://gstreamer.freedesktop.org; diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 349b5093a3b16..93c9b9a59b99d 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gst-plugins-base, bzip2, libva +{ stdenv, fetchurl, pkgconfig, gst-plugins-base, bzip2, libva, wayland , libdrm, udev, xorg, mesa, yasm, gstreamer, gst-plugins-bad, nasm , libvpx }: @@ -14,8 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = with stdenv.lib; [ pkgconfig bzip2 ]; - buildInputs = with stdenv.lib; [ gstreamer gst-plugins-base gst-plugins-bad libva libdrm udev - xorg.libX11 xorg.libXext xorg.libXv xorg.libXrandr xorg.libSM xorg.libICE mesa nasm libvpx ]; + buildInputs = [ + gstreamer gst-plugins-base gst-plugins-bad libva wayland libdrm udev + xorg.libX11 xorg.libXext xorg.libXv xorg.libXrandr xorg.libSM xorg.libICE mesa nasm libvpx + ]; preConfigure = " export GST_PLUGIN_PATH_1_0=$out/lib/gstreamer-1.0 diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index e821e693b0ce6..daa2cb1efb4c5 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -15,11 +15,16 @@ stdenv.mkDerivation rec { sha256 = "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + enableParallelBuilding = true; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (libintlOrEmpty != []) "-lintl"; - nativeBuildInputs = [ perl pkgconfig gettext ]; + setupHook = ./setup-hook.sh; + + nativeBuildInputs = [ setupHook perl pkgconfig gettext ]; propagatedBuildInputs = with xorg; with stdenv.lib; [ glib cairo pango gdk_pixbuf atk ] @@ -35,7 +40,9 @@ stdenv.mkDerivation rec { then "--disable-glibtest --disable-introspection --disable-visibility" else "--with-xinput=yes"; - postInstall = "rm -rf $out/share/gtk-doc"; + postInstall = '' + _moveToOutput share/gtk-2.0/demo "$docdev" + ''; passthru = { gtkExeEnvPostBuild = '' diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index 174f12fc68ca9..6c00a5df09f8f 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -1,16 +1,15 @@ { stdenv, fetchurl, pkgconfig, gettext, perl , expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection -, xlibs, x11, wayland, libxkbcommon, epoxy +, xorg, wayland, epoxy, json_glib, libxkbcommon, gmp , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux, cups ? null }: -assert xineramaSupport -> xlibs.libXinerama != null; assert cupsSupport -> cups != null; let ver_maj = "3.18"; - ver_min = "4"; + ver_min = "5"; version = "${ver_maj}.${ver_min}"; in stdenv.mkDerivation rec { @@ -18,26 +17,34 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz"; - sha256 = "5400dcf280d28d24606f33d59ed48c717f7d3db425d4b6fb52e8002f0c76c7eb"; + sha256 = "107aeb9a4244ce3c044becdd6dffc32d83202595181597180d4c736302a71852"; }; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ]; - buildInputs = [ libxkbcommon epoxy ]; - propagatedBuildInputs = with xlibs; with stdenv.lib; - [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk libXrandr libXrender libXcomposite libXi libXcursor ] + buildInputs = [ libxkbcommon epoxy json_glib ]; + propagatedBuildInputs = with xorg; with stdenv.lib; + [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk + libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ] ++ optionals stdenv.isLinux [ wayland ] ++ optional xineramaSupport libXinerama ++ optional cupsSupport cups; + #TODO: colord? - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; # demos fail to install, no idea where's the problem preConfigure = "sed '/^SRC_SUBDIRS /s/demos//' -i Makefile.in"; enableParallelBuilding = true; - postInstall = "rm -rf $out/share/gtk-doc"; + postInstall = '' + substituteInPlace "$out/lib/gtk-3.0/3.0.0/printbackends/libprintbackend-cups.la" \ + --replace '-L${gmp.dev}/lib' '-L${gmp.out}/lib' + ''; passthru = { gtkExeEnvPostBuild = '' @@ -46,7 +53,7 @@ stdenv.mkDerivation rec { ''; # workaround for bug of nix-mode for Emacs */ ''; }; - meta = { + meta = with stdenv.lib; { description = "A multi-platform toolkit for creating graphical user interfaces"; longDescription = '' @@ -62,9 +69,9 @@ stdenv.mkDerivation rec { homepage = http://www.gtk.org/; - license = stdenv.lib.licenses.lgpl2Plus; + license = licenses.lgpl2Plus; - maintainers = with stdenv.lib.maintainers; [ urkud raskin vcunat lethalman ]; - platforms = stdenv.lib.platforms.all; + maintainers = with maintainers; [ urkud raskin vcunat lethalman ]; + platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/gtk+/setup-hook.sh b/pkgs/development/libraries/gtk+/setup-hook.sh new file mode 100644 index 0000000000000..c2b0ab502db7e --- /dev/null +++ b/pkgs/development/libraries/gtk+/setup-hook.sh @@ -0,0 +1,10 @@ +fixupOutputHooks+=(_gtk2CleanComments) + +# Clean comments that link to generator of the file +_gtk2CleanComments() { + local f="$prefix/lib/gtk-2.0/2.10.0/immodules.cache" + if [ -f "$f" ]; then + sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f" + fi +} + diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 6145c8c494773..45f5217d3c91b 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { postInstall = '' ln -sv ${libsoup}/include/*/libsoup $out/include - ln -sv ${libxml2}/include/*/libxml $out/include + ln -sv ${libxml2.dev}/include/*/libxml $out/include ln -sv ${gssdp}/include/*/libgssdp $out/include ''; diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix index d2a958faed8bd..37403f50e2b10 100644 --- a/pkgs/development/libraries/gvfs/default.nix +++ b/pkgs/development/libraries/gvfs/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool libtool ]; buildInputs = - [ makeWrapper glib dbus.libs udev libgudev udisks2 libgcrypt + [ makeWrapper glib dbus udev libgudev udisks2 libgcrypt libgphoto2 avahi libarchive fuse libcdio libxml2 libxslt docbook_xsl samba libmtp # ToDo: a ligther version of libsoup to have FTP/HTTP support? diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 26c5d2fa8254e..865a4f1cfad86 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,38 +1,49 @@ { stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty -, icu, graphite2 +, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one. , withIcu ? false # recommended by upstream as default, but most don't needed and it's big , withGraphite2 ? true # it is small and major distros do include it }: -# TODO: split non-icu and icu lib into different outputs? -# (icu is a ~30 MB dependency, the rest is very small in comparison) +let + version = "1.0.6"; + inherit (stdenv.lib) optional optionals optionalString; +in -stdenv.mkDerivation rec { - name = "harfbuzz-1.0.6"; +stdenv.mkDerivation { + name = "harfbuzz${optionalString withIcu "-icu"}-${version}"; src = fetchurl { - url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2"; + url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.bz2"; sha256 = "09ivk5m4y09ar4zi9r6db7gp234cy05h0ach7w22g9kqvkxsf5pn"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" ]; + outputBin = "dev"; configureFlags = [ ( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default ( "--with-icu=" + (if withIcu then "yes" else "no") ) ]; - buildInputs = [ pkgconfig glib freetype cairo ] # recommended by upstream + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ glib freetype cairo ] # recommended by upstream ++ libintlOrEmpty; propagatedBuildInputs = [] - ++ stdenv.lib.optional withGraphite2 graphite2 - ++ stdenv.lib.optional withIcu icu + ++ optional withGraphite2 graphite2 + ++ optionals withIcu [ icu harfbuzz ] ; - meta = { + # Slightly hacky; some pkgs expect them in a single directory. + postInstall = optionalString withIcu '' + rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc" + ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.la + ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc + ''; + + meta = with stdenv.lib; { description = "An OpenType text shaping engine"; homepage = http://www.freedesktop.org/wiki/Software/HarfBuzz; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + maintainers = [ maintainers.eelco ]; + platforms = with platforms; linux ++ darwin; }; } diff --git a/pkgs/development/libraries/hunspell/default.nix b/pkgs/development/libraries/hunspell/default.nix index 98f6511f39172..0d0ff38fb47f3 100644 --- a/pkgs/development/libraries/hunspell/default.nix +++ b/pkgs/development/libraries/hunspell/default.nix @@ -8,8 +8,10 @@ stdenv.mkDerivation rec { sha256 = "0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7"; }; - propagatedBuildInputs = [ ncurses readline ]; - configureFlags = "--with-ui --with-readline"; + outputs = [ "dev" "out" "bin" "man" ]; + + buildInputs = [ ncurses readline ]; + configureFlags = [ "--with-ui" "--with-readline" ]; meta = with stdenv.lib; { homepage = http://hunspell.sourceforge.net; diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix index a2196d26524e2..bc8c62230acf8 100644 --- a/pkgs/development/libraries/icu/default.nix +++ b/pkgs/development/libraries/icu/default.nix @@ -13,6 +13,9 @@ stdenv.mkDerivation { sha256 = "05j86714qaj0lvhvyr2s1xncw6sk0h2dcghb3iiwykbkbh8fjr1s"; }; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + makeFlags = stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-headerpad_max_install_names"; @@ -37,6 +40,8 @@ stdenv.mkDerivation { sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc ''; + postFixup = ''_moveToOutput lib/icu "$dev" ''; + enableParallelBuilding = true; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/jasper/default.nix b/pkgs/development/libraries/jasper/default.nix index 2fa9cf7dbf952..17395561eda52 100644 --- a/pkgs/development/libraries/jasper/default.nix +++ b/pkgs/development/libraries/jasper/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, xorg, libjpeg }: +{ stdenv, fetchurl, unzip, libjpeg, autoreconfHook }: stdenv.mkDerivation rec { name = "jasper-1.900.1"; @@ -17,11 +17,16 @@ stdenv.mkDerivation rec { ./jasper-CVE-2014-9029.diff ]; - nativeBuildInputs = [unzip]; + # newer reconf to recognize a multiout flag + nativeBuildInputs = [ unzip autoreconfHook ]; propagatedBuildInputs = [ libjpeg ]; configureFlags = "--enable-shared"; - + + outputs = [ "dev" "out" "man" "bin" ]; + + enableParallelBuilding = true; + meta = { homepage = https://www.ece.uvic.ca/~frodo/jasper/; description = "JPEG2000 Library"; diff --git a/pkgs/development/libraries/json-c/default.nix b/pkgs/development/libraries/json-c/default.nix index ad425f2a38123..d5e0694e0516f 100644 --- a/pkgs/development/libraries/json-c/default.nix +++ b/pkgs/development/libraries/json-c/default.nix @@ -9,11 +9,13 @@ stdenv.mkDerivation rec { patches = [ ./unused-variable.patch ]; - buildInputs = [ autoreconfHook ]; # won't configure without it, no idea why + outputs = [ "dev" "out" ]; + + nativeBuildInputs = [ autoreconfHook ]; # won't configure without it, no idea why # compatibility hack (for mypaint at least) postInstall = '' - ln -s json-c.pc "$out/lib/pkgconfig/json.pc" + ln -s json-c.pc "$dev/lib/pkgconfig/json.pc" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/lame/default.nix b/pkgs/development/libraries/lame/default.nix index f4ea47e633f9e..b324494faff74 100644 --- a/pkgs/development/libraries/lame/default.nix +++ b/pkgs/development/libraries/lame/default.nix @@ -32,6 +32,9 @@ stdenv.mkDerivation rec { patches = [ ./gcc-4.9.patch ]; + outputs = [ "out" "lib" "doc" ]; # a small single header + outputMan = "out"; + nativeBuildInputs = [ ] ++ optional nasmSupport nasm; diff --git a/pkgs/development/libraries/lcms/default.nix b/pkgs/development/libraries/lcms/default.nix index c98a01f6f70f1..9365cf0b5f091 100644 --- a/pkgs/development/libraries/lcms/default.nix +++ b/pkgs/development/libraries/lcms/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation { sha256 = "1abkf8iphwyfs3z305z3qczm3z1i9idc1lz4gvfg92jnkz5k5bl0"; }; + outputs = [ "dev" "out" "bin" "man" ]; + meta = { description = "Color management engine"; homepage = http://www.littlecms.com/; diff --git a/pkgs/development/libraries/lcms2/default.nix b/pkgs/development/libraries/lcms2/default.nix index db82c943d7c2b..7dea029491aa7 100644 --- a/pkgs/development/libraries/lcms2/default.nix +++ b/pkgs/development/libraries/lcms2/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, libtiff, libjpeg, zlib}: +{ stdenv, fetchurl, libtiff, libjpeg, zlib }: stdenv.mkDerivation rec { name = "lcms2-2.7"; @@ -8,13 +8,14 @@ stdenv.mkDerivation rec { sha256 = "0lvaglcjsvnyglgj3cb3pjc22nq8fml1vlx5dmmmw66ywx526925"; }; + outputs = [ "dev" "out" "bin" ]; + propagatedBuildInputs = [ libtiff libjpeg zlib ]; - meta = { + meta = with stdenv.lib; { description = "Color management engine"; homepage = http://www.littlecms.com/; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.urkud ]; + license = licenses.mit; + platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/libao/default.nix b/pkgs/development/libraries/libao/default.nix index a8948e8ae8c07..419ba8de9e4dc 100644 --- a/pkgs/development/libraries/libao/default.nix +++ b/pkgs/development/libraries/libao/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1bwwv1g9lchaq6qmhvj1pp3hnyqr64ydd4j38x94pmprs4d27b83"; }; + outputs = [ "dev" "out" "doc" ]; + buildInputs = [ pkgconfig ] ++ lib.optional stdenv.isLinux (if usePulseAudio then libpulseaudio else alsaLib) ++ diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index ff33043dbaeac..467dd87f43e94 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { preFixup = '' sed -i $out/lib/libarchive.la \ - -e 's|-lcrypto|-L${openssl}/lib -lcrypto|' \ + -e 's|-lcrypto|-L${openssl.out}/lib -lcrypto|' \ -e 's|-llzo2|-L${lzo}/lib -llzo2|' ''; diff --git a/pkgs/development/libraries/libassuan/default.nix b/pkgs/development/libraries/libassuan/default.nix index 884924f643db7..c59fb39eb5a8c 100644 --- a/pkgs/development/libraries/libassuan/default.nix +++ b/pkgs/development/libraries/libassuan/default.nix @@ -8,13 +8,16 @@ stdenv.mkDerivation rec { sha256 = "0lh4698pgb2wjrrrbdk14llizad5l74f8pdbg4ma4zq4fbsrkjc7"; }; + outputs = [ "dev" "out" "info" ]; + outputBin = "dev"; # libassuan-config + buildInputs = [ libgpgerror pth ]; doCheck = true; # Make sure includes are fixed for callers who don't use libassuan-config postInstall = '' - sed -i 's,#include <gpg-error.h>,#include "${libgpgerror}/include/gpg-error.h",g' $out/include/assuan.h + sed -i 's,#include <gpg-error.h>,#include "${libgpgerror.dev}/include/gpg-error.h",g' $dev/include/assuan.h ''; meta = { diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 23b1402e3e7fe..a3d2d3fde3039 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -7,10 +7,10 @@ , x264Support ? false, x264 ? null , xvidSupport ? true, xvidcore ? null , faacSupport ? false, faac ? null -, vaapiSupport ? false, libva ? null # ToDo: it has huge closure +, vaapiSupport ? true, libva ? null , vdpauSupport ? true, libvdpau ? null , freetypeSupport ? true, freetype ? null # it's small and almost everywhere -, SDL # only for avplay in $tools, adds nontrivial closure to it +, SDL # only for avplay in $bin, adds nontrivial closure to it , enableGPL ? true # ToDo: some additional default stuff may need GPL , enableUnfree ? faacSupport }: @@ -77,13 +77,11 @@ let enableParallelBuilding = true; - outputs = [ "out" "tools" ]; + outputs = [ "dev" "out" "bin" ]; + setOutputFlags = false; - # move avplay to get rid of the SDL dependency in the main output - postInstall = '' - mkdir -p "$tools/bin" - mv "$out/bin/avplay" "$tools/bin" - ''; + # move tools away to lighten runtime deps and size + postInstall = ''_moveToOutput bin "$bin" ''; doInstallCheck = false; # fails randomly installCheckTarget = "check"; # tests need to be run *after* installation diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix index c3059642382a9..7a905d9c82a64 100644 --- a/pkgs/development/libraries/libcaca/default.nix +++ b/pkgs/development/libraries/libcaca/default.nix @@ -11,10 +11,17 @@ stdenv.mkDerivation rec { sha256 = "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"; }; + outputs = [ "dev" "bin" "out" "man" ]; + configureFlags = "--disable-x11 --disable-imlib2 --disable-doc"; propagatedBuildInputs = [ ncurses zlib ]; + postInstall = '' + mkdir -p $dev/bin + mv $bin/bin/caca-config $dev/bin/caca-config + ''; + meta = { homepage = http://libcaca.zoy.org/; description = "A graphics library that outputs text instead of pixels"; diff --git a/pkgs/development/libraries/libcanberra/default.nix b/pkgs/development/libraries/libcanberra/default.nix index b441719d31cd0..8e3523a27e9fd 100644 --- a/pkgs/development/libraries/libcanberra/default.nix +++ b/pkgs/development/libraries/libcanberra/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { postInstall = '' for f in $out/lib/*.la; do - sed 's|-lltdl|-L${libtool}/lib -lltdl|' -i $f + sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f done ''; diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix index ccc0a19965499..f64174778b205 100644 --- a/pkgs/development/libraries/libdbi-drivers/default.nix +++ b/pkgs/development/libraries/libdbi-drivers/default.nix @@ -31,11 +31,11 @@ stdenv.mkDerivation rec { ] ++ optionals (postgresql != null) [ "--with-pgsql" "--with-pgsql_incdir=${postgresql}/include" - "--with-pgsql_libdir=${postgresql}/lib" + "--with-pgsql_libdir=${postgresql.lib}/lib" ] ++ optionals (sqlite != null) [ "--with-sqlite3" - "--with-sqlite3-incdir=${sqlite}/include/sqlite" - "--with-sqlite3-libdir=${sqlite}/lib/sqlite" + "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite" + "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite" ]; installFlags = [ "DESTDIR=\${out}" ]; diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index 533512e9b6896..4db67e73b8bad 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "71960ac8bde7d710992b1bc8879935e8300a870c36bd06f22412d0447e3d96c4"; }; + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libpthreadstubs libpciaccess ] ++ stdenv.lib.optional stdenv.isLinux udev; diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index dc8ecf7e95d83..23b26e343db6e 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { postInstall = '' find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ - -e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g' + -e 's,-lncurses[a-z]*,-L${ncurses.lib}/lib -lncursesw,g' ''; configureFlags = [ "--enable-widec" ]; diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index 4a34ac6bdec7c..686b444e430b2 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, gettext, glibc }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libelf-0.8.13"; src = fetchurl { @@ -15,6 +15,11 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ glibc ]; }; + # Libelf's custom NLS macros fail to determine the catalog file extension on + # Darwin, so disable NLS for now. + # FIXME: Eventually make Gettext a build input on all platforms. + configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls"; + meta = { description = "ELF object file access library"; @@ -26,12 +31,3 @@ stdenv.mkDerivation (rec { maintainers = [ ]; }; } - -// - -# Libelf's custom NLS macros fail to determine the catalog file extension on -# Darwin, so disable NLS for now. -# FIXME: Eventually make Gettext a build input on all platforms. -(if stdenv.isDarwin - then { configureFlags = [ "--disable-nls" ]; } - else { })) diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index 284a09bc92756..98185da168add 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -8,14 +8,14 @@ stdenv.mkDerivation { url = "mirror://sourceforge/levent/libevent-${version}-stable.tar.gz"; sha256 = "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki"; }; + postPatch = "patchShebangs event_rpcgen.py"; + + outputs = [ "dev" "out" ]; + outputBin = "dev"; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ python ] ++ stdenv.lib.optional stdenv.isCygwin findutils; - patchPhase = '' - patchShebangs event_rpcgen.py - ''; - meta = with stdenv.lib; { description = "Event notification library"; diff --git a/pkgs/development/libraries/libextractor/default.nix b/pkgs/development/libraries/libextractor/default.nix index 18387c904f83e..2b6571290dfb9 100644 --- a/pkgs/development/libraries/libextractor/default.nix +++ b/pkgs/development/libraries/libextractor/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { configureFlags = "--disable-ltdl-install " + "--with-ltdl-include=${libtool}/include " - + "--with-ltdl-lib=${libtool}/lib " + + "--with-ltdl-lib=${libtool.lib}/lib " + "--enable-xpdf"; # Checks need to be run after "make install", otherwise plug-ins are not in diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 824b909f1d911..816b9728cc99c 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { sha256 = "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh"; }; - patches = if stdenv.isCygwin then [ ./3.2.1-cygwin.patch ] else null; + patches = stdenv.lib.optional stdenv.isCygwin ./3.2.1-cygwin.patch; + + outputs = [ "dev" "out" "doc" ]; configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= @@ -17,12 +19,16 @@ stdenv.mkDerivation rec { dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. - # Install headers in the right place. - postInstall = '' - ln -s${if (stdenv.isFreeBSD || stdenv.isOpenBSD || stdenv.isDarwin) then "" else "r"}v "$out/lib/"libffi*/include "$out/include" + # Install headers and libs in the right places. + postFixup = '' + mkdir -p "$dev/" + mv "$out/lib/${name}/include" "$dev/include" + rmdir "$out/lib/${name}" + substituteInPlace "$dev/lib/pkgconfig/libffi.pc" \ + --replace 'includedir=''${libdir}/libffi-3.2.1' "includedir=$dev" ''; - meta = { + meta = with stdenv.lib; { description = "A foreign function call interface library"; longDescription = '' The libffi library provides a portable, high level programming @@ -40,8 +46,8 @@ stdenv.mkDerivation rec { ''; homepage = http://sourceware.org/libffi/; # See http://github.com/atgreen/libffi/blob/master/LICENSE . - license = stdenv.lib.licenses.free; + license = licenses.free; maintainers = [ ]; - platforms = stdenv.lib.platforms.all; + platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/libgcrypt/1.5.nix b/pkgs/development/libraries/libgcrypt/1.5.nix index 990e73d0a63ee..d77946e5ec37a 100644 --- a/pkgs/development/libraries/libgcrypt/1.5.nix +++ b/pkgs/development/libraries/libgcrypt/1.5.nix @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { # Make sure libraries are correct for .pc and .la files # Also make sure includes are fixed for callers who don't use libgpgcrypt-config postInstall = '' - sed -i 's,#include <gpg-error.h>,#include "${libgpgerror}/include/gpg-error.h",g' $out/include/gcrypt.h + sed -i 's,#include <gpg-error.h>,#include "${libgpgerror.dev}/include/gpg-error.h",g' $out/include/gcrypt.h '' + stdenv.lib.optionalString enableCapabilities '' - sed -i 's,\(-lcap\),-L${libcap}/lib \1,' $out/lib/libgcrypt.la + sed -i 's,\(-lcap\),-L${libcap.out}/lib \1,' $out/lib/libgcrypt.la ''; doCheck = true; diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index cc23d47e2bf2c..e03ed24e8fcd0 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -10,16 +10,19 @@ stdenv.mkDerivation rec { sha256 = "09k06gs27gxfha07sa9rpf4xh6mvphj9sky7n09ymx75w9zjrg69"; }; + outputs = [ "dev" "out" "info" ]; + outputBin = "dev"; + buildInputs = [ libgpgerror ] ++ lib.optional enableCapabilities libcap; # Make sure libraries are correct for .pc and .la files # Also make sure includes are fixed for callers who don't use libgpgcrypt-config - postInstall = '' - sed -i 's,#include <gpg-error.h>,#include "${libgpgerror}/include/gpg-error.h",g' $out/include/gcrypt.h + postFixup = '' + sed -i 's,#include <gpg-error.h>,#include "${libgpgerror.dev}/include/gpg-error.h",g' "$dev/include/gcrypt.h" '' + stdenv.lib.optionalString enableCapabilities '' - sed -i 's,\(-lcap\),-L${libcap}/lib \1,' $out/lib/libgcrypt.la + sed -i 's,\(-lcap\),-L${libcap.out}/lib \1,' $out/lib/libgcrypt.la ''; # TODO: figure out why this is even necessary and why the missing dylib only crashes diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index 19a6a8531bee1..3279bf3d9fbeb 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation rec { postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure"; + outputs = [ "dev" "out" "info" ]; + outputBin = "dev"; # deps want just the lib, most likely + # If architecture-dependent MO files aren't available, they're generated # during build, so we need gettext for cross-builds. crossAttrs.buildInputs = [ gettext ]; @@ -25,7 +28,7 @@ stdenv.mkDerivation rec { doCheck = true; - meta = { + meta = with stdenv.lib; { homepage = "https://www.gnupg.org/related_software/libgpg-error/index.html"; description = "A small library that defines common error values for all GnuPG components"; @@ -36,9 +39,9 @@ stdenv.mkDerivation rec { Daemon and possibly more in the future. ''; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.all; - maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + license = licenses.lgpl2Plus; + platforms = platforms.all; + maintainers = [ maintainers.fuuzetsu ]; }; } diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index fb988db65d1aa..661a5c8b8ca67 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { configureFlags = "--disable-appliance --disable-daemon"; patches = [ ./libguestfs-syms.patch ]; - NIX_CFLAGS_COMPILE="-I${libxml2}/include/libxml2/"; + NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/"; preConfigure = '' AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index c3c6c13c98fc9..b16dc83574149 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1xf4hphhahcjm2xwx147lfpsavjwv9l4c2gf6hx71zxywbz5lpds"; }; + outputs = [ "dev" "out" "bin" "info" "docdev" ]; + doCheck = ! stdenv.isDarwin; buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv; diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index ed97952940a93..430743af96ad5 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -15,11 +15,11 @@ in with stdenv.lib; stdenv.mkDerivation rec { - name = "libinput-1.0.2"; + name = "libinput-1.1.1"; src = fetchurl { url = "http://www.freedesktop.org/software/libinput/${name}.tar.xz"; - sha256 = "1fggbi8w8r7mayyk7zwqrqf3ni95y2703vcpggxqq7yjdgw0bld3"; + sha256 = "05yxz3cds65zmzj98yhsrwvnkv8c7n3zs2fksjzs2fy7vlrv9qid"; }; configureFlags = [ diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 3660a652e79dc..79cf45a8005f5 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, nasm }: +{ stdenv, fetchurl, nasm, autoreconfHook }: stdenv.mkDerivation rec { name = "libjpeg-turbo-1.4.2"; @@ -8,7 +8,11 @@ stdenv.mkDerivation rec { sha256 = "0gi349hp1x7mb98s4mf66sb2xay2kjjxj9ihrriw0yiy0k9va6sj"; }; - buildInputs = [ nasm ]; + outputs = [ "dev" "out" "doc" "bin" ]; + + buildInputs = [ autoreconfHook nasm ]; + + enableParallelBuilding = true; doCheck = true; checkTarget = "test"; diff --git a/pkgs/development/libraries/libjpeg/default.nix b/pkgs/development/libraries/libjpeg/default.nix index bf2ebb27f37f8..025be2009599b 100644 --- a/pkgs/development/libraries/libjpeg/default.nix +++ b/pkgs/development/libraries/libjpeg/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation { configureFlags = optional static "--enable-static --disable-shared"; + outputs = [ "dev" "out" "man" "bin" ]; + meta = { homepage = http://www.ijg.org/; description = "A library that implements the JPEG image file format"; diff --git a/pkgs/development/libraries/libmbim/default.nix b/pkgs/development/libraries/libmbim/default.nix index f910741c446e4..8baf4a77c362e 100644 --- a/pkgs/development/libraries/libmbim/default.nix +++ b/pkgs/development/libraries/libmbim/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0abv0h9c3kbw4bq1b9270sg189jcjj3x3wa91bj836ynwg9m34wl"; }; + outputs = [ "dev" "out" "doc" ]; + preConfigure = '' patchShebangs . ''; diff --git a/pkgs/development/libraries/libmicrohttpd/default.nix b/pkgs/development/libraries/libmicrohttpd/default.nix index 3ef4ba77c31c8..c681879453347 100644 --- a/pkgs/development/libraries/libmicrohttpd/default.nix +++ b/pkgs/development/libraries/libmicrohttpd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "07j1p21rvbrrfpxngk8xswzkmjkh94bp1971xfjh1p0ja709qwzj"; }; - outputs = [ "out" "info" ]; + outputs = [ "dev" "out" "docdev" ]; buildInputs = [ libgcrypt ]; diff --git a/pkgs/development/libraries/libmng/default.nix b/pkgs/development/libraries/libmng/default.nix index 234f56863c099..b97ee6a4ced0b 100644 --- a/pkgs/development/libraries/libmng/default.nix +++ b/pkgs/development/libraries/libmng/default.nix @@ -8,13 +8,16 @@ stdenv.mkDerivation rec { sha256 = "0l5wa3b9rr4zl49zbbjpapqyccqjwzkzw1ph3p4pk9p5h73h9317"; }; + outputs = [ "dev" "out" "docdev" ]; + outputMan= "docdev"; + propagatedBuildInputs = [ zlib libpng libjpeg lcms2 ]; - meta = { + meta = with stdenv.lib; { description = "Reference library for reading, displaying, writing and examining Multiple-Image Network Graphics"; homepage = http://www.libmng.com; - license = stdenv.lib.licenses.zlib; - maintainers = with stdenv.lib.maintainers; [ marcweber urkud ]; - hydraPlatforms = stdenv.lib.platforms.linux; + license = licenses.zlib; + maintainers = with maintainers; [ marcweber urkud ]; + hydraPlatforms = platforms.linux; }; } diff --git a/pkgs/development/libraries/libmpc/default.nix b/pkgs/development/libraries/libmpc/default.nix index 1e8ea0ffa1380..2a4600f52045c 100644 --- a/pkgs/development/libraries/libmpc/default.nix +++ b/pkgs/development/libraries/libmpc/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ gmp mpfr ]; - CFLAGS = "-I${gmp}/include"; + CFLAGS = "-I${gmp.dev}/include"; doCheck = true; diff --git a/pkgs/development/libraries/libmtp/default.nix b/pkgs/development/libraries/libmtp/default.nix index 13b4050193367..671169b9ab3a9 100644 --- a/pkgs/development/libraries/libmtp/default.nix +++ b/pkgs/development/libraries/libmtp/default.nix @@ -3,17 +3,19 @@ stdenv.mkDerivation rec { name = "libmtp-1.1.9"; - propagatedBuildInputs = [ libusb1 ]; - buildInputs = [ pkgconfig ]; - - # tried to install files to /lib/udev, hopefully OK - configureFlags = [ "--with-udev=$$out/lib/udev" ]; - src = fetchurl { url = "mirror://sourceforge/libmtp/${name}.tar.gz"; sha256 = "12dinqic0ljnhrwx3rc61jc7q24ybr0mckc2ya5kh1s1np0d7w93"; }; + outputs = [ "dev" "bin" "out" ]; + + propagatedBuildInputs = [ libusb1 ]; + buildInputs = [ pkgconfig ]; + + # tried to install files to /lib/udev, hopefully OK + configureFlags = [ "--with-udev=$$bin/lib/udev" ]; + meta = { homepage = http://libmtp.sourceforge.net; description = "An implementation of Microsoft's Media Transfer Protocol"; diff --git a/pkgs/development/libraries/libogg/default.nix b/pkgs/development/libraries/libogg/default.nix index 4e01784047207..11300f6151aec 100644 --- a/pkgs/development/libraries/libogg/default.nix +++ b/pkgs/development/libraries/libogg/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "16z74q422jmprhyvy7c9x909li8cqzmvzyr8cgbm52xcsp6pqs1z"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "doc" ]; meta = with stdenv.lib; { homepage = http://xiph.org/ogg/; diff --git a/pkgs/development/libraries/liboil/default.nix b/pkgs/development/libraries/liboil/default.nix index 43b1f34709347..754e308ac15ba 100644 --- a/pkgs/development/libraries/liboil/default.nix +++ b/pkgs/development/libraries/liboil/default.nix @@ -8,10 +8,13 @@ stdenv.mkDerivation rec { sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh"; }; - buildInputs = [ pkgconfig ]; - patches = [ ./x86_64-cpuid.patch ]; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; # oil-bugreport + + nativeBuildInputs = [ pkgconfig ]; + # fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix" # errors configureFlags = stdenv.lib.optional stdenv.isDarwin "--build=x86_64"; diff --git a/pkgs/development/libraries/libopensc-dnie/default.nix b/pkgs/development/libraries/libopensc-dnie/default.nix index f2855dd2a9240..b610fe23edeee 100644 --- a/pkgs/development/libraries/libopensc-dnie/default.nix +++ b/pkgs/development/libraries/libopensc-dnie/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { ar x opensc-dnie* tar xf data.tar.gz - RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.cc.libc}/lib:${zlib}/lib + RPATH=${stdenv.lib.makeLibraryPath [ glib opensc openssl openct libtool pcsclite stdenv.cc.libc zlib ]} for a in "usr/lib/"*.so*; do if ! test -L $a; then diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix index 460aaa2b0eca0..b8951e66c8bdb 100644 --- a/pkgs/development/libraries/libopus/default.nix +++ b/pkgs/development/libraries/libopus/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { sha256 = "158xprn2086arvdib3vbbygz7z6jqkw2nci7nlywzzwallap0wmr"; }; + outputs = [ "dev" "out" ]; + configureFlags = stdenv.lib.optional fixedPoint "--enable-fixed-point" ++ stdenv.lib.optional withCustomModes "--enable-custom-modes"; diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index d2fa6b184d64c..6e7481805e700 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sha256 = "0wnjy7gqn0f24qrlggs7kl0ij59by413j1xmqp12n3vqh9j531fg"; }; + outputs = [ "dev" "out" "man" ]; + propagatedBuildInputs = [ zlib ]; passthru = { inherit zlib; }; @@ -21,6 +23,8 @@ stdenv.mkDerivation rec { configureFlags = "--enable-static"; + postInstall = ''mv "$out/bin" "$dev/bin"''; + meta = with stdenv.lib; { description = "The official reference implementation for the PNG file format"; homepage = http://www.libpng.org/pub/png/libpng.html; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index 53777a0c56f0f..00abbbbdca48a 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -3,11 +3,11 @@ assert zlib != null; let - version = "1.6.18"; - sha256 = "0qq96rf31483kxz32h6l6921hy6p2v2pfqfvc74km229g4xw241f"; + version = "1.6.19"; + sha256 = "1s1mmkl79ghiczi2x2rbnp6y70v4c5pr8g3icxn9h5imymbmc71i"; patch_src = fetchurl { url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz"; - sha256 = "0g2ljh2vhclas1hacys1c4gk6l6hyy6sngb2yvdsnjz50nyq16kv"; + sha256 = "0bgqkac16yhl0zwjzq2zwkixg2l2x3a6blbk3k0wqz0lza2a6jrh"; }; whenPatched = stdenv.lib.optionalString apngSupport; @@ -18,13 +18,18 @@ in stdenv.mkDerivation rec { url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; inherit sha256; }; - postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; + outputs = [ "dev" "out" "man" ]; + propagatedBuildInputs = [ zlib ]; + preConfigure = "export bin=$dev"; + doCheck = true; + postInstall = ''mv "$out/bin" "$dev/bin"''; + passthru = { inherit zlib; }; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix index 7085236feb52c..0f08085063983 100644 --- a/pkgs/development/libraries/libproxy/default.nix +++ b/pkgs/development/libraries/libproxy/default.nix @@ -7,6 +7,8 @@ stdenv.mkDerivation rec { sha256 = "0jw6454gxjykmbnbh544axi8hzz9gmm4jz1y5gw1hdqnakg36gyw"; }; + outputs = [ "dev" "out" ]; # to deal with propagatedBuildInputs + nativeBuildInputs = [ pkgconfig cmake ]; propagatedBuildInputs = [ zlib ] # now some optional deps, but many more are possible diff --git a/pkgs/development/libraries/libqmi/default.nix b/pkgs/development/libraries/libqmi/default.nix index 9699d67d7b87a..82768cd350dd9 100644 --- a/pkgs/development/libraries/libqmi/default.nix +++ b/pkgs/development/libraries/libqmi/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "101ppan2q1h4pyp2zbn9b8sdwy2c7fk9rp91yykxz3afrvzbymq8"; }; + outputs = [ "dev" "out" "docdev" ]; + preBuild = '' patchShebangs . ''; diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix index 3d564fc00f8be..031886d345168 100644 --- a/pkgs/development/libraries/libraw/default.nix +++ b/pkgs/development/libraries/libraw/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "043kckxjqanw8dl3m9f6kvsf0l20ywxmgxd1xb0slj6m8l4w4hz6"; }; - buildInputs = [ lcms2 jasper ] ; + buildInputs = [ lcms2 jasper ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index ea1910733e7d2..0768a21bf5436 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic"; NIX_CFLAGS_COMPILE - = stdenv.lib.optionalString stdenv.isDarwin "-I${cairo}/include/cairo"; + = stdenv.lib.optionalString stdenv.isDarwin "-I${cairo.dev}/include/cairo"; # It wants to add loaders and update the loaders.cache in gdk-pixbuf # Patching the Makefiles to it creates rsvg specific loaders and the @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # Merge gdkpixbuf and librsvg loaders postInstall = '' mv $GDK_PIXBUF/loaders.cache $GDK_PIXBUF/loaders.cache.tmp - cat ${gdk_pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache.tmp > $GDK_PIXBUF/loaders.cache + cat ${gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache.tmp > $GDK_PIXBUF/loaders.cache rm $GDK_PIXBUF/loaders.cache.tmp ''; } diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 481d82c0c9ad3..f0ff549c71686 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, pkgconfig -, fftw, libsndfile -}: +{ stdenv, fetchurl, pkgconfig, libsndfile }: stdenv.mkDerivation rec { name = "libsamplerate-0.1.8"; @@ -11,12 +9,14 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ fftw libsndfile ]; + buildInputs = [ libsndfile ]; # maybe interesting configure flags: #--disable-fftw disable usage of FFTW #--disable-cpu-clip disable tricky cpu specific clipper + outputs = [ "dev" "bin" "out" ]; + postConfigure = stdenv.lib.optionalString stdenv.isDarwin '' # need headers from the Carbon.framework in /System/Library/Frameworks to diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index 48a2999e7af9d..5be8730ba0153 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig flac libogg libvorbis ] ++ stdenv.lib.optional stdenv.isDarwin Carbon; + enableParallelBuilding = true; + + outputs = [ "dev" "out" "bin" "doc" ]; + # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle preConfigure = stdenv.lib.optionalString stdenv.isDarwin diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix index c6f10a5531c46..42450275ad5e5 100644 --- a/pkgs/development/libraries/libsodium/default.nix +++ b/pkgs/development/libraries/libsodium/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { sha256 = "0ngvcjwg6m9nivzi208yvz8yvmk6kxnvyr25w907kaicgpm063cl"; }; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lssp"; + outputs = [ "dev" "out" ]; + + enableParallelBuilding = true; doCheck = true; diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index f71cc77321a52..b9a6c8341efc0 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -18,11 +18,13 @@ stdenv.mkDerivation { patchShebangs libsoup/ ''; + outputs = [ "dev" "out" ]; + buildInputs = libintlOrEmpty ++ [ intltool python sqlite ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib libxml2 gobjectIntrospection ] ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring ]; - passthru.propagatedUserEnvPackages = [ glib_networking ]; + passthru.propagatedUserEnvPackages = [ glib_networking.out ]; # glib_networking is a runtime dependency, not a compile-time dependency configureFlags = "--disable-tls-check" + stdenv.lib.optionalString (!gnomeSupport) " --without-gnome"; diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix index 3f6eeac892b15..e33d0c89b7d04 100644 --- a/pkgs/development/libraries/libssh/default.nix +++ b/pkgs/development/libraries/libssh/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c ''; + outputs = [ "dev" "out" ]; + buildInputs = [ zlib openssl libsodium ]; nativeBuildInputs = [ cmake pkgconfig ]; diff --git a/pkgs/development/libraries/libssh2/default.nix b/pkgs/development/libraries/libssh2/default.nix index 5e12ea734c188..26a4e1d504a56 100644 --- a/pkgs/development/libraries/libssh2/default.nix +++ b/pkgs/development/libraries/libssh2/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "05c2is69c50lyikkh29nk6zhghjk4i7hjx0zqfhq47aald1jj82s"; }; + outputs = [ "dev" "out" "docdev" ]; + buildInputs = [ openssl zlib ]; crossAttrs = { diff --git a/pkgs/development/libraries/libtasn1/default.nix b/pkgs/development/libraries/libtasn1/default.nix index 1ae26c48fc21a..5ac8cc94d044b 100644 --- a/pkgs/development/libraries/libtasn1/default.nix +++ b/pkgs/development/libraries/libtasn1/default.nix @@ -8,6 +8,9 @@ stdenv.mkDerivation rec { sha256 = "1j8iixynchziw1y39lnibyl5h81m4p78w3i4f28q2vgwjgf801x4"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + buildInputs = [ perl texinfo ]; doCheck = true; diff --git a/pkgs/development/libraries/libtheora/default.nix b/pkgs/development/libraries/libtheora/default.nix index da590adae0623..129dface2d938 100644 --- a/pkgs/development/libraries/libtheora/default.nix +++ b/pkgs/development/libraries/libtheora/default.nix @@ -8,6 +8,9 @@ stdenv.mkDerivation rec { sha256 = "0swiaj8987n995rc7hw0asvpwhhzpjiws8kr3s6r44bqqib2k5a0"; }; + outputs = [ "dev" "out" "docdev" ]; + outputDoc = "docdev"; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libogg libvorbis ]; diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 2c559d221abe9..a506279c2a4af 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "136nf1rj9dp5jgv1p7z4dk0xy3wki1w0vfjbk82f645m0w4samsd"; }; - outputs = [ "out" "doc" "man" ]; + outputs = [ "dev" "out" "bin" "doc" ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/libtoxcore/new-api/default.nix b/pkgs/development/libraries/libtoxcore/new-api/default.nix index 42f81cf6a9d23..0433d14668097 100644 --- a/pkgs/development/libraries/libtoxcore/new-api/default.nix +++ b/pkgs/development/libraries/libtoxcore/new-api/default.nix @@ -27,8 +27,8 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--with-libsodium-headers=${libsodium}/include" - "--with-libsodium-libs=${libsodium}/lib" + "--with-libsodium-headers=${libsodium.dev}/include" + "--with-libsodium-libs=${libsodium.out}/lib" "--enable-ntox" "--enable-daemon" ]; diff --git a/pkgs/development/libraries/libtoxcore/old-api/default.nix b/pkgs/development/libraries/libtoxcore/old-api/default.nix index 3ff2e1ad285d9..6bc69792b53af 100644 --- a/pkgs/development/libraries/libtoxcore/old-api/default.nix +++ b/pkgs/development/libraries/libtoxcore/old-api/default.nix @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--with-libsodium-headers=${libsodium}/include" - "--with-libsodium-libs=${libsodium}/lib" + "--with-libsodium-headers=${libsodium.dev}/include" + "--with-libsodium-libs=${libsodium.out}/lib" "--enable-ntox" "--enable-daemon" ]; diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix index 3fc8b50855901..da09e2fcbe25d 100644 --- a/pkgs/development/libraries/libunwind/default.nix +++ b/pkgs/development/libraries/libunwind/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure ''; + outputs = [ "dev" "out" ]; + propagatedBuildInputs = [ xz ]; NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else ""; @@ -30,7 +32,7 @@ stdenv.mkDerivation rec { postInstall = '' find $out -name \*.la | while read file; do - sed -i 's,-llzma,${xz}/lib/liblzma.la,' $file + sed -i 's,-llzma,${xz.out}/lib/liblzma.la,' $file done ''; diff --git a/pkgs/development/libraries/libusb/default.nix b/pkgs/development/libraries/libusb/default.nix index 7aec64d596fc8..b1872779b707f 100644 --- a/pkgs/development/libraries/libusb/default.nix +++ b/pkgs/development/libraries/libusb/default.nix @@ -3,6 +3,9 @@ stdenv.mkDerivation { name = "libusb-compat-0.1.5"; + outputs = [ "dev" "out" ]; # get rid of propagating systemd closure + outputBin = "dev"; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libusb1 ]; diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 75d6bdb4cc6a8..fe920bba411fd 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, udev ? null, libobjc, IOKit }: +{ stdenv, fetchurl, pkgconfig, libudev ? null, libobjc, IOKit }: stdenv.mkDerivation rec { name = "libusb-1.0.19"; @@ -8,15 +8,17 @@ stdenv.mkDerivation rec { sha256 = "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c"; }; + outputs = [ "dev" "out" ]; # get rid of propagating systemd closure + buildInputs = [ pkgconfig ]; propagatedBuildInputs = - stdenv.lib.optional stdenv.isLinux udev ++ + stdenv.lib.optional stdenv.isLinux libudev ++ stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ]; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; preFixup = stdenv.lib.optionalString stdenv.isLinux '' - sed 's,-ludev,-L${udev}/lib -ludev,' -i $out/lib/libusb-1.0.la + sed 's,-ludev,-L${libudev.out}/lib -ludev,' -i $out/lib/libusb-1.0.la ''; meta = { diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 12de07ced32d8..ff44b157eaff5 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, libX11, pkgconfig, libXext, libdrm, libXfixes, wayland, libffi -, mesa ? null +, mesa_noglu +, minimal ? true, libva }: stdenv.mkDerivation rec { @@ -10,9 +11,15 @@ stdenv.mkDerivation rec { sha256 = "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz"; }; - buildInputs = [ libX11 libXext pkgconfig libdrm libXfixes wayland libffi mesa ]; + outputs = [ "dev" "out" "bin" ]; - configureFlags = stdenv.lib.optional (mesa != null) "--enable-glx"; + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ libdrm ] + ++ stdenv.lib.optionals (!minimal) [ libva libX11 libXext libXfixes wayland libffi mesa_noglu ]; + # TODO: share libs between minimal and !minimal - perhaps just symlink them + + #configureFlags = stdenv.lib.optional (mesa != null) "--enable-glx"; meta = with stdenv.lib; { homepage = http://www.freedesktop.org/wiki/Software/vaapi; diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index 6c5d5a91ad888..04d06a149fcf2 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "857a01932609225b9a3a5bf222b85e39b55c08787d0ad427dbd9ec033d58d736"; }; + outputs = [ "dev" "out" ]; + buildInputs = with xorg; [ pkgconfig dri2proto libXext ]; propagatedBuildInputs = [ xorg.libX11 ]; diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index e946f27791b60..a8295380829e9 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python -, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext +, iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext , libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng , dnsmasq, libnl, libpcap, libxslt, xhtml1 , pythonPackages, perlPackages @@ -19,12 +19,12 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig libxml2 gnutls devicemapper perl python readline lvm2 - utillinux udev libpciaccess gettext libtasn1 libgcrypt yajl makeWrapper + utillinux systemd.udev.lib libpciaccess gettext libtasn1 libgcrypt yajl makeWrapper libcap_ng libnl libxslt xhtml1 perlPackages.XMLXPath ]; preConfigure = '' - PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH + PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${systemd.udev.bin}/sbin:${dnsmasq}/bin:$PATH patchShebangs . # fixes /usr/bin/python references ''; diff --git a/pkgs/development/libraries/libvorbis/default.nix b/pkgs/development/libraries/libvorbis/default.nix index d58607ea29882..f1715805141db 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1lg1n3a6r41492r7in0fpvzc7909mc5ir9z0gd3qh2pz4yalmyal"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "doc" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libogg ]; diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 6a47566707860..c33c5d9ad01e2 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -72,6 +72,9 @@ stdenv.mkDerivation rec { patchPhase = ''patchShebangs .''; + outputs = [ "dev" "out" "bin" ]; + setOutputFlags = false; + configureFlags = [ (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8") (enableFeature vp8EncoderSupport "vp8-encoder") @@ -146,6 +149,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = ''_moveToOutput bin "$bin" ''; + crossAttrs = let isCygwin = stdenv.cross.libc == "msvcrt"; isDarwin = stdenv.cross.libc == "libSystem"; diff --git a/pkgs/development/libraries/libvpx/git.nix b/pkgs/development/libraries/libvpx/git.nix index 31b1c197e9ff0..bfe1f9424cd56 100644 --- a/pkgs/development/libraries/libvpx/git.nix +++ b/pkgs/development/libraries/libvpx/git.nix @@ -73,6 +73,9 @@ stdenv.mkDerivation rec { patchPhase = ''patchShebangs .''; + outputs = [ "dev" "out" "bin" ]; + setOutputFlags = false; + configureFlags = [ (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8") (enableFeature vp8EncoderSupport "vp8-encoder") @@ -147,6 +150,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = ''_moveToOutput bin "$bin" ''; + crossAttrs = let isCygwin = stdenv.cross.libc == "msvcrt"; isDarwin = stdenv.cross.libc == "libSystem"; diff --git a/pkgs/development/libraries/libwnck/3.x.nix b/pkgs/development/libraries/libwnck/3.x.nix index 6c6c0812c43c3..a763af96667b8 100644 --- a/pkgs/development/libraries/libwnck/3.x.nix +++ b/pkgs/development/libraries/libwnck/3.x.nix @@ -8,6 +8,9 @@ stdenv.mkDerivation { sha256 = "d48ac9c7f50c0d563097f63d07bcc83744c7d92a1b4ef65e5faeab32b5ccb723"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + patches = [ ./install_introspection_to_prefix.patch ]; buildInputs = [ pkgconfig intltool ]; diff --git a/pkgs/development/libraries/libwnck/default.nix b/pkgs/development/libraries/libwnck/default.nix index 6a4479bdda38c..bb5258120494d 100644 --- a/pkgs/development/libraries/libwnck/default.nix +++ b/pkgs/development/libraries/libwnck/default.nix @@ -12,6 +12,9 @@ stdenv.mkDerivation rec { sha256 = "17isfjvrzgj5znld2a7zsk9vd39q9wnsysnw5jr8iz410z935xw3"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + buildInputs = [ pkgconfig gtk intltool xorg.libX11 xorg.libXres ]; # ?another optional: startup-notification diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix index 5543b05ce9d15..d11e2ed943964 100644 --- a/pkgs/development/libraries/libxkbcommon/default.nix +++ b/pkgs/development/libraries/libxkbcommon/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha1 = "z9dvxrkcyb4b7f2zybgkrqb9zcxrj9vi"; }; + outputs = [ "dev" "out" ]; + buildInputs = [ pkgconfig yacc flex xkeyboard_config libxcb ]; configureFlags = '' diff --git a/pkgs/development/libraries/libxklavier/default.nix b/pkgs/development/libraries/libxklavier/default.nix index d69276a070bba..f074b31bb6820 100644 --- a/pkgs/development/libraries/libxklavier/default.nix +++ b/pkgs/development/libraries/libxklavier/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "016lpdv35z0qsw1cprdc2k5qzkdi5waj6qmr0a2q6ljn9g2kpv7b"; }; + outputs = [ "dev" "out" "docdev" ]; + # TODO: enable xmodmap support, needs xmodmap DB propagatedBuildInputs = with xorg; [ libX11 libXi xkeyboard_config libxml2 libICE glib libxkbfile isocodes ]; diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 2fdc198aa115b..af71c05a1c870 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,14 +1,11 @@ -{ stdenv, fetchurl, zlib, xz, python ? null, pythonSupport ? true, findXMLCatalogs }: - -assert pythonSupport -> python != null; - -#TODO: share most stuff between python and non-python builds, perhaps via multiple-output +{ stdenv, fetchurl, zlib, xz, python, findXMLCatalogs }: let version = "2.9.2"; + inherit (stdenv.lib) optional; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libxml2-${version}"; src = fetchurl { @@ -16,20 +13,32 @@ stdenv.mkDerivation (rec { sha256 = "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "bin" "doc" "py" ]; + propagatedOutputs = "out bin py"; - buildInputs = stdenv.lib.optional pythonSupport python + buildInputs = [ python ] # Libxml2 has an optional dependency on liblzma. However, on impure # platforms, it may end up using that from /usr/lib, and thus lack a # RUNPATH for that, leading to undefined references for its users. - ++ stdenv.lib.optional stdenv.isFreeBSD xz; + ++ optional stdenv.isFreeBSD xz; propagatedBuildInputs = [ zlib findXMLCatalogs ]; - passthru = { inherit pythonSupport version; }; + configureFlags = "--with-python=${python}"; enableParallelBuilding = true; + preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; + installFlags = ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"''; + + postFixup = '' + _moveToOutput bin/xml2-config "$dev" + _moveToOutput lib/xml2Conf.sh "$dev" + _moveToOutput share/man/man1 "$bin" + ''; + + passthru = { inherit version; pythonSupport = true; }; + meta = { homepage = http://xmlsoft.org/; description = "An XML parsing library for C"; @@ -37,15 +46,5 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.eelco ]; }; - -} // stdenv.lib.optionalAttrs pythonSupport { - configureFlags = "--with-python=${python}"; - - # this is a pair of ugly hacks to make python stuff install into the right place - preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$out"''; - installFlags = ''pythondir="$(out)/lib/${python.libPrefix}/site-packages"''; - -} // stdenv.lib.optionalAttrs (!pythonSupport) { - configureFlags = "--with-python=no"; # otherwise build impurity bites us -}) +} diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 3579e99ec7a8e..dc74d8e95eeb8 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "bin" "doc" ]; buildInputs = [ libxml2 ]; @@ -17,7 +17,6 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optionals stdenv.isSunOS [ ./patch-ah.patch ]; configureFlags = [ - "--with-libxml-prefix=${libxml2}" "--without-python" "--without-crypto" "--without-debug" @@ -25,11 +24,17 @@ stdenv.mkDerivation rec { "--without-debugger" ]; - meta = { + postFixup = '' + _moveToOutput bin/xslt-config "$dev" + _moveToOutput lib/xsltConf.sh "$dev" + _moveToOutput share/man/man1 "$bin" + ''; + + meta = with stdenv.lib; { homepage = http://xmlsoft.org/XSLT/; description = "A C library and tools to do XSL transformations"; license = "bsd"; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = platforms.unix; + maintainers = [ maintainers.eelco ]; }; } diff --git a/pkgs/development/libraries/mailcore2/default.nix b/pkgs/development/libraries/mailcore2/default.nix index 8cf0744a0d14f..c86205226dddb 100644 --- a/pkgs/development/libraries/mailcore2/default.nix +++ b/pkgs/development/libraries/mailcore2/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { substituteInPlace CMakeLists.txt \ --replace "tidy/tidy.h" "tidy.h" \ --replace "/usr/include/tidy" "${libtidy}/include" \ - --replace "/usr/include/libxml2" "${libxml2}/include/libxml2" \ + --replace "/usr/include/libxml2" "${libxml2.dev}/include/libxml2" \ ''; cmakeFlags = [ diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 11fafc8f03816..3386de316b94f 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,6 +1,5 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll -, python, libxml2Python, file, expat, makedepend, pythonPackages -, libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio +{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook, substituteAll +, file, expat, libdrm, xorg, wayland, libudev, llvmPackages, libffi, libomxil-bellagio , libvdpau, libelf, libva , grsecEnabled , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt @@ -21,12 +20,13 @@ else - libOSMesa is in $osmesa (~4 MB) */ +with { inherit (stdenv.lib) optional optionalString; }; + let version = "11.0.5"; # this is the default search path for DRI drivers - driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32"; + driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; in -with { inherit (stdenv.lib) optional optionals optionalString; }; stdenv.mkDerivation { name = "mesa-noglu-${version}"; @@ -48,7 +48,7 @@ stdenv.mkDerivation { ] ++ optional stdenv.isLinux (substituteAll { src = ./dlopen-absolute-paths.diff; - inherit udev; + libudev = libudev.out; }); postPatch = '' @@ -56,7 +56,7 @@ stdenv.mkDerivation { --replace _EGL_DRIVER_SEARCH_DIR '"${driverLink}"' ''; - outputs = ["out" "drivers" "osmesa"]; + outputs = [ "dev" "out" "drivers" "osmesa" ]; configureFlags = [ "--sysconfdir=/etc" @@ -97,17 +97,17 @@ stdenv.mkDerivation { ] ++ optional enableTextureFloats "--enable-texture-float" ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec - nativeBuildInputs = [ pkgconfig python makedepend file flex bison pythonPackages.Mako ]; + nativeBuildInputs = [ pkgconfig file ]; propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] - ++ optionals stdenv.isLinux [ libdrm ]; + ++ optional stdenv.isLinux libdrm; buildInputs = with xorg; [ - autoreconfHook intltool expat libxml2Python llvmPackages.llvm + autoreconfHook intltool expat llvmPackages.llvm glproto dri2proto dri3proto presentproto libX11 libXext libxcb libXt libXfixes libxshmfence libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ - ] ++ optional stdenv.isLinux udev; + ] ++ optional stdenv.isLinux libudev; enableParallelBuilding = true; doCheck = false; @@ -127,43 +127,42 @@ stdenv.mkDerivation { $out/lib/vdpau \ $out/lib/libxatracker* - mkdir -p {$osmesa,$drivers}/lib/pkgconfig + mkdir -p {$osmesa,$drivers}/lib/ mv -t $osmesa/lib/ \ $out/lib/libOSMesa* - mv -t $drivers/lib/pkgconfig/ \ - $out/lib/pkgconfig/xatracker.pc - - mv -t $osmesa/lib/pkgconfig/ \ - $out/lib/pkgconfig/osmesa.pc - '' + /* now fix references in .la files */ '' sed "/^libdir=/s,$out,$osmesa," -i \ $osmesa/lib/libOSMesa*.la - '' + /* work around bug #529, but maybe $drivers should also be patchelf-ed */ '' - find $drivers/ $osmesa/ -type f -executable -print0 | xargs -0 strip -S || true + '' + /* set the default search path for DRI drivers; used e.g. by X server */ '' + substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" + '' + /* move vdpau drivers to $drivers/lib, so they are found */ '' + mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau + ''; + #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */ - '' + /* add RPATH so the drivers can find the moved libgallium and libdricore9 */ '' + postFixup = + # add RPATH so the drivers can find the moved libgallium and libdricore9 + # moved here to avoid problems with stripping patchelfed files + '' for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do if [[ ! -L "$lib" ]]; then patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" fi done - '' + /* set the default search path for DRI drivers; used e.g. by X server */ '' - substituteInPlace "$out/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" - '' + /* move vdpau drivers to $drivers/lib, so they are found */ '' - mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau ''; - #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM + # ToDo + /* check $out doesn't depend on llvm */ '' + # builder failures are ignored for some reason + # grep -qv '${llvmPackages.llvm}' -R "$out" passthru = { inherit libdrm version driverLink; }; - meta = { + meta = with stdenv.lib; { description = "An open source implementation of OpenGL"; homepage = http://www.mesa3d.org/; - license = "bsd"; - platforms = stdenv.lib.platforms.mesaPlatforms; - maintainers = with stdenv.lib.maintainers; [ eduarrrd simons vcunat ]; + license = licenses.mit; # X11 variant, in most files + platforms = platforms.mesaPlatforms; + maintainers = with maintainers; [ eduarrrd simons vcunat ]; }; } diff --git a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff b/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff index a4bb6a72b1381..9a52265722391 100644 --- a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff +++ b/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff @@ -16,7 +16,7 @@ index 4fdf3c2..69ea22d 100644 do { for (version = 1; version >= 0; version--) { - snprintf(name, sizeof(name), "libudev.so.%d", version); -+ snprintf(name, sizeof(name), "@udev@/lib/libudev.so.%d", version); ++ snprintf(name, sizeof(name), "@libudev@/lib/libudev.so.%d", version); udev_handle = dlopen(name, flags); if (udev_handle) return udev_handle; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index e1809d544d1f5..c17b762cab222 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { patches = [ ./upstream.patch ]; + outputs = [ "dev" "out" "doc" ]; + # mpfr.h requires gmp.h propagatedBuildInputs = [ gmp ]; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index c505d89a6d8fd..efaf0fec215da 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -20,6 +20,9 @@ stdenv.mkDerivation rec { # gcc-5.patch should be removed after 5.9 patches = [ ./clang.patch ./gcc-5.patch ]; + outputs = [ "dev" "lib" "out" "man" ]; + setOutputFlags = false; # some aren't supported + configureFlags = [ "--with-shared" "--without-debug" @@ -30,9 +33,15 @@ stdenv.mkDerivation rec { buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; preConfigure = '' - configureFlagsArray+=("--includedir=$out/include") - export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig" + export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig" mkdir -p "$PKG_CONFIG_LIBDIR" + configureFlagsArray+=( + "--libdir=$lib/lib" + "--includedir=$dev/include" + "--bindir=$dev/bin" + "--mandir=$man/share/man" + "--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR" + ) '' + lib.optionalString stdenv.isCygwin '' sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure ''; @@ -46,44 +55,44 @@ stdenv.mkDerivation rec { # When building a wide-character (Unicode) build, create backward # compatibility links from the the "normal" libraries to the # wide-character libraries (e.g. libncurses.so to libncursesw.so). - postInstall = '' + postFixup = '' # Determine what suffixes our libraries have suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)" - libs="$(ls $out/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")" + libs="$(ls $dev/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")" suffixes="$(echo "$suffix" | awk '{for (i=1; i < length($0); i++) {x=substr($0, i+1, length($0)-i); print x}}')" # Get the path to the config util - cfg=$(basename $out/bin/ncurses*-config) + cfg=$(basename $dev/bin/ncurses*-config) # symlink the full suffixed include directory - ln -svf . $out/include/ncurses$suffix + ln -svf . $dev/include/ncurses$suffix for newsuffix in $suffixes ""; do # Create a non-abi versioned config util links - ln -svf $cfg $out/bin/ncurses$newsuffix-config + ln -svf $cfg $dev/bin/ncurses$newsuffix-config # Allow for end users who #include <ncurses?w/*.h> - ln -svf . $out/include/ncurses$newsuffix + ln -svf . $dev/include/ncurses$newsuffix - for lib in $libs; do + for library in $libs; do for dylibtype in so dll dylib; do - if [ -e "$out/lib/lib''${lib}$suffix.$dylibtype" ]; then - ln -svf lib''${lib}$suffix.$dylibtype $out/lib/lib$lib$newsuffix.$dylibtype - ln -svf lib''${lib}$suffix.$dylibtype.${abiVersion} $out/lib/lib$lib$newsuffix.$dylibtype.${abiVersion} + if [ -e "$lib/lib/lib''${library}$suffix.$dylibtype" ]; then + ln -svf lib''${library}$suffix.$dylibtype $lib/lib/lib$library$newsuffix.$dylibtype + ln -svf lib''${library}$suffix.$dylibtype.${abiVersion} $lib/lib/lib$library$newsuffix.$dylibtype.${abiVersion} fi done for statictype in a dll.a la; do - if [ -e "$out/lib/lib''${lib}$suffix.$statictype" ]; then - ln -svf lib''${lib}$suffix.$statictype $out/lib/lib$lib$newsuffix.$statictype + if [ -e "$lib/lib/lib''${library}$suffix.$statictype" ]; then + ln -svf lib''${library}$suffix.$statictype $lib/lib/lib$library$newsuffix.$statictype fi done - ln -svf ''${lib}$suffix.pc $out/lib/pkgconfig/$lib$newsuffix.pc + ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc done done ''; preFixup = '' - rm $out/lib/*.a + rm "$lib"/lib/*.a ''; meta = { diff --git a/pkgs/development/libraries/nettle/generic.nix b/pkgs/development/libraries/nettle/generic.nix index 3c439eb404cc3..1bfb739712f40 100644 --- a/pkgs/development/libraries/nettle/generic.nix +++ b/pkgs/development/libraries/nettle/generic.nix @@ -9,6 +9,9 @@ stdenv.mkDerivation (rec { inherit src; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + buildInputs = [ gnum4 ]; propagatedBuildInputs = [ gmp ]; @@ -61,5 +64,5 @@ stdenv.lib.optionalAttrs stdenv.isSunOS { # /usr/include/mp.h from OpenSolaris. See # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html> # for details. - configureFlags = [ "--with-include-path=${gmp}/include" ]; + configureFlags = [ "--with-include-path=${gmp.dev}/include" ]; }) diff --git a/pkgs/development/libraries/newt/default.nix b/pkgs/development/libraries/newt/default.nix index f5f72c006c73e..8a4b793cad797 100644 --- a/pkgs/development/libraries/newt/default.nix +++ b/pkgs/development/libraries/newt/default.nix @@ -14,16 +14,18 @@ stdenv.mkDerivation rec { buildInputs = [ slang popt ]; + NIX_LDFLAGS = "-lncurses"; + crossAttrs = { makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-"; }; - meta = { + meta = with stdenv.lib; { homepage = https://fedorahosted.org/newt/; description = "Library for color text mode, widget based user interfaces"; - license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.viric ]; + license = licenses.lgpl2; + platforms = platforms.linux; + maintainers = [ maintainers.viric ]; }; } diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix index e1b7a01c4cd35..ef4dde42597a6 100644 --- a/pkgs/development/libraries/nspr/default.nix +++ b/pkgs/development/libraries/nspr/default.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation { sha256 = "343614971c30520d0fa55f4af0a72578e2d8674bb71caf7187490c3379523107"; }; + outputs = [ "dev" "out" ]; + outputBin = "dev"; + preConfigure = '' cd nspr ''; @@ -21,6 +24,7 @@ stdenv.mkDerivation { postInstall = '' find $out -name "*.a" -delete + _moveToOutput share "$dev" # just aclocal ''; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index 47bb5cde228a7..20290b4c87a23 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, nspr, perl, zlib, sqlite -, includeTools ? false -}: +{ stdenv, fetchurl, nspr, perl, zlib, sqlite }: let @@ -46,15 +44,18 @@ in stdenv.mkDerivation rec { INSTALL_TARGET ''; + outputs = [ "dev" "out" "tools" ]; + preConfigure = "cd nss"; makeFlags = [ - "NSPR_INCLUDE_DIR=${nspr}/include/nspr" - "NSPR_LIB_DIR=${nspr}/lib" + "NSPR_INCLUDE_DIR=${nspr.dev}/include/nspr" + "NSPR_LIB_DIR=${nspr.out}/lib" "NSDISTMODE=copy" "BUILD_OPT=1" "SOURCE_PREFIX=\$(out)" "NSS_ENABLE_ECC=1" + "USE_SYSTEM_ZLIB=1" "NSS_USE_SYSTEM_SQLITE=1" ] ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"; @@ -75,8 +76,11 @@ in stdenv.mkDerivation rec { libfile="$out/lib/lib$libname.so" LD_LIBRARY_PATH=$out/lib $out/bin/shlibsign -v -i "$libfile" done - '' + stdenv.lib.optionalString (!includeTools) '' - find $out/bin -type f \( -name nss-config -o -delete \) + + _moveToOutput bin "$tools" + _moveToOutput bin/nss-config "$dev" + _moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example + rm "$out"/lib/*.a ''; meta = { diff --git a/pkgs/development/libraries/nss_wrapper/default.nix b/pkgs/development/libraries/nss_wrapper/default.nix index 278834190bbf2..a81d95e6b9871 100644 --- a/pkgs/development/libraries/nss_wrapper/default.nix +++ b/pkgs/development/libraries/nss_wrapper/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0bysdijvi9n0jk74iklbfhbp0kvv81a727lcfd5q03q2hkzjfm18"; }; - buildInputs = [ cmake pkgconfig ]; + buildInputs = [ cmake pkgconfig (stdenv.cc.libc.out or null) ]; + # outputs TODO: missing glibc.out might become a general problem meta = with stdenv.lib; { description = "A wrapper for the user, group and hosts NSS API"; diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index 253f74ecc6a87..e9895ff56a025 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { # Should be removed with >=2.4.43 patches = [ ./CVE-2015-6908.patch ]; - outputs = [ "out" "man" ]; + # TODO: separate "out" and "bin" + outputs = [ "dev" "out" "man" "docdev" ]; buildInputs = [ openssl cyrus_sasl db groff ]; @@ -21,12 +22,10 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optional (openssl == null) "--without-tls" ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl"; - dontPatchELF = 1; # !!! - # Fixup broken libtool preFixup = '' - sed -e 's,-lsasl2,-L${cyrus_sasl}/lib -lsasl2,' \ - -e 's,-lssl,-L${openssl}/lib -lssl,' \ + sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \ + -e 's,-lssl,-L${openssl.out}/lib -lssl,' \ -i $out/lib/libldap.la -i $out/lib/libldap_r.la ''; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 5ed30731a6848..2df2847e89812 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -18,11 +18,12 @@ stdenv.mkDerivation rec { sha1 = "9d1977cc89242cd11471269ece2ed4650947c046"; }; - outputs = [ "out" "man" ]; - patches = optional stdenv.isCygwin ./1.0.1-cygwin64.patch ++ optional (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")) ./darwin-arch.patch; + outputs = [ "dev" "out" "man" "bin" ]; + setOutputFlags = false; + nativeBuildInputs = [ perl ]; buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; @@ -42,9 +43,7 @@ stdenv.mkDerivation rec { "-DUSE_CRYPTODEV_DIGESTS" ]; - makeFlags = [ - "MANDIR=$(out)/share/man" - ]; + makeFlags = [ "MANDIR=$(man)/share/man" ]; # Parallel building is broken in OpenSSL. enableParallelBuilding = false; @@ -56,12 +55,18 @@ stdenv.mkDerivation rec { rm "$out/lib/"*.a fi + mkdir -p $bin + mv $out/bin $bin/ + + mkdir $dev + mv $out/include $dev/ + # remove dependency on Perl at runtime - rm -r $out/etc/ssl/misc $out/bin/c_rehash + rm -r $out/etc/ssl/misc ''; postFixup = '' - # Check to make sure we don't depend on perl + # Check to make sure the main output doesn't depend on perl if grep -r '${perl}' $out; then echo "Found an erroneous dependency on perl ^^^" >&2 exit 1 diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index eefed304134f3..f2a9bdc123097 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -8,6 +8,9 @@ stdenv.mkDerivation rec { sha256 = "1i3a1wdpagm0p3y1bwaz5x5rjhcpqbcrnhkcp10p259vkxk72wz5"; }; + outputs = [ "dev" "out" "docdev" ]; + outputBin = "dev"; + buildInputs = [ pkgconfig libffi libtasn1 libiconv ]; configureFlags = [ diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index e7106b9877e0f..e213fa56a7cc4 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, xlibsWrapper, glib, cairo, libpng, harfbuzz -, fontconfig, freetype, libintlOrEmpty, gobjectIntrospection +{ stdenv, fetchurl, pkgconfig, libXft, cairo, harfbuzz +, libintlOrEmpty, gobjectIntrospection }: let @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { sha256 = "0v12gi7f01iq3z852pclpnmkbcksbvpcmiazmklkx1dd9fbpakhx"; }; - buildInputs = with stdenv.lib; [ gobjectIntrospection ] - ++ optional stdenv.isDarwin fontconfig; - nativeBuildInputs = [ pkgconfig ]; + outputs = [ "dev" "out" "bin" "docdev" ]; - propagatedBuildInputs = [ xlibsWrapper glib cairo libpng fontconfig freetype harfbuzz ] ++ libintlOrEmpty; + buildInputs = [ gobjectIntrospection ]; + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ cairo harfbuzz libXft ] ++ libintlOrEmpty; enableParallelBuilding = true; @@ -29,8 +29,6 @@ stdenv.mkDerivation rec { # .../bin/sh: line 5: 14823 Abort trap: 6 srcdir=. PANGO_RC_FILE=./pangorc ${dir}$tst # FAIL: testiter - postInstall = "rm -rf $out/share/gtk-doc"; - meta = with stdenv.lib; { description = "A library for laying out and rendering of text, with an emphasis on internationalization"; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 3370e910565e1..fa4a640bd0b03 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,9 +1,11 @@ -{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true -, windows ? null +{ stdenv, fetchurl +, windows ? null, variant ? null, pcre }: with stdenv.lib; +assert elem variant [ null "cpp" "pcre16" "pcre32" ]; + stdenv.mkDerivation rec { name = "pcre-8.37"; @@ -17,18 +19,26 @@ stdenv.mkDerivation rec { ./cve-2015-5073.patch ]; - outputs = [ "out" "doc" "man" ]; + outputs = [ "dev" "out" "bin" "doc" "man" ]; - configureFlags = '' - --enable-jit - ${if unicodeSupport then "--enable-unicode-properties" else ""} - ${if !cplusplusSupport then "--disable-cpp" else ""} - ''; + configureFlags = [ + "--enable-jit" + "--enable-unicode-properties" + "--disable-cpp" + ] + ++ optional (variant != null) "--enable-${variant}"; doCheck = with stdenv; !(isCygwin || isFreeBSD); # XXX: test failure on Cygwin # we are running out of stack on both freeBSDs on Hydra + postFixup = '' + _moveToOutput bin/pcre-config "$dev" + '' + + optionalString (variant != null) '' + ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.so.*.*.* + ''; + crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") { buildInputs = [ windows.mingw_w64_pthreads.crossDrv ]; }; diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix index c7c5aff24558e..4ebb0cbcc2607 100644 --- a/pkgs/development/libraries/pdf2xml/default.nix +++ b/pkgs/development/libraries/pdf2xml/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation { preBuild = '' cp Makefile.linux Makefile - sed -i 's|/usr/include/libxml2|${libxml2}/include/libxml2|' Makefile - sed -i 's|-lxml2|-lxml2 -L${libxml2}/lib|' Makefile + sed -i 's|/usr/include/libxml2|${libxml2.dev}/include/libxml2|' Makefile + sed -i 's|-lxml2|-lxml2 -L${libxml2.out}/lib|' Makefile sed -i 's|XPDF = xpdf_3.01|XPDF = ${libxpdf}/lib|' Makefile mkdir exe diff --git a/pkgs/development/libraries/phonon-backend-gstreamer/qt5/old.nix b/pkgs/development/libraries/phonon-backend-gstreamer/qt5/old.nix index bc34d249b46d0..feaa743aca748 100644 --- a/pkgs/development/libraries/phonon-backend-gstreamer/qt5/old.nix +++ b/pkgs/development/libraries/phonon-backend-gstreamer/qt5/old.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ optional debug "-DCMAKE_BUILD_TYPE=Debug"; + NIX_CFLAGS_COMPILE = "-fPIC"; + meta = with stdenv.lib; { homepage = http://phonon.kde.org/; description = "GStreamer backend for Phonon"; diff --git a/pkgs/development/libraries/policykit/default.nix b/pkgs/development/libraries/policykit/default.nix index f494710be638f..9f8b702f8975f 100644 --- a/pkgs/development/libraries/policykit/default.nix +++ b/pkgs/development/libraries/policykit/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig glib dbus_glib pam intltool gettext libxslt ]; - propagatedBuildInputs = [ expat dbus.libs ]; + propagatedBuildInputs = [ expat dbus ]; configureFlags = "--localstatedir=/var --sysconfdir=/etc"; diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index cdeaa0cb1d96a..5744460008fd0 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { sha256 = "109w86kfqrgz83g9ivggplmgc77rz8kx8646izvm2jb57h4rbh71"; }; + outputs = [ "dev" "out" "bin" ]; # small man pages in $bin + buildInputs = [ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ] ++ [ libxslt docbook_xsl docbook_xml_dtd_412 ] # man pages diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 92777f001695c..ebcdcc2b3efdf 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { inherit sha256; }; - outputs = [ "out" ] ++ lib.optional (!minimal) "doc"; + outputs = [ "dev" "out" ]; patches = [ ./datadir_env.patch ]; diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 46d5128140151..5d8c2430ab9f9 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { make install # fixup .pc file to find alsa library - sed -i "s|-lasound|-L${alsaLib}/lib -lasound|" "$out/lib/pkgconfig/"*.pc + sed -i "s|-lasound|-L${alsaLib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix index 08d8f141deb0b..40fa63d75caf9 100644 --- a/pkgs/development/libraries/qt-3/default.nix +++ b/pkgs/development/libraries/qt-3/default.nix @@ -49,9 +49,9 @@ stdenv.mkDerivation { ${if cursorSupport then "-L${libXcursor}/lib -I${libXcursor}/include" else ""} ${if mysqlSupport then "-qt-sql-mysql -L${mysql.lib}/lib/mysql -I${mysql.lib}/include/mysql" else ""} ${if xftSupport then "-xft - -L${libXft}/lib -I${libXft}/include - -L${libXft.freetype}/lib -I${libXft.freetype}/include - -L${libXft.fontconfig}/lib -I${libXft.fontconfig}/include" else "-no-xft"} + -L${libXft.out}/lib -I${libXft.dev}/include + -L${libXft.freetype.out}/lib -I${libXft.freetype.dev}/include + -L${libXft.fontconfig.lib}/lib -I${libXft.fontconfig.dev}/include" else "-no-xft"} "; patches = [ diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index e4d1bae636cf8..ccc486692e241 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -52,19 +52,24 @@ stdenv.mkDerivation rec { [ ./glib-2.32.patch (substituteAll { src = ./dlopen-absolute-paths.diff; - inherit cups icu libXfixes; - glibc = stdenv.cc.libc; + cups = cups.out; + icu = icu.out; + libXfixes = libXfixes.out; + glibc = stdenv.cc.libc.out; openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path"; }) ] ++ stdenv.lib.optional gtkStyle (substituteAll { src = ./dlopen-gtkstyle.diff; # substituteAll ignores env vars starting with capital letter - gconf = GConf; - inherit gnome_vfs libgnomeui gtk; + gconf = GConf.out; + gtk = gtk.out; + libgnomeui = libgnomeui.out; + gnome_vfs = gnome_vfs.out; }) ++ stdenv.lib.optional flashplayerFix (substituteAll { src = ./dlopen-webkit-nsplugin.diff; - inherit gtk gdk_pixbuf; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; }) ++ [(fetchpatch { name = "fix-medium-font.patch"; @@ -112,7 +117,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi - libSM zlib libpng openssl dbus.libs freetype fontconfig glib ] + libSM zlib libpng openssl dbus freetype fontconfig glib ] # Qt doesn't directly need GLU (just GL), but many apps use, it's small and doesn't remain a runtime-dep if not used ++ optional mesaSupported mesa_glu ++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib @@ -129,7 +134,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin - "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include"; + "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include"; NIX_LDFLAGS = optionalString stdenv.isDarwin "-lglib-2.0"; diff --git a/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch index e8a4ba6a21510..fd226708a916c 100644 --- a/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch +++ b/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch @@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644 { m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); m_loaded = m_libUdev.load(); if (resolveMethods()) return true; - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); m_loaded = m_libUdev.load(); return resolveMethods(); } diff --git a/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch index e1e66a3ce95a3..bb304392af4c8 100644 --- a/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch +++ b/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch @@ -16,10 +16,10 @@ index 09940ab..45460f9 100644 { if (!udevLibrary->isLoaded()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); if (!udevLibrary->load()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); if (!udevLibrary->load()) { qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); return false; diff --git a/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch index 1fc4bbd607652..4ec1947f6f95f 100644 --- a/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch +++ b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch @@ -10,8 +10,8 @@ diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.co QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = -+QMAKE_INCDIR_OPENGL = @mesa@/include -+QMAKE_LIBDIR_OPENGL = @mesa@/lib ++QMAKE_INCDIR_OPENGL = @mesa_inc@/include ++QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_EGL = diff --git a/pkgs/development/libraries/qt-5/5.4/default.nix b/pkgs/development/libraries/qt-5/5.4/default.nix index 136c352d1aa5a..5807e6858723f 100644 --- a/pkgs/development/libraries/qt-5/5.4/default.nix +++ b/pkgs/development/libraries/qt-5/5.4/default.nix @@ -15,6 +15,7 @@ , bison2 , mesa_noglu +, libudev , cups , gnome @@ -214,13 +215,18 @@ let serialport = callPackage ( - { qtSubmodule, base }: + { qtSubmodule, base, substituteAll }: qtSubmodule { name = "qtserialport"; qtInputs = [ base ]; patchFlags = "-p2"; # patches originally for monolithic build - patches = [ ./0009-dlopen-serialport-udev.patch ]; + patches = [ + (substituteAll { + src = ./0009-dlopen-serialport-udev.patch; + libudev = libudev.out; + }) + ]; } ) {}; @@ -268,7 +274,7 @@ let ( { qtSubmodule, declarative, location, multimedia, sensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt - , sqlite, udev + , sqlite, libudev , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -287,21 +293,22 @@ let (substituteAll { src = ./0002-dlopen-webkit-nsplugin.patch; - inherit gtk gdk_pixbuf; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; } ) ++ optional flashplayerFix (substituteAll { src = ./0007-dlopen-webkit-gtk.patch; - inherit gtk; + gtk = gtk.out; } ) ++ [ (substituteAll { src = ./0008-dlopen-webkit-udev.patch; - inherit udev; + libudev = libudev.out; } ) ]; diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index 30d53eb874bec..2b7052e1ca625 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -44,8 +44,8 @@ stdenv.mkDerivation { substituteInPlace qtbase/configure --replace /bin/pwd pwd substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ - --replace /usr/share/X11/locale ${libX11}/share/X11/locale \ - --replace /usr/lib/X11/locale ${libX11}/share/X11/locale + --replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \ + --replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf ''; @@ -54,25 +54,27 @@ stdenv.mkDerivation { (substituteAll { src = ./0001-dlopen-gtkstyle.patch; # substituteAll ignores env vars starting with capital letter - gconf = GConf; - inherit gnome_vfs libgnomeui gtk; + gconf = GConf.out; + gtk = gtk.out; + libgnomeui = libgnomeui.out; + gnome_vfs = gnome_vfs.out; }) ++ [ (substituteAll { src = ./0004-dlopen-resolv.patch; - glibc = stdenv.cc.libc; + glibc = stdenv.cc.libc.out; }) (substituteAll { src = ./0005-dlopen-gl.patch; openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path"; }) ./0006-tzdir.patch - (substituteAll { src = ./0010-dlopen-libXcursor.patch; inherit libXcursor; }) - (substituteAll { src = ./0011-dlopen-openssl.patch; inherit openssl; }) - (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus; }) + (substituteAll { src = ./0010-dlopen-libXcursor.patch; libXcursor = libXcursor.out; }) + (substituteAll { src = ./0011-dlopen-openssl.patch; openssl = openssl.out; }) + (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus.lib; }) ./0013-xdg_config_dirs.patch ] ++ optional mesaSupported - (substituteAll { src = ./0014-mkspecs-libgl.patch; inherit mesa; }) + (substituteAll { src = ./0014-mkspecs-libgl.patch; mesa_inc = mesa.dev; mesa_lib = mesa.out; }) ++ (optional decryptSslTraffic ./0100-ssl.patch); preConfigure = '' @@ -160,11 +162,11 @@ stdenv.mkDerivation { # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag # if dependency paths contain the string "pq", which can occur in the hash. # To prevent these failures, we need to override PostgreSQL detection. - PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq"; + PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq"; propagatedBuildInputs = [ xorg.libXcomposite libX11 libxcb libXext libXrender libXi - fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre + fontconfig freetype openssl dbus glib udev libxml2 libxslt pcre zlib libjpeg libpng libtiff sqlite icu xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch index 0f418e600f151..3a60abb5f4a05 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch @@ -17,8 +17,8 @@ index 8d6fb6f..0ff9181 100644 QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = -+QMAKE_INCDIR_OPENGL = @mesa@/include -+QMAKE_LIBDIR_OPENGL = @mesa@/lib ++QMAKE_INCDIR_OPENGL = @mesa_inc@/include ++QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_EGL = diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 7c48c4571d92b..1ec89acfcd21d 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation { substituteInPlace qtbase/configure --replace /bin/pwd pwd substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ - --replace /usr/share/X11/locale ${libX11}/share/X11/locale \ - --replace /usr/lib/X11/locale ${libX11}/share/X11/locale + --replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \ + --replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf ''; @@ -57,12 +57,14 @@ stdenv.mkDerivation { let dlopen-gtkstyle = substituteAll { src = ./0001-dlopen-gtkstyle.patch; # substituteAll ignores env vars starting with capital letter - gconf = GConf; - inherit gnome_vfs libgnomeui gtk; + gconf = GConf.out; + gtk = gtk.out; + libgnomeui = libgnomeui.out; + gnome_vfs = gnome_vfs.out; }; dlopen-resolv = substituteAll { src = ./0002-dlopen-resolv.patch; - glibc = stdenv.cc.libc; + glibc = stdenv.cc.libc.out; }; dlopen-gl = substituteAll { src = ./0003-dlopen-gl.patch; @@ -71,21 +73,22 @@ stdenv.mkDerivation { tzdir = ./0004-tzdir.patch; dlopen-libXcursor = substituteAll { src = ./0005-dlopen-libXcursor.patch; - inherit libXcursor; + libXcursor = libXcursor.out; }; dlopen-openssl = substituteAll { src = ./0006-dlopen-openssl.patch; - inherit openssl; + openssl = openssl.out; }; dlopen-dbus = substituteAll { src = ./0007-dlopen-dbus.patch; - dbus_libs = dbus; + dbus_libs = dbus.lib; }; xdg-config-dirs = ./0008-xdg-config-dirs.patch; decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch; mkspecs-libgl = substituteAll { src = ./0010-mkspecs-libgl.patch; - inherit mesa; + mesa_inc = mesa.dev; + mesa_lib = mesa.out; }; nix-profiles-library-paths = ./0011-nix-profiles-library-paths.patch; in [ @@ -181,11 +184,11 @@ stdenv.mkDerivation { # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag # if dependency paths contain the string "pq", which can occur in the hash. # To prevent these failures, we need to override PostgreSQL detection. - PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq"; + PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq"; propagatedBuildInputs = [ xlibs.libXcomposite libX11 libxcb libXext libXrender libXi - fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre + fontconfig freetype openssl dbus glib udev libxml2 libxslt pcre zlib libjpeg libpng libtiff sqlite icu xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] diff --git a/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch index 6636cc9265a85..3a813dc800745 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch @@ -16,10 +16,10 @@ index 6f2cabd..81b9849 100644 { if (!udevLibrary->isLoaded()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); if (!udevLibrary->load()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); if (!udevLibrary->load()) { qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); return false; diff --git a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix index fa7383fc1e767..32549c95344a1 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix @@ -1,7 +1,12 @@ -{ qtSubmodule, qtbase }: +{ qtSubmodule, qtbase, substituteAll, libudev }: qtSubmodule { name = "qtserialport"; qtInputs = [ qtbase ]; - patches = [ ./0001-dlopen-serialport-udev.patch ]; + patches = [ + (substituteAll { + src = ./0001-dlopen-serialport-udev.patch; + libudev = libudev.out; + }) + ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch index f3b9d407bd726..1c360cd81aa2d 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch @@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644 { m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); m_loaded = m_libUdev.load(); if (resolveMethods()) return true; - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); m_loaded = m_libUdev.load(); return resolveMethods(); } diff --git a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix index 596c02d39afb1..2e92391f4c085 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix @@ -1,6 +1,6 @@ { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtmultimedia, qtsensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt -, sqlite, udev +, sqlite, libudev , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -18,15 +18,16 @@ qtSubmodule { patches = let dlopen-webkit-nsplugin = substituteAll { src = ./0001-dlopen-webkit-nsplugin.patch; - inherit gtk gdk_pixbuf; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; }; dlopen-webkit-gtk = substituteAll { src = ./0002-dlopen-webkit-gtk.patch; - inherit gtk; + gtk = gtk.out; }; dlopen-webkit-udev = substituteAll { src = ./0003-dlopen-webkit-udev.patch; - inherit udev; + libudev = libudev.out; }; in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] ++ [ dlopen-webkit-udev ]; diff --git a/pkgs/development/libraries/rdkafka/default.nix b/pkgs/development/libraries/rdkafka/default.nix index 947b06021cd21..32fff70ebfbaa 100644 --- a/pkgs/development/libraries/rdkafka/default.nix +++ b/pkgs/development/libraries/rdkafka/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { buildInputs = [ zlib perl ]; + NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow"; + postPatch = '' patchShebangs . ''; diff --git a/pkgs/development/libraries/readline/6.3.nix b/pkgs/development/libraries/readline/6.3.nix index f770fabb35d34..11d4271b168b6 100644 --- a/pkgs/development/libraries/readline/6.3.nix +++ b/pkgs/development/libraries/readline/6.3.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn"; }; + outputs = [ "dev" "out" "doc" ]; + propagatedBuildInputs = [ncurses]; patchFlags = "-p0"; diff --git a/pkgs/development/libraries/schroedinger/default.nix b/pkgs/development/libraries/schroedinger/default.nix index 33f5ba867d6a1..2df7d05189425 100644 --- a/pkgs/development/libraries/schroedinger/default.nix +++ b/pkgs/development/libraries/schroedinger/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, orc, pkgconfig}: +{ stdenv, fetchurl, orc, pkgconfig }: stdenv.mkDerivation { name = "schroedinger-1.0.11"; @@ -11,16 +11,12 @@ stdenv.mkDerivation { sha256 = "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"; }; - buildInputs = [orc pkgconfig]; + outputs = [ "dev" "out" "docdev" ]; - # The test suite is known not to build against Orc >0.4.16 in Schroedinger 1.0.11. - # A fix is in upstream, so test when pulling 1.0.12 if this is still needed. See: - # http://www.mail-archive.com/schrodinger-devel@lists.sourceforge.net/msg00415.html - preBuild = '' - substituteInPlace Makefile \ - --replace "SUBDIRS = schroedinger doc tools testsuite" "SUBDIRS = schroedinger doc tools" \ - --replace "DIST_SUBDIRS = schroedinger doc tools testsuite" "DIST_SUBDIRS = schroedinger doc tools" - ''; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ orc ]; + + doCheck = true; meta = with stdenv.lib; { homepage = "http://diracvideo.org/"; diff --git a/pkgs/development/libraries/scmccid/default.nix b/pkgs/development/libraries/scmccid/default.nix index 7dcde2a09a8c5..f9845d60b4903 100644 --- a/pkgs/development/libraries/scmccid/default.nix +++ b/pkgs/development/libraries/scmccid/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ patchelf ]; installPhase = '' - RPATH=${libusb}/lib:${stdenv.cc.libc}/lib + RPATH=${libusb}/lib:${stdenv.cc.libc.out}/lib for a in proprietary/*/Contents/Linux/*.so*; do if ! test -L $a; then diff --git a/pkgs/development/libraries/slang/default.nix b/pkgs/development/libraries/slang/default.nix index bf1f38fbb83d7..e83718673aaea 100644 --- a/pkgs/development/libraries/slang/default.nix +++ b/pkgs/development/libraries/slang/default.nix @@ -7,20 +7,29 @@ stdenv.mkDerivation rec { sha256 = "0aqd2cjabj6nhd4r3dc4vhqif2bf3dmqnrn2gj0xm4gqyfd177jy"; }; + outputs = [ "dev" "out" "doc" ]; + # Fix some wrong hardcoded paths preConfigure = '' - sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" configure - sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" src/sltermin.c + sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure + sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c sed -i -e "s|/bin/ln|ln|" src/Makefile.in + sed -i -e "s|-ltermcap|-lncurses|" ./configure ''; configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}"; - buildInputs = [ncurses pcre libpng zlib readline]; + buildInputs = [ pcre libpng zlib readline ]; + propagatedBuildInputs = [ ncurses ]; + + postInstall = '' + find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \; + sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc + ''; - meta = { + meta = with stdenv.lib; { description = "A multi-platform programmer's library designed to allow a developer to create robust software"; homepage = http://www.jedsoft.org/slang/; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = [ maintainers.fuuzetsu ]; }; } diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index c2473ae2c5db5..2f300abebbf16 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/smpeg-config \ --prefix PATH ":" "${pkgconfig}/bin" \ - --prefix PKG_CONFIG_PATH ":" "${SDL}/lib/pkgconfig" + --prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig" ''; meta = { diff --git a/pkgs/development/libraries/socket_wrapper/default.nix b/pkgs/development/libraries/socket_wrapper/default.nix index 0c6f40c8b1430..bff4f393d1dbe 100644 --- a/pkgs/development/libraries/socket_wrapper/default.nix +++ b/pkgs/development/libraries/socket_wrapper/default.nix @@ -9,6 +9,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ (stdenv.cc.libc.out or null) ]; meta = with stdenv.lib; { description = "a library passing all socket communications through unix sockets"; diff --git a/pkgs/development/libraries/speex/default.nix b/pkgs/development/libraries/speex/default.nix index 9a1c00e63b9d3..8e3cf899e40b4 100644 --- a/pkgs/development/libraries/speex/default.nix +++ b/pkgs/development/libraries/speex/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { name = "speex-1.2rc2"; - + src = fetchurl { url = "http://downloads.us.xiph.org/releases/speex/${name}.tar.gz"; sha256 = "14g8ph39inkrif749lzjm089g7kwk0hymq1a3i9ch5gz8xr7r8na"; @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { postPatch = '' sed -i '/AC_CONFIG_MACRO_DIR/i PKG_PROG_PKG_CONFIG' configure.ac ''; - + + outputs = [ "dev" "out" "doc" ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ fftw speexdsp ]; diff --git a/pkgs/development/libraries/speexdsp/default.nix b/pkgs/development/libraries/speexdsp/default.nix index 7112afbea8a29..56b1900837ac6 100644 --- a/pkgs/development/libraries/speexdsp/default.nix +++ b/pkgs/development/libraries/speexdsp/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { patches = [ ./build-fix.patch ]; postPatch = "sed '3i#include <stdint.h>' -i ./include/speex/speexdsp_config_types.h.in"; + outputs = [ "dev" "out" "doc" ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ fftw ]; diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index d9fbde9aa09c8..1a62381927346 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation { sha1 = "dae1ae5297fece9671ae0c434a7ecd0cda09c76a"; }; + outputs = [ "dev" "out" "bin" ]; + buildInputs = lib.optionals interactive [ readline ncurses ]; configureFlags = [ "--enable-threadsafe" ]; diff --git a/pkgs/development/libraries/uid_wrapper/default.nix b/pkgs/development/libraries/uid_wrapper/default.nix index 35d7f53173fb5..0675ec68b4e8a 100644 --- a/pkgs/development/libraries/uid_wrapper/default.nix +++ b/pkgs/development/libraries/uid_wrapper/default.nix @@ -9,6 +9,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ (stdenv.cc.libc.out or null) ]; meta = with stdenv.lib; { description = "a wrapper for the user, group and hosts NSS API"; diff --git a/pkgs/development/libraries/webkitgtk/2.4.nix b/pkgs/development/libraries/webkitgtk/2.4.nix index 8ad3fcd0428de..607c706fdb598 100644 --- a/pkgs/development/libraries/webkitgtk/2.4.nix +++ b/pkgs/development/libraries/webkitgtk/2.4.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, perl, python, ruby, bison, gperf, flex , pkgconfig, which, gettext, gobjectIntrospection , gtk2, gtk3, wayland, libwebp, enchant, sqlite -, libxml2, libsoup, libsecret, libxslt, harfbuzz +, libxml2, libsoup, libsecret, libxslt, harfbuzz, xorg , gst-plugins-base , withGtk2 ? false , enableIntrospection ? true @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2 wayland libwebp enchant libxml2 libsecret libxslt - gst-plugins-base sqlite + gst-plugins-base sqlite xorg.libXt ]; propagatedBuildInputs = [ diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 4df1ba71c11f3..3637bec63ce64 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -2,7 +2,7 @@ , pkgconfig, gettext, gobjectIntrospection, libnotify , gtk2, gtk3, wayland, libwebp, enchant , libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs -, enableGeoLocation ? true, geoclue2, sqlite +, enableGeoLocation ? true, geoclue2, sqlite, xorg , gst-plugins-base }: @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2 wayland libwebp enchant libnotify libxml2 libsecret libxslt harfbuzz libpthreadstubs - gst-plugins-base + gst-plugins-base xorg.libXt ] ++ optional enableGeoLocation geoclue2; propagatedBuildInputs = [ diff --git a/pkgs/development/libraries/wildmidi/default.nix b/pkgs/development/libraries/wildmidi/default.nix index 8660d15e06a38..4dec0555ae9fe 100644 --- a/pkgs/development/libraries/wildmidi/default.nix +++ b/pkgs/development/libraries/wildmidi/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = [ alsaLib ]; + buildInputs = [ alsaLib stdenv.cc.libc/*couldn't find libm*/ ]; preConfigure = '' substituteInPlace CMakeLists.txt \ diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix index d7ca92f70d9b0..90cc1d995a5a9 100644 --- a/pkgs/development/libraries/wxGTK-2.8/default.nix +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -33,10 +33,10 @@ stdenv.mkDerivation rec { # These variables are used by configure to find some dependencies. SEARCH_INCLUDE = - "${libXinerama}/include ${libSM}/include ${libXxf86vm}/include"; + "${libXinerama.dev}/include ${libSM.dev}/include ${libXxf86vm.dev}/include"; SEARCH_LIB = - "${libXinerama}/lib ${libSM}/lib ${libXxf86vm}/lib " - + optionalString withMesa "${mesa}/lib "; + "${libXinerama.out}/lib ${libSM.out}/lib ${libXxf86vm.out}/lib " + + optionalString withMesa "${mesa.out}/lib "; # Work around a bug in configure. NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1"; diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 6c541f1aa6825..26e3231450344 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { sed -i s,/bin/bash,${stdenv.shell}, configure version.sh ''; + outputs = [ "out" "lib" ]; # leaving 52 kB of headers + configureFlags = [ "--enable-shared" ] ++ stdenv.lib.optional (!stdenv.isi686) "--enable-pic" ++ stdenv.lib.optional (enable10bit) "--bit-depth=10"; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 93474d14344e1..4f2b9a594e52d 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -2,7 +2,7 @@ let version = "1.2.8"; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "zlib-${version}"; src = fetchurl { @@ -20,15 +20,31 @@ stdenv.mkDerivation (rec { --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"' ''; - configureFlags = if static then "" else "--shared"; + outputs = [ "dev" "out" "static" ]; + setOutputFlags = false; + outputDoc = "dev"; # single tiny man3 page + preConfigure = '' if test -n "$crossConfig"; then export CC=$crossConfig-gcc - configureFlags=${if static then "" else "--shared"} fi ''; + configureFlags = stdenv.lib.optional (!static) "--shared"; + + postInstall = '' + _moveToOutput lib/libz.a "$static" + '' + # jww (2015-01-06): Sometimes this library install as a .so, even on + # Darwin; others time it installs as a .dylib. I haven't yet figured out + # what causes this difference. + + stdenv.lib.optionalString stdenv.isDarwin '' + for file in $out/lib/*.so* $out/lib/*.dylib* ; do + install_name_tool -id "$file" $file + done + ''; + # As zlib takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc"; @@ -57,13 +73,5 @@ stdenv.mkDerivation (rec { license = licenses.zlib; platforms = platforms.all; }; -} // (if stdenv.isDarwin then { - postInstall = '' - # jww (2015-01-06): Sometimes this library install as a .so, even on - # Darwin; others time it installs as a .dylib. I haven't yet figured out - # what causes this difference. - for file in $out/lib/*.so* $out/lib/*.dylib* ; do - install_name_tool -id "$file" $file - done - ''; -} else {})) +} + diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index 595c98f76aaa2..0ae5fc3b5403f 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -54,8 +54,8 @@ stdenv.mkDerivation rec { find $out \( \ \( -type f -a -name "*.so*" \) -o \ \( -type f -a -perm -0100 \) \ - \) -exec patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-*so.? \ - --set-rpath ${zlib}/lib:${ncurses}/lib {} \; + \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \ + --set-rpath ${stdenv.lib.makeLibraryPath [ zlib ncurses ]} {} \; # fix ineffective PROGDIR / MYNDKDIR determination for i in ndk-build ndk-gdb ndk-gdb-py do diff --git a/pkgs/development/mobile/androidenv/androidndk_r8e.nix b/pkgs/development/mobile/androidenv/androidndk_r8e.nix index 90994ae708e50..d3f66c918ec77 100644 --- a/pkgs/development/mobile/androidenv/androidndk_r8e.nix +++ b/pkgs/development/mobile/androidenv/androidndk_r8e.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { find $out \( \ \( -type f -a -name "*.so*" \) -o \ \( -type f -a -perm -0100 \) \ - \) -exec patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-*so.? \ + \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \ --set-rpath ${zlib}/lib:${ncurses}/lib {} \; # fix ineffective PROGDIR / MYNDKDIR determination for i in ndk-build ndk-gdb ndk-gdb-py diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index 02c1546ace7b2..eb0c4295bcd5d 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -7,6 +7,8 @@ }: { platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false, useGooglePlayServices ? false }: +with { inherit (stdenv.lib) makeLibraryPath; }; + stdenv.mkDerivation rec { name = "android-sdk-${version}"; version = "24.4"; @@ -39,7 +41,7 @@ stdenv.mkDerivation rec { for i in emulator emulator-arm emulator-mips emulator-x86 mksdcard do - patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i + patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i done @@ -48,7 +50,7 @@ stdenv.mkDerivation rec { for i in emulator64-arm emulator64-mips emulator64-x86 do - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $i + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i patchelf --set-rpath ${stdenv.cc.cc}/lib64 $i done ''} @@ -58,7 +60,7 @@ stdenv.mkDerivation rec { wrapProgram `pwd`/android \ --prefix PATH : ${jdk}/bin \ - --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib + --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ glib gtk libXtst ]} wrapProgram `pwd`/uiautomatorviewer \ --prefix PATH : ${jdk}/bin \ @@ -74,7 +76,7 @@ stdenv.mkDerivation rec { do wrapProgram `pwd`/$i \ --prefix PATH : ${file}/bin \ - --suffix LD_LIBRARY_PATH : `pwd`/lib:${libX11_32bit}/lib:${libxcb_32bit}/lib:${libXau_32bit}/lib:${libXdmcp_32bit}/lib:${libXext_32bit}/lib:${mesa_32bit}/lib + --suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ libX11_32bit libxcb_32bit libXau_32bit libXdmcp_32bit libXext_32bit mesa_32bit ]} done ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' @@ -82,7 +84,7 @@ stdenv.mkDerivation rec { do wrapProgram `pwd`/$i \ --prefix PATH : ${file}/bin \ - --suffix LD_LIBRARY_PATH : `pwd`/lib:${libX11}/lib:${libxcb}/lib:${libXau}/lib:${libXdmcp}/lib:${libXext}/lib:${mesa}/lib:${alsaLib}/lib + --suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ libX11 libxcb libXau libXdmcp libXext mesa alsaLib ]} done ''} ''} @@ -94,11 +96,11 @@ stdenv.mkDerivation rec { # The monitor requires some more patching cd lib/monitor-x86 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 monitor - patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 monitor + patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so wrapProgram `pwd`/monitor \ - --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib:${libXtst}/lib + --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk atk stdenv.cc.cc libXtst ]} cd ../.. '' @@ -107,11 +109,11 @@ stdenv.mkDerivation rec { # The monitor requires some more patching cd lib/monitor-x86_64 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 monitor - patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 monitor + patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so wrapProgram `pwd`/monitor \ - --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib::${libXtst}/lib + --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk atk stdenv.cc.cc libXtst ]} cd ../.. '' diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix index 1b49c8f6fc4e9..f429a629f3167 100644 --- a/pkgs/development/mobile/androidenv/build-tools.nix +++ b/pkgs/development/mobile/androidenv/build-tools.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # Patch the interpreter for i in aapt aidl bcc_compat dexdump llvm-rs-cc do - patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i + patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i done # These binaries need to find libstdc++ and libgcc_s @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { # These binaries also need zlib in addition to libstdc++ for i in arm-linux-androideabi-ld i686-linux-android-ld mipsel-linux-android-ld split-select zipalign do - patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i + patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i done diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix index 1243ba429a39a..1654b13d13b1a 100644 --- a/pkgs/development/mobile/androidenv/platform-tools.nix +++ b/pkgs/development/mobile/androidenv/platform-tools.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { '' for i in adb dmtracedump fastboot hprof-conv sqlite3 do - patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i + patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:`pwd`/lib $i done diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix index 60cab19ecbdf8..0437edad63fe4 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix @@ -45,11 +45,11 @@ stdenv.mkDerivation { ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 titanium_prep.linux32 '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 '' else ""} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix index 47414e205a064..37ecf62706dec 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix @@ -44,11 +44,11 @@ stdenv.mkDerivation { ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 titanium_prep.linux32 '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 '' else ""} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix index 59a405f61fabd..b5f1c6c53122a 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix @@ -44,11 +44,11 @@ stdenv.mkDerivation { ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 titanium_prep.linux32 '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 '' else ""} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix index 041ba0d4a6cf2..a927a74729af0 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix @@ -44,11 +44,11 @@ stdenv.mkDerivation { ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 titanium_prep.linux32 '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 '' else ""} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.5.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.5.nix index f9c5ce8812f31..3fa119dda6558 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.5.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.5.nix @@ -44,11 +44,11 @@ stdenv.mkDerivation { ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux.so.2 titanium_prep.linux32 '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 + patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64 '' else ""} diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index f4837bd047f50..b6ee0d192e339 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation { postPatch = '' substituteInPlace "unittest.ml" \ --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}" - substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat}/lib" \ - substituteInPlace Makefile --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat}/include" \ + substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \ + substituteInPlace Makefile --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \ ''; configurePhase = "true"; # Skip configure diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix index 985e7946b6b4a..13b633f4704eb 100644 --- a/pkgs/development/perl-modules/DBD-SQLite/default.nix +++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix @@ -17,6 +17,10 @@ buildPerlPackage rec { ./external-sqlite.patch ]; + sqlite_dev = sqlite.dev; + sqlite_out = sqlite.out; + postPatch = "substituteAllInPlace Makefile.PL; cat Makefile.PL"; + preBuild = '' substituteInPlace Makefile --replace -L/usr/lib "" diff --git a/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch index 9a20fa2503997..1f90546b252c1 100644 --- a/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch +++ b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch @@ -1,39 +1,33 @@ -diff -rc DBD-SQLite-1.29/Makefile.PL DBD-SQLite-1.29-new/Makefile.PL -*** DBD-SQLite-1.29/Makefile.PL 2010-01-08 10:08:29.000000000 +0100 ---- DBD-SQLite-1.29-new/Makefile.PL 2010-08-05 11:42:53.000000000 +0200 -*************** -*** 123,129 **** - # a system sqlite is also sophisticated enough to have a patching system - # that can change the if ( 0 ) to if ( 1 ) - my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc); -! if ( 0 ) { - require File::Spec; - if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) { - $sqlite_base =~ /=(.*)/; ---- 123,129 ---- - # a system sqlite is also sophisticated enough to have a patching system - # that can change the if ( 0 ) to if ( 1 ) - my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc); -! if ( 1 ) { - require File::Spec; - if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) { - $sqlite_base =~ /=(.*)/; -*************** -*** 184,191 **** - } else { - # Always the bundled one. - # XXX: ... and this message should be more informative. -! $sqlite_local = 1; -! print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING}; - } - - @ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV ); ---- 184,191 ---- - } else { - # Always the bundled one. - # XXX: ... and this message should be more informative. -! # $sqlite_local = 1; -! # print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING}; - } - - @ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV ); +diff --git a/Makefile.PL b/Makefile.PL +index 606b28d..0cea060 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -128,24 +128,10 @@ SCOPE: { + # the system SQLite. We expect that anyone sophisticated enough to use + # a system sqlite is also sophisticated enough to have a patching system + # that can change the if ( 0 ) to if ( 1 ) +-my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc); +-if ( 0 ) { +- require File::Spec; +- if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) { +- $sqlite_base =~ /=(.*)/; +- $sqlite_base = $1; +- $sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' ); +- $sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' ); +- } +- if ( $sqlite_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) { +- $sqlite_local =~ /=(.*)/; +- $sqlite_local = "$1" ? 1 : 0; +- if ( $sqlite_local ) { +- # Keep these from making into CFLAGS/LDFLAGS +- undef $sqlite_lib; +- undef $sqlite_inc; +- } +- } ++my ($sqlite_local, $sqlite_lib, $sqlite_inc); ++if ( 1 ) { ++ $sqlite_lib = '@sqlite_out@/lib'; ++ $sqlite_inc = '@sqlite_dev@/include'; + + # Now check for a compatible sqlite3 + unless ( $sqlite_local ) { diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 7c51bf1b59179..9ee8be87c028d 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -28,6 +28,7 @@ preConfigure() { perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags } + postFixup() { # If a user installs a Perl package, she probably also wants its # dependencies in the user environment (since Perl modules don't diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 6cd4134cc9c41..91a004a7f686f 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -1,13 +1,15 @@ perl: -{ buildInputs ? [], ... } @ attrs: +{ buildInputs ? [], name, ... } @ attrs: perl.stdenv.mkDerivation ( { + outputs = [ "out" "docdev" ]; + doCheck = true; - + checkTarget = "test"; - + # Prevent CPAN downloads. PERL_AUTOINSTALL = "--skipdeps"; @@ -23,7 +25,7 @@ perl.stdenv.mkDerivation ( attrs // { - name = "perl-" + attrs.name; + name = "perl-" + name; builder = ./builder.sh; buildInputs = buildInputs ++ [ perl ]; } diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix index 6f71393304079..897210a4046c9 100644 --- a/pkgs/development/python-modules/pygobject/default.nix +++ b/pkgs/development/python-modules/pygobject/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"; }; - outputs = [ "out" "doc" ]; + outputs = [ "out" "docdev" ]; configureFlags = "--disable-introspection"; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 14be68988f841..e393d92b02f3d 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -2260,7 +2260,7 @@ let xml2 = old.xml2.overrideDerivation (attrs: { preConfigure = '' - export LIBXML_INCDIR=${pkgs.libxml2}/include/libxml2 + export LIBXML_INCDIR=${pkgs.libxml2.dev}/include/libxml2 patchShebangs configure ''; }); diff --git a/pkgs/development/tools/build-managers/cargo/snapshot.nix b/pkgs/development/tools/build-managers/cargo/snapshot.nix index ad07148815bb9..8f5467f631125 100644 --- a/pkgs/development/tools/build-managers/cargo/snapshot.nix +++ b/pkgs/development/tools/build-managers/cargo/snapshot.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { mkdir -p "$out" ./install.sh "--prefix=$out" '' + (if stdenv.isLinux then '' - patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ + patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \ "$out/bin/cargo" '' else "") + postInstall; diff --git a/pkgs/development/tools/build-managers/cmake/2.8.nix b/pkgs/development/tools/build-managers/cmake/2.8.nix index 60a941a66375f..80fdce59607be 100644 --- a/pkgs/development/tools/build-managers/cmake/2.8.nix +++ b/pkgs/development/tools/build-managers/cmake/2.8.nix @@ -47,8 +47,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = optional wantPS ps; - CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs; - + CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" + (concatMap (p: [ p p.out ]) buildInputs); + configureFlags = "--docdir=/share/doc/${name} --mandir=/share/man --system-libs" + stdenv.lib.optionalString useQt4 " --qt-gui"; diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 59bcfe45ea22c..4a9feeb776e80 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib , useNcurses ? false, ncurses, useQt4 ? false, qt4 , wantPS ? false, ps ? null @@ -25,8 +25,6 @@ stdenv.mkDerivation rec { sha256 = "1shwim3gfdybjx9f11ykxz5l09rh58vmvz8ip76q3i76mkv2pf55"; }; - enableParallelBuilding = true; - patches = # Don't search in non-Nix locations such as /usr, but do search in # Nixpkgs' Glibc. @@ -38,18 +36,28 @@ stdenv.mkDerivation rec { sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv"; }) ++ stdenv.lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; + outputs = [ "out" "doc" ]; + setOutputFlags = false; + + setupHook = ./setup-hook.sh; + buildInputs = - [ bzip2 curl expat libarchive xz zlib ] + [ setupHook pkgconfig bzip2 curl expat libarchive xz zlib ] ++ optional useNcurses ncurses ++ optional useQt4 qt4; propagatedBuildInputs = optional wantPS ps; - CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs; - + preConfigure = with stdenv; optionalString (stdenv ? glibc) + '' + fixCmakeFiles . + substituteInPlace Modules/Platform/UnixPaths.cmake \ + --subst-var-by glibc_bin ${glibc.bin or glibc} \ + --subst-var-by glibc_dev ${glibc.dev or glibc} \ + --subst-var-by glibc_lib ${glibc.out or glibc} + ''; configureFlags = [ "--docdir=/share/doc/${name}" - "--mandir=/share/man" "--no-system-jsoncpp" ] ++ optional (!stdenv.isCygwin) "--system-libs" @@ -57,22 +65,18 @@ stdenv.mkDerivation rec { ++ ["--"] ++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF"; - setupHook = ./setup-hook.sh; - dontUseCmakeConfigure = true; - preConfigure = optionalString (stdenv ? glibc) - '' - source $setupHook - fixCmakeFiles . - substituteInPlace Modules/Platform/UnixPaths.cmake \ - --subst-var-by glibc ${stdenv.glibc} - ''; + enableParallelBuilding = true; + + preInstall = ''mkdir "$doc" ''; + + postInstall = ''_moveToOutput "share/cmake-*/Help" "$doc" ''; - meta = { + meta = with stdenv.lib; { homepage = http://www.cmake.org/; description = "Cross-Platform Makefile Generator"; - platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all; - maintainers = with stdenv.lib.maintainers; [ urkud mornfall ttuegel ]; + platforms = if useQt4 then qt4.meta.platforms else platforms.all; + maintainers = with maintainers; [ urkud mornfall ttuegel ]; }; } diff --git a/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch b/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch index b0447e7060712..0a2d4ad43ab7d 100644 --- a/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch +++ b/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch @@ -53,21 +53,21 @@ index 20ee1d1..39834e6 100644 - -list(APPEND CMAKE_SYSTEM_PROGRAM_PATH - /usr/pkg/bin -+ "@glibc@" ++ "@glibc_bin@" ) list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 -+ "@glibc@/lib" ++ "@glibc_lib@/lib" ) list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES - /usr/include -+ "@glibc@/include" ++ "@glibc_dev@/include" ) list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES - /usr/include -+ "@glibc@/include" ++ "@glibc_dev@/include" ) # Enable use of lib64 search path variants by default. diff --git a/pkgs/development/tools/build-managers/gnumake/4.1/default.nix b/pkgs/development/tools/build-managers/gnumake/4.1/default.nix index 9ac2010701828..de6f96ce99f6c 100644 --- a/pkgs/development/tools/build-managers/gnumake/4.1/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/4.1/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation { ./no-tty-name.patch ]; + outputs = [ "out" "doc" ]; + meta = { homepage = http://www.gnu.org/software/make/; description = "A tool to control the generation of non-source files from sources"; diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix index bba50b3208920..d2ddcabc0b1eb 100644 --- a/pkgs/development/tools/misc/autogen/default.nix +++ b/pkgs/development/tools/misc/autogen/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0sfmmy19k9z0j3f738fyk6ljf6b66410cvd5zzyplxi2683j10qs"; }; + outputs = [ "dev" "bin" "lib" "out" "man" "info" ]; + nativeBuildInputs = [ which pkgconfig perl ]; buildInputs = [ guile libxml2 ]; @@ -20,6 +22,17 @@ stdenv.mkDerivation rec { substituteInPlace pkg/libopts/mklibsrc.sh --replace /tmp $TMPDIR ''; + postInstall = '' + mkdir -p $dev/bin + mv $bin/bin/autoopts-config $dev/bin + + for f in $lib/lib/autogen/tpl-config.tlib $out/share/autogen/tpl-config.tlib; do + sed -e "s|$dev/include|/no-such-autogen-include-path|" -i $f + sed -e "s|$bin/bin|/no-such-autogen-bin-path|" -i $f + sed -e "s|$lib/lib|/no-such-autogen-lib-path|" -i $f + done + ''; + #doCheck = true; # 2 tests fail because of missing /dev/tty meta = with stdenv.lib; { diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 61824eb607bec..ceec956004f5c 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -34,6 +34,8 @@ stdenv.mkDerivation rec { ./pt-pax-flags-20121023.patch ]; + outputs = (optional (cross == null) "dev") ++ [ "out" "info" ]; + nativeBuildInputs = optional gold bison; buildInputs = [ zlib ]; @@ -67,6 +69,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postFixup = optionalString (cross == null) "ln -s $out/bin $dev/bin"; # tools needed for development + meta = { description = "Tools for manipulating binaries (linker, assembler, etc.)"; diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix index cb534d511eaf5..0751f51281ded 100644 --- a/pkgs/development/tools/misc/drush/default.nix +++ b/pkgs/development/tools/misc/drush/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { mkdir -p "$out" cp -r . "$out/src" mkdir "$out/bin" - wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses}/bin" + wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses.dev}/bin" ln -s "$out/src/drush" "$out/bin/drush" ''; } diff --git a/pkgs/development/tools/misc/eggdbus/default.nix b/pkgs/development/tools/misc/eggdbus/default.nix index 97031a533fae9..9f04e28372225 100644 --- a/pkgs/development/tools/misc/eggdbus/default.nix +++ b/pkgs/development/tools/misc/eggdbus/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "118hj63ac65zlg71kydv4607qcg1qpdlql4kvhnwnnhar421jnq4"; }; - buildInputs = [ pkgconfig glib dbus.libs dbus_glib ]; + buildInputs = [ pkgconfig glib dbus dbus_glib ]; meta = { homepage = http://hal.freedesktop.org/releases/; diff --git a/pkgs/development/tools/misc/global/default.nix b/pkgs/development/tools/misc/global/default.nix index 63b29fccd5277..741b494ec398e 100644 --- a/pkgs/development/tools/misc/global/default.nix +++ b/pkgs/development/tools/misc/global/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-ltdl-include=${libtool}/include" - "--with-ltdl-lib=${libtool}/lib" + "--with-ltdl-lib=${libtool.lib}/lib" "--with-ncurses=${ncurses}" "--with-sqlite3=${sqlite}" "--with-exuberant-ctags=${ctags}/bin/ctags" diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix index 5d27b469680b0..27ec2772e0953 100644 --- a/pkgs/development/tools/misc/libtool/libtool2.nix +++ b/pkgs/development/tools/misc/libtool/libtool2.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1qq61k6lp1fp75xs398yzi6wvbx232l7xbyn3p13cnh27mflvgg3"; }; + outputs = [ "out" "lib" ]; + propagatedNativeBuildInputs = [ m4 ]; nativeBuildInputs = [ perl help2man ]; @@ -43,4 +45,3 @@ stdenv.mkDerivation rec { maintainers = [ ]; }; } - diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 5aa81e46bed13..b3121ac7944d2 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { setupHook = [ ./setup-hook.sh ]; + #doCheck = true; # problems when loading libc.so.6 + meta = { homepage = http://nixos.org/patchelf.html; license = "GPL"; diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index 6eea0a6d5d6bf..127223c4ee15c 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -1,24 +1,30 @@ -{stdenv, fetchurl, automake, libiconv, vanilla ? false}: +{stdenv, fetchurl, automake, libiconv, vanilla ? false }: -stdenv.mkDerivation (rec { +let + inherit (stdenv.lib) optional; +in +stdenv.mkDerivation rec { name = "pkg-config-0.29"; - + setupHook = ./setup-hook.sh; - + src = fetchurl { url = "http://pkgconfig.freedesktop.org/releases/${name}.tar.gz"; sha256 = "0sq09a39wj4cxf8l2jvkq067g08ywfma4v6nhprnf351s82pfl68"; }; + # Process Requires.private properly, see + # http://bugs.freedesktop.org/show_bug.cgi?id=4738. + patches = optional (!vanilla) ./requires-private.patch + ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch; - buildInputs = stdenv.lib.optional (stdenv.isCygwin || stdenv.isDarwin) libiconv; + buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin) libiconv; + + preConfigure = stdenv.lib.optionalString (stdenv.system == "mips64el-linux") + ''cp -v ${automake}/share/automake*/config.{sub,guess} .''; configureFlags = [ "--with-internal-glib" ]; - patches = (if vanilla then [] else [ - # Process Requires.private properly, see - # http://bugs.freedesktop.org/show_bug.cgi?id=4738. - ./requires-private.patch - ]) ++ stdenv.lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch; + postInstall = ''rm "$out"/bin/*-pkg-config''; # clean the duplicate file meta = { description = "A tool that allows packages to find out information about other packages"; @@ -26,9 +32,5 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; -} // (if stdenv.system == "mips64el-linux" then - { - preConfigure = '' - cp -v ${automake}/share/automake*/config.{sub,guess} . - ''; - } else {})) +} + diff --git a/pkgs/development/tools/misc/texinfo/5.2.nix b/pkgs/development/tools/misc/texinfo/5.2.nix index c43ebcd2de28b..a9edccbd200dd 100644 --- a/pkgs/development/tools/misc/texinfo/5.2.nix +++ b/pkgs/development/tools/misc/texinfo/5.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, perl, xz, interactive ? false }: +{ stdenv, fetchurl, xz, ncurses, perl, interactive ? false }: stdenv.mkDerivation rec { name = "texinfo-5.2"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"; }; - buildInputs = [ perl xz ] + buildInputs = [ perl xz.bin ] ++ stdenv.lib.optional interactive ncurses; preInstall = '' diff --git a/pkgs/development/tools/node-webkit/nw11.nix b/pkgs/development/tools/node-webkit/nw11.nix index ed3b99aad0096..2fe1ddf42d439 100644 --- a/pkgs/development/tools/node-webkit/nw11.nix +++ b/pkgs/development/tools/node-webkit/nw11.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev, libcap +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap , libnotify}: let bits = if stdenv.system == "x86_64-linux" then "x64" @@ -35,7 +35,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot - ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0 + ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot diff --git a/pkgs/development/tools/node-webkit/nw12.nix b/pkgs/development/tools/node-webkit/nw12.nix index 7492acb136782..4cacc75d77768 100644 --- a/pkgs/development/tools/node-webkit/nw12.nix +++ b/pkgs/development/tools/node-webkit/nw12.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev, libcap +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap , libnotify}: let bits = if stdenv.system == "x86_64-linux" then "x64" @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nwjc - ln -s ${udev}/lib/libudev.so $out/share/nwjs/libudev.so.0 + ln -s ${libudev.out}/lib/libudev.so $out/share/nwjs/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/nwjs" $out/share/nwjs/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/nwjs" $out/share/nwjs/nwjc diff --git a/pkgs/development/tools/node-webkit/nw9.nix b/pkgs/development/tools/node-webkit/nw9.nix index 213b94102b0d7..d8601865c6d14 100644 --- a/pkgs/development/tools/node-webkit/nw9.nix +++ b/pkgs/development/tools/node-webkit/nw9.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev}: +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev }: let bits = if stdenv.system == "x86_64-linux" then "x64" else "ia32"; @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot - ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0 + ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot diff --git a/pkgs/development/tools/phantomjs/default.nix b/pkgs/development/tools/phantomjs/default.nix index 77bc1e5a885fd..8b6b655b6a56b 100644 --- a/pkgs/development/tools/phantomjs/default.nix +++ b/pkgs/development/tools/phantomjs/default.nix @@ -1,6 +1,9 @@ -{ stdenv, fetchurl, freetype, fontconfig, openssl, unzip }: +{ stdenv, lib, fetchurl, freetype, fontconfig, openssl, unzip }: -assert stdenv.lib.elem stdenv.system [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; +let + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; +in +assert lib.elem stdenv.system platforms; stdenv.mkDerivation rec { name = "phantomjs-1.9.8"; @@ -27,12 +30,12 @@ stdenv.mkDerivation rec { sha256 = "0j0aq8dgzmb210xdrh0v3d4nblskl3zsckl8bzf1a603wcx085cg"; }; - buildInputs = if stdenv.isDarwin then [ unzip ] else []; + buildInputs = lib.optional stdenv.isDarwin unzip; - buildPhase = if stdenv.isDarwin then "" else '' + buildPhase = lib.optionalString (!stdenv.isDarwin) '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${openssl}/lib" \ + --set-rpath "${stdenv.lib.makeLibraryPath [ freetype fontconfig stdenv.cc.cc stdenv.cc.cc openssl ]}" \ bin/phantomjs ''; @@ -60,9 +63,9 @@ stdenv.mkDerivation rec { ''; homepage = http://phantomjs.org/; - license = stdenv.lib.licenses.bsd3; + license = lib.licenses.bsd3; - maintainers = [ stdenv.lib.maintainers.bluescreen303 ]; - platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" ]; + maintainers = [ lib.maintainers.bluescreen303 ]; + inherit platforms; }; } diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix index 8d9db34446d6f..b2f566ece8de3 100644 --- a/pkgs/development/tools/selenium/chromedriver/default.nix +++ b/pkgs/development/tools/selenium/chromedriver/default.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin mv chromedriver $out/bin - patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver + patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver wrapProgram "$out/bin/chromedriver" \ - --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH" + --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64:${stdenv.lib.makeLibraryPath [ cairo fontconfig freetype gdk_pixbuf glib gtk libX11 nspr nss pango libXrender gconf libXext libXi ]}:\$LD_LIBRARY_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 085807e1bfadb..7d98028762949 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { # curl: curl rm opt/vagrant/embedded/bin/curl - ln -s ${curl}/bin/curl opt/vagrant/embedded/bin + ln -s ${curl.bin}/bin/curl opt/vagrant/embedded/bin # libarchive: bsdtar, bsdcpio rm opt/vagrant/embedded/bin/{bsdtar,bsdcpio} @@ -57,8 +57,8 @@ stdenv.mkDerivation rec { # openssl: c_rehash, openssl rm opt/vagrant/embedded/bin/{c_rehash,openssl} - ln -s ${openssl}/bin/c_rehash opt/vagrant/embedded/bin - ln -s ${openssl}/bin/openssl opt/vagrant/embedded/bin + ln -s ${openssl.bin}/bin/c_rehash opt/vagrant/embedded/bin + ln -s ${openssl.bin}/bin/openssl opt/vagrant/embedded/bin # ruby: erb, gem, irb, rake, rdoc, ri, ruby, testrb rm opt/vagrant/embedded/bin/{erb,gem,irb,rake,rdoc,ri,ruby,testrb} @@ -77,14 +77,14 @@ stdenv.mkDerivation rec { # libxml: xml2-config, xmlcatalog, xmllint rm opt/vagrant/embedded/bin/{xml2-config,xmlcatalog,xmllint} - ln -s ${libxml2}/bin/xml2-config opt/vagrant/embedded/bin - ln -s ${libxml2}/bin/xmlcatalog opt/vagrant/embedded/bin - ln -s ${libxml2}/bin/xmllint opt/vagrant/embedded/bin + ln -s ${libxml2.dev}/bin/xml2-config opt/vagrant/embedded/bin + ln -s ${libxml2.bin}/bin/xmlcatalog opt/vagrant/embedded/bin + ln -s ${libxml2.bin}/bin/xmllint opt/vagrant/embedded/bin # libxslt: xslt-config, xsltproc rm opt/vagrant/embedded/bin/{xslt-config,xsltproc} - ln -s ${libxslt}/bin/xslt-config opt/vagrant/embedded/bin - ln -s ${libxslt}/bin/xsltproc opt/vagrant/embedded/bin + ln -s ${libxslt.dev}/bin/xslt-config opt/vagrant/embedded/bin + ln -s ${libxslt.bin}/bin/xsltproc opt/vagrant/embedded/bin mkdir -p "$out" cp -r opt "$out" diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index d526cc7c7c4e8..6c16382de2aea 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -43,9 +43,11 @@ in stdenv.mkDerivation { patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./pkg-libpath.patch ]; - buildInputs = [ python which zlib libuv openssl python ] - ++ optionals stdenv.isLinux [ utillinux http-parser ] - ++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ]; + buildInputs = [ python zlib libuv openssl python ] + ++ optionals stdenv.isLinux [ utillinux http-parser ]; + nativeBuildInputs = [ pkgconfig ] + ++ optional stdenv.isDarwin libtool; + setupHook = ./setup-hook.sh; enableParallelBuilding = true; diff --git a/pkgs/games/beret/default.nix b/pkgs/games/beret/default.nix index b36ec6a43f69c..cfb276c0fb06e 100644 --- a/pkgs/games/beret/default.nix +++ b/pkgs/games/beret/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ]; - NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL"; + NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL"; NIX_CFLAGS_LINK = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework OpenGL -framework Cocoa"; diff --git a/pkgs/games/bitsnbots/default.nix b/pkgs/games/bitsnbots/default.nix index 57cd67fbb7baf..82e5ddb06d4d8 100644 --- a/pkgs/games/bitsnbots/default.nix +++ b/pkgs/games/bitsnbots/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { makefile = "Makefile.linux"; - NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL"; + NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL"; NIX_LDFLAGS = "-lGL"; diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index ad2733df079dd..317981cd88771 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -71,8 +71,8 @@ stdenv.mkDerivation rec { dfHackSourceRoot = srcs.dfhack.name; cmakeFlags = [ - "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include" - "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include" + "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" + "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" ]; permission = ./df_permission; @@ -113,6 +113,7 @@ stdenv.mkDerivation rec { fi ''; + # outputs TODO: probably wrong path-substitutions below installPhase = '' set -x mkdir -p $out/bin diff --git a/pkgs/games/extremetuxracer/default.nix b/pkgs/games/extremetuxracer/default.nix index af80467c960d3..f2417428880cc 100644 --- a/pkgs/games/extremetuxracer/default.nix +++ b/pkgs/games/extremetuxracer/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-tcl=${tcl}/lib" ]; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL" ''; meta = { diff --git a/pkgs/games/gemrb/default.nix b/pkgs/games/gemrb/default.nix index 86da7686eefd0..42d80f86e8280 100644 --- a/pkgs/games/gemrb/default.nix +++ b/pkgs/games/gemrb/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # TODO: make libpng, libvorbis, sdl_mixer, freetype, vlc, glew (and other gl reqs) optional # Necessary to find libdl. - CMAKE_LIBRARY_PATH = "${stdenv.cc.libc}/lib"; + CMAKE_LIBRARY_PATH = "${stdenv.cc.libc.out}/lib"; # Can't have -werror because of the Vorbis header files. cmakeFlags = "-DDISABLE_WERROR=ON -DCMAKE_VERBOSE_MAKEFILE=ON"; diff --git a/pkgs/games/hedgewars/default.nix b/pkgs/games/hedgewars/default.nix index f5d4627c5c08d..9909c04281440 100644 --- a/pkgs/games/hedgewars/default.nix +++ b/pkgs/games/hedgewars/default.nix @@ -28,11 +28,11 @@ stdenv.mkDerivation rec { -rpath ${SDL_mixer}/lib -rpath ${SDL_net}/lib -rpath ${SDL_ttf}/lib - -rpath ${SDL}/lib - -rpath ${libpng}/lib + -rpath ${SDL.out}/lib + -rpath ${libpng.out}/lib -rpath ${lua5_1}/lib -rpath ${mesa}/lib - -rpath ${zlib}/lib + -rpath ${zlib.out}/lib " ''; diff --git a/pkgs/games/jamp/default.nix b/pkgs/games/jamp/default.nix index be7abc75915de..0fbd79e77b005 100644 --- a/pkgs/games/jamp/default.nix +++ b/pkgs/games/jamp/default.nix @@ -16,7 +16,7 @@ rec { preBuild = a.fullDepEntry ('' sed -e "s@/usr/games@$out/bin@g" -i Makefile sed -e "s@/usr/@$out/@g" -i Makefile - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL.dev}/include/SDL" '') ["minInit" "addInputs" "doUnpack"]; /* doConfigure should be removed if not needed */ diff --git a/pkgs/games/liquidwar/default.nix b/pkgs/games/liquidwar/default.nix index 602daa1ee864b..a87c4dea0c374 100644 --- a/pkgs/games/liquidwar/default.nix +++ b/pkgs/games/liquidwar/default.nix @@ -30,7 +30,7 @@ rec { phaseNames = ["setVars" "doConfigure" "doMakeInstall"]; setVars = a.noDepEntry ('' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL.dev}/include/SDL" ''); meta = { diff --git a/pkgs/games/micropolis/default.nix b/pkgs/games/micropolis/default.nix index 55a02e08003d4..a294128969c5d 100644 --- a/pkgs/games/micropolis/default.nix +++ b/pkgs/games/micropolis/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { preConfigure = '' cd src - sed -i "s@^CFLAGS.*\$@&\nCFLAGS += -I${libXpm}/include/X11@" tk/makefile + sed -i "s@^CFLAGS.*\$@&\nCFLAGS += -I${libXpm.dev}/include/X11@" tk/makefile sed -i "s@^INCLUDES.*\$@&\n\t-I$PWD/tcl \\\\@" sim/makefile ''; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index ecd468eaf5828..1b201daa371b5 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -25,7 +25,7 @@ in stdenv.mkDerivation { cmakeFlags = [ "-DENABLE_FREETYPE=1" "-DENABLE_GETTEXT=1" - "-DCURL_INCLUDE_DIR=${curl}/include/curl" + "-DCURL_INCLUDE_DIR=${curl.dev}/include/curl" "-DIRRLICHT_INCLUDE_DIR=${irrlicht}/include/irrlicht" ]; diff --git a/pkgs/games/nexuiz/default.nix b/pkgs/games/nexuiz/default.nix index e40dec3c23fcc..0bfebd510c940 100644 --- a/pkgs/games/nexuiz/default.nix +++ b/pkgs/games/nexuiz/default.nix @@ -36,14 +36,14 @@ in stdenv.mkDerivation { ''; NIX_LDFLAGS = '' - -rpath ${zlib}/lib - -rpath ${curl}/lib - -rpath ${libjpeg}/lib - -rpath ${libpng}/lib - -rpath ${libvorbis}/lib - -rpath ${libtheora}/lib - -rpath ${libogg}/lib - -rpath ${libmodplug}/lib + -rpath ${zlib.out}/lib + -rpath ${curl.out}/lib + -rpath ${libjpeg.out}/lib + -rpath ${libpng.out}/lib + -rpath ${libvorbis.out}/lib + -rpath ${libtheora.out}/lib + -rpath ${libogg.out}/lib + -rpath ${libmodplug.out}/lib ''; buildPhase = '' diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix index d75f02c5e941e..ec9c928b7982f 100644 --- a/pkgs/games/oilrush/default.nix +++ b/pkgs/games/oilrush/default.nix @@ -1,6 +1,8 @@ { stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr , libXrender, fontconfig, freetype, openal }: +with { inherit (stdenv.lib) makeLibraryPath; }; + stdenv.mkDerivation { name = "oilrush"; src = @@ -25,25 +27,25 @@ stdenv.mkDerivation { do patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f done - patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\ launcher_$arch patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libNetwork_$arch.so patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtCoreUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\ libQtGuiUnigine_$arch.so.4 patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtNetworkUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\ libQtWebKitUnigine_$arch.so.4 patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtXmlUnigine_$arch.so.4 patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libRakNet_$arch.so - patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\ libUnigine_$arch.so - patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\ OilRush_$arch ''; installPhase = '' @@ -53,7 +55,7 @@ stdenv.mkDerivation { mkdir -p "$out/bin" cat << EOF > "$out/bin/oilrush" #! /bin/sh - LD_LIBRARY_PATH=.:${openal}/lib:\$LD_LIBRARY_PATH + LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH cd "$out/opt/oilrush" exec ./launcher_$arch.sh "\$@" EOF diff --git a/pkgs/games/openarena/default.nix b/pkgs/games/openarena/default.nix index 1926afaeb3b64..1e396318bbbd0 100644 --- a/pkgs/games/openarena/default.nix +++ b/pkgs/games/openarena/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { installPhase = let gameDir = "$out/openarena-$version"; interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")"; + libPath = stdenv.lib.makeLibraryPath [ SDL libogg libvorbis ]; in '' mkdir -pv $out/bin cd $out @@ -23,11 +24,11 @@ stdenv.mkDerivation rec { ${if stdenv.system == "x86_64-linux" then '' patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64" makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \ - --prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" + --prefix LD_LIBRARY_PATH : "${libPath}" '' else '' patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.i386" makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \ - --prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" + --prefix LD_LIBRARY_PATH : "${libPath}" ''} ''; diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix index 2dc4dece75f38..04b74b4214fa3 100644 --- a/pkgs/games/openlierox/default.nix +++ b/pkgs/games/openlierox/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z"; }; - NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; # The breakpad fails to build on x86_64, and it's only to report bugs upstream cmakeFlags = [ "-DBREAKPAD=0" ]; diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix index ed682e7bed93d..cf968c08287e2 100644 --- a/pkgs/games/planetaryannihilation/default.nix +++ b/pkgs/games/planetaryannihilation/default.nix @@ -34,12 +34,12 @@ stdenv.mkDerivation { ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc xorg.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xorg.libXrender ]}:{stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host" + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk glib stdenv.glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" "$out/host/CoherentUI_Host" - wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc xorg.libX11 xorg.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" + wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.glibc.out xorg.libX11 xorg.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" for f in $out/lib/*; do - patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc curl xorg.libX11 stdenv.glibc xorg.libXcursor "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" $f + patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 stdenv.glibc.out xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" $f done ''; diff --git a/pkgs/games/quantumminigolf/default.nix b/pkgs/games/quantumminigolf/default.nix index 940351790166d..1b07550779655 100644 --- a/pkgs/games/quantumminigolf/default.nix +++ b/pkgs/games/quantumminigolf/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { inherit (s) url sha256; }; preBuild = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL" sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp ''; diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index fbf47653af99b..a1ca93a828b42 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { patches = [ ./moderinze_cpp.patch ]; preConfigure = '' - export CPPFLAGS="-I${SDL}/include -I${SDL}/include/SDL -I${SDL_mixer}/include" + export CPPFLAGS="-I${SDL.dev}/include -I${SDL.dev}/include/SDL -I${SDL_mixer}/include" autoreconf -i ''; diff --git a/pkgs/games/sdlmame/default.nix b/pkgs/games/sdlmame/default.nix index 7cc4c2b96b1e7..52a892705742e 100644 --- a/pkgs/games/sdlmame/default.nix +++ b/pkgs/games/sdlmame/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { installPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xorg.libX11}/lib:${xorg.libXinerama}/lib:${stdenv.cc.cc}/lib" \ + --set-rpath "${stdenv.lib.makeLibraryPath [ alsaLib qt48 SDL fontconfig freetype SDL_ttf xorg.libX11 xorg.libXinerama stdenv.cc.cc ]}" \ share/sdlmame/sdlmame mkdir -p "$out/bin" diff --git a/pkgs/games/thePenguinMachine/default.nix b/pkgs/games/thePenguinMachine/default.nix index 479004a9af4d7..9089b58bd533f 100644 --- a/pkgs/games/thePenguinMachine/default.nix +++ b/pkgs/games/thePenguinMachine/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { buildInputs = [python pil pygame SDL]; configurePhase = '' - sed -e "/includes = /aincludes.append('${SDL}/include/SDL')" -i setup.py; + sed -e "/includes = /aincludes.append('${SDL.dev}/include/SDL')" -i setup.py; sed -e "/includes = /aincludes.append('$(echo ${pygame}/include/python*)')" -i setup.py; cat setup.py; export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s" diff --git a/pkgs/games/tibia/default.nix b/pkgs/games/tibia/default.nix index dc4a8ac369258..2e48b00092ac6 100644 --- a/pkgs/games/tibia/default.nix +++ b/pkgs/games/tibia/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { mkdir -pv $out/res cp -r * $out/res - patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \ + patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \ --set-rpath ${stdenv.cc.cc}/lib:${libX11}/lib:${mesa}/lib \ "$out/res/Tibia" @@ -41,7 +41,7 @@ stdenv.mkDerivation { cat << EOF > "$out/bin/Tibia" #!${stdenv.shell} cd $out/res - ${glibc}/lib/ld-linux.so.2 --library-path \$LD_LIBRARY_PATH ./Tibia "\$@" + ${glibc.out}/lib/ld-linux.so.2 --library-path \$LD_LIBRARY_PATH ./Tibia "\$@" EOF chmod +x $out/bin/Tibia diff --git a/pkgs/games/trackballs/default.nix b/pkgs/games/trackballs/default.nix index 22d8c944fa8bf..7cf741f2faba1 100644 --- a/pkgs/games/trackballs/default.nix +++ b/pkgs/games/trackballs/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { postUnpack = optionalString debug "mkdir -p $out/src; cp -R * $out/src ; cd $out/src"; - NIX_CFLAGS_COMPILE = "-iquote ${SDL}/include/SDL"; + NIX_CFLAGS_COMPILE = "-iquote ${SDL.dev}/include/SDL"; configureFlags = optionalString debug "--enable-debug"; patchPhase = '' diff --git a/pkgs/games/ue4demos/default.nix b/pkgs/games/ue4demos/default.nix index ed2ea23d41580..026f974ff9325 100644 --- a/pkgs/games/ue4demos/default.nix +++ b/pkgs/games/ue4demos/default.nix @@ -20,7 +20,7 @@ let cd $out unzip $src - interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2) + interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) binary=$(find . -executable -type f) patchelf \ --set-interpreter $interpreter \ diff --git a/pkgs/games/ultrastardx/default.nix b/pkgs/games/ultrastardx/default.nix index 3eabaa090bb06..5027abedcf4f4 100644 --- a/pkgs/games/ultrastardx/default.nix +++ b/pkgs/games/ultrastardx/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # The fpc is not properly wrapped to add -rpath. I add this manually. # I even do a trick on lib/lib64 for libgcc, that I expect it will work. preBuild = '' - export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc}/lib64 -rpath ${stdenv.cc.cc}/lib" + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL.out}/lib -rpath ${SDL_image}/lib -rpath ${libpng.out}/lib -rpath ${freetype.out}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg.out}/lib -rpath ${zlib.out}/lib -rpath ${sqlite.out}/lib -rpath ${libX11.out}/lib -rpath ${pcre.out}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc.out}/lib64 -rpath ${stdenv.cc.cc.out}/lib" sed -i 414,424d Makefile ''; diff --git a/pkgs/games/xonotic/default.nix b/pkgs/games/xonotic/default.nix index 7fb7c11694fd6..e45bbb20d3a71 100644 --- a/pkgs/games/xonotic/default.nix +++ b/pkgs/games/xonotic/default.nix @@ -32,9 +32,9 @@ stdenv.mkDerivation rec { #''; NIX_LDFLAGS = '' - -rpath ${zlib}/lib - -rpath ${libvorbis}/lib - -rpath ${curl}/lib + -rpath ${zlib.out}/lib + -rpath ${libvorbis.out}/lib + -rpath ${curl.out}/lib ''; buildPhase = '' diff --git a/pkgs/games/xsokoban/default.nix b/pkgs/games/xsokoban/default.nix index e6686a658a90e..502771e18ee60 100644 --- a/pkgs/games/xsokoban/default.nix +++ b/pkgs/games/xsokoban/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { preConfigure = '' sed -e 's/getline/my_getline/' -i score.c - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXpm}/include/X11" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXpm.dev}/include/X11" for i in $NIX_CFLAGS_COMPILE; do echo $i; ls ''${i#-I}; done chmod a+rw config.h cat >>config.h <<EOF diff --git a/pkgs/games/zdoom/default.nix b/pkgs/games/zdoom/default.nix index 0bc63855299e5..de0f9c4db831d 100644 --- a/pkgs/games/zdoom/default.nix +++ b/pkgs/games/zdoom/default.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation { cmakeFlags = [ "-DFMOD_LIBRARY=${fmod}/lib/libfmodex.so" - "-DSDL_INCLUDE_DIR=${SDL}/include" + "-DSDL_INCLUDE_DIR=${SDL.dev}/include" ]; - NIX_CFLAGS_COMPILE = [ "-I ${SDL}/include/SDL" ]; + NIX_CFLAGS_COMPILE = [ "-I ${SDL.dev}/include/SDL" ]; preConfigure = '' sed s@zdoom.pk3@$out/share/zdoom.pk3@ -i src/version.h diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index dea00c35b4e09..fba194aa15270 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -16,8 +16,11 @@ stdenv.mkDerivation { sha256 = "1gaakz24k6x5nc09rmpiq0xq20j1qdjc3szag8qwmyi4ky6ydmg1"; }; + # FIXME: the cups libraries contains some $out/share strings so can't be split. + outputs = [ "dev" "out" "doc" "man" ]; # TODO: above + buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ] - ++ optionals stdenv.isLinux [ pam dbus.libs acl ]; + ++ optionals stdenv.isLinux [ pam dbus acl ]; propagatedBuildInputs = [ gmp ]; @@ -58,6 +61,9 @@ stdenv.mkDerivation { # Delete obsolete stuff that conflicts with cups-filters. rm -rf $out/share/cups/banners $out/share/cups/data/testprint + mkdir $dev/bin + mv $out/bin/cups-config $dev/bin/ + # Rename systemd files provided by CUPS for f in $out/lib/systemd/system/*; do substituteInPlace "$f" \ diff --git a/pkgs/misc/cups/drivers/canon/default.nix b/pkgs/misc/cups/drivers/canon/default.nix index 4c31e8d37d254..779cf9656863f 100644 --- a/pkgs/misc/cups/drivers/canon/default.nix +++ b/pkgs/misc/cups/drivers/canon/default.nix @@ -202,10 +202,10 @@ stdenv.mkDerivation rec { cp libs/ThLB* $out/share/ufr2filter ) - patchelf --set-rpath "$out/lib32:${i686_libxml2}/lib" $out/lib32/libcanonufr2.so.1.0.0 + patchelf --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/lib32/libcanonufr2.so.1.0.0 patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32" $out/bin/cnpkmoduleufr2 - patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32:${i686_libxml2}/lib" $out/bin/cnpkbidi + patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/bin/cnpkbidi makeWrapper "${ghostscript}/bin/gs" "$out/bin/gs" \ --prefix LD_LIBRARY_PATH ":" "$out/lib" \ diff --git a/pkgs/misc/drivers/foo2zjs/default.nix b/pkgs/misc/drivers/foo2zjs/default.nix index 2417b0e566de8..2547baec4f12a 100644 --- a/pkgs/misc/drivers/foo2zjs/default.nix +++ b/pkgs/misc/drivers/foo2zjs/default.nix @@ -1,5 +1,5 @@ x@{builderDefsPackage - , foomatic_filters, bc, unzip, ghostscript, udev, vim + , foomatic_filters, bc, unzip, ghostscript, systemd, vim , ...}: builderDefsPackage (a : @@ -36,7 +36,7 @@ rec { ''PIXMAPS=$out/share/pixmaps'' ''UDEVBIN=$out/bin'' ''UDEVDIR=$out/etc/udev/rules.d'' - ''UDEVD=${udev}/sbin/udevd'' + ''UDEVD=${systemd.udev.bin}/sbin/udevd'' ''LIBUDEVDIR=$out/lib/udev/rules.d'' ''USBDIR=$out/etc/hotplug/usb'' ''FOODB=$out/share/foomatic/db/source'' diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index 07d6655037914..219a04e4f0288 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -182,7 +182,7 @@ in extraBuildInputs = [ libpng SDL ]; }).override { - patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL}/bin/sdl-config\",' configure"; + patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL.dev}/bin/sdl-config\",' configure"; configurePhase = "./configure"; }; diff --git a/pkgs/os-specific/linux/alsa-lib/default.nix b/pkgs/os-specific/linux/alsa-lib/default.nix index ed72e7011663e..8f46bb29c1fba 100644 --- a/pkgs/os-specific/linux/alsa-lib/default.nix +++ b/pkgs/os-specific/linux/alsa-lib/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { sed -i -e 's/u_int\([0-9]*\)_t/uint\1_t/g' include/pcm.h ''; + outputs = [ "dev" "out" ]; + crossAttrs = { patchPhase = '' sed -i s/extern/static/g include/iatomic.h diff --git a/pkgs/os-specific/linux/apparmor/2.9/default.nix b/pkgs/os-specific/linux/apparmor/2.9/default.nix new file mode 100644 index 0000000000000..5e8ccc7569180 --- /dev/null +++ b/pkgs/os-specific/linux/apparmor/2.9/default.nix @@ -0,0 +1,183 @@ +{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, perl, which +, glibc, flex, bison, python27, swig, dbus, pam +}: + +let + apparmor-series = "2.9"; + apparmor-patchver = "2"; + apparmor-version = "${apparmor-series}.${apparmor-patchver}"; + + apparmor-meta = component: with stdenv.lib; { + homepage = http://apparmor.net/; + description = "Linux application security system - ${component}"; + license = licenses.gpl2; + maintainers = with maintainers; [ phreedom thoughtpolice joachifm ]; + platforms = platforms.linux; + }; + + apparmor-sources = fetchurl { + url = "https://launchpad.net/apparmor/${apparmor-series}/${apparmor-version}/+download/apparmor-${apparmor-version}.tar.gz"; + sha256 = "1mayly7d7w959fya7z8q6kab2x3jcwhqhkpx36jsvpjhxkhmc4fh"; + }; + + prePatchCommon = '' + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man" + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html" + substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${glibc.dev}/include/linux/capability.h" + substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" + ''; + + libapparmor = stdenv.mkDerivation { + name = "libapparmor-${apparmor-version}"; + src = apparmor-sources; + + buildInputs = [ + autoconf + automake + bison + flex + dbus # requires patch to dbus ... + glibc + libtool + perl + pkgconfig + python27 + swig + which + ]; + + prePatch = prePatchCommon + '' + substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${glibc.dev}/include/netinet/in.h" + substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${glibc.dev}/include/netinet/in.h" + ''; + + buildPhase = '' + cd ./libraries/libapparmor + ./autogen.sh + ./configure --prefix="$out" --with-python --with-perl + make + ''; + + installPhase = '' + make install + ''; + + meta = apparmor-meta "library"; + }; + + apparmor-utils = stdenv.mkDerivation { + name = "apparmor-utils-${apparmor-version}"; + src = apparmor-sources; + + buildInputs = [ + python27 + libapparmor + which + ]; + + prePatch = prePatchCommon; + + buildPhase = '' + cd ./utils + make LANGS="" + ''; + + installPhase = '' + make install LANGS="" DESTDIR="$out" BINDIR="$out/bin" VIM_INSTALL_PATH="$out/share" PYPREFIX="" + ''; + + meta = apparmor-meta "user-land utilities"; + }; + + apparmor-parser = stdenv.mkDerivation { + name = "apparmor-parser-${apparmor-version}"; + src = apparmor-sources; + + buildInputs = [ + libapparmor + bison + flex + which + ]; + + prePatch = prePatchCommon + '' + substituteInPlace ./parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison" + substituteInPlace ./parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex" + substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${glibc.dev}/include/linux/capability.h" + ## techdoc.pdf still doesn't build ... + substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages" + ''; + + buildPhase = '' + cd ./parser + make LANGS="" USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include + ''; + + installPhase = '' + make install LANGS="" USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include DESTDIR="$out" DISTRO="unknown" + ''; + + meta = apparmor-meta "rule parser"; + }; + + apparmor-pam = stdenv.mkDerivation { + name = "apparmor-pam-${apparmor-version}"; + src = apparmor-sources; + + buildInputs = [ + libapparmor + pam + pkgconfig + which + ]; + + buildPhase = '' + cd ./changehat/pam_apparmor + make USE_SYSTEM=1 + ''; + + installPhase = '' + make install DESTDIR="$out" + ''; + + meta = apparmor-meta "PAM service"; + }; + + apparmor-profiles = stdenv.mkDerivation { + name = "apparmor-profiles-${apparmor-version}"; + src = apparmor-sources; + + buildInputs = [ which ]; + + buildPhase = '' + cd ./profiles + make + ''; + + installPhase = '' + make install DESTDIR="$out" EXTRAS_DEST="$out/share/apparmor/extra-profiles" + ''; + + meta = apparmor-meta "profiles"; + }; + + apparmor-kernel-patches = stdenv.mkDerivation { + name = "apparmor-kernel-patches-${apparmor-version}"; + src = apparmor-sources; + + phases = ''unpackPhase installPhase''; + + installPhase = '' + mkdir "$out" + cp -R ./kernel-patches "$out" + ''; + + meta = apparmor-meta "kernel patches"; + }; + +in + +{ + inherit libapparmor apparmor-utils apparmor-parser apparmor-pam + apparmor-profiles apparmor-kernel-patches; +} diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 64c6f66575b63..49fdbab24caa8 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -22,7 +22,7 @@ let prePatchCommon = '' substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man" substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html" - substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${glibc}/include/linux/capability.h" + substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${glibc.dev}/include/linux/capability.h" substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; @@ -49,8 +49,8 @@ let dontDisableStatic = true; prePatch = prePatchCommon + '' - substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h" - substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${glibc}/include/netinet/in.h" + substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${glibc.dev}/include/netinet/in.h" + substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${glibc.dev}/include/netinet/in.h" ''; postPatch = "cd ./libraries/libapparmor"; @@ -104,7 +104,7 @@ let prePatch = prePatchCommon + '' substituteInPlace ./parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison" substituteInPlace ./parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex" - substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${glibc}/include/linux/capability.h" + substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${glibc.dev}/include/linux/capability.h" ## techdoc.pdf still doesn't build ... substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages" ''; diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix index 753771bf44e04..96c5af74db3c0 100644 --- a/pkgs/os-specific/linux/bluez/bluez5.nix +++ b/pkgs/os-specific/linux/bluez/bluez5.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { [ pythonDBus pygobject pygobject3 recursivePthLoader ]; buildInputs = - [ pkgconfig dbus.libs glib alsaLib python pythonPackages.wrapPython + [ pkgconfig dbus glib alsaLib python pythonPackages.wrapPython readline libsndfile udev libical # Disables GStreamer; not clear what it gains us other than a # zillion extra dependencies. diff --git a/pkgs/os-specific/linux/bluez/bluez5_28.nix b/pkgs/os-specific/linux/bluez/bluez5_28.nix index 7f5a30144c8bb..ba3f478ddc22c 100644 --- a/pkgs/os-specific/linux/bluez/bluez5_28.nix +++ b/pkgs/os-specific/linux/bluez/bluez5_28.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { [ pythonDBus pygobject pygobject3 recursivePthLoader ]; buildInputs = - [ pkgconfig dbus.libs glib alsaLib python pythonPackages.wrapPython + [ pkgconfig dbus glib alsaLib python pythonPackages.wrapPython readline libsndfile udev libical # Disables GStreamer; not clear what it gains us other than a # zillion extra dependencies. diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 23e5171d17801..4f30bc19caf84 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper + [ pkgconfig dbus glib libusb alsaLib python makeWrapper readline libsndfile # Disables GStreamer; not clear what it gains us other than a # zillion extra dependencies. diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix index b423dc3a08620..60468538be249 100644 --- a/pkgs/os-specific/linux/checksec/default.nix +++ b/pkgs/os-specific/linux/checksec/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { cp checksec.sh $out/bin/checksec chmod +x $out/bin/checksec substituteInPlace $out/bin/checksec --replace /bin/bash ${stdenv.shell} - substituteInPlace $out/bin/checksec --replace /lib/libc.so.6 ${glibc}/lib/libc.so.6 + substituteInPlace $out/bin/checksec --replace /lib/libc.so.6 ${glibc.out}/lib/libc.so.6 substituteInPlace $out/bin/checksec --replace find ${findutils}/bin/find substituteInPlace $out/bin/checksec --replace "file $" "${file}/bin/file $" substituteInPlace $out/bin/checksec --replace "xargs file" "xargs ${file}/bin/file" diff --git a/pkgs/os-specific/linux/drbd/default.nix b/pkgs/os-specific/linux/drbd/default.nix index 4c945a7fbac7e..95c851da30f82 100644 --- a/pkgs/os-specific/linux/drbd/default.nix +++ b/pkgs/os-specific/linux/drbd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, flex, udev, perl }: +{ stdenv, fetchurl, flex, systemd, perl }: assert stdenv.isLinux; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { preConfigure = '' - export PATH=${udev}/sbin:$PATH + export PATH=${systemd.udev.bin}/sbin:$PATH substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/ substituteInPlace user/legacy/Makefile.in \ --replace /sbin/ $out/sbin/ \ diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix index bb2915958f7ca..fddaa84a82404 100644 --- a/pkgs/os-specific/linux/kbd/default.nix +++ b/pkgs/os-specific/linux/kbd/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # Fix the path to gzip/bzip2. substituteInPlace src/libkeymap/findfile.c \ --replace gzip ${gzip}/bin/gzip \ - --replace bzip2 ${bzip2}/bin/bzip2 \ + --replace bzip2 ${bzip2.bin}/bin/bzip2 \ # We get a warning in armv5tel-linux and the fuloong2f, so we # disable -Werror in it. diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 4a826ff7ae3d1..49b93b1a10ea8 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -74,7 +74,7 @@ let installsFirmware = (config.isEnabled "FW_LOADER") && (isModular || (config.isDisabled "FIRMWARE_IN_KERNEL")); - in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // { + in (optionalAttrs isModular { outputs = [ "out" "dev" ]; propagatedOutputs = ""; }) // { passthru = { inherit version modDirVersion config kernelPatches configfile; }; diff --git a/pkgs/os-specific/linux/klibc/shrunk.nix b/pkgs/os-specific/linux/klibc/shrunk.nix index 066b4fcb4e063..2ce833d104fdf 100644 --- a/pkgs/os-specific/linux/klibc/shrunk.nix +++ b/pkgs/os-specific/linux/klibc/shrunk.nix @@ -8,10 +8,10 @@ stdenv.mkDerivation { name = "${klibc.name}"; buildCommand = '' mkdir -p $out/lib - cp -prd ${klibc}/lib/klibc/bin $out/ - cp -p ${klibc}/lib/*.so $out/lib/ + cp -prd ${klibc.out}/lib/klibc/bin $out/ + cp -p ${klibc.out}/lib/*.so $out/lib/ chmod +w $out/* - old=$(echo ${klibc}/lib/klibc-*.so) + old=$(echo ${klibc.out}/lib/klibc-*.so) new=$(echo $out/lib/klibc-*.so) for i in $out/bin/*; do echo $i diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index 8157270d67d7d..c8484babcdf83 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -3,12 +3,14 @@ stdenv.mkDerivation rec { name = "libcap-${version}"; version = "2.24"; - + src = fetchurl { url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${name}.tar.xz"; sha256 = "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"; }; - + + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ perl ]; propagatedBuildInputs = [ attr ]; @@ -16,14 +18,11 @@ stdenv.mkDerivation rec { makeFlags = "lib=lib prefix=$(out)"; - passthru = { - postinst = n : '' - mkdir -p $out/share/doc/${n} - cp ../License $out/share/doc/${n}/License - ''; - }; - - postInstall = passthru.postinst name; + postInstall = '' + rm "$out"/lib/*.a + mkdir -p "$dev/share/doc/${name}" + cp ../License "$dev/share/doc/${name}/License" + ''; meta = { description = "Library for working with POSIX capabilities"; diff --git a/pkgs/os-specific/linux/libcap/man.nix b/pkgs/os-specific/linux/libcap/man.nix index 9aac3c4e1f5a0..eeb780f095bdc 100644 --- a/pkgs/os-specific/linux/libcap/man.nix +++ b/pkgs/os-specific/linux/libcap/man.nix @@ -10,6 +10,4 @@ stdenv.mkDerivation rec { makeFlags = "MANDIR=$(out)/share/man"; preConfigure = "cd doc"; - - postInstall = libcap.postinst name; } diff --git a/pkgs/os-specific/linux/libcap/pam.nix b/pkgs/os-specific/linux/libcap/pam.nix index b78f32dccbb44..3dd7cd947af22 100644 --- a/pkgs/os-specific/linux/libcap/pam.nix +++ b/pkgs/os-specific/linux/libcap/pam.nix @@ -12,6 +12,4 @@ stdenv.mkDerivation rec { preConfigure = "cd pam_cap"; makeFlags = "${libcap.makeFlags} PAM_CAP=yes"; - - postInstall = libcap.postinst name; } diff --git a/pkgs/os-specific/linux/libcap/progs.nix b/pkgs/os-specific/linux/libcap/progs.nix index ae4446c82e6cf..e3871f15f885c 100644 --- a/pkgs/os-specific/linux/libcap/progs.nix +++ b/pkgs/os-specific/linux/libcap/progs.nix @@ -21,5 +21,8 @@ stdenv.mkDerivation rec { installFlags = "RAISE_SETFCAP=no"; - postInstall = libcap.postinst name; + postInstall = '' + mkdir -p "$out/share/doc/${name}" + cp ../License "$out/share/doc/${name}/" + ''; } diff --git a/pkgs/os-specific/linux/libnl/default.nix b/pkgs/os-specific/linux/libnl/default.nix index afd9695420e3c..1e1ed0a6112c0 100644 --- a/pkgs/os-specific/linux/libnl/default.nix +++ b/pkgs/os-specific/linux/libnl/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation { owner = "thom311"; }; + outputs = [ "dev" "bin" "out" "man" ]; + nativeBuildInputs = [ autoreconfHook bison flex pkgconfig ]; meta = { diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index 0e6bf512aa261..32a8ba4ad46af 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, udev, utillinux, coreutils, enable_dmeventd ? false }: +{ stdenv, fetchurl, pkgconfig, systemd, libudev, utillinux, coreutils, enable_dmeventd ? false }: let version = "2.02.132"; @@ -22,7 +22,7 @@ stdenv.mkDerivation { ] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ udev ]; + buildInputs = [ libudev ]; preConfigure = '' @@ -30,7 +30,7 @@ stdenv.mkDerivation { --replace /usr/bin/tr ${coreutils}/bin/tr substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ --replace /usr/sbin/lvm $out/sbin/lvm \ - --replace /usr/bin/udevadm ${udev}/bin/udevadm + --replace /usr/bin/udevadm ${systemd.udev.bin}/bin/udevadm sed -i /DEFAULT_SYS_DIR/d Makefile.in sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in diff --git a/pkgs/os-specific/linux/module-init-tools/default.nix b/pkgs/os-specific/linux/module-init-tools/default.nix index 1302d7b1fef05..2d6875d506a76 100644 --- a/pkgs/os-specific/linux/module-init-tools/default.nix +++ b/pkgs/os-specific/linux/module-init-tools/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation { }) ]; + buildInputs = [ stdenv.glibc.dev stdenv.glibc.static ]; + SGML_CATALOG_FILES = "${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat"; patches = [ ./module-dir.patch ./docbook2man.patch ]; diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index 3da37a89923a4..e2daa9199a98a 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }: +{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }: stdenv.mkDerivation rec { name = "multipath-tools-0.4.9"; @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup - substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id - substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id + substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id + substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id ''; meta = { diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 75f25e2680420..34cf0196079b3 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "--with-statedir=/var/lib/nfs" "--with-tirpcinclude=${libtirpc}/include/tirpc" ] - ++ stdenv.lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc}/bin/rpcgen"; + ++ stdenv.lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; patchPhase = '' diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index f7cadd469d70f..d84c6224eebe4 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -9,10 +9,14 @@ stdenv.mkDerivation rec { sha256 = "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"; }; + outputs = [ "out" "doc" "man" /* "modules" */ ]; + nativeBuildInputs = [ flex ]; buildInputs = [ cracklib ]; + enableParallelBuilding = true; + crossAttrs = { propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ]; preConfigure = preConfigure + '' @@ -31,7 +35,14 @@ stdenv.mkDerivation rec { postInstall = '' mv -v $out/sbin/unix_chkpwd{,.orig} ln -sv /var/setuid-wrappers/unix_chkpwd $out/sbin/unix_chkpwd - ''; + ''; /* + rm -rf $out/etc + mkdir -p $modules/lib + mv $out/lib/security $modules/lib/ + '';*/ + # don't move modules, because libpam needs to (be able to) find them, + # which is done by dlopening $out/lib/security/pam_foo.so + # $out/etc was also missed: pam_env(login:session): Unable to open config file preConfigure = '' configureFlags="$configureFlags --includedir=$out/include/security" diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index f928dc8e657c6..321e94e3aaf42 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { preBuild = assert glibc != null; '' - substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc}/sbin/nscd + substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc.bin}/bin/nscd ''; postInstall = diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index a78f51ddb36fe..780b906729749 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, dbus, kmod -, xz, pam, acl, cryptsetup, libuuid, m4, utillinux +{ stdenv, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, kmod +, zlib, xz, pam, acl, cryptsetup, libuuid, m4, utillinux, libffi , glib, kbd, libxslt, coreutils, libgcrypt , kexectools, libmicrohttpd, linuxHeaders, libseccomp , autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 @@ -22,18 +22,27 @@ stdenv.mkDerivation rec { sha256 = "0cvzsrazqgbia3zajb0z4ik8myfil4bdy2c29qs6w93d6yvrjfkj"; }; - outputs = [ "out" "man" "doc" ]; + patches = [ ./hwdb-location.diff ]; + + /* gave up for now! + outputs = [ "out" "libudev" "doc" ]; # maybe: "dev" + # note: there are many references to ${systemd}/... + outputDev = "out"; + propagatedOutputs = "libudev"; + */ + outputs = [ "out" "man" ]; buildInputs = [ linuxHeaders pkgconfig intltool gperf libcap kmod xz pam acl /* cryptsetup */ libuuid m4 glib libxslt libgcrypt - libmicrohttpd kexectools libseccomp + libmicrohttpd kexectools libseccomp libffi /* FIXME: we may be able to prevent the following dependencies by generating an autoconf'd tarball, but that's probably not worth it. */ autoreconfHook gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 ] ++ stdenv.lib.optionals pythonSupport [pythonPackages.python pythonPackages.lxml]; + configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc" @@ -76,14 +85,15 @@ stdenv.mkDerivation rec { for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/core/shutdown.c src/nspawn/nspawn.c src/shared/generator.c; do test -e $i substituteInPlace $i \ - --replace /usr/bin/getent ${stdenv.glibc}/bin/getent \ - --replace /bin/mount ${utillinux}/bin/mount \ - --replace /bin/umount ${utillinux}/bin/umount \ - --replace /sbin/swapon ${utillinux}/sbin/swapon \ - --replace /sbin/swapoff ${utillinux}/sbin/swapoff \ + --replace /usr/bin/getent ${stdenv.glibc.bin}/bin/getent \ + --replace /bin/mount ${utillinux.bin}/bin/mount \ + --replace /bin/umount ${utillinux.bin}/bin/umount \ + --replace /sbin/swapon ${utillinux.bin}/sbin/swapon \ + --replace /sbin/swapoff ${utillinux.bin}/sbin/swapoff \ + --replace /sbin/fsck ${utillinux.bin}/sbin/fsck \ --replace /bin/echo ${coreutils}/bin/echo \ --replace /bin/cat ${coreutils}/bin/cat \ - --replace /sbin/sulogin ${utillinux}/sbin/sulogin \ + --replace /sbin/sulogin ${utillinux.bin}/sbin/sulogin \ --replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck done @@ -91,12 +101,24 @@ stdenv.mkDerivation rec { --replace /usr/lib/systemd/catalog/ $out/lib/systemd/catalog/ configureFlagsArray+=("--with-ntp-servers=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org") + + #export NIX_CFLAGS_LINK+=" -Wl,-rpath,$libudev/lib" ''; + /* + makeFlags = [ + "udevlibexecdir=$(libudev)/lib/udev" + # udev rules refer to $out, and anything but libs should probably go to $out + "udevrulesdir=$(out)/lib/udev/rules.d" + "udevhwdbdir=$(out)/lib/udev/hwdb.d" + ]; + */ + + PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python NIX_CFLAGS_COMPILE = - [ # Can't say ${polkit}/bin/pkttyagent here because that would + [ # Can't say ${polkit.bin}/bin/pkttyagent here because that would # lead to a cyclic dependency. "-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\"" "-fno-stack-protector" @@ -109,13 +131,6 @@ stdenv.mkDerivation rec { "-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\"" ]; - # Use /var/lib/udev rather than /etc/udev for the generated hardware - # database. Upstream doesn't want this (see commit - # 1e1954f53386cb773e2a152748dd31c4d36aa2d8) because using /var is - # forbidden in early boot, but in NixOS the initrd guarantees that - # /var is mounted. - makeFlags = "hwdb_bin=/var/lib/udev/hwdb.bin"; - installFlags = [ "localstatedir=$(TMPDIR)/var" "sysconfdir=$(out)/etc" @@ -156,8 +171,30 @@ stdenv.mkDerivation rec { # "kernel-install" shouldn't be used on NixOS. find $out -name "*kernel-install*" -exec rm {} \; ''; # */ + /* + # Move lib(g)udev to a separate output. TODO: maybe split them up + # to avoid libudev pulling glib + mkdir -p "$libudev/lib" + mv "$out"/lib/lib{,g}udev* "$libudev/lib/" + + for i in "$libudev"/lib/*.la; do + substituteInPlace $i --replace "$out" "$libudev" + done + for i in "$out"/lib/pkgconfig/{libudev,gudev-1.0}.pc; do + substituteInPlace $i --replace "libdir=$out" "libdir=$libudev" + done + */ enableParallelBuilding = true; + /* + # some libs fail to link to liblzma and/or libffi + postFixup = let extraLibs = stdenv.lib.makeLibraryPath [ xz.out libffi.out zlib.out ]; + in '' + for f in "$out"/lib/*.so.0.*; do + patchelf --set-rpath `patchelf --print-rpath "$f"`':${extraLibs}' "$f" + done + ''; + */ # The interface version prevents NixOS from switching to an # incompatible systemd at runtime. (Switching across reboots is @@ -174,3 +211,4 @@ stdenv.mkDerivation rec { maintainers = [ stdenv.lib.maintainers.eelco stdenv.lib.maintainers.simons ]; }; } + diff --git a/pkgs/os-specific/linux/systemd/hwdb-location.diff b/pkgs/os-specific/linux/systemd/hwdb-location.diff new file mode 100644 index 0000000000000..31e7a027f50d7 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/hwdb-location.diff @@ -0,0 +1,19 @@ +diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c +index 06c9831..e74825c 100644 +--- a/src/libsystemd/sd-hwdb/sd-hwdb.c ++++ b/src/libsystemd/sd-hwdb/sd-hwdb.c +@@ -268,13 +268,8 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) { + } + + static const char hwdb_bin_paths[] = +- "/etc/systemd/hwdb/hwdb.bin\0" + "/etc/udev/hwdb.bin\0" +- "/usr/lib/systemd/hwdb/hwdb.bin\0" +-#ifdef HAVE_SPLIT_USR +- "/lib/systemd/hwdb/hwdb.bin\0" +-#endif +- UDEVLIBEXECDIR "/hwdb.bin\0"; ++ ; + + _public_ int sd_hwdb_new(sd_hwdb **ret) { + _cleanup_hwdb_unref_ sd_hwdb *hwdb = NULL; diff --git a/pkgs/os-specific/linux/systemd/libudev.nix b/pkgs/os-specific/linux/systemd/libudev.nix new file mode 100644 index 0000000000000..0fe45aee91642 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/libudev.nix @@ -0,0 +1,19 @@ +{ stdenv, systemd }: + +stdenv.mkDerivation { + name = "libudev-${systemd.version}"; + + unpackPhase = ":"; + outputs = [ "dev" "out" ]; + installPhase = '' + mkdir -p "$out/lib" "$dev/lib/pkgconfig" "$dev/include" + cp -P "${systemd}"/lib/libudev.* "$out/lib/" + cp -P "${systemd}"/lib/pkgconfig/libudev.pc "$dev/lib/pkgconfig/" + cp -P "${systemd}"/include/libudev.h "$dev/include/" + + substituteInPlace "$dev"/lib/pkgconfig/*.pc \ + --replace "${systemd}" "$out" + sed "/^includedir=/cincludedir=$dev/include" -i "$dev"/lib/pkgconfig/*.pc + ''; +} + diff --git a/pkgs/os-specific/linux/udev/145.nix b/pkgs/os-specific/linux/udev/145.nix new file mode 100644 index 0000000000000..6dd551e1ce13e --- /dev/null +++ b/pkgs/os-specific/linux/udev/145.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchurl, gperf, pkgconfig, glib, acl, libusb, usbutils, pciutils }: + +assert stdenv ? glibc; + +stdenv.mkDerivation rec { + name = "udev-145"; + + src = fetchurl { + url = "mirror://kernel/linux/utils/kernel/hotplug/${name}.tar.bz2"; + sha256 = "1zmibp6n7d582fqx8vmg9vb2a1435hghfpz36056bc25ccwf7yiv"; + }; + + buildInputs = [gperf pkgconfig glib acl libusb usbutils]; + + configureFlags = "--with-pci-ids-path=${pciutils}/share/pci.ids"; + + preConfigure = + '' + substituteInPlace extras/keymap/Makefile.in \ + --replace /usr/include ${stdenv.glibc.dev}/include + ''; + + postInstall = + '' + # Install some rules that really should be installed by default. + for i in 40-alsa.rules 40-infiniband.rules 40-isdn.rules 40-pilot-links.rules 64-device-mapper.rules 64-md-raid.rules; do + cp rules/packages/$i $out/libexec/rules.d/ + done + + # The path to rule_generator.functions in write_cd_rules and + # write_net_rules is broken. Also, don't store the mutable + # persistant rules in /etc/udev/rules.d but in + # /var/lib/udev/rules.d. + for i in $out/libexec/write_cd_rules $out/libexec/write_net_rules; do + substituteInPlace $i \ + --replace /lib/udev $out/libexec \ + --replace /etc/udev/rules.d /var/lib/udev/rules.d + done + + # Don't set PATH to /bin:/sbin; won't work in NixOS. + substituteInPlace $out/libexec/rule_generator.functions \ + --replace 'PATH=' '#PATH=' + + # Don't hardcore the FIRMWARE_DIRS variable; obtain it from the + # environment of the caller. + sed '3,4d' -i $out/libexec/firmware.sh + ''; + + meta = { + homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html; + description = "Udev manages the /dev filesystem"; + }; +} diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index bcd9aa58bccfa..ec5c77699ecbb 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }: +{ stdenv, fetchurl, pkgconfig, zlib, ncurses ? null, perl ? null, pam }: stdenv.mkDerivation rec { name = "util-linux-2.27.1"; @@ -8,12 +8,15 @@ stdenv.mkDerivation rec { sha256 = "1452hz5zx56a3mad8yrg5wb0vy5zi19mpjp6zx1yr6p9xp6qz08a"; }; - outputs = [ "out" "man" ]; - patches = [ ./rtcwake-search-PATH-for-shutdown.patch ]; + outputs = [ "bin" "out" "man" ]; # TODO: $bin is kept the first for now + # due to lots of ${utillinux}/bin occurences and headers being rather small + outputDev = "bin"; + + #FIXME: make it also work on non-nixos? postPatch = '' # Substituting store paths would create a circular dependency on systemd @@ -40,21 +43,25 @@ stdenv.mkDerivation rec { ${if ncurses == null then "--without-ncurses" else ""} ''; + makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin"; + + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ zlib pam ] ++ stdenv.lib.optional (ncurses != null) ncurses ++ stdenv.lib.optional (perl != null) perl; postInstall = '' - rm $out/bin/su # su should be supplied by the su package (shadow) + rm "$bin/bin/su" # su should be supplied by the su package (shadow) ''; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.kernel.org/pub/linux/utils/util-linux/; description = "A set of system utilities for Linux"; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; # also contains parts under more permissive licenses + platforms = platforms.linux; priority = 6; # lower priority than coreutils ("kill") and shadow ("login" etc.) packages }; } diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix index 2bd755d032466..4acd90fba0fe8 100644 --- a/pkgs/servers/dns/nsd/default.nix +++ b/pkgs/servers/dns/nsd/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ++ edf rootServer "root-server" ++ edf rrtypes "draft-rrtypes" ++ edf zoneStats "zone-stats" - ++ [ "--with-ssl=${openssl}" "--with-libevent=${libevent}" ]; + ++ [ "--with-ssl=${openssl.dev}" "--with-libevent=${libevent.dev}" ]; meta = with stdenv.lib; { homepage = http://www.nlnetlabs.nl; diff --git a/pkgs/servers/http/apache-httpd/2.2.nix b/pkgs/servers/http/apache-httpd/2.2.nix index 99d6fe12aa1c2..88e1475342c6e 100644 --- a/pkgs/servers/http/apache-httpd/2.2.nix +++ b/pkgs/servers/http/apache-httpd/2.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, perl, zlib +{ stdenv, fetchurl, pkgconfig, openssl, perl, zlib , sslSupport, proxySupport ? true , apr, aprutil, pcre , ldapSupport ? true, openldap @@ -20,17 +20,19 @@ stdenv.mkDerivation rec { sha256 = "1b165zi7jrrlz5wmyy3b34lcs3dl4g0dymfb0qxwdnimylcrsbzk"; }; - buildInputs = [perl apr aprutil pcre] ++ - stdenv.lib.optional sslSupport openssl; + # FIXME: -dev depends on -doc + outputs = [ "dev" "out" "doc" ]; - # An apr-util header file includes an apr header file - # through #include "" (quotes) - # passing simply CFLAGS did not help, then I go by NIX_CFLAGS_COMPILE - NIX_CFLAGS_COMPILE = "-iquote ${apr}/include/apr-1"; + buildInputs = [ pkgconfig perl apr aprutil pcre zlib ] ++ + stdenv.lib.optional sslSupport openssl; # Required for ‘pthread_cancel’. NIX_LDFLAGS = (if stdenv.isDarwin then "" else "-lgcc_s"); + patchPhase = '' + sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|" + ''; + configureFlags = '' --with-z=${zlib} --with-pcre=${pcre} @@ -48,9 +50,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + stripDebugList = "lib modules bin"; + postInstall = '' - echo "removing manual" - rm -rf $out/manual + mkdir -p $doc/share/doc/httpd + mv $out/manual $doc/share/doc/httpd + mkdir -p $dev/bin + mv $out/sbin/apxs $dev/bin/apxs ''; passthru = { diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index aa8dfdd45f519..780eae8132d45 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -22,11 +22,19 @@ stdenv.mkDerivation rec { sha256 = "165p5qgwyk1dwjypgcx5vb47xadiszs3dw28n2axplw1xifh67ik"; }; + # FIXME: -dev depends on -doc + outputs = [ "dev" "out" "doc" ]; + buildInputs = [perl] ++ + optional sslSupport openssl ++ optional ldapSupport openldap ++ # there is no --with-ldap flag optional libxml2Support libxml2 ++ optional stdenv.isDarwin libiconv; + patchPhase = '' + sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|" + ''; + # Required for ‘pthread_cancel’. NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; @@ -43,18 +51,20 @@ stdenv.mkDerivation rec { --enable-imagemap --enable-cgi ${optionalString proxySupport "--enable-proxy"} - ${optionalString sslSupport "--enable-ssl --with-ssl=${openssl}"} + ${optionalString sslSupport "--enable-ssl"} ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"} - ${optionalString libxml2Support "--with-libxml2=${libxml2}/include/libxml2"} + ${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"} ''; + enableParallelBuilding = true; + postInstall = '' - echo "removing manual" - rm -rf $out/manual + mkdir -p $doc/share/doc/httpd + mv $out/manual $doc/share/doc/httpd + mkdir -p $dev/bin + mv $out/bin/apxs $dev/bin/apxs ''; - enableParallelBuilding = true; - passthru = { inherit apr aprutil sslSupport proxySupport ldapSupport; }; diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix index f6b4771e951e0..a07d00cd2d7de 100644 --- a/pkgs/servers/http/nginx/default.nix +++ b/pkgs/servers/http/nginx/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { [ "--with-file-aio" "--with-aio_module" ] ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized"; + NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized"; preConfigure = concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules; diff --git a/pkgs/servers/http/nginx/unstable.nix b/pkgs/servers/http/nginx/unstable.nix index 45129dbe0d3f0..5ef42a7aa433d 100644 --- a/pkgs/servers/http/nginx/unstable.nix +++ b/pkgs/servers/http/nginx/unstable.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio" ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; + NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; preConfigure = concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules; diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index 14f95761cfb1c..147e24c014d27 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -46,8 +46,8 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" - export PATH="$PATH:${stdenv.cc.libc}/sbin" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags" + export PATH="$PATH:${stdenv.cc.libc.bin}/bin" patchShebangs . ''; diff --git a/pkgs/servers/mail/opensmtpd/default.nix b/pkgs/servers/mail/opensmtpd/default.nix index 2fd3f0421b975..34de9c3674ba2 100644 --- a/pkgs/servers/mail/opensmtpd/default.nix +++ b/pkgs/servers/mail/opensmtpd/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { "--with-privsep-user=smtpd" "--with-queue-user=smtpq" "--with-ca-file=/etc/ssl/certs/ca-certificates.crt" - "--with-libevent-dir=${libevent}" + "--with-libevent-dir=${libevent.dev}" ]; installFlags = [ diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix index 9cb5dd41c1c3f..e682ebb1c8175 100644 --- a/pkgs/servers/nosql/eventstore/default.nix +++ b/pkgs/servers/nosql/eventstore/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { buildPhase = '' ln -s ${v8}/lib/libv8.so src/libs/libv8.so - ln -s ${icu}/lib/libicui18n.so src/libs/libicui18n.so - ln -s ${icu}/lib/libicuuc.so src/libs/libicuuc.so + ln -s ${icu.out}/lib/libicui18n.so src/libs/libicui18n.so + ln -s ${icu.out}/lib/libicuuc.so src/libs/libicuuc.so patchShebangs build.sh ./build.sh js1 diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix index 5d8e255f47f16..cfeafed0da20c 100644 --- a/pkgs/servers/openafs-client/default.nix +++ b/pkgs/servers/openafs-client/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { for i in `grep -l -R '/usr/\(include\|src\)' .`; do echo "Patch /usr/include and /usr/src in $i" substituteInPlace $i \ - --replace "/usr/include" "${glibc}/include" \ + --replace "/usr/include" "${glibc.dev}/include" \ --replace "/usr/src" "$TMP" done diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 392d16c6e5486..47edd751887ce 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -43,6 +43,8 @@ stdenv.mkDerivation rec { patches = [ ./caps-fix.patch ]; + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ pkgconfig intltool autoreconfHook ]; propagatedBuildInputs = @@ -50,7 +52,7 @@ stdenv.mkDerivation rec { buildInputs = [ json_c libsndfile speexdsp fftwFloat ] - ++ lib.optionals stdenv.isLinux [ glib dbus.libs ] + ++ lib.optionals stdenv.isLinux [ glib dbus ] ++ lib.optionals (!libOnly) ( [ libasyncns webrtc-audio-processing ] ++ lib.optional jackaudioSupport libjack2 @@ -110,8 +112,9 @@ stdenv.mkDerivation rec { postInstall = lib.optionalString libOnly '' rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}} - sed 's|-lltdl|-L${libtool}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la - ''; + sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la + '' + + ''_moveToOutput lib/cmake "$dev" ''; meta = { description = "Sound server for POSIX and Win32 systems"; diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix index a97e6847a450f..44db5895290b1 100644 --- a/pkgs/servers/shishi/default.nix +++ b/pkgs/servers/shishi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, pkgconfig , libgcrypt, libgpgerror, libtasn1 # Optional Dependencies @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { # Fixes support for gcrypt 1.6+ patches = [ ./gcrypt-fix.patch ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libgcrypt libgpgerror libtasn1 optPam optLibidn optGnutls ]; configureFlags = [ @@ -60,13 +61,13 @@ stdenv.mkDerivation rec { postInstall = '' sed -i $out/lib/libshi{sa,shi}.la \ '' + optionalString (optLibidn != null) '' - -e 's,\(-lidn\),-L${optLibidn}/lib \1,' \ + -e 's,\(-lidn\),-L${optLibidn.out}/lib \1,' \ '' + optionalString (optGnutls != null) '' - -e 's,\(-lgnutls\),-L${optGnutls}/lib \1,' \ + -e 's,\(-lgnutls\),-L${optGnutls.out}/lib \1,' \ '' + '' - -e 's,\(-lgcrypt\),-L${libgcrypt}/lib \1,' \ - -e 's,\(-lgpg-error\),-L${libgpgerror}/lib \1,' \ - -e 's,\(-ltasn1\),-L${libtasn1}/lib \1,' + -e 's,\(-lgcrypt\),-L${libgcrypt.out}/lib \1,' \ + -e 's,\(-lgpg-error\),-L${libgpgerror.out}/lib \1,' \ + -e 's,\(-ltasn1\),-L${libtasn1.out}/lib \1,' ''; meta = { diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 1f281d9d72e3b..c04ac7372c1f3 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -67,6 +67,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; outputs = [ "out" "lib" ]; + setOutputFlags = false; + moveToDev = false; prePatch = '' substituteInPlace cmake/libutils.cmake \ @@ -112,8 +114,8 @@ stdenv.mkDerivation rec { '' + '' # Fix the mysql_config sed -i $out/bin/mysql_config \ - -e 's,-lz,-L${zlib}/lib -lz,g' \ - -e 's,-lssl,-L${openssl}/lib -lssl,g' + -e 's,-lz,-L${zlib.out}/lib -lz,g' \ + -e 's,-lssl,-L${openssl.out}/lib -lssl,g' # Add mysql_config to libs since configure scripts use it mkdir -p $lib/bin diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 7a0ecdfd95281..1743aa2df4be6 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -10,7 +10,8 @@ let inherit sha256; }; - outputs = [ "out" "doc" ]; + outputs = [ "out" "lib" "doc" ]; + setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = [ zlib readline openssl ] @@ -20,8 +21,11 @@ let makeFlags = [ "world" ]; - configureFlags = - [ "--with-openssl" ] + configureFlags = [ + "--with-openssl" + "--sysconfdir=/etc" + "--libdir=$(lib)/lib" + ] ++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs" ++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid"; @@ -36,8 +40,12 @@ let postInstall = '' + _moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it + _moveToOutput "lib/*.a" "$out" + _moveToOutput "lib/libecpg*" "$out" + # Prevent a retained dependency on gcc-wrapper. - substituteInPlace $out/lib/pgxs/src/Makefile.global --replace ${stdenv.cc}/bin/ld ld + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld ''; disallowedReferences = [ stdenv.cc ]; diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh index f5b8803a98a3c..c9e53f3800d3d 100644 --- a/pkgs/servers/x11/xorg/builder.sh +++ b/pkgs/servers/x11/xorg/builder.sh @@ -10,7 +10,7 @@ postInstall() { local r p requires set +o pipefail - requires=$(grep "Requires:" $out/lib/pkgconfig/*.pc | \ + requires=$(grep "Requires:" ${!outputDev}/lib/pkgconfig/*.pc | \ sed "s/Requires://" | sed "s/,/ /g") set -o pipefail @@ -33,10 +33,6 @@ postInstall() { done fi done - - mkdir -p "$out/nix-support" - echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" - echo "$propagatedNativeBuildInputs" > "$out/nix-support/propagated-native-build-inputs" } diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index d1764108e4ade..e872718a8072c 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -2117,6 +2117,21 @@ let buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]; }) // {inherit dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ;}; + # TODO: + # With the current state of ./generate-expr-from-tarballs.pl, + # this will get overwritten when next invoked. + # Could add a special case to ./generate-expr-from-tarballs.pl, + # or perhaps there's a cleaner solution. + #xquartz = (mkDerivation "xquartz" { + # name = "xorg-server-1.14.6"; + # builder = ./builder.sh; + # src = fetchurl { + # url = mirror://xorg/individual/xserver/xorg-server-1.14.6.tar.bz2; + # sha256 = "0c57vp1z0p38dj5gfipkmlw6bvbz1mrr0sb3sbghdxxdyq4kzcz8"; + # }; + # buildInputs = [pkgconfig renderproto libdrm openssl libX11 libXau libXaw libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt libXv ]; + #}) // {inherit renderproto libdrm openssl libX11 libXau libXaw libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt libXv ;}; + xorgsgmldoctools = (mkDerivation "xorgsgmldoctools" { name = "xorg-sgml-doctools-1.11"; builder = ./builder.sh; diff --git a/pkgs/servers/x11/xorg/imake-cc-wrapper-uberhack.patch b/pkgs/servers/x11/xorg/imake-cc-wrapper-uberhack.patch new file mode 100644 index 0000000000000..fe079eeb42a75 --- /dev/null +++ b/pkgs/servers/x11/xorg/imake-cc-wrapper-uberhack.patch @@ -0,0 +1,13 @@ +diff --git a/imake.c b/imake.c +index c20cd4a..ec2589b 100644 +--- a/imake.c ++++ b/imake.c +@@ -959,7 +959,7 @@ get_libc_version(FILE *inFile) + { + char aout[4096], *tmpdir; + FILE *fp; +- const char *format = "%s -o %s -x c -"; ++ const char *format = "f=$(mktemp imakeXXXXXX.c); cat > $f; %s $f -o %s"; + char *cc; + int len; + char *command; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 1339e51eb232d..ac3a4a8d11594 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -48,7 +48,7 @@ in imake = attrs: attrs // { inherit (xorg) xorgcffiles; x11BuildHook = ./imake.sh; - patches = [./imake.patch]; + patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; setupHook = if stdenv.isDarwin then ./darwin-imake-setup-hook.sh else null; CFLAGS = [ "-DIMAKE_COMPILETIME_CPP=\\\"${if stdenv.isDarwin then "${args.tradcpp}/bin/cpp" @@ -73,7 +73,7 @@ in libxcb = attrs : attrs // { nativeBuildInputs = [ args.python ]; configureFlags = "--enable-xkb --enable-xinput"; - outputs = [ "out" "doc" "man" ]; + outputs = [ "dev" "out" "doc" ]; }; xcbproto = attrs : attrs // { @@ -81,6 +81,7 @@ in }; libX11 = attrs: attrs // { + outputs = [ "dev" "out" "man" ]; preConfigure = setMalloc0ReturnsNullCrossCompiling + '' sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure ''; @@ -90,7 +91,6 @@ in rm -rf $out/share/doc ''; CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; - outputs = [ "out" "man" ]; }; libAppleWM = attrs: attrs // { @@ -100,7 +100,16 @@ in ''; }; + libXau = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + + libXdmcp = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + }; + libXfont = attrs: attrs // { + outputs = [ "dev" "out" ]; propagatedBuildInputs = [ args.freetype ]; # propagate link reqs. like bzip2 # prevents "misaligned_stack_error_entering_dyld_stub_binder" configureFlags = lib.optionals isDarwin [ @@ -109,14 +118,10 @@ in }; libXxf86vm = attrs: attrs // { + outputs = [ "dev" "out" ]; preConfigure = setMalloc0ReturnsNullCrossCompiling; }; - libXrandr = attrs: attrs // { - preConfigure = setMalloc0ReturnsNullCrossCompiling; - propagatedBuildInputs = [xorg.libXrender]; - }; - # Propagate some build inputs because of header file dependencies. # Note: most of these are in Requires.private, so maybe builder.sh # should propagate them automatically. @@ -126,7 +131,7 @@ in ''; propagatedBuildInputs = [ xorg.libSM ]; CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; - outputs = [ "out" "doc" "man" ]; + outputs = [ "dev" "out" "docdev" ]; }; # See https://bugs.freedesktop.org/show_bug.cgi?id=47792 @@ -139,44 +144,106 @@ in propagatedBuildInputs = [ xorg.fixesproto ]; }; + libICE = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + }; + libXcomposite = attrs: attrs // { + outputs = [ "dev" "out" ]; propagatedBuildInputs = [ xorg.libXfixes ]; }; libXaw = attrs: attrs // { + outputs = [ "dev" "out" "docdev" ]; propagatedBuildInputs = [ xorg.libXmu ]; }; + libXcursor = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + + libXdamage = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + libXft = attrs: attrs // { + outputs = [ "dev" "out" ]; propagatedBuildInputs = [ xorg.libXrender args.freetype args.fontconfig ]; preConfigure = setMalloc0ReturnsNullCrossCompiling; # the include files need ft2build.h, and Requires.private isn't enough for us postInstall = '' - sed "/^Requires:/s/$/, freetype2/" -i "$out/lib/pkgconfig/xft.pc" + sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc" ''; }; libXext = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; propagatedBuildInputs = [ xorg.xproto xorg.libXau ]; preConfigure = setMalloc0ReturnsNullCrossCompiling; }; - libSM = attrs: attrs - // { propagatedBuildInputs = [ xorg.libICE ]; }; + libXfixes = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + + libXi = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + }; + + libXinerama = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + + libXmu = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + buildFlags = ''BITMAP_DEFINES=-DBITMAPDIR=\"/no-such-path\"''; + }; + + libXrandr = attrs: attrs // { + outputs = [ "dev" "out" ]; + preConfigure = setMalloc0ReturnsNullCrossCompiling; + propagatedBuildInputs = [xorg.libXrender]; + }; + + libSM = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + propagatedBuildInputs = [ xorg.libICE ]; + }; - libXrender = attrs: attrs - // { preConfigure = setMalloc0ReturnsNullCrossCompiling; }; + libXrender = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + preConfigure = setMalloc0ReturnsNullCrossCompiling; + }; - libXvMC = attrs: attrs - // { buildInputs = attrs.buildInputs ++ [xorg.renderproto]; }; + libXres = attrs: attrs // { + outputs = [ "dev" "out" "docdev" ]; + }; + + libXv = attrs: attrs // { + outputs = [ "dev" "out" "docdev" ]; + }; + + libXvMC = attrs: attrs // { + outputs = [ "dev" "out" "doc" ]; + buildInputs = attrs.buildInputs ++ [xorg.renderproto]; + }; libXpm = attrs: attrs // { + outputs = [ "dev" "out" "bin" ]; # tiny man in $bin patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in"; }; libXpresent = attrs: attrs // { buildInputs = with xorg; attrs.buildInputs ++ [ libXext libXfixes libXrandr ]; }; + libxkbfile = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to avoid propagation + }; + + libxshmfence = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to avoid propagation + }; + setxkbmap = attrs: attrs // { postInstall = '' @@ -193,10 +260,30 @@ in buildInputs = attrs.buildInputs ++ [ args.freetype args.fontconfig ]; }; + xcbutil = attrs: attrs // { + outputs = [ "dev" "out" ]; + }; + xcbutilcursor = attrs: attrs // { meta.maintainers = [ stdenv.lib.maintainers.lovek323 ]; }; + xcbutilimage = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to get rid of propagating others + }; + + xcbutilkeysyms = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to get rid of propagating others + }; + + xcbutilrenderutil = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to get rid of propagating others + }; + + xcbutilwm = attrs: attrs // { + outputs = [ "dev" "out" ]; # mainly to get rid of propagating others + }; + xf86inputevdev = attrs: attrs // { preBuild = "sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c"; installFlags = "sdkdir=\${out}/include/xorg"; @@ -280,7 +367,7 @@ in version = (builtins.parseDrvName attrs.name).version; commonBuildInputs = attrs.buildInputs ++ [ xtrans ]; commonPropagatedBuildInputs = [ - args.zlib args.mesa args.dbus.libs + args.zlib args.mesa args.dbus xf86bigfontproto glproto xf86driproto compositeproto scrnsaverproto resourceproto xf86dgaproto @@ -307,6 +394,7 @@ in in if (!isDarwin) then { + outputs = [ "dev" "out" ]; buildInputs = [ makeWrapper ] ++ commonBuildInputs; propagatedBuildInputs = [ libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [ args.udev @@ -325,6 +413,12 @@ in wrapProgram $out/bin/Xephyr \ --set XKB_BINDIR "${xorg.xkbcomp}/bin" \ --add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb" + ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others + cd "$dev" + for f in include/xorg/*.h; do + sed "1i#line 1 \"${attrs.name}/$f\"" -i "$f" + done + ) ''; passthru.version = version; # needed by virtualbox guest additions } else { @@ -405,7 +499,7 @@ in stdenv = if isDarwin then args.clangStdenv else stdenv; buildInputs = attrs.buildInputs ++ lib.optional isDarwin args.bootstrap_cmds; configureFlags = [ - "--with-xserver=${xorg.xorgserver}/bin/X" + "--with-xserver=${xorg.xorgserver.out}/bin/X" ] ++ lib.optionals isDarwin [ "--with-bundle-id-prefix=org.nixos.xquartz" "--with-launchdaemons-dir=\${out}/LaunchDaemons" diff --git a/pkgs/servers/x11/xquartz/default.nix b/pkgs/servers/x11/xquartz/default.nix index 920b66147f26f..db0c446617af6 100644 --- a/pkgs/servers/x11/xquartz/default.nix +++ b/pkgs/servers/x11/xquartz/default.nix @@ -159,7 +159,7 @@ in stdenv.mkDerivation { --replace "@ENCODINGSDIR@" "${xorg.encodings}/share/fonts/X11/encodings" \ --replace "@MKFONTDIR@" "${xorg.mkfontdir}/bin/mkfontdir" \ --replace "@MKFONTSCALE@" "${xorg.mkfontscale}/bin/mkfontscale" \ - --replace "@FC_CACHE@" "${fontconfig}/bin/fc-cache" \ + --replace "@FC_CACHE@" "${fontconfig.bin}/bin/fc-cache" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" cp ${./xinitrc} $out/etc/X11/xinit/xinitrc diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 60504ecaa9bc4..e49e7ef5da49b 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -9,6 +9,8 @@ let shortName = "bash43"; baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline"; sha256 = "1m14s1f61mf6bijfibcjm9y6pkyvz6gibyl8p4hxq90fisi8gimg"; + + inherit (stdenv.lib) optional optionalString; in stdenv.mkDerivation rec { @@ -41,17 +43,17 @@ stdenv.mkDerivation rec { }; in import ./bash-4.3-patches.nix patch) - ++ stdenv.lib.optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch; + ++ optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch; crossAttrs = { configureFlags = baseConfigureFlags + " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" + - stdenv.lib.optionalString stdenv.isCygwin '' + optionalString stdenv.isCygwin '' --without-libintl-prefix --without-libiconv-prefix --with-installed-readline bash_cv_dev_stdin=present bash_cv_dev_fd=standard - bash_cv_termcap_lib=libncurses + bash_cv_termcap_lib=libncurses ''; }; @@ -59,20 +61,29 @@ stdenv.mkDerivation rec { # Note: Bison is needed because the patches above modify parse.y. nativeBuildInputs = [bison] - ++ stdenv.lib.optional (texinfo != null) texinfo - ++ stdenv.lib.optional interactive readline - ++ stdenv.lib.optional stdenv.isDarwin binutils; + ++ optional (texinfo != null) texinfo + ++ optional interactive readline + ++ optional stdenv.isDarwin binutils; # Bash randomly fails to build because of a recursive invocation to # build `version.h'. enableParallelBuilding = false; postInstall = '' - # Add an `sh' -> `bash' symlink. ln -s bash "$out/bin/sh" ''; - meta = { + postFixup = if interactive + then '' + substituteInPlace "$out/bin/bashbug" \ + --replace '${stdenv.shell}' "$out/bin/bash" + '' + # most space is taken by locale data + else '' + rm -r "$out/share" "$out/bin/bashbug" + ''; + + meta = with stdenv.lib; { homepage = http://www.gnu.org/software/bash/; description = "GNU Bourne-Again Shell, the de facto standard shell on Linux" + @@ -89,11 +100,11 @@ stdenv.mkDerivation rec { Bash without modification. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; - platforms = stdenv.lib.platforms.all; + platforms = platforms.all; - maintainers = [ stdenv.lib.maintainers.simons ]; + maintainers = [ maintainers.simons ]; }; passthru = { diff --git a/pkgs/stdenv/common-path.nix b/pkgs/stdenv/common-path.nix index cff6fd0a3eed1..da468d56a2cda 100644 --- a/pkgs/stdenv/common-path.nix +++ b/pkgs/stdenv/common-path.nix @@ -7,9 +7,9 @@ pkgs.gawk pkgs.gnutar pkgs.gzip - pkgs.bzip2 + pkgs.bzip2.bin pkgs.gnumake pkgs.bash pkgs.patch - pkgs.xz + pkgs.xz.bin ] diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 636410fdd788c..d6b5bef8f4705 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -30,9 +30,9 @@ rec { cp -rL ${darwin.Libsystem}/include $out chmod -R u+w $out/include - cp -rL ${icu}/include* $out/include + cp -rL ${icu.dev}/include* $out/include cp -rL ${libiconv}/include/* $out/include - cp -rL ${gnugrep.pcre}/include/* $out/include + cp -rL ${gnugrep.pcre.dev}/include/* $out/include mv $out/include $out/include-Libsystem # Copy coreutils, bash, etc. @@ -49,20 +49,20 @@ rec { cp -d ${gawk}/bin/awk $out/bin cp ${gnutar}/bin/tar $out/bin cp ${gzip}/bin/gzip $out/bin - cp ${bzip2}/bin/bzip2 $out/bin + cp ${bzip2.bin}/bin/bzip2 $out/bin cp -d ${gnumake}/bin/* $out/bin cp -d ${patch}/bin/* $out/bin - cp -d ${xz}/bin/xz $out/bin + cp -d ${xz.bin}/bin/xz $out/bin # This used to be in-nixpkgs, but now is in the bundle # because I can't be bothered to make it partially static - cp ${curl}/bin/curl $out/bin - cp -d ${curl}/lib/libcurl*.dylib $out/lib - cp -d ${libssh2}/lib/libssh*.dylib $out/lib - cp -d ${openssl}/lib/*.dylib $out/lib + cp ${curl.bin}/bin/curl $out/bin + cp -d ${curl.out}/lib/libcurl*.dylib $out/lib + cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib + cp -d ${openssl.out}/lib/*.dylib $out/lib - cp -d ${gnugrep.pcre}/lib/libpcre*.dylib $out/lib - cp -d ${libiconv}/lib/libiconv*.dylib $out/lib + cp -d ${gnugrep.pcre.out}/lib/libpcre*.dylib $out/lib + cp -d ${libiconv.lib}/lib/libiconv*.dylib $out/lib # Copy what we need of clang cp -d ${llvmPackages.clang}/bin/clang $out/bin @@ -77,10 +77,10 @@ rec { mkdir $out/include cp -rd ${libcxx}/include/c++ $out/include - cp -d ${icu}/lib/libicu*.dylib $out/lib - cp -d ${zlib}/lib/libz.* $out/lib + cp -d ${icu.out}/lib/libicu*.dylib $out/lib + cp -d ${zlib.out}/lib/libz.* $out/lib cp -d ${gmpxx}/lib/libgmp*.* $out/lib - cp -d ${xz}/lib/liblzma*.* $out/lib + cp -d ${xz.out}/lib/liblzma*.* $out/lib # Copy binutils. for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 246ca3696d582..9e011ab88ae16 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -80,6 +80,7 @@ let ../../build-support/setup-hooks/compress-man-pages.sh ../../build-support/setup-hooks/strip.sh ../../build-support/setup-hooks/patch-shebangs.sh + ../../build-support/setup-hooks/multiple-outputs.sh ../../build-support/setup-hooks/move-sbin.sh ../../build-support/setup-hooks/move-lib64.sh cc diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index a01af7db70a3a..788973b0cb5cf 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -174,12 +174,21 @@ ensureDir() { } -installBin() { - mkdir -p $out/bin - cp "$@" $out/bin +# Add $1/lib* into rpaths. +# The function is used in multiple-outputs.sh hook, +# so it is defined here but tried after the hook. +_addRpathPrefix() { + if [ "$NIX_NO_SELF_RPATH" != 1 ]; then + export NIX_LDFLAGS="-rpath $1/lib $NIX_LDFLAGS" + if [ -n "$NIX_LIB64_IN_SELF_RPATH" ]; then + export NIX_LDFLAGS="-rpath $1/lib64 $NIX_LDFLAGS" + fi + if [ -n "$NIX_LIB32_IN_SELF_RPATH" ]; then + export NIX_LDFLAGS="-rpath $1/lib32 $NIX_LDFLAGS" + fi + fi } - ###################################################################### # Initialisation. @@ -301,16 +310,7 @@ for i in $crossPkgs; do done -# Add the output as an rpath. -if [ "$NIX_NO_SELF_RPATH" != 1 ]; then - export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS" - if [ -n "$NIX_LIB64_IN_SELF_RPATH" ]; then - export NIX_LDFLAGS="-rpath $out/lib64 $NIX_LDFLAGS" - fi - if [ -n "$NIX_LIB32_IN_SELF_RPATH" ]; then - export NIX_LDFLAGS="-rpath $out/lib32 $NIX_LDFLAGS" - fi -fi +_addRpathPrefix "$out" # Set the TZ (timezone) environment variable, otherwise commands like @@ -627,7 +627,7 @@ configurePhase() { done fi - if [ -z "$dontAddPrefix" ]; then + if [ -z "$dontAddPrefix" -a -n "$prefix" ]; then configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" fi @@ -689,7 +689,9 @@ checkPhase() { installPhase() { runHook preInstall - mkdir -p "$prefix" + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi installTargets=${installTargets:-install} echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" @@ -718,24 +720,29 @@ fixupPhase() { prefix=${!output} runHook fixupOutput done + + # Propagate build inputs and setup hook into the development output. + if [ -n "$propagatedBuildInputs" ]; then - mkdir -p "$out/nix-support" - echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" + mkdir -p "${!outputDev}/nix-support" + echo "$propagatedBuildInputs" > "${!outputDev}/nix-support/propagated-build-inputs" fi if [ -n "$propagatedNativeBuildInputs" ]; then - mkdir -p "$out/nix-support" - echo "$propagatedNativeBuildInputs" > "$out/nix-support/propagated-native-build-inputs" + mkdir -p "${!outputDev}/nix-support" + echo "$propagatedNativeBuildInputs" > "${!outputDev}/nix-support/propagated-native-build-inputs" fi - if [ -n "$propagatedUserEnvPkgs" ]; then - mkdir -p "$out/nix-support" - echo "$propagatedUserEnvPkgs" > "$out/nix-support/propagated-user-env-packages" + if [ -n "$setupHook" ]; then + mkdir -p "${!outputDev}/nix-support" + substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook" fi - if [ -n "$setupHook" ]; then - mkdir -p "$out/nix-support" - substituteAll "$setupHook" "$out/nix-support/setup-hook" + # Propagate user-env packages into the output with binaries, TODO? + + if [ -n "$propagatedUserEnvPkgs" ]; then + mkdir -p "${!outputBin}/nix-support" + echo "$propagatedUserEnvPkgs" > "${!outputBin}/nix-support/propagated-user-env-packages" fi runHook postFixup diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 12fc3fed5a5a4..b796faa9a3f46 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -210,14 +210,13 @@ rec { gmp = pkgs.gmp.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; mpfr = pkgs.mpfr.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; libmpc = pkgs.libmpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; - isl_0_11 = pkgs.isl_0_11.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; - cloog_0_18_0 = pkgs.cloog_0_18_0.override { + isl = pkgs.isl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; - isl = isl_0_11; + inherit isl; }; gccPlain = pkgs.gcc.cc.override { - isl = isl_0_11; - cloog = cloog_0_18_0; + inherit isl cloog; }; }; extraBuildInputs = [ stage2.pkgs.patchelf stage2.pkgs.paxctl ]; @@ -289,11 +288,13 @@ rec { shellPackage = stage4.pkgs.bash; }; + /* outputs TODO allowedRequisites = with stage4.pkgs; [ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk glibc gnumake gnused gnutar gnugrep gnupatch patchelf attr acl paxctl zlib pcre linuxHeaders ed gcc gcc.cc libsigsegv ]; + */ overrides = pkgs: { gcc = cc; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index bf060329be6d5..ed2154d00d2ec 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -130,20 +130,20 @@ rec { mkdir -p $out/bin $out/lib $out/libexec # Copy what we need of Glibc. - cp -d ${glibc}/lib/ld-*.so* $out/lib - cp -d ${glibc}/lib/libc*.so* $out/lib - cp -d ${glibc}/lib/libc_nonshared.a $out/lib - cp -d ${glibc}/lib/libm*.so* $out/lib - cp -d ${glibc}/lib/libdl*.so* $out/lib - cp -d ${glibc}/lib/librt*.so* $out/lib - cp -d ${glibc}/lib/libpthread*.so* $out/lib - cp -d ${glibc}/lib/libnsl*.so* $out/lib - cp -d ${glibc}/lib/libutil*.so* $out/lib - cp -d ${glibc}/lib/libnss*.so* $out/lib - cp -d ${glibc}/lib/libresolv*.so* $out/lib - cp -d ${glibc}/lib/crt?.o $out/lib + cp -d ${glibc.out}/lib/ld-*.so* $out/lib + cp -d ${glibc.out}/lib/libc*.so* $out/lib + cp -d ${glibc.out}/lib/libc_nonshared.a $out/lib + cp -d ${glibc.out}/lib/libm*.so* $out/lib + cp -d ${glibc.out}/lib/libdl*.so* $out/lib + cp -d ${glibc.out}/lib/librt*.so* $out/lib + cp -d ${glibc.out}/lib/libpthread*.so* $out/lib + cp -d ${glibc.out}/lib/libnsl*.so* $out/lib + cp -d ${glibc.out}/lib/libutil*.so* $out/lib + cp -d ${glibc.out}/lib/libnss*.so* $out/lib + cp -d ${glibc.out}/lib/libresolv*.so* $out/lib + cp -d ${glibc.out}/lib/crt?.o $out/lib - cp -rL ${glibc}/include $out + cp -rL ${glibc.dev}/include $out chmod -R u+w $out/include # Hopefully we won't need these. diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index e31fed39843d9..b1a824983a3e7 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -43,20 +43,20 @@ rec { mkdir -p $out/bin $out/lib $out/libexec # Copy what we need of Glibc. - cp -d ${glibc}/lib/ld*.so* $out/lib - cp -d ${glibc}/lib/libc*.so* $out/lib - cp -d ${glibc}/lib/libc_nonshared.a $out/lib - cp -d ${glibc}/lib/libm*.so* $out/lib - cp -d ${glibc}/lib/libdl*.so* $out/lib - cp -d ${glibc}/lib/librt*.so* $out/lib - cp -d ${glibc}/lib/libpthread*.so* $out/lib - cp -d ${glibc}/lib/libnsl*.so* $out/lib - cp -d ${glibc}/lib/libutil*.so* $out/lib - cp -d ${glibc}/lib/libnss*.so* $out/lib - cp -d ${glibc}/lib/libresolv*.so* $out/lib - cp -d ${glibc}/lib/crt?.o $out/lib - - cp -rL ${glibc}/include $out + cp -d ${glibc.out}/lib/ld*.so* $out/lib + cp -d ${glibc.out}/lib/libc*.so* $out/lib + cp -d ${glibc.out}/lib/libc_nonshared.a $out/lib + cp -d ${glibc.out}/lib/libm*.so* $out/lib + cp -d ${glibc.out}/lib/libdl*.so* $out/lib + cp -d ${glibc.out}/lib/librt*.so* $out/lib + cp -d ${glibc.out}/lib/libpthread*.so* $out/lib + cp -d ${glibc.out}/lib/libnsl*.so* $out/lib + cp -d ${glibc.out}/lib/libutil*.so* $out/lib + cp -d ${glibc.out}/lib/libnss*.so* $out/lib + cp -d ${glibc.out}/lib/libresolv*.so* $out/lib + cp -d ${glibc.out}/lib/crt?.o $out/lib + + cp -rL ${glibc.dev}/include $out chmod -R u+w $out/include # Hopefully we won't need these. diff --git a/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix b/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix index 932929a0efcd0..8168994828731 100644 --- a/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix @@ -28,9 +28,9 @@ rec { cp -rL ${darwin.Libsystem}/include $out chmod -R u+w $out/include - cp -rL ${icu}/include* $out/include + cp -rL ${icu.dev}/include* $out/include cp -rL ${libiconv}/include/* $out/include - cp -rL ${gnugrep.pcre}/include/* $out/include + cp -rL ${gnugrep.pcre.dev}/include/* $out/include mv $out/include $out/include-Libsystem # Copy coreutils, bash, etc. @@ -47,19 +47,19 @@ rec { cp -d ${gawk}/bin/awk $out/bin cp ${gnutar}/bin/tar $out/bin cp ${gzip}/bin/gzip $out/bin - cp ${bzip2}/bin/bzip2 $out/bin + cp ${bzip2.bin}/bin/bzip2 $out/bin cp -d ${gnumake}/bin/* $out/bin cp -d ${patch}/bin/* $out/bin - cp -d ${xz}/bin/xz $out/bin + cp -d ${xz.bin}/bin/xz $out/bin # This used to be in-nixpkgs, but now is in the bundle # because I can't be bothered to make it partially static - cp ${curl}/bin/curl $out/bin - cp -d ${curl}/lib/libcurl*.dylib $out/lib - cp -d ${libssh2}/lib/libssh*.dylib $out/lib - cp -d ${openssl}/lib/*.dylib $out/lib + cp ${curl.bin}/bin/curl $out/bin + cp -d ${curl.out}/lib/libcurl*.dylib $out/lib + cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib + cp -d ${openssl.out}/lib/*.dylib $out/lib - cp -d ${gnugrep.pcre}/lib/libpcre*.dylib $out/lib + cp -d ${gnugrep.pcre.out}/lib/libpcre*.dylib $out/lib cp -d ${libiconv}/lib/lib*.dylib $out/lib cp -d ${gettext}/lib/libintl*.dylib $out/lib chmod +x $out/lib/libintl*.dylib @@ -78,10 +78,10 @@ rec { mkdir $out/include cp -rd ${libcxx}/include/c++ $out/include - cp -d ${icu}/lib/libicu*.dylib $out/lib - cp -d ${zlib}/lib/libz.* $out/lib + cp -d ${icu.out}/lib/libicu*.dylib $out/lib + cp -d ${zlib.out}/lib/libz.* $out/lib cp -d ${gmpxx}/lib/libgmp*.* $out/lib - cp -d ${xz}/lib/liblzma*.* $out/lib + cp -d ${xz.out}/lib/liblzma*.* $out/lib # Copy binutils. for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do diff --git a/pkgs/test/openftd/default.nix b/pkgs/test/openftd/default.nix index 91042fe059115..13b6b01f32599 100644 --- a/pkgs/test/openftd/default.nix +++ b/pkgs/test/openftd/default.nix @@ -45,5 +45,5 @@ stdenv.mkDerivation { glib gtk pkgconfig dbus_glib realCurl pcre libsexy libgnomeui gtkspell libnotify libgtkhtml ]; - configureFlags="--with-libcurl-libraries=${curl}/lib --with-libcurl-headers=${curl}/include --with-pcre_libraries=${pcre}/lib --with-pcre_headers=${pcre}/include"; + configureFlags="--with-libcurl-libraries=${curl.out}/lib --with-libcurl-headers=${curl.dev}/include --with-pcre_libraries=${pcre.out}/lib --with-pcre_headers=${pcre.dev}/include"; } diff --git a/pkgs/tools/X11/xlaunch/default.nix b/pkgs/tools/X11/xlaunch/default.nix index 06dfd28b7399c..ccf998951a341 100644 --- a/pkgs/tools/X11/xlaunch/default.nix +++ b/pkgs/tools/X11/xlaunch/default.nix @@ -45,7 +45,7 @@ EOF else RESET_OPTION=\"-noreset\" fi; - XCMD=\"\$(egrep \"^Environment=\" /etc/systemd/system/display-manager.service | sed -e \"s/Environment=/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" + XCMD=\"\$(egrep \"^Environment=\" /etc/systemd/system/display-manager.service | sed -e \"s/Environment=/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver.out}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" PRE_XCMD=\"\$(egrep \"^ExecStartPre=\" /etc/systemd/system/display-manager.service | sed -e \"\s/ExecStartPre=//\")\" echo \"\$PRE_XCMD\" echo \"\$PRE_XCMD\" | bash diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 5ef80e887cf6f..fe95b2b685e70 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -53,14 +53,14 @@ buildPythonPackage rec { --set XKB_BINDIR "${xkbcomp}/bin" \ --set FONTCONFIG_FILE "${fontsConf}" \ --prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \ - --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin + --prefix PATH : ${getopt}/bin:${xorgserver.out}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin ''; #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though #postFixup = '' # sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra # sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra - # sed -i '4iexport PATH=${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra + # sed -i '4iexport PATH=${getopt}/bin:${xorgserver.out}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra #''; diff --git a/pkgs/tools/X11/xpra/gtk3.nix b/pkgs/tools/X11/xpra/gtk3.nix index 04bcd1195147c..de65897130a8a 100644 --- a/pkgs/tools/X11/xpra/gtk3.nix +++ b/pkgs/tools/X11/xpra/gtk3.nix @@ -54,14 +54,14 @@ buildPythonPackage rec { --set XKB_BINDIR "${xkbcomp}/bin" \ --set FONTCONFIG_FILE "${fontsConf}" \ --prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \ - --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin + --prefix PATH : ${getopt}/bin:${xorgserver.out}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin ''; #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though #postFixup = '' # sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra # sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra - # sed -i '4iexport PATH=${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra + # sed -i '4iexport PATH=${getopt}/bin:${xorgserver.out}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin\${PATH:+:}\$PATH' $out/bin/xpra #''; diff --git a/pkgs/tools/admin/gtk-vnc/default.nix b/pkgs/tools/admin/gtk-vnc/default.nix index fddb9505c9841..657d08026e4a8 100644 --- a/pkgs/tools/admin/gtk-vnc/default.nix +++ b/pkgs/tools/admin/gtk-vnc/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # Fix broken .la files preFixup = '' - sed 's,-lgpg-error,-L${libgpgerror}/lib -lgpg-error,' -i $out/lib/*.la + sed 's,-lgpg-error,-L${libgpgerror.out}/lib -lgpg-error,' -i $out/lib/*.la ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 71b43bf2de9ae..6b5717ab29705 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoreconfHook }: +{ stdenv, fetchurl, autoreconfHook, acl }: stdenv.mkDerivation rec { name = "gnutar-${version}"; @@ -24,7 +24,10 @@ stdenv.mkDerivation rec { substituteInPlace src/system.c --replace '_(' 'N_(' ''; - buildInputs = stdenv.lib.optional stdenv.isDarwin autoreconfHook; + outputs = [ "out" "info" ]; + + buildInputs = [ acl ] + ++ stdenv.lib.optional stdenv.isDarwin autoreconfHook; # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. diff --git a/pkgs/tools/audio/qastools/default.nix b/pkgs/tools/audio/qastools/default.nix index 920f6913d090b..3743b38a2103b 100644 --- a/pkgs/tools/audio/qastools/default.nix +++ b/pkgs/tools/audio/qastools/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { cmakeFlags = [ "-DCMAKE_INSALL_PREFIX=$out" - "-DALSA_INCLUDE=${alsaLib}/include/alsa/version.h" + "-DALSA_INCLUDE=${alsaLib.dev}/include/alsa/version.h" ]; meta = with stdenv.lib; { diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix index 5330dfb82bd2e..7acb8ce2eb0bf 100644 --- a/pkgs/tools/bluetooth/blueman/default.nix +++ b/pkgs/tools/bluetooth/blueman/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { for i in $out/bin/* $out/libexec/*; do wrapProgram $i \ --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" \ - --set LD_LIBRARY_PATH "${libpulseaudio}/lib:" \ + --set LD_LIBRARY_PATH "${libpulseaudio.out}/lib:" \ --prefix PATH : ${xdg_utils}/bin done diff --git a/pkgs/tools/bluetooth/obex-data-server/default.nix b/pkgs/tools/bluetooth/obex-data-server/default.nix index 53e854c34ebc6..15167ee57b134 100644 --- a/pkgs/tools/bluetooth/obex-data-server/default.nix +++ b/pkgs/tools/bluetooth/obex-data-server/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { preConfigure = '' addToSearchPath PKG_CONFIG_PATH ${openobex}/lib64/pkgconfig - export PKG_CONFIG_PATH="${dbus_libs}/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH="${dbus_libs.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" ''; meta = { diff --git a/pkgs/tools/bluetooth/obexd/default.nix b/pkgs/tools/bluetooth/obexd/default.nix index f900a81caa0e8..a3486569b5180 100644 --- a/pkgs/tools/bluetooth/obexd/default.nix +++ b/pkgs/tools/bluetooth/obexd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1i20dnibvnq9lnkkhajr5xx3kxlwf9q5c4jm19kyb0q1klzgzlb8"; }; - buildInputs = [ glib dbus.libs openobex bluez libical ]; + buildInputs = [ glib dbus openobex bluez libical ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/tools/compression/bzip2/builder.sh b/pkgs/tools/compression/bzip2/builder.sh deleted file mode 100644 index a598dfcf808c1..0000000000000 --- a/pkgs/tools/compression/bzip2/builder.sh +++ /dev/null @@ -1,24 +0,0 @@ -source $stdenv/setup -installFlags="PREFIX=$out" - -if test -n "$sharedLibrary"; then - - preBuild() { - make -f Makefile-libbz2_so - } - - preInstall() { - mkdir -p $out/lib - mv libbz2.so* $out/lib - (cd $out/lib && ln -s libbz2.so.1.0.? libbz2.so && ln -s libbz2.so.1.0.? libbz2.so.1); - } - -fi - -postInstall() { - rm $out/bin/bunzip2* $out/bin/bzcat* - ln -s bzip2 $out/bin/bunzip2 - ln -s bzip2 $out/bin/bzcat -} - -genericBuild diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index 74da91431a439..48f4c4fe3c356 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl, linkStatic ? false }: -let version = "1.0.6"; in +let + version = "1.0.6"; -stdenv.mkDerivation { - name = "bzip2-${version}"; + sharedLibrary = !stdenv.isDarwin && !(stdenv ? isStatic) + && stdenv.system != "i686-cygwin" && !linkStatic; - builder = ./builder.sh; +in stdenv.mkDerivation { + name = "bzip2-${version}"; src = fetchurl { url = "http://www.bzip.org/${version}/bzip2-${version}.tar.gz"; @@ -23,14 +25,41 @@ stdenv.mkDerivation { ''; }; - sharedLibrary = - !stdenv.isDarwin && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic; + outputs = [ "dev" "bin" "static" ] ++ stdenv.lib.optional sharedLibrary "out"; + + preBuild = stdenv.lib.optionalString sharedLibrary '' + make -f Makefile-libbz2_so + ''; + + preInstall = stdenv.lib.optionalString sharedLibrary '' + mkdir -p $out/lib + mv libbz2.so* $out/lib + ( cd $out/lib && + ln -s libbz2.so.1.0.? libbz2.so && + ln -s libbz2.so.1.0.? libbz2.so.1 + ) + ''; + + installFlags = [ "PREFIX=$(bin)" ]; + + postInstall = '' + rm $bin/bin/bunzip2* $bin/bin/bzcat* + ln -s bzip2 $bin/bin/bunzip2 + ln -s bzip2 $bin/bin/bzcat + + mkdir "$static" + mv "$bin/lib" "$static/" + ''; - patchPhase = stdenv.lib.optionalString stdenv.isDarwin "substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'"; + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang' + ''; - preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'"; + preConfigure = '' + substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man' + ''; - makeFlags = if linkStatic then "LDFLAGS=-static" else ""; + makeFlags = stdenv.lib.optional linkStatic "LDFLAGS=-static"; inherit linkStatic; diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 6772e21cb0cb5..009246b69a088 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, xz }: stdenv.mkDerivation rec { name = "gzip-1.6"; @@ -8,8 +8,12 @@ stdenv.mkDerivation rec { sha256 = "0ivqnbhiwd12q8hp3qw6rpsrpw2jg5y2mymk8cn22lsx90dfvprp"; }; + outputs = [ "out" "man" "info" ]; + enableParallelBuilding = true; + buildInputs = [ xz.bin ]; + preConfigure = if stdenv.isCygwin then '' sed -i lib/fpending.h -e 's,include <stdio_ext.h>,,' '' else null; diff --git a/pkgs/tools/compression/kzipmix/default.nix b/pkgs/tools/compression/kzipmix/default.nix index f768189040b5b..6fcff7b292802 100644 --- a/pkgs/tools/compression/kzipmix/default.nix +++ b/pkgs/tools/compression/kzipmix/default.nix @@ -12,8 +12,8 @@ stdenv.mkDerivation { mkdir -p $out/bin cp kzip zipmix $out/bin - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/bin/kzip - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/bin/zipmix + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/kzip + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/zipmix ''; meta = { diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 5f5ee28ca0636..5d6a8634b1baa 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1da071wyx921pyx3zkxlnbpp14p6km98pnp66mg1arwi9dxgbxbg"; }; + outputs = [ "dev" "out" "bin" "man" "doc" ]; + doCheck = true; # In stdenv-linux, prevent a dependency on bootstrap-tools. diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index a53e93960aef4..c091158bff635 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -8,7 +8,11 @@ stdenv.mkDerivation rec { sha256 = "1m72lk90b5i3h9qnmss6aygrzyn8x2avy3hyaq2fb0jglkrkz6ar"; }; - buildInputs = [ pkgconfig libuuid ]; + outputs = [ "bin" "out" "man" ]; + outputDev = "bin"; # just for *.pc + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libuuid ]; crossAttrs = { preConfigure = '' @@ -16,14 +20,19 @@ stdenv.mkDerivation rec { ''; }; - # libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency). - configureFlags = "--enable-elf-shlibs --disable-libuuid --disable-libblkid --disable-uuidd --disable-fsck --enable-symlink-install"; - - enableParallelBuilding = true; + configureFlags = [ + "--enable-elf-shlibs" "--enable-symlink-install" "--enable-relative-symlinks" + # libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency). + "--disable-libuuid" "--disable-uuidd" "--disable-libblkid" "--disable-fsck" + ]; - preInstall = "installFlagsArray=('LN=ln -s')"; + # hacky way to make it install *.pc + postInstall = '' + make install-libs + rm "$out"/lib/*.a + ''; - postInstall = "make install-libs"; + enableParallelBuilding = true; meta = { homepage = http://e2fsprogs.sourceforge.net/; diff --git a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix index d4129f4d390ac..1776c30ecae0a 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix @@ -1,9 +1,9 @@ { stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock , libselinux, cryptsetup, multipath_tools, lsof, utillinux -, useNixUdev ? true, udev ? null +, useNixUdev ? true, libudev ? null }: -assert useNixUdev -> udev != null; +assert useNixUdev -> libudev != null; buildPythonPackage rec { name = "blivet-${version}"; @@ -21,21 +21,21 @@ buildPythonPackage rec { sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \ blivet/devicelibs/mpath.py blivet/devices.py sed -i -e '/"wipefs"/ { - s|wipefs|${utillinux}/sbin/wipefs| + s|wipefs|${utillinux.bin}/sbin/wipefs| s/-f/--force/ }' blivet/formats/__init__.py sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py - sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py + sed -i -r -e 's|"(u?mount)"|"${utillinux.bin}/bin/\1"|' blivet/util.py sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py '' + stdenv.lib.optionalString useNixUdev '' sed -i -e '/find_library/,/find_library/ { - c libudev = "${udev}/lib/libudev.so.1" + c libudev = "${libudev.out}/lib/libudev.so.1" }' blivet/pyudev.py ''; propagatedBuildInputs = [ pykickstart pyparted pyblock libselinux cryptsetup - ] ++ stdenv.lib.optional useNixUdev udev; + ] ++ stdenv.lib.optional useNixUdev libudev; # tests are currently _heavily_ broken upstream doCheck = false; diff --git a/pkgs/tools/filesystems/nixpart/0.4/default.nix b/pkgs/tools/filesystems/nixpart/0.4/default.nix index 01a3caafc5ddf..cbedf6a70a5d7 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/default.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/default.nix @@ -12,7 +12,7 @@ let inherit stdenv fetchurl buildPythonPackage; inherit pykickstart pyparted pyblock cryptsetup multipath_tools; inherit useNixUdev; - inherit (pkgs) lsof utillinux udev; + inherit (pkgs) lsof utillinux libudev; libselinux = pkgs.libselinux.override { enablePython = true; }; }; @@ -29,12 +29,12 @@ let lvm2 = import ./lvm2.nix { inherit stdenv fetchurl; - inherit (pkgs) pkgconfig utillinux udev coreutils; + inherit (pkgs) pkgconfig utillinux libudev systemd coreutils; }; multipath_tools = import ./multipath-tools.nix { inherit stdenv fetchurl lvm2; - inherit (pkgs) readline udev libaio gzip; + inherit (pkgs) readline systemd libaio gzip; }; parted = import ./parted.nix { diff --git a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix index 9e2b0c9007947..b92c40ba99e62 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, udev, utillinux, coreutils }: +{ stdenv, fetchurl, pkgconfig, libudev, systemd, utillinux, coreutils }: let v = "2.02.106"; @@ -15,7 +15,7 @@ stdenv.mkDerivation { configureFlags = "--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib"; - buildInputs = [ pkgconfig udev ]; + buildInputs = [ pkgconfig libudev ]; preConfigure = '' @@ -23,7 +23,7 @@ stdenv.mkDerivation { --replace /usr/bin/tr ${coreutils}/bin/tr substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ --replace /usr/sbin/lvm $out/sbin/lvm \ - --replace /usr/bin/udevadm ${udev}/bin/udevadm + --replace /usr/bin/udevadm ${systemd.udev.bin}/bin/udevadm sed -i /DEFAULT_SYS_DIR/d Makefile.in sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in @@ -42,7 +42,7 @@ stdenv.mkDerivation { postInstall = '' substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \ - --replace $out/sbin/blkid ${utillinux}/sbin/blkid + --replace $out/sbin/blkid ${utillinux.bin}/sbin/blkid # Systemd stuff mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators diff --git a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix index 90722d74ace15..b78605504bf88 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }: +{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }: stdenv.mkDerivation rec { name = "multipath-tools-0.4.9"; @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup - substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id - substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id + substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id + substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id ''; meta = { diff --git a/pkgs/tools/filesystems/svnfs/default.nix b/pkgs/tools/filesystems/svnfs/default.nix index fba066d0f4cb4..3337141821770 100644 --- a/pkgs/tools/filesystems/svnfs/default.nix +++ b/pkgs/tools/filesystems/svnfs/default.nix @@ -12,10 +12,10 @@ stdenv.mkDerivation { # why is this required? preConfigure='' - export LD_LIBRARY_PATH=${subversion}/lib + export LD_LIBRARY_PATH=${subversion.out}/lib ''; - NIX_CFLAGS_COMPILE="-I ${subversion}/include/subversion-1"; + NIX_CFLAGS_COMPILE="-I ${subversion.dev}/include/subversion-1"; NIX_LDFLAGS="-lsvn_client-1"; meta = { diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix index de61809a1aea9..e30f67af3e951 100644 --- a/pkgs/tools/filesystems/xfsprogs/default.nix +++ b/pkgs/tools/filesystems/xfsprogs/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { buildInputs = [ gettext libuuid readline ]; - outputs = [ "out" "lib" ]; + outputs = [ "dev" "out" "bin" ]; # TODO: review xfs preConfigure = '' NIX_LDFLAGS="$(echo $NIX_LDFLAGS | sed "s,$out,$lib,g")" @@ -39,8 +39,6 @@ stdenv.mkDerivation rec { "XGETTEXT=xgettext" "--disable-lib64" "--enable-readline" - "--includedir=$(lib)/include" - "--libdir=$(lib)/lib" ]; installFlags = [ "install-dev" ]; diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index 138ae58da0641..cb37d893378e9 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -25,7 +25,7 @@ rec { mkdir -p $PWD/builddir cd builddir export NIX_LDFLAGS="$NIX_LDFLAGS -ldl -L$out/lib" - cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc}/lib + cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc.out}/lib '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; needLib64 = a.stdenv.system == "x86_64-linux"; diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index f8dd35576ff78..08799d3e712b0 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/gnuplot \ --prefix PATH : '${gnused}/bin' \ --prefix PATH : '${coreutils}/bin' \ - --prefix PATH : '${fontconfig}/bin' \ + --prefix PATH : '${fontconfig.bin}/bin' \ --run '. ${./set-gdfontpath-from-fontconfig.sh}' ''; diff --git a/pkgs/tools/graphics/graphviz/2.32.nix b/pkgs/tools/graphics/graphviz/2.32.nix index 2743bd78aa7c9..6eb8b5bceb2e9 100644 --- a/pkgs/tools/graphics/graphviz/2.32.nix +++ b/pkgs/tools/graphics/graphviz/2.32.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; - CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo}/include/cairo"; + CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo.dev}/include/cairo"; configureFlags = [ "--with-pngincludedir=${libpng}/include" diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index 5635e3a69ff7f..78784580eacca 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw +{ stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat , yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo , flex }: @@ -22,21 +22,14 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex - ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender pango libXaw ] + ] ++ stdenv.lib.optionals (xorg != null) + (with xorg; [ xlibsWrapper libXrender pango libXaw libXpm ]) ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin") - "-I${cairo}/include/cairo"; + "-I${cairo.dev}/include/cairo"; - configureFlags = - [ "--with-pngincludedir=${libpng}/include" - "--with-pnglibdir=${libpng}/lib" - "--with-jpegincludedir=${libjpeg}/include" - "--with-jpeglibdir=${libjpeg}/lib" - "--with-expatincludedir=${expat}/include" - "--with-expatlibdir=${expat}/lib" - ] - ++ stdenv.lib.optional (xorg == null) "--without-x"; + configureFlags = stdenv.lib.optional (xorg == null) "--without-x"; postPatch = stdenv.lib.optionalString stdenv.isDarwin '' for foo in cmd/dot/Makefile.in cmd/edgepaint/Makefile.in \ diff --git a/pkgs/tools/graphics/pdfread/default.nix b/pkgs/tools/graphics/pdfread/default.nix index f35553ea168f0..13f9e30c8da75 100644 --- a/pkgs/tools/graphics/pdfread/default.nix +++ b/pkgs/tools/graphics/pdfread/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { cp -R *.py pylrs $PYDIR wrapProgram $out/bin/pdfread.py --prefix PYTHONPATH : $PYTHONPATH:${pil}/$LIBSUFFIX/PIL:$PYDIR \ - --prefix PATH : ${ghostscript}/bin:${pngnq}/bin:${djvulibre}/bin:${unrar}/bin:${optipng}/bin + --prefix PATH : ${ghostscript}/bin:${pngnq}/bin:${djvulibre.bin}/bin:${unrar}/bin:${optipng}/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/graphics/pngout/default.nix b/pkgs/tools/graphics/pngout/default.nix index 471823ed9235b..afc1a2519fe10 100644 --- a/pkgs/tools/graphics/pngout/default.nix +++ b/pkgs/tools/graphics/pngout/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation { cp ${folder}/pngout $out/bin ${if stdenv.system == "i686-linux" then '' - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/bin/pngout + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout '' else if stdenv.system == "x86_64-linux" then '' - patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/bin/pngout + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout '' else ""} ''; diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix index d84989d4372b3..6da565b292f94 100644 --- a/pkgs/tools/graphics/quirc/default.nix +++ b/pkgs/tools/graphics/quirc/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { src = fetchgit { inherit (s) url sha256 rev; }; - NIX_CFLAGS_COMPILE="-I${SDL}/include/SDL"; + NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL"; configurePhase = '' sed -e 's/-[og] root//g' -i Makefile ''; diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix index 3e17e721f7be1..b62f81ba8fece 100644 --- a/pkgs/tools/inputmethods/ibus/default.nix +++ b/pkgs/tools/inputmethods/ibus/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { for f in "$out"/bin/*; do wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \ --prefix PYTHONPATH : "$(toPythonPath ${pygobject3})" \ - --prefix LD_LIBRARY_PATH : "${gnome3.gtk3}/lib:${atk}/lib:$out/lib" \ + --prefix LD_LIBRARY_PATH : "${gnome3.gtk3.out}/lib:${atk.out}/lib:$out/lib" \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \ --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules" done diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 35e9e3828d935..40ebf2174ae26 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, gmp ? null +{ stdenv, fetchurl, perl, xz, gmp ? null , aclSupport ? false, acl ? null , selinuxSupport? false, libselinux ? null, libsepol ? null , autoconf, automake114x, texinfo @@ -36,7 +36,9 @@ let touch -r src/stat.c src/tail.c ''; - nativeBuildInputs = [ perl ]; + outputs = [ "out" "info" ]; + + nativeBuildInputs = [ perl xz.bin ]; buildInputs = [ gmp ] ++ optional aclSupport acl ++ optionals stdenv.isCygwin [ autoconf automake114x texinfo ] # due to patch diff --git a/pkgs/tools/misc/debian-devscripts/default.nix b/pkgs/tools/misc/debian-devscripts/default.nix index b6158ab644546..2f484c22ddfe6 100644 --- a/pkgs/tools/misc/debian-devscripts/default.nix +++ b/pkgs/tools/misc/debian-devscripts/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { -e "s@/usr/(s|)bin/sendmail@${sendmailPath}@g" \ -e "s@/usr/bin/diff@${diffutils}/bin/diff@g" \ -e "s@/usr/bin/gpgv(2|)@${gnupg}/bin/gpgv2@g" \ - -e "s@(command -v|/usr/bin/)curl@${curl}/bin/curl@g" \ + -e "s@(command -v|/usr/bin/)curl@${curl.bin}/bin/curl@g" \ -i {} + sed -e "s@/usr/share/sgml/[^ ]*/manpages/docbook.xsl@${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl@" -i scripts/Makefile sed -r \ diff --git a/pkgs/tools/misc/entr/default.nix b/pkgs/tools/misc/entr/default.nix index 8770a5858875b..ae402e35c2eb6 100644 --- a/pkgs/tools/misc/entr/default.nix +++ b/pkgs/tools/misc/entr/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile.bsd --replace /bin/echo echo substituteInPlace entr.c --replace /bin/cat ${coreutils}/bin/cat - substituteInPlace entr.c --replace /usr/bin/clear ${ncurses}/bin/clear + substituteInPlace entr.c --replace /usr/bin/clear ${ncurses.dev}/bin/clear substituteInPlace entr.1 --replace /bin/cat cat substituteInPlace entr.1 --replace /usr/bin/clear clear ''; diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 16d53c9f436a8..c59283fb7c39c 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, coreutils}: +{ stdenv, fetchurl, coreutils }: stdenv.mkDerivation rec { name = "findutils-4.4.2"; @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { patches = [ ./findutils-path.patch ./change_echo_path.patch ./disable-test-canonicalize.patch ]; + outputs = [ "out" "info" ]; + doCheck = true; crossAttrs = { diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 8e52adc76991d..ae1df626fe5da 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -98,6 +98,9 @@ stdenv.mkDerivation rec { postInstall = '' paxmark pms $out/sbin/grub-{probe,bios-setup} + + # Avoid a runtime reference to gcc + sed -i $out/lib/grub/*/modinfo.sh -e "/grub_target_cppflags=/ s|'.*'|' '|" ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/kde-gtk-config/default.nix b/pkgs/tools/misc/kde-gtk-config/default.nix index 809d0c65c6ece..bf868790de2d3 100644 --- a/pkgs/tools/misc/kde-gtk-config/default.nix +++ b/pkgs/tools/misc/kde-gtk-config/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation { ]; cmakeFlags = '' - -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include - -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include + -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include + -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include -DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0 -DKDE4_LIBEXEC_INSTALL_DIR=lib/kde4/libexec ''; diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index b79f43cfbc35c..77fcb186ef1de 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { --wine-path=${wine_custom} \ --gpg-exec=${gnupg}/bin/gpg2 \ --bash-interp=${bash}/bin/bash \ - --downloader=${curl}/bin/curl + --downloader=${curl.bin}/bin/curl $configureFlags ''; diff --git a/pkgs/tools/misc/plowshare/default.nix b/pkgs/tools/misc/plowshare/default.nix index 40540ad1c20db..a1a12a82471d5 100644 --- a/pkgs/tools/misc/plowshare/default.nix +++ b/pkgs/tools/misc/plowshare/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { make PREFIX="$out" install for fn in plow{del,down,list,up}; do - wrapProgram "$out/bin/$fn" --prefix PATH : "${curl}/bin:${spidermonkey}/bin" + wrapProgram "$out/bin/$fn" --prefix PATH : "${curl.bin}/bin:${spidermonkey.out}/bin" done ''; diff --git a/pkgs/tools/misc/profile-cleaner/default.nix b/pkgs/tools/misc/profile-cleaner/default.nix index 55c44770c3e17..2c1f3d77def3f 100644 --- a/pkgs/tools/misc/profile-cleaner/default.nix +++ b/pkgs/tools/misc/profile-cleaner/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { installPhase = '' PREFIX=\"\" DESTDIR=$out make install wrapProgram $out/bin/profile-cleaner \ - --prefix PATH : "${parallel}/bin:${sqlite}/bin" + --prefix PATH : "${parallel}/bin:${sqlite.bin}/bin" ''; meta = { diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index 0f28b15ea973a..0d165bb4a2da3 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { makeFlags = "DESTDIR=$(out)"; - NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ]; + NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ]; # Probably a hack, but using DESTDIR and PREFIX makes everything work! postInstall = '' diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index 1c8a2e495b697..bd1d8501eeaa8 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -19,7 +19,7 @@ python2Packages.buildPythonPackage rec { src = ./nix-paths.patch; df = "${coreutils}/bin/df"; python = "${python2}/bin/${python2.executable}"; - libc = "${stdenv.cc.libc}/lib/libc.so.6"; + libc = "${stdenv.cc.libc.out}/lib/libc.so.6"; }) # Apply https://github.com/JaviMerino/trash-cli/commit/4f45a37a3 diff --git a/pkgs/tools/misc/xdummy/default.nix b/pkgs/tools/misc/xdummy/default.nix index 30aba19930c70..1f4dbc8633270 100644 --- a/pkgs/tools/misc/xdummy/default.nix +++ b/pkgs/tools/misc/xdummy/default.nix @@ -18,7 +18,7 @@ let EndSection Section "Files" - ModulePath "${xorg.xorgserver}/lib/xorg/modules" + ModulePath "${xorg.xorgserver.out}/lib/xorg/modules" ModulePath "${xorg.xf86videodummy}/lib/xorg/modules" XkbDir "${xkeyboard_config}/share/X11/xkb" FontPath "${xorg.fontadobe75dpi}/lib/X11/fonts/75dpi" @@ -75,7 +75,7 @@ let in writeScriptBin "xdummy" '' #!${stdenv.shell} export XKB_BINDIR="${xorg.xkbcomp}/bin" - exec ${xorg.xorgserver}/bin/Xorg \ + exec ${xorg.xorgserver.out}/bin/Xorg \ -noreset \ -logfile /dev/null \ "$@" \ diff --git a/pkgs/tools/misc/xvfb-run/default.nix b/pkgs/tools/misc/xvfb-run/default.nix index 162fb73b3f00e..f1cf044243496 100644 --- a/pkgs/tools/misc/xvfb-run/default.nix +++ b/pkgs/tools/misc/xvfb-run/default.nix @@ -17,6 +17,6 @@ stdenv.mkDerivation { wrapProgram $out/bin/xvfb-run \ --set XKB_BINDIR "${xkbcomp}/bin" \ --set FONTCONFIG_FILE "${fontsConf}" \ - --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin + --prefix PATH : ${getopt}/bin:${xorgserver.out}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin ''; } diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index 6080f38a80197..42d52d5c973bc 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { # Ensure ffmpeg is available in $PATH for post-processing & transcoding support. postInstall = stdenv.lib.optionalString (ffmpeg != null) - ''wrapProgram $out/bin/youtube-dl --prefix PATH : "${ffmpeg}/bin"''; + ''wrapProgram $out/bin/youtube-dl --prefix PATH : "${ffmpeg.bin}/bin"''; meta = with stdenv.lib; { version = "2015.11.24"; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 14687817835ae..ed650b87b212c 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, pkgconfig , idnSupport ? false, libidn ? null , ldapSupport ? false, openldap ? null , zlibSupport ? false, zlib ? null @@ -23,6 +23,9 @@ stdenv.mkDerivation rec { sha256 = "1slq5c0v9wa8hajgimhkxhvsrd07jmih8sa3gjsl597qp5k4w5b5"; }; + outputs = [ "dev" "out" "bin" "man" "docdev" ]; + + nativeBuildInputs = [ pkgconfig ]; # Zlib and OpenSSL must be propagated because `libcurl.la' contains # "-lz -lssl", which aren't necessary direct build inputs of # applications that use Curl. @@ -59,6 +62,11 @@ stdenv.mkDerivation rec { CXX = "g++"; CXXCPP = "g++ -E"; + postInstall = '' + _moveToOutput bin/curl-config "$dev" + sed '/^dependency_libs/s|${libssh2.dev}|${libssh2.out}|' -i "$out"/lib/*.la + ''; + crossAttrs = { # We should refer to the cross built openssl # For the 'urandom', maybe it should be a cross-system option diff --git a/pkgs/tools/networking/gupnp-tools/default.nix b/pkgs/tools/networking/gupnp-tools/default.nix index d0f2ef5466918..b1c0235a35b35 100644 --- a/pkgs/tools/networking/gupnp-tools/default.nix +++ b/pkgs/tools/networking/gupnp-tools/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { gnome3.defaultIconTheme gnome3.gnome_themes_standard makeWrapper]; postInstall = '' - wrapProgram "$out/bin/gupnp-av-cp" --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.defaultIconTheme}/share:$out/share" - wrapProgram "$out/bin/gupnp-universal-cp" --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.defaultIconTheme}/share:$out/share" + wrapProgram "$out/bin/gupnp-av-cp" --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:${gnome3.defaultIconTheme}/share:$out/share" + wrapProgram "$out/bin/gupnp-universal-cp" --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share:${gnome3.defaultIconTheme}/share:$out/share" ''; } diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix index eca416b53d4ed..a92c343285798 100644 --- a/pkgs/tools/networking/inetutils/default.nix +++ b/pkgs/tools/networking/inetutils/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses /* for `talk' */ ]; - configureFlags = "--with-ncurses-include-dir=${ncurses}/include"; + configureFlags = "--with-ncurses-include-dir=${ncurses.dev}/include"; # Test fails with "UNIX socket name too long", probably because our # $TMPDIR is too long. diff --git a/pkgs/tools/networking/megatools/default.nix b/pkgs/tools/networking/megatools/default.nix index 10a951f84fc16..7c2a437ab658a 100644 --- a/pkgs/tools/networking/megatools/default.nix +++ b/pkgs/tools/networking/megatools/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { postInstall = '' for i in $(find $out/bin/ -type f); do wrapProgram "$i" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" done ''; diff --git a/pkgs/tools/networking/netsniff-ng/default.nix b/pkgs/tools/networking/netsniff-ng/default.nix index e39787a4fbb9c..07bd9fd8c1a24 100644 --- a/pkgs/tools/networking/netsniff-ng/default.nix +++ b/pkgs/tools/networking/netsniff-ng/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { configurePhase = '' patchShebangs configure substituteInPlace configure --replace "which" "command -v" - NACL_INC_DIR=${libsodium}/include/sodium NACL_LIB=sodium ./configure + NACL_INC_DIR=${libsodium.dev}/include/sodium NACL_LIB=sodium ./configure ''; enableParallelBuilding = true; diff --git a/pkgs/tools/networking/network-manager-applet/default.nix b/pkgs/tools/networking/network-manager-applet/default.nix index 93ab1266c6ba8..e089f69ebd827 100644 --- a/pkgs/tools/networking/network-manager-applet/default.nix +++ b/pkgs/tools/networking/network-manager-applet/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram "$out/bin/nm-applet" \ - --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules:${gnome3.dconf}/lib/gio/modules" \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules:${gnome3.dconf}/lib/gio/modules" \ --prefix XDG_DATA_DIRS : "${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ --set GCONF_CONFIG_SOURCE "xml::~/.gconf" \ --prefix PATH ":" "${gnome3.gconf}/bin" diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix index 5b2e14d033a99..464461194daaf 100644 --- a/pkgs/tools/networking/network-manager/default.nix +++ b/pkgs/tools/networking/network-manager/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, intltool, wirelesstools, pkgconfig, dbus_glib, xz -, udev, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, dhcpcd, iptables +, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, dhcpcd, iptables , libgcrypt, dnsmasq, avahi, bind, perl, bluez5, substituteAll, readline , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup }: @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { "--with-libsoup=yes" ]; - buildInputs = [ wirelesstools udev libgudev libnl libuuid polkit ppp libndp + buildInputs = [ wirelesstools systemd libgudev libnl libuuid polkit ppp libndp xz bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup ]; propagatedBuildInputs = [ dbus_glib gnutls libgcrypt ]; diff --git a/pkgs/tools/networking/nylon/default.nix b/pkgs/tools/networking/nylon/default.nix index daeb7ffb57bb8..fc89ea8db51b6 100644 --- a/pkgs/tools/networking/nylon/default.nix +++ b/pkgs/tools/networking/nylon/default.nix @@ -1,5 +1,11 @@ -{ stdenv, fetchurl, libevent }: - +{ stdenv, fetchurl, libevent, buildEnv }: +let + # failed to find a better way to make it work + libevent-comb = buildEnv { + inherit (libevent.out) name; + paths = [ libevent.dev libevent.out ]; + }; +in stdenv.mkDerivation { name = "nylon-1.21"; src = fetchurl { @@ -9,7 +15,7 @@ stdenv.mkDerivation { patches = [ ./configure-use-solib.patch ]; - configureFlags = [ "--with-libevent=${libevent}" ]; + configureFlags = [ "--with-libevent=${libevent-comb}" ]; buildInputs = [ libevent ]; diff --git a/pkgs/tools/networking/openconnect.nix b/pkgs/tools/networking/openconnect.nix index 54239b7661743..43e48e9a4cdfe 100644 --- a/pkgs/tools/networking/openconnect.nix +++ b/pkgs/tools/networking/openconnect.nix @@ -18,8 +18,8 @@ stdenv.mkDerivation rec { preConfigure = '' export PKG_CONFIG=${pkgconfig}/bin/pkg-config - export LIBXML2_CFLAGS="-I ${libxml2}/include/libxml2" - export LIBXML2_LIBS="-L${libxml2}/lib -lxml2" + export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2" + export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2" ''; configureFlags = [ diff --git a/pkgs/tools/networking/p2p/seeks/default.nix b/pkgs/tools/networking/p2p/seeks/default.nix index 28dce0f567e91..621e71c9eae2d 100644 --- a/pkgs/tools/networking/p2p/seeks/default.nix +++ b/pkgs/tools/networking/p2p/seeks/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, stdenv, zlib, docbook2x, pcre, curl, libxml2, libevent, perl +{ fetchgit, stdenv, zlib, bzip2, docbook2x, pcre, curl, libxml2, libevent, perl , pkgconfig, protobuf, tokyocabinet, tokyotyrant, opencv, autoconf, automake , libtool, seeks_confDir ? "" }: @@ -13,14 +13,14 @@ stdenv.mkDerivation { }; buildInputs = - [ zlib docbook2x pcre curl libxml2 libevent perl pkgconfig + [ zlib bzip2 docbook2x pcre curl libxml2 libevent perl pkgconfig protobuf tokyocabinet tokyotyrant opencv autoconf automake libtool ]; configureFlags = [ # Enable the built-in web server providing a web search interface. "--enable-httpserv-plugin=yes" - "--with-libevent=${libevent}" + "--with-libevent=${libevent.dev}" ]; preConfigure = '' diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 43349178211f9..7d3ced17b40c2 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { [ ( substituteAll { src = ./nix-purity.patch; inherit libpcap; - glibc = stdenv.cc.libc; + glibc = stdenv.cc.libc.dev; }) # Without nonpriv.patch, pppd --version doesn't work when not run as # root. diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index e356d6d653767..c15b7a99fe132 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -9,23 +9,31 @@ stdenv.mkDerivation rec { sha256 = "1jly2apag4yg649w3flaq73wdrcfyxnhx5py9j73y7adxmswigbn"; }; + outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB + buildInputs = [ openssl expat libevent ]; configureFlags = [ - "--with-ssl=${openssl}" + "--with-ssl=${openssl.dev}" "--with-libexpat=${expat}" - "--with-libevent=${libevent}" + "--with-libevent=${libevent.dev}" "--localstatedir=/var" "--sysconfdir=/etc" ]; installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ]; - meta = { + # get rid of runtime dependencies on $dev outputs + postInstall = ''substituteInPlace "$lib/lib/libunbound.la" '' + + stdenv.lib.concatMapStrings + (pkg: " --replace '-L${pkg.dev}/lib' '-L${pkg.out}/lib' ") + [ openssl expat libevent ]; + + meta = with stdenv.lib; { description = "Validating, recursive, and caching DNS resolver"; - license = stdenv.lib.licenses.bsd3; + license = licenses.bsd3; homepage = http://www.unbound.net; - maintainers = [ stdenv.lib.maintainers.emery ]; - platforms = stdenv.lib.platforms.unix; + maintainers = [ maintainers.emery ]; + platforms = platforms.unix; }; } diff --git a/pkgs/tools/networking/uwimap/default.nix b/pkgs/tools/networking/uwimap/default.nix index 1da9ca9698414..e2c83bcb975cf 100644 --- a/pkgs/tools/networking/uwimap/default.nix +++ b/pkgs/tools/networking/uwimap/default.nix @@ -18,8 +18,9 @@ stdenv.mkDerivation { ++ stdenv.lib.optional (!stdenv.isDarwin) pam; patchPhase = '' - sed -i -e s,/usr/local/ssl,${openssl}, \ - src/osdep/unix/Makefile + sed -i src/osdep/unix/Makefile -e 's,/usr/local/ssl,${openssl},' + sed -i src/osdep/unix/Makefile -e 's,^SSLCERTS=.*,SSLCERTS=/etc/ssl/certs,' + sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${openssl.out}/lib,' ''; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index 6389234342fe6..941acbc016ff8 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sha256 = "11xvs919a8xr595hs6hk323rkk7yshyfdfyfdhlahagkrcxdcsdx"; }; + patches = [ ./remove-runtime-dep-on-openssl-headers.patch ]; + preConfigure = '' for i in "doc/texi2pod.pl" "util/rmold.pl"; do sed -i "$i" -e 's|/usr/bin.*perl|${perl}/bin/perl|g' diff --git a/pkgs/tools/networking/wget/remove-runtime-dep-on-openssl-headers.patch b/pkgs/tools/networking/wget/remove-runtime-dep-on-openssl-headers.patch new file mode 100644 index 0000000000000..a6a1fcfcb37b1 --- /dev/null +++ b/pkgs/tools/networking/wget/remove-runtime-dep-on-openssl-headers.patch @@ -0,0 +1,17 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 1a36a9b..e279c84 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -2211,10 +2211,9 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a + echo '' >> $@ + echo '#include "version.h"' >> $@ + echo 'const char *version_string = "@VERSION@";' >> $@ +- echo 'const char *compilation_string = "'$(COMPILE)'";' \ ++ echo 'const char *compilation_string = 0;' \ + | $(ESCAPEQUOTE) >> $@ +- echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \ ++ echo 'const char *link_string = 0;' \ + | $(ESCAPEQUOTE) >> $@ + + css.c: $(srcdir)/css.l diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index dc3373c3b6fcf..8ab9001573a24 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation { substituteInPlace checkinstallrc-dist --replace /usr/local $out substituteInPlace installwatch/create-localdecls \ - --replace /usr/include/unistd.h ${stdenv.glibc}/include/unistd.h + --replace /usr/include/unistd.h ${stdenv.glibc.dev}/include/unistd.h ''; postInstall = diff --git a/pkgs/tools/package-management/nix-prefetch-scripts/default.nix b/pkgs/tools/package-management/nix-prefetch-scripts/default.nix index abc409b29375d..b447272871f2f 100644 --- a/pkgs/tools/package-management/nix-prefetch-scripts/default.nix +++ b/pkgs/tools/package-management/nix-prefetch-scripts/default.nix @@ -24,10 +24,10 @@ stdenv.mkDerivation { copyScript "hg" ${../../../build-support/fetchhg/nix-prefetch-hg} ${mercurial} copyScript "git" ${../../../build-support/fetchgit/nix-prefetch-git} ${git} ${coreutils} - copyScript "svn" ${../../../build-support/fetchsvn/nix-prefetch-svn} ${subversion} + copyScript "svn" ${../../../build-support/fetchsvn/nix-prefetch-svn} ${subversion.out} copyScript "bzr" ${../../../build-support/fetchbzr/nix-prefetch-bzr} ${bazaar} copyScript "cvs" ${../../../build-support/fetchcvs/nix-prefetch-cvs} ${cvs} - copyScript "zip" ${../../../build-support/fetchzip/nix-prefetch-zip} ${unzip} ${curl} + copyScript "zip" ${../../../build-support/fetchzip/nix-prefetch-zip} ${unzip} ${curl.bin} ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 1d8c5d86b2381..364032b70e93c 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -22,8 +22,8 @@ let # would end up using the wrong bzip2 when cross-compiling. # XXX: The right thing would be to reinstate `--with-bzip2' in Nix. postUnpack = - '' export CPATH="${bzip2}/include" - export LIBRARY_PATH="${bzip2}/lib" + '' export CPATH="${bzip2.dev}/include" + export LIBRARY_PATH="${bzip2.out}/lib" export CXXFLAGS="-Wno-error=reserved-user-defined-literal" ''; diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix new file mode 100644 index 0000000000000..88bd8f4603758 --- /dev/null +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -0,0 +1,76 @@ +{ lib, stdenv, fetchurl, perl, curl, bzip2, sqlite, openssl ? null +, pkgconfig, boehmgc, perlPackages, libsodium +, storeDir ? "/nix/store" +, stateDir ? "/nix/var" +}: + +stdenv.mkDerivation rec { + name = "nix-1.9pre4100_4bbcfaf"; + + src = fetchurl { + url = "http://hydra.nixos.org/build/21565942/download/4/${name}.tar.xz"; + sha256 = "1jcy0n8mi17k5vk89vammfh74lvsgnm4gjsk23cq1shspjnbbgxs"; + }; + + nativeBuildInputs = [ perl pkgconfig ]; + + buildInputs = [ curl openssl sqlite ] ++ lib.optional stdenv.isLinux libsodium; + + propagatedBuildInputs = [ boehmgc ]; + + # Note: bzip2 is not passed as a build input, because the unpack phase + # would end up using the wrong bzip2 when cross-compiling. + # XXX: The right thing would be to reinstate `--with-bzip2' in Nix. + postUnpack = + '' export CPATH="${bzip2.dev}/include" + export LIBRARY_PATH="${bzip2.out}/lib" + export CXXFLAGS="-Wno-error=reserved-user-defined-literal" + ''; + + configureFlags = + '' + --with-store-dir=${storeDir} --localstatedir=${stateDir} --sysconfdir=/etc + --with-dbi=${perlPackages.DBI}/${perl.libPrefix} + --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix} + --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} + --disable-init-state + --enable-gc + ''; + + makeFlags = "profiledir=$(out)/etc/profile.d"; + + installFlags = "sysconfdir=$(out)/etc"; + + doInstallCheck = true; + + crossAttrs = { + postUnpack = + '' export CPATH="${bzip2.crossDrv}/include" + export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS" + ''; + + configureFlags = + '' + --with-store-dir=${storeDir} --localstatedir=${stateDir} + --with-dbi=${perlPackages.DBI}/${perl.libPrefix} + --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix} + --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} + --disable-init-state + --enable-gc + '' + stdenv.lib.optionalString ( + stdenv.cross ? nix && stdenv.cross.nix ? system + ) ''--with-system=${stdenv.cross.nix.system}''; + + doInstallCheck = false; + }; + + enableParallelBuilding = true; + + meta = { + description = "The Nix Deployment System"; + homepage = http://nixos.org/; + license = stdenv.lib.licenses.lgpl2Plus; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index ef7b999529681..0397723a2252d 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # Note: we don't add elfutils to buildInputs, since it provides a # bad `ld' and other stuff. - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${elfutils}/include"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${elfutils}/include"; NIX_CFLAGS_LINK = "-L${elfutils}/lib"; diff --git a/pkgs/tools/security/modsecurity/default.nix b/pkgs/tools/security/modsecurity/default.nix index 2f3101cffea8c..09754f53a9edd 100644 --- a/pkgs/tools/security/modsecurity/default.nix +++ b/pkgs/tools/security/modsecurity/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl +{ stdenv, lib, fetchurl, pkgconfig , curl, apacheHttpd, pcre, apr, aprutil, libxml2 }: with lib; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { sha256 = "e2bbf789966c1f80094d88d9085a81bde082b2054f8e38e0db571ca49208f434"; }; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ]; configureFlags = [ "--enable-standalone-module" diff --git a/pkgs/tools/security/mpw/default.nix b/pkgs/tools/security/mpw/default.nix index 15937a6792e69..a565c3b96e14e 100644 --- a/pkgs/tools/security/mpw/default.nix +++ b/pkgs/tools/security/mpw/default.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation { patchShebangs . ''; - NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; buildInputs = [ autoconf automake openssl libxml2 ]; diff --git a/pkgs/tools/security/prey/default.nix b/pkgs/tools/security/prey/default.nix index b36c11cf9345b..f9bd6ea50e8d9 100644 --- a/pkgs/tools/security/prey/default.nix +++ b/pkgs/tools/security/prey/default.nix @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec { cp -R . $out cp -R ${modulesSrc}/* $out/modules/ wrapProgram "$out/prey.sh" \ - --prefix PATH ":" "${xawtv}/bin:${imagemagick}/bin:${curl}/bin:${scrot}/bin:${inetutils}/bin:${coreutils}/bin" \ + --prefix PATH ":" "${xawtv}/bin:${imagemagick}/bin:${curl.bin}/bin:${scrot}/bin:${inetutils}/bin:${coreutils}/bin" \ --set CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt" ''; diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix index c06636dc36777..a06754cb58d21 100644 --- a/pkgs/tools/security/thc-hydra/default.nix +++ b/pkgs/tools/security/thc-hydra/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, libidn, ncurses, pcre, libssh, postgresql92 }: +{ stdenv, fetchurl, pkgconfig, openssl, libidn, ncurses, pcre, libssh, postgresql92 }: with stdenv.lib; @@ -12,10 +12,11 @@ stdenv.mkDerivation rec { }; preConfigure = '' - substituteInPlace configure --replace "\$LIBDIRS" "${openssl}/lib ${pcre}/lib ${libssh}/lib ${postgresql92}/lib" - substituteInPlace configure --replace "\$INCDIRS" "${openssl}/include ${pcre}/include ${libssh}/include ${postgresql92}/include" + substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92.lib}/lib" + substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include" ''; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl libidn ncurses pcre libssh ]; meta = { diff --git a/pkgs/tools/security/tor/tor-arm.nix b/pkgs/tools/security/tor/tor-arm.nix index 6c4d61d825f94..365379c8f6a8d 100644 --- a/pkgs/tools/security/tor/tor-arm.nix +++ b/pkgs/tools/security/tor/tor-arm.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { for i in $(cd $out/bin && ls); do wrapProgram $out/bin/$i \ --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pythonPackages.curses}):$out/libexec:$PYTHONPATH" \ - --set TERMINFO "${ncurses}/share/terminfo" \ + --set TERMINFO "${ncurses.out}/share/terminfo" \ --set TERM "xterm" done ''; diff --git a/pkgs/tools/security/trousers/default.nix b/pkgs/tools/security/trousers/default.nix index e910241113b98..d57aa8c63a92f 100644 --- a/pkgs/tools/security/trousers/default.nix +++ b/pkgs/tools/security/trousers/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # Fix broken libtool file preFixup = stdenv.lib.optionalString (!stdenv.isDarwin) '' - sed 's,-lcrypto,-L${openssl}/lib -lcrypto,' -i $out/lib/libtspi.la + sed 's,-lcrypto,-L${openssl.out}/lib -lcrypto,' -i $out/lib/libtspi.la ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/system/plan9port/builder.sh b/pkgs/tools/system/plan9port/builder.sh index 2434889581ed3..15fcdcf6c9ddc 100644 --- a/pkgs/tools/system/plan9port/builder.sh +++ b/pkgs/tools/system/plan9port/builder.sh @@ -5,8 +5,8 @@ export PLAN9_TARGET=$PLAN9 configurePhase() { - echo CFLAGS=\"-I${fontconfig}/include -I${libXt}/include\" > LOCAL.config - echo X11=\"${libXt}/include\" >> LOCAL.config + echo CFLAGS=\"-I${fontconfig_dev}/include -I${libXt_dev}/include\" > LOCAL.config + echo X11=\"${libXt_dev}/include\" >> LOCAL.config for f in `grep -l -r /usr/local/plan9`; do sed "s,/usr/local/plan9,${PLAN9},g" -i $f diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix index 3a78cb2baf637..70f792953b856 100644 --- a/pkgs/tools/system/plan9port/default.nix +++ b/pkgs/tools/system/plan9port/default.nix @@ -47,6 +47,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; }; - inherit libXt; - inherit fontconfig; + libXt_dev = libXt.dev; + fontconfig_dev = fontconfig.dev; } diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index 041dd96e1ca81..aa510a28c231b 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite mkdir -p $GOSQLITE cp -R $srcGoSqlite/* $GOSQLITE/ - export CGO_CFLAGS=-I${sqlite}/include - export CGO_LDFLAGS=-L${sqlite}/lib - go build -ldflags "-r ${sqlite}/lib" -o storebrowse + export CGO_CFLAGS=-I${sqlite.dev}/include + export CGO_LDFLAGS=-L${sqlite.out}/lib + go build -ldflags "-r ${sqlite.out}/lib" -o storebrowse ''; installPhase = '' diff --git a/pkgs/tools/system/thermald/default.nix b/pkgs/tools/system/thermald/default.nix index 9fe9adaedadb3..dd28d5b2b1dad 100644 --- a/pkgs/tools/system/thermald/default.nix +++ b/pkgs/tools/system/thermald/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am''; preConfigure = '' - export PKG_CONFIG_PATH="${dbus_libs}/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH="${dbus_libs.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" ./autogen.sh #--prefix="$out" ''; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index f8413b9a0d0f3..70a3bdeb7984e 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, coreutils ? null }: +{ stdenv, fetchurl, xz, coreutils ? null }: stdenv.mkDerivation rec { name = "diffutils-3.3"; @@ -8,8 +8,10 @@ stdenv.mkDerivation rec { sha256 = "1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2"; }; + outputs = [ "out" "info" ]; + /* If no explicit coreutils is given, use the one from stdenv. */ - nativeBuildInputs = [ coreutils ]; + nativeBuildInputs = [ xz.bin coreutils ]; meta = { homepage = http://www.gnu.org/software/diffutils/diffutils.html; diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 001a50458e29d..e62b18a4c4364 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,6 +1,9 @@ -{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false +{ stdenv, fetchurl, xz, libsigsegv, readline, interactive ? false , locale ? null }: +let + inherit (stdenv.lib) optional; +in stdenv.mkDerivation rec { name = "gawk-4.1.3"; @@ -9,23 +12,25 @@ stdenv.mkDerivation rec { sha256 = "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"; }; + # When we do build separate interactive version, it makes sense to always include man. + outputs = [ "out" "info" ] ++ stdenv.lib.optional (!interactive) "man"; + doCheck = !( stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 || stdenv.isDarwin # XXX: `locale' segfaults ); - buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv - ++ stdenv.lib.optional readlineSupport readline + buildInputs = [ xz.bin ] + ++ stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv + ++ stdenv.lib.optional interactive readline ++ stdenv.lib.optional stdenv.isDarwin locale; configureFlags = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") "--with-libsigsegv-prefix=${libsigsegv}" - ++ stdenv.lib.optional readlineSupport "--with-readline=${readline}" - # only darwin where reported, seems OK on non-chrooted Fedora (don't rebuild stdenv) - ++ stdenv.lib.optional (!readlineSupport && stdenv.isDarwin) "--without-readline"; + ++ [(if interactive then "--with-readline=${readline}" else "--without-readline")]; postInstall = "rm $out/bin/gawk-*"; - meta = { + meta = with stdenv.lib; { homepage = http://www.gnu.org/software/gawk/; description = "GNU implementation of the Awk programming language"; @@ -43,8 +48,11 @@ stdenv.mkDerivation rec { lines of code. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; + + platforms = platforms.unix; maintainers = [ ]; }; } + diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index e8352e318b9ba..d0259362df61d 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation { # Perl is needed for testing nativeBuildInputs = [ perl ]; + outputs = [ "out" "info" ]; # the man pages are rather small + buildInputs = [ pcre libiconv ]; # cygwin: FAIL: multibyte-white-space @@ -35,7 +37,7 @@ stdenv.mkDerivation { chmod +x $out/bin/egrep $out/bin/fgrep ''; - meta = { + meta = with stdenv.lib; { homepage = http://www.gnu.org/software/grep/; description = "GNU implementation of the Unix grep command"; @@ -45,10 +47,10 @@ stdenv.mkDerivation { prints the matching lines. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.all; + maintainers = [ maintainers.eelco ]; + platforms = platforms.all; }; passthru = {inherit pcre;}; diff --git a/pkgs/tools/text/gnused/default.nix b/pkgs/tools/text/gnused/default.nix index b1c5910029dd7..037c2f17a63ba 100644 --- a/pkgs/tools/text/gnused/default.nix +++ b/pkgs/tools/text/gnused/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl }: stdenv.mkDerivation { name = "gnused-4.2.2"; @@ -8,6 +8,8 @@ stdenv.mkDerivation { sha256 = "f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7"; }; + outputs = [ "out" "info" ]; + meta = { homepage = http://www.gnu.org/software/sed/; description = "GNU sed, a batch stream editor"; diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 039bff8c655a9..e08c10fd9ed2e 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { postInstall = '' # Remove example output with (random?) colors to # avoid non-determinism in the output - rm $out/share/doc/${name}/examples/hdtbl/*color*ps + rm $doc/share/doc/examples/hdtbl/*color*ps # Remove creation date - find $out/share/doc/${name} -type f -print0 | xargs -0 sed -i -e 's/%%CreationDate: .*//' + find $doc/share/doc/ -type f -print0 | xargs -0 sed -i -e 's/%%CreationDate: .*//' ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/text/multitran/data/default.nix b/pkgs/tools/text/multitran/data/default.nix index d0e39add665ab..57a375d2a17b5 100644 --- a/pkgs/tools/text/multitran/data/default.nix +++ b/pkgs/tools/text/multitran/data/default.nix @@ -3,7 +3,7 @@ # This package requires a locale ru_RU.cp1251 locale entry. # Waiting for a better idea, I created it modifying a store file using: # localedef -f CP1251 -i ru_RU ru_RU.CP1251 -# The store file mentioned is in "${glibc}/lib/locale/locale-archive" +# The store file mentioned is in "${glibc.out}/lib/locale/locale-archive" stdenv.mkDerivation { name = "multitran-data-0.3"; diff --git a/pkgs/tools/text/xidel/default.nix b/pkgs/tools/text/xidel/default.nix index 89adcc75b1951..000584a50e109 100644 --- a/pkgs/tools/text/xidel/default.nix +++ b/pkgs/tools/text/xidel/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p "$out/bin" cp -a usr/* "$out/" - interpreter="$(echo ${stdenv.glibc}/lib/ld-linux*)" + interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)" patchelf --set-interpreter "$interpreter" "$out/bin/xidel" patchelf --set-rpath "${stdenv.lib.makeLibraryPath [stdenv.glibc]}" "$out/bin/xidel" ''; diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index b26582a6cc716..7c393c5241514 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -237,12 +237,12 @@ stdenv.mkDerivation rec { # We can remove PATH= when those impurities are fixed. sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook5_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${tetex}/bin:${coreutils}/bin:${gnused}/bin')|" \ -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \ - -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt}/bin/xsltproc'|" \ + -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \ -e "s|^FOP =.*|FOP = '${fop}/bin/fop'|" \ -e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \ -e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \ - -e "s|^XMLLINT =.*|XMLLINT = '${libxml2}/bin/xmllint'|" \ + -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \ -e "s|^EPUBCHECK =.*|EPUBCHECK = 'nixpkgs_is_missing_epubcheck'|" \ -i a2x.py '' + '' diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix index 408ef8ae263c0..18f9c99ee2406 100644 --- a/pkgs/tools/typesetting/tex/dblatex/default.nix +++ b/pkgs/tools/typesetting/tex/dblatex/default.nix @@ -37,16 +37,16 @@ stdenv.mkDerivation rec { sed -i 's|self.install_layout == "deb"|False|' setup.py '' + stdenv.lib.optionalString enableAllFeatures '' for file in $(find -name "*.py"); do - sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt}/bin/xsltproc|g' \ - -e 's|Popen(\["xsltproc|Popen(\["${libxslt}/bin/xsltproc|g' \ + sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt.bin}/bin/xsltproc|g' \ + -e 's|Popen(\["xsltproc|Popen(\["${libxslt.bin}/bin/xsltproc|g' \ -e 's|cmd = \["texindy|cmd = ["nixpkgs_is_missing_texindy|g' \ -e 's|cmd = "epstopdf|cmd = "${tex}/bin/epstopdf|g' \ -e 's|cmd = \["makeindex|cmd = ["${tex}/bin/makeindex|g' \ -e 's|doc.program = "pdflatex"|doc.program = "${tex}/bin/pdflatex"|g' \ -e 's|self.program = "latex"|self.program = "${tex}/bin/latex"|g' \ -e 's|Popen("pdflatex|Popen("${tex}/bin/pdflatex|g' \ - -e 's|"fc-match"|"${fontconfig}/bin/fc-match"|g' \ - -e 's|"fc-list"|"${fontconfig}/bin/fc-list"|g' \ + -e 's|"fc-match"|"${fontconfig.bin}/bin/fc-match"|g' \ + -e 's|"fc-list"|"${fontconfig.bin}/bin/fc-list"|g' \ -e 's|cmd = "inkscape|cmd = "${inkscape}/bin/inkscape|g' \ -e 's|cmd = "fig2dev|cmd = "${transfig}/bin/fig2dev|g' \ -e 's|cmd = \["ps2pdf|cmd = ["${ghostscript}/bin/ps2pdf|g' \ diff --git a/pkgs/tools/typesetting/tex/texlive-new/bin.nix b/pkgs/tools/typesetting/tex/texlive-new/bin.nix index 677e64c57dc68..7ed9b58d14d74 100644 --- a/pkgs/tools/typesetting/tex/texlive-new/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive-new/bin.nix @@ -97,7 +97,8 @@ core = stdenv.mkDerivation rec { cp ../texk/texlive/linked_scripts/scripts.lst "$out/share/texmf-dist/scripts/texlive/" '' + /* doc location identical with individual TeX pkgs */ '' mkdir -p "$doc/doc" - mv "$out"/share/{man,info} "$doc"/doc + mv "$doc"/share/{man,info} "$doc"/doc + rmdir "$doc"/share '' + cleanBrokenLinks; setupHook = ./setup-hook.sh; # TODO: maybe texmf-nix -> texmf (and all references) diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 74b3829cf89f5..008de2d252091 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -54,7 +54,7 @@ rec { # sed -e s@ncurses/curses.h@curses.h@g -i $(grep ncurses/curses.h -rl . ) sed -e '1i\#include <string.h>\n\#include <stdlib.h>' -i $( find libs/teckit -name '*.cpp' -o -name '*.c' ) - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${icu}/include/layout"; + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${icu.dev}/include/layout"; ./Build --prefix="$out" --datadir="$out/share" --mandir="$out/share/man" --infodir="$out/share/info" \ ${args.lib.concatStringsSep " " configureFlags} @@ -119,7 +119,7 @@ rec { "patchShebangsInterimLibexec" "patchShebangsInterimTexmfDist" "patchShebangsInterimShareTexmfDist"]; - buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11 libICE xproto + buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11.out libICE xproto freetype t1lib gd libXaw icu ghostscript ed libXt libXpm libXmu libXext xextproto perl libSM ruby expat curl libjpeg python fontconfig xz pkgconfig poppler libpaper graphite2 lesstif zziplib harfbuzz texinfo potrace gmp mpfr diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix index 49fe7dc681fe9..f99c14720760d 100644 --- a/pkgs/tools/typesetting/xmlto/default.nix +++ b/pkgs/tools/typesetting/xmlto/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/xmlto" \ - --prefix PATH : "${libxslt}/bin:${libxml2}/bin:${getopt}/bin" + --prefix PATH : "${libxslt.bin}/bin:${libxml2.bin}/bin:${getopt}/bin" # `w3m' is needed for HTML to text conversions. substituteInPlace "$out/share/xmlto/format/docbook/txt" \ diff --git a/pkgs/tools/virtualization/aws/default.nix b/pkgs/tools/virtualization/aws/default.nix index 123dbf647f0d7..efce0c92b78f0 100644 --- a/pkgs/tools/virtualization/aws/default.nix +++ b/pkgs/tools/virtualization/aws/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin - sed 's|\[curl|[${curl}/bin/curl|g' $src > $out/bin/aws + sed 's|\[curl|[${curl.bin}/bin/curl|g' $src > $out/bin/aws chmod +x $out/bin/aws ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 352f5e1fe141f..ca2aa8046e314 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1565,7 +1565,7 @@ let }; gawkInteractive = appendToName "interactive" - (gawk.override { readlineSupport = true; }); + (gawk.override { interactive = true; }); gawp = goPackages.gawp.bin // { outputs = [ "bin" ]; }; @@ -1939,7 +1939,7 @@ let ised = callPackage ../tools/misc/ised {}; - isl = isl_0_15; + isl = isl_0_14; isl_0_11 = callPackage ../development/libraries/isl/0.11.1.nix { }; isl_0_12 = callPackage ../development/libraries/isl/0.12.2.nix { }; isl_0_14 = callPackage ../development/libraries/isl/0.14.1.nix { }; @@ -3591,7 +3591,7 @@ let xflux = callPackage ../tools/misc/xflux { }; xfsprogs = callPackage ../tools/filesystems/xfsprogs { }; - libxfs = xfsprogs.lib; + libxfs = xfsprogs.dev; # outputs TODO xml2 = callPackage ../tools/text/xml/xml2 { }; @@ -3805,7 +3805,7 @@ let gambit = callPackage ../development/compilers/gambit { }; - gcc = gcc49; + gcc = gcc5; gcc_multi = if system == "x86_64-linux" then lowPrio ( @@ -6208,8 +6208,8 @@ let }; # Should we deprecate these? Currently there are many references. - dbus_tools = pkgs.dbus.tools; - dbus_libs = pkgs.dbus.libs; + dbus_tools = pkgs.dbus.out; + dbus_libs = pkgs.dbus; dbus_daemon = pkgs.dbus.daemon; dhex = callPackage ../applications/editors/dhex { }; @@ -6486,7 +6486,7 @@ let gmp4 = callPackage ../development/libraries/gmp/4.3.2.nix { }; # required by older GHC versions gmp5 = callPackage ../development/libraries/gmp/5.1.x.nix { }; gmp6 = callPackage ../development/libraries/gmp/6.x.nix { }; - gmp = gmp5; + gmp = gmp6; gmpxx = appendToName "with-cxx" (gmp.override { cxx = true; }); #GMP ex-satellite, so better keep it near gmp @@ -6500,9 +6500,7 @@ let gperftools = callPackage ../development/libraries/gperftools { }; - gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer { - callPackage = pkgs.newScope (pkgs // { inherit (pkgs) libav; }); - }); + gst_all_1 = recurseIntoAttrs (callPackage ../development/libraries/gstreamer { }); gst_all = { inherit (pkgs) gstreamer gnonlin gst_python qt_gstreamer; @@ -6591,12 +6589,15 @@ let }; glib = callPackage ../development/libraries/glib { }; + glib-tested = glib.override { doCheck = true; }; # checked version separate to break cycles + glibmm = callPackage ../development/libraries/glibmm { }; glib_networking = callPackage ../development/libraries/glib-networking {}; atk = callPackage ../development/libraries/atk { }; + atkmm = callPackage ../development/libraries/atkmm { }; pixman = callPackage ../development/libraries/pixman { }; @@ -6605,6 +6606,8 @@ let glSupport = config.cairo.gl or (stdenv.isLinux && !stdenv.isArm && !stdenv.isMips); }; + + cairomm = callPackage ../development/libraries/cairomm { }; pango = callPackage ../development/libraries/pango { }; @@ -7585,6 +7588,7 @@ let }); libva = callPackage ../development/libraries/libva { }; + libva-full = libva.override { minimal = false; }; libvdpau = callPackage ../development/libraries/libvdpau { }; @@ -7635,14 +7639,13 @@ let libxmi = callPackage ../development/libraries/libxmi { }; - libxml2 = callPackage ../development/libraries/libxml2 { - pythonSupport = false; + libxml2 = callPackage ../development/libraries/libxml2 { }; + libxml2Python = pkgs.buildEnv { # slightly hacky + name = "libxml2+py-${pkgs.libxml2.version}"; + paths = with libxml2; [ dev bin py ]; + inherit (pkgs.libxml2) passthru; }; - libxml2Python = lowPrio (libxml2.override { - pythonSupport = true; - }); - libxmlxx = callPackage ../development/libraries/libxmlxx { }; libxmp = callPackage ../development/libraries/libxmp { }; @@ -7727,7 +7730,7 @@ let ); mesa = mesaDarwinOr (buildEnv { name = "mesa-${mesa_noglu.version}"; - paths = [ mesa_noglu mesa_glu ]; + paths = [ mesa_noglu.dev mesa_noglu.out mesa_glu ]; }); meterbridge = callPackage ../applications/audio/meterbridge { }; @@ -7856,13 +7859,10 @@ let nspr = callPackage ../development/libraries/nspr { }; nss = lowPrio (callPackage ../development/libraries/nss { }); + nssTools = nss.tools; nss_wrapper = callPackage ../development/libraries/nss_wrapper { }; - nssTools = callPackage ../development/libraries/nss { - includeTools = true; - }; - ntk = callPackage ../development/libraries/audio/ntk { }; ntrack = callPackage ../development/libraries/ntrack { }; @@ -7978,9 +7978,7 @@ let vtk = vtkWithQt4; }; - pcre = callPackage ../development/libraries/pcre { - unicodeSupport = config.pcre.unicode or true; - }; + pcre = callPackage ../development/libraries/pcre { }; pcre2 = callPackage ../development/libraries/pcre2 { }; @@ -8393,7 +8391,7 @@ let sqlite-amalgamation = callPackage ../development/libraries/sqlite-amalgamation { }; - sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }); + sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }).bin; sqlcipher = lowPrio (callPackage ../development/libraries/sqlcipher { readline = null; @@ -8540,9 +8538,13 @@ let inherit (pythonPackages) gyp; }; - vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; + vaapiIntel = callPackage ../development/libraries/vaapi-intel { + libva = libva-full; # also wants libva-{x11,drm,wayland} + }; - vaapiVdpau = callPackage ../development/libraries/vaapi-vdpau { }; + vaapiVdpau = callPackage ../development/libraries/vaapi-vdpau { + libva = libva-full; # needs libva-{x11,glx} + }; vamp = callPackage ../development/libraries/audio/vamp { }; @@ -10409,7 +10411,11 @@ let systemd = callPackage ../os-specific/linux/systemd { linuxHeaders = linuxHeaders_3_18; - }; + } + // { + udev.bin = systemd; # ${systemd.udev.bin}/bin/udevadm + udev.lib = libudev.out; # ${systemd.udev.lib}/lib/libudev.* + }; systemtap = callPackage ../development/tools/profiling/systemtap { inherit (gnome) libglademm; @@ -10487,7 +10493,11 @@ let cross = assert crossSystem != null; crossSystem; }); - udev = pkgs.systemd; + # This hacky alias covers most use cases without mass-replace (build inputs) + # and causes an *evaluation* error if "${udev}" is attempted. + udev = [ libudev.dev libudev.out ]; + libudev = callPackage ../os-specific/linux/systemd/libudev.nix { }; + eudev = callPackage ../os-specific/linux/eudev {}; # libudev.so.0 @@ -11802,9 +11812,7 @@ let inherit (gnome3) gitg; - giv = callPackage ../applications/graphics/giv { - pcre = pcre.override { unicodeSupport = true; }; - }; + giv = callPackage ../applications/graphics/giv { }; gmrun = callPackage ../applications/misc/gmrun {}; @@ -13386,6 +13394,7 @@ let vlc = callPackage ../applications/video/vlc { ffmpeg = ffmpeg_2; + libva = libva-full; # also wants libva-x11 }; vlc_qt5 = qt5Libs.vlc; @@ -14895,7 +14904,9 @@ let why3 = callPackage ../applications/science/logic/why3 {}; - yices = callPackage ../applications/science/logic/yices {}; + yices = callPackage ../applications/science/logic/yices { + gmp-static = gmp.override { withStatic = true; }; + }; z3 = callPackage ../applications/science/logic/z3 {}; z3_opt = callPackage ../applications/science/logic/z3_opt {}; diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index e58df1f42c33f..abd4a81234162 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -103,7 +103,7 @@ let makeFlagsArray=( LUA_LDIR="$out/share/lua/${lua.luaversion}" LUA_INC="-I${lua}/include" LUA_CDIR="$out/lib/lua/${lua.luaversion}" - EXPAT_INC="-I${expat}/include"); + EXPAT_INC="-I${expat.dev}/include"); ''; meta = { diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 11d9e6e8c36b4..00dbee64cacd1 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -2280,8 +2280,8 @@ let self = _self // overrides; _self = with self; { sha256 = "0f5gdprcql4kwzgxl2s6ngcfg1jl45lzcqh7dkv5bkwlwmxa9rsi"; }; buildInputs = [ DevelChecklib TestRequires pkgs.gmp ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp}/include"; - NIX_CFLAGS_LINK = "-L${pkgs.gmp}/lib -lgmp"; + NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; }; CryptEksblowfish = buildPerlPackage rec { @@ -4905,7 +4905,7 @@ let self = _self // overrides; _self = with self; { # tests fail doCheck = false; - makeMakerFlags = "--lib_png_path=${pkgs.libpng} --lib_jpeg_path=${pkgs.libjpeg} --lib_zlib_path=${pkgs.zlib} --lib_ft_path=${pkgs.freetype} --lib_fontconfig_path=${pkgs.fontconfig} --lib_xpm_path=${pkgs.xorg.libXpm}"; + makeMakerFlags = "--lib_png_path=${pkgs.libpng.out} --lib_jpeg_path=${pkgs.libjpeg.out} --lib_zlib_path=${pkgs.zlib.out} --lib_ft_path=${pkgs.freetype.out} --lib_fontconfig_path=${pkgs.fontconfig.lib} --lib_xpm_path=${pkgs.xorg.libXpm.out}"; }; GDSecurityImage = buildPerlPackage { @@ -6099,7 +6099,7 @@ let self = _self // overrides; _self = with self; { }; buildInputs = [ ApacheTest ExtUtilsXSBuilder mod_perl2 pkgs.apacheHttpd pkgs.apr pkgs.aprutil ]; propagatedBuildInputs = [ mod_perl2 ]; - makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd} --with-apache2-apxs=${pkgs.apacheHttpd}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd}/bin/httpd --with-apr-config=${pkgs.apr}/bin/apr-1-config --with-apu-config=${pkgs.aprutil}/bin/apu-1-config"; + makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd} --with-apache2-apxs=${pkgs.apacheHttpd}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd --with-apr-config=${pkgs.apr}/bin/apr-1-config --with-apu-config=${pkgs.aprutil}/bin/apu-1-config"; preConfigure = '' # override broken prereq check substituteInPlace configure --replace "prereq_check=\"\$PERL \$PERL_OPTS build/version_check.pl\"" "prereq_check=\"echo\"" @@ -6720,8 +6720,8 @@ let self = _self // overrides; _self = with self; { }; buildInputs = [ pkgs.gmp ]; doCheck = false; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp}/include"; - NIX_CFLAGS_LINK = "-L${pkgs.gmp}/lib -lgmp"; + NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; }; MathBigRat = buildPerlPackage rec { @@ -8452,8 +8452,14 @@ let self = _self // overrides; _self = with self; { sha256 = "1x6jjmhvsdq488k6wdg58ajnr4dmbcbk7imyv0aybkhj1ygw7ahv"; }; buildInputs = [ pkgs.openssl ]; - OPENSSL_PREFIX = pkgs.openssl; doCheck = false; # Test performs network access. + preConfigure = '' + mkdir openssl + ln -s ${pkgs.openssl.out}/lib openssl + ln -s ${pkgs.openssl.bin}/bin openssl + ln -s ${pkgs.openssl.dev}/include openssl + export OPENSSL_PREFIX=$(realpath openssl) + ''; meta = { description = "Perl extension for using OpenSSL"; license = "SSLeay"; @@ -9772,6 +9778,7 @@ let self = _self // overrides; _self = with self; { url = "mirror://cpan/authors/id/U/UM/UMEMOTO/${name}.tar.gz"; sha256 = "1ads4k4vvq6pnxkdw0s8gaj03w4h9snxyw7zyikfzd20fy76yx6s"; }; + setOutputFlags = false; buildInputs = [ pkgs.which ]; }; @@ -10692,7 +10699,7 @@ let self = _self // overrides; _self = with self; { preConfigure = '' substituteInPlace Makefile.PL --replace '$Config{libpth}' \ - "'${pkgs.ncurses}/lib'" + "'${pkgs.ncurses.lib}/lib'" ''; # Tests don't work because they require /dev/tty. @@ -12771,7 +12778,7 @@ let self = _self // overrides; _self = with self; { patchPhase = if stdenv.isCygwin then '' sed -i"" -e "s@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. \$Config{_exe};@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. (\$^O eq 'cygwin' ? \"\" : \$Config{_exe});@" inc/Devel/CheckLib.pm '' else null; - makeMakerFlags = "EXPATLIBPATH=${pkgs.expat}/lib EXPATINCPATH=${pkgs.expat}/include"; + makeMakerFlags = "EXPATLIBPATH=${pkgs.expat.out}/lib EXPATINCPATH=${pkgs.expat.dev}/include"; }; XMLXPath = buildPerlPackage { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 351f8626d44a6..d2ad910e0883f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -409,7 +409,7 @@ let postInstall = '' wrapProgram $out/bin/alot \ - --prefix LD_LIBRARY_PATH : ${pkgs.notmuch}/lib:${pkgs.file}/lib:${pkgs.gpgme}/lib + --prefix LD_LIBRARY_PATH : '${pkgs.lib.makeLibraryPath [ pkgs.notmuch pkgs.file pkgs.gpgme ]}' ''; meta = { @@ -4396,7 +4396,7 @@ let preFixup = '' wrapProgram $out/bin/gtimelog \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ - --prefix LD_LIBRARY_PATH ":" "${pkgs.gtk3}/lib" \ + --prefix LD_LIBRARY_PATH ":" "${pkgs.gtk3.out}/lib" \ ''; @@ -14507,7 +14507,7 @@ let postPatch = '' sed -i -e '/udev_library_name/,/^ *libudev/ { - s|CDLL([^,]*|CDLL("${pkgs.udev}/lib/libudev.so.1"|p; d + s|CDLL([^,]*|CDLL("${pkgs.libudev.out}/lib/libudev.so.1"|p; d }' pyudev/_libudev.py ''; @@ -14874,8 +14874,8 @@ let patchPhase = '' substituteInPlace "setup.cfg" \ - --replace "/usr/local/include" "${pkgs.sqlite}/include" \ - --replace "/usr/local/lib" "${pkgs.sqlite}/lib" + --replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \ + --replace "/usr/local/lib" "${pkgs.sqlite.out}/lib" ''; # error: invalid command 'test' @@ -14931,9 +14931,11 @@ let cd Source python setup.py backport python setup.py configure \ - --apr-inc-dir=${pkgs.apr}/include/apr-1 \ - --apu-inc-dir=${pkgs.aprutil}/include/apr-1 \ - --apr-lib-dir=${pkgs.apr}/lib \ + --apr-inc-dir=${pkgs.apr.dev}/include \ + --apu-inc-dir=${pkgs.aprutil.dev}/include \ + --apr-lib-dir=${pkgs.apr.out}/lib \ + --svn-lib-dir=${pkgs.subversion.out}/lib \ + --svn-bin-dir=${pkgs.subversion.out}/bin \ --svn-root-dir=${pkgs.subversion} '' + (if !stdenv.isDarwin then "" else '' sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile @@ -16153,7 +16155,7 @@ let patchPhase = '' cp "${x_ignore_nofocus}/cpp/linux-specific/"* . - substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${pkgs.xorg.libX11}/lib/libX11.so.6" + substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${pkgs.xorg.libX11.out}/lib/libX11.so.6" gcc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o gcc -shared \ -Wl,${if stdenv.isDarwin then "-install_name" else "-soname"},x_ignore_nofocus.so \ @@ -17483,7 +17485,7 @@ let # I don't know why I need to add these libraries. Shouldn't they # be part of wxPython? postInstall = '' - libspaths=${pkgs.xorg.libSM}/lib:${pkgs.xorg.libXScrnSaver}/lib + libspaths=${with pkgs.xorg; pkgs.lib.makeLibraryPath [ libSM libXScrnSaver ]} wrapProgram $out/bin/taskcoach.py \ --prefix LD_LIBRARY_PATH : $libspaths ''; @@ -20115,7 +20117,7 @@ let mock ]; - LD_LIBRARY_PATH = "${pkgs.cairo}/lib"; + LD_LIBRARY_PATH = "${pkgs.cairo.out}/lib"; meta = { description = "Graphite-web, without the interface. Just the rendering HTTP API"; |