lol

Merge branch 'master' into staging-next

+2235 -1360
+2 -1
doc/languages-frameworks/python.section.md
··· 1074 1074 * Make sure libraries build for all Python interpreters. 1075 1075 * By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why. 1076 1076 * Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`. 1077 - 1077 + * Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). 1078 + This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
+4 -4
doc/languages-frameworks/rust.section.md
··· 93 93 94 94 ``` 95 95 # Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone 96 - { lib, buildPlatform, buildRustCrate, fetchgit }: 97 - let kernel = buildPlatform.parsed.kernel.name; 96 + { lib, stdenv, buildRustCrate, fetchgit }: 97 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 98 98 # ... (content skipped) 99 99 in 100 100 rec { ··· 122 122 123 123 ``` 124 124 # Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone 125 - { lib, buildPlatform, buildRustCrate, fetchgit }: 126 - let kernel = buildPlatform.parsed.kernel.name; 125 + { lib, stdenv, buildRustCrate, fetchgit }: 126 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 127 127 # ... (content skipped) 128 128 in 129 129 rec {
+1 -1
doc/old/cross.txt
··· 78 78 --- 79 79 {stdenv, fetchurl}: 80 80 81 - assert stdenv.system == "i686-linux"; 81 + assert stdenv.buildPlatform.system == "i686-linux"; 82 82 83 83 stdenv.mkDerivation { 84 84 name = "linux-headers-2.6.13.1-arm";
+5
maintainers/maintainer-list.nix
··· 23 23 github = "a1russell"; 24 24 name = "Adam Russell"; 25 25 }; 26 + aanderse = { 27 + email = "aaron@fosslib.net"; 28 + github = "aanderse"; 29 + name = "Aaron Andersen"; 30 + }; 26 31 aaronschif = { 27 32 email = "aaronschif@gmail.com"; 28 33 github = "aaronschif";
+1 -1
nixos/lib/make-system-tarball.nix
··· 1 1 { stdenv, perl, pixz, pathsFromGraph 2 2 3 3 , # The file name of the resulting tarball 4 - fileName ? "nixos-system-${stdenv.system}" 4 + fileName ? "nixos-system-${stdenv.hostPlatform.system}" 5 5 6 6 , # The files and directories to be placed in the tarball. 7 7 # This is a list of attribute sets {source, target} where `source'
+2 -2
nixos/lib/qemu-flags.nix
··· 14 14 15 15 qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" 16 16 else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" 17 - else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'"; 17 + else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; 18 18 19 19 qemuBinary = qemuPkg: { 20 20 "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; 21 21 "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; 22 22 "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; 23 23 "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; 24 - }.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm"; 24 + }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; 25 25 }
+1 -1
nixos/modules/installer/cd-dvd/installation-cd-base.nix
··· 16 16 ]; 17 17 18 18 # ISO naming. 19 - isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso"; 19 + isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; 20 20 21 21 isoImage.volumeID = substring 0 11 "NIXOS_ISO"; 22 22
+2 -1
nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
··· 16 16 ]; 17 17 18 18 assertions = lib.singleton { 19 - assertion = pkgs.stdenv.system == "aarch64-linux"; 19 + assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux" 20 + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; 20 21 message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " + 21 22 "it cannot be cross compiled"; 22 23 };
+2 -1
nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
··· 16 16 ]; 17 17 18 18 assertions = lib.singleton { 19 - assertion = pkgs.stdenv.system == "armv7l-linux"; 19 + assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux" 20 + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; 20 21 message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " + 21 22 "it cannot be cross compiled"; 22 23 };
+2 -1
nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
··· 16 16 ]; 17 17 18 18 assertions = lib.singleton { 19 - assertion = pkgs.stdenv.system == "armv6l-linux"; 19 + assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux" 20 + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; 20 21 message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " + 21 22 "it cannot be cross compiled"; 22 23 };
+2 -2
nixos/modules/installer/cd-dvd/sd-image.nix
··· 22 22 { 23 23 options.sdImage = { 24 24 imageName = mkOption { 25 - default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img"; 25 + default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img"; 26 26 description = '' 27 27 Name of the generated image file. 28 28 ''; ··· 102 102 mkdir -p $out/nix-support $out/sd-image 103 103 export img=$out/sd-image/${config.sdImage.imageName} 104 104 105 - echo "${pkgs.stdenv.system}" > $out/nix-support/system 105 + echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system 106 106 echo "file sd-image $img" >> $out/nix-support/hydra-build-products 107 107 108 108 # Create the image file sized to fit /boot and /, plus 20M of slack
+1 -1
nixos/modules/installer/netboot/netboot.nix
··· 25 25 26 26 # !!! Hack - attributes expected by other modules. 27 27 environment.systemPackages = [ pkgs.grub2_efi ] 28 - ++ (if pkgs.stdenv.system == "aarch64-linux" 28 + ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" 29 29 then [] 30 30 else [ pkgs.grub2 pkgs.syslinux ]); 31 31
+2
nixos/modules/misc/ids.nix
··· 328 328 qemu-libvirtd = 301; 329 329 # kvm = 302; # unused 330 330 # render = 303; # unused 331 + zeronet = 304; 331 332 332 333 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! 333 334 ··· 616 617 qemu-libvirtd = 301; 617 618 kvm = 302; # default udev rules from systemd requires these 618 619 render = 303; # default udev rules from systemd requires these 620 + zeronet = 304; 619 621 620 622 # When adding a gid, make sure it doesn't match an existing 621 623 # uid. Users and groups with the same name should have equal
+2
nixos/modules/module-list.nix
··· 421 421 ./services/monitoring/graphite.nix 422 422 ./services/monitoring/hdaps.nix 423 423 ./services/monitoring/heapster.nix 424 + ./services/monitoring/incron.nix 424 425 ./services/monitoring/longview.nix 425 426 ./services/monitoring/monit.nix 426 427 ./services/monitoring/munin.nix ··· 619 620 ./services/networking/xl2tpd.nix 620 621 ./services/networking/xrdp.nix 621 622 ./services/networking/zerobin.nix 623 + ./services/networking/zeronet.nix 622 624 ./services/networking/zerotierone.nix 623 625 ./services/networking/znc.nix 624 626 ./services/printing/cupsd.nix
+1 -1
nixos/modules/services/misc/gitea.nix
··· 283 283 284 284 mkdir -p ${cfg.repositoryRoot} 285 285 # update all hooks' binary paths 286 - HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 5 -type f -wholename "*git/hooks/*") 286 + HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*") 287 287 if [ "$HOOKS" ] 288 288 then 289 289 sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS
+1 -1
nixos/modules/services/misc/gitit.nix
··· 10 10 11 11 toYesNo = b: if b then "yes" else "no"; 12 12 13 - gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; 13 + gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; 14 14 15 15 gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self)); 16 16
+98
nixos/modules/services/monitoring/incron.nix
··· 1 + 2 + { config, lib, pkgs, ... }: 3 + 4 + with lib; 5 + 6 + let 7 + 8 + cfg = config.services.incron; 9 + 10 + in 11 + 12 + { 13 + options = { 14 + 15 + services.incron = { 16 + 17 + enable = mkOption { 18 + type = types.bool; 19 + default = false; 20 + description = '' 21 + Whether to enable the incron daemon. 22 + 23 + Note that commands run under incrontab only support common Nix profiles for the <envar>PATH</envar> provided variable. 24 + ''; 25 + }; 26 + 27 + allow = mkOption { 28 + type = types.nullOr (types.listOf types.str); 29 + default = null; 30 + description = '' 31 + Users allowed to use incrontab. 32 + 33 + If empty then no user will be allowed to have their own incrontab. 34 + If <literal>null</literal> then will defer to <option>deny</option>. 35 + If both <option>allow</option> and <option>deny</option> are null 36 + then all users will be allowed to have their own incrontab. 37 + ''; 38 + }; 39 + 40 + deny = mkOption { 41 + type = types.nullOr (types.listOf types.str); 42 + default = null; 43 + description = "Users forbidden from using incrontab."; 44 + }; 45 + 46 + systab = mkOption { 47 + type = types.lines; 48 + default = ""; 49 + description = "The system incrontab contents."; 50 + example = '' 51 + /var/mail IN_CLOSE_WRITE abc $@/$# 52 + /tmp IN_ALL_EVENTS efg $@/$# $& 53 + ''; 54 + }; 55 + 56 + extraPackages = mkOption { 57 + type = types.listOf types.package; 58 + default = []; 59 + example = literalExample "[ pkgs.rsync ]"; 60 + description = "Extra packages available to the system incrontab."; 61 + }; 62 + 63 + }; 64 + 65 + }; 66 + 67 + config = mkIf cfg.enable { 68 + 69 + warnings = optional (cfg.allow != null && cfg.deny != null) 70 + ''If `services.incron.allow` is set then `services.incron.deny` will be ignored.''; 71 + 72 + environment.systemPackages = [ pkgs.incron ]; 73 + 74 + security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab"; 75 + 76 + # incron won't read symlinks 77 + environment.etc."incron.d/system" = { 78 + mode = "0444"; 79 + text = cfg.systab; 80 + }; 81 + environment.etc."incron.allow" = mkIf (cfg.allow != null) { 82 + text = concatStringsSep "\n" cfg.allow; 83 + }; 84 + environment.etc."incron.deny" = mkIf (cfg.deny != null) { 85 + text = concatStringsSep "\n" cfg.deny; 86 + }; 87 + 88 + systemd.services.incron = { 89 + description = "File System Events Scheduler"; 90 + wantedBy = [ "multi-user.target" ]; 91 + path = cfg.extraPackages; 92 + serviceConfig.PIDFile = "/run/incrond.pid"; 93 + serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 710 -p /var/spool/incron"; 94 + serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond --foreground"; 95 + }; 96 + }; 97 + 98 + }
+1 -1
nixos/modules/services/networking/vsftpd.nix
··· 99 99 nopriv_user=vsftpd 100 100 secure_chroot_dir=/var/empty 101 101 syslog_enable=YES 102 - ${optionalString (pkgs.stdenv.system == "x86_64-linux") '' 102 + ${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") '' 103 103 seccomp_sandbox=NO 104 104 ''} 105 105 anon_umask=${cfg.anonymousUmask}
+102
nixos/modules/services/networking/zeronet.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + let 4 + cfg = config.services.zeronet; 5 + 6 + zConfFile = pkgs.writeTextFile { 7 + name = "zeronet.conf"; 8 + 9 + text = '' 10 + [global] 11 + data_dir = ${cfg.dataDir} 12 + log_dir = ${cfg.logDir} 13 + '' + lib.optionalString (cfg.port != null) '' 14 + ui_port = ${toString cfg.port} 15 + '' + cfg.extraConfig; 16 + }; 17 + in with lib; { 18 + options.services.zeronet = { 19 + enable = mkEnableOption "zeronet"; 20 + 21 + dataDir = mkOption { 22 + type = types.path; 23 + default = "/var/lib/zeronet"; 24 + example = "/home/okina/zeronet"; 25 + description = "Path to the zeronet data directory."; 26 + }; 27 + 28 + logDir = mkOption { 29 + type = types.path; 30 + default = "/var/log/zeronet"; 31 + example = "/home/okina/zeronet/log"; 32 + description = "Path to the zeronet log directory."; 33 + }; 34 + 35 + port = mkOption { 36 + type = types.nullOr types.int; 37 + default = null; 38 + example = 15441; 39 + description = "Optional zeronet port."; 40 + }; 41 + 42 + tor = mkOption { 43 + type = types.bool; 44 + default = false; 45 + description = "Use TOR for all zeronet traffic."; 46 + }; 47 + 48 + extraConfig = mkOption { 49 + type = types.lines; 50 + default = ""; 51 + 52 + description = '' 53 + Extra configuration. Contents will be added verbatim to the 54 + configuration file at the end. 55 + ''; 56 + }; 57 + }; 58 + 59 + config = mkIf cfg.enable { 60 + services.tor = mkIf cfg.tor { 61 + enable = true; 62 + controlPort = 9051; 63 + extraConfig = "CookieAuthentication 1"; 64 + }; 65 + 66 + systemd.services.zeronet = { 67 + description = "zeronet"; 68 + after = [ "network.target" (optionalString cfg.tor "tor.service") ]; 69 + wantedBy = [ "multi-user.target" ]; 70 + 71 + preStart = '' 72 + # Ensure folder exists or create it and permissions are correct 73 + mkdir -p ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} 74 + chmod 750 ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} 75 + chown zeronet:zeronet ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} 76 + ''; 77 + 78 + serviceConfig = { 79 + PermissionsStartOnly = true; 80 + PrivateTmp = "yes"; 81 + User = "zeronet"; 82 + Group = "zeronet"; 83 + ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${zConfFile}"; 84 + }; 85 + }; 86 + 87 + users = { 88 + groups.zeronet.gid = config.ids.gids.zeronet; 89 + 90 + users.zeronet = { 91 + description = "zeronet service user"; 92 + home = cfg.dataDir; 93 + createHome = true; 94 + group = "zeronet"; 95 + extraGroups = mkIf cfg.tor [ "tor" ]; 96 + uid = config.ids.uids.zeronet; 97 + }; 98 + }; 99 + }; 100 + 101 + meta.maintainers = with maintainers; [ chiiruno ]; 102 + }
+5 -2
nixos/modules/services/security/usbguard.nix
··· 188 188 wants = [ "systemd-udevd.service" "local-fs.target" ]; 189 189 190 190 # make sure an empty rule file and required directories exist 191 - preStart = ''mkdir -p $(dirname "${cfg.ruleFile}") "${cfg.IPCAccessControlFiles}" && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})''; 191 + preStart = '' 192 + mkdir -p $(dirname "${cfg.ruleFile}") $(dirname "${cfg.auditFilePath}") "${cfg.IPCAccessControlFiles}" \ 193 + && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile}) 194 + ''; 192 195 193 196 serviceConfig = { 194 197 Type = "simple"; 195 - ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -d -k -c ${daemonConfFile}''; 198 + ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; 196 199 Restart = "on-failure"; 197 200 }; 198 201 };
+5
nixos/modules/services/web-servers/nginx/default.nix
··· 16 16 } // (optionalAttrs vhostConfig.enableACME { 17 17 sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem"; 18 18 sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem"; 19 + sslTrustedCertificate = "${acmeDirectory}/${serverName}/full.pem"; 19 20 }) // (optionalAttrs (vhostConfig.useACMEHost != null) { 20 21 sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem"; 21 22 sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem"; 23 + sslTrustedCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/full.pem"; 22 24 }) 23 25 ) cfg.virtualHosts; 24 26 enableIPv6 = config.networking.enableIPv6; ··· 227 229 ${optionalString hasSSL '' 228 230 ssl_certificate ${vhost.sslCertificate}; 229 231 ssl_certificate_key ${vhost.sslCertificateKey}; 232 + ''} 233 + ${optionalString (hasSSL && vhost.sslTrustedCertificate != null) '' 234 + ssl_trusted_certificate ${vhost.sslTrustedCertificate}; 230 235 ''} 231 236 232 237 ${optionalString (vhost.basicAuthFile != null || vhost.basicAuth != {}) ''
+7
nixos/modules/services/web-servers/nginx/vhost-options.nix
··· 129 129 description = "Path to server SSL certificate key."; 130 130 }; 131 131 132 + sslTrustedCertificate = mkOption { 133 + type = types.path; 134 + default = null; 135 + example = "/var/root.cert"; 136 + description = "Path to root SSL certificate for stapling and client certificates."; 137 + }; 138 + 132 139 http2 = mkOption { 133 140 type = types.bool; 134 141 default = true;
+1 -1
nixos/modules/system/boot/luksroot.nix
··· 324 324 [ "aes" "aes_generic" "blowfish" "twofish" 325 325 "serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512" 326 326 327 - (if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") 327 + (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") 328 328 ]; 329 329 description = '' 330 330 A list of cryptographic kernel modules needed to decrypt the root device(s).
+1 -1
nixos/modules/virtualisation/azure-agent.nix
··· 77 77 config = mkIf cfg.enable { 78 78 assertions = [ { 79 79 assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 80 - message = "Azure not currently supported on ${pkgs.stdenv.system}"; 80 + message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}"; 81 81 } { 82 82 assertion = config.networking.networkmanager.enable == false; 83 83 message = "Windows Azure Linux Agent is not compatible with NetworkManager";
+1 -1
nixos/modules/virtualisation/brightbox-image.nix
··· 26 26 rm $diskImageBase 27 27 popd 28 28 ''; 29 - diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw"; 29 + diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw"; 30 30 buildInputs = [ pkgs.utillinux pkgs.perl ]; 31 31 exportReferencesGraph = 32 32 [ "closure" config.system.build.toplevel ];
+1 -1
nixos/modules/virtualisation/google-compute-image.nix
··· 14 14 PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]} 15 15 pushd $out 16 16 mv $diskImage disk.raw 17 - tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw.tar.gz disk.raw 17 + tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw 18 18 rm $out/disk.raw 19 19 popd 20 20 '';
+1 -1
nixos/modules/virtualisation/virtualbox-guest.nix
··· 34 34 config = mkIf cfg.enable (mkMerge [{ 35 35 assertions = [{ 36 36 assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 37 - message = "Virtualbox not currently supported on ${pkgs.stdenv.system}"; 37 + message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}"; 38 38 }]; 39 39 40 40 environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
+5 -5
nixos/modules/virtualisation/virtualbox-image.nix
··· 26 26 }; 27 27 vmDerivationName = mkOption { 28 28 type = types.str; 29 - default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.system}"; 29 + default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; 30 30 description = '' 31 31 The name of the derivation for the VirtualBox appliance. 32 32 ''; 33 33 }; 34 34 vmName = mkOption { 35 35 type = types.str; 36 - default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})"; 36 + default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})"; 37 37 description = '' 38 38 The name of the VirtualBox appliance. 39 39 ''; 40 40 }; 41 41 vmFileName = mkOption { 42 42 type = types.str; 43 - default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.system}.ova"; 43 + default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova"; 44 44 description = '' 45 45 The file name of the VirtualBox appliance. 46 46 ''; ··· 67 67 echo "creating VirtualBox VM..." 68 68 vmName="${cfg.vmName}"; 69 69 VBoxManage createvm --name "$vmName" --register \ 70 - --ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"} 70 + --ostype ${if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "Linux26_64" else "Linux26"} 71 71 VBoxManage modifyvm "$vmName" \ 72 72 --memory ${toString cfg.memorySize} --acpi on --vram 32 \ 73 - ${optionalString (pkgs.stdenv.system == "i686-linux") "--pae on"} \ 73 + ${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \ 74 74 --nictype1 virtio --nic1 nat \ 75 75 --audiocontroller ac97 --audio alsa \ 76 76 --rtcuseutc on \
+1 -1
nixos/modules/virtualisation/vmware-guest.nix
··· 22 22 config = mkIf cfg.enable { 23 23 assertions = [ { 24 24 assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 25 - message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}"; 25 + message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}"; 26 26 } ]; 27 27 28 28 environment.systemPackages = [ open-vm-tools ];
+1 -1
nixos/modules/virtualisation/xen-dom0.nix
··· 146 146 config = mkIf cfg.enable { 147 147 assertions = [ { 148 148 assertion = pkgs.stdenv.isx86_64; 149 - message = "Xen currently not supported on ${pkgs.stdenv.system}"; 149 + message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}"; 150 150 } { 151 151 assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false); 152 152 message = "Xen currently does not support EFI boot";
+2 -1
nixos/tests/nfs.nix
··· 6 6 { pkgs, ... }: 7 7 { fileSystems = pkgs.lib.mkVMOverride 8 8 [ { mountPoint = "/data"; 9 - device = "server:/data"; 9 + # nfs4 exports the export with fsid=0 as a virtual root directory 10 + device = if (version == 4) then "server:/" else "server:/data"; 10 11 fsType = "nfs"; 11 12 options = [ "vers=${toString version}" ]; 12 13 }
+2 -2
pkgs/applications/altcoins/mist.nix
··· 4 4 version = "0.11.1"; 5 5 name = "mist"; 6 6 7 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 7 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 8 8 9 9 meta = with stdenv.lib; { 10 10 description = "Browse and use Ðapps on the Ethereum network"; ··· 37 37 url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip"; 38 38 sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3"; 39 39 }; 40 - }.${stdenv.system} or throwSystem; 40 + }.${stdenv.hostPlatform.system} or throwSystem; 41 41 42 42 buildInputs = [ unzip makeWrapper ]; 43 43
+3 -3
pkgs/applications/audio/baudline/default.nix
··· 11 11 version = "1.08"; 12 12 13 13 src = 14 - if stdenv.system == "x86_64-linux" then 14 + if stdenv.hostPlatform.system == "x86_64-linux" then 15 15 fetchurl { 16 16 url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz"; 17 17 sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr"; 18 18 } 19 - else if stdenv.system == "i686-linux" then 19 + else if stdenv.hostPlatform.system == "i686-linux" then 20 20 fetchurl { 21 21 url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz"; 22 22 sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb"; 23 23 } 24 24 else 25 - throw "baudline isn't supported (yet?) on ${stdenv.system}"; 25 + throw "baudline isn't supported (yet?) on ${stdenv.hostPlatform.system}"; 26 26 27 27 buildInputs = [ makeWrapper ]; 28 28
+1 -1
pkgs/applications/audio/google-musicmanager/default.nix
··· 1 1 { stdenv, fetchurl 2 2 , flac, expat, libidn, qtbase, qtwebkit, libvorbis }: 3 - assert stdenv.system == "x86_64-linux"; 3 + assert stdenv.hostPlatform.system == "x86_64-linux"; 4 4 5 5 stdenv.mkDerivation rec { 6 6 version = "beta_1.0.467.4929-r0"; # friendly to nix-env version sorting algo
+3 -3
pkgs/applications/audio/mpg123/default.nix
··· 1 1 { stdenv 2 2 , fetchurl, alsaLib 3 - , hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec { ··· 13 12 14 13 buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; 15 14 16 - configureFlags = 17 - stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}"; 15 + configureFlags = stdenv.lib.optional 16 + (stdenv.hostPlatform ? mpg123) 17 + "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}"; 18 18 19 19 meta = { 20 20 description = "Fast console MPEG Audio Player and decoder library";
+2 -2
pkgs/applications/audio/pulseeffects/default.nix
··· 43 43 ]; 44 44 in stdenv.mkDerivation rec { 45 45 name = "pulseeffects-${version}"; 46 - version = "4.2.8"; 46 + version = "4.3.3"; 47 47 48 48 src = fetchFromGitHub { 49 49 owner = "wwmm"; 50 50 repo = "pulseeffects"; 51 51 rev = "v${version}"; 52 - sha256 = "0ckl0640n6lhk0gcmnmwngajkf46rrd8bxfh7xy5sq6qmm01dhdd"; 52 + sha256 = "1krfxvwqimfcsv7f2l722ivzz0qdf5h0pmb702mg65qb160zn065"; 53 53 }; 54 54 55 55 nativeBuildInputs = [
+2 -2
pkgs/applications/audio/renoise/default.nix
··· 17 17 version = "3.1.0"; 18 18 19 19 src = 20 - if stdenv.system == "x86_64-linux" then 20 + if stdenv.hostPlatform.system == "x86_64-linux" then 21 21 if builtins.isNull releasePath then 22 22 fetchurl { 23 23 url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2"; ··· 25 25 } 26 26 else 27 27 releasePath 28 - else if stdenv.system == "i686-linux" then 28 + else if stdenv.hostPlatform.system == "i686-linux" then 29 29 if builtins.isNull releasePath then 30 30 fetchurl { 31 31 url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";
+4 -3
pkgs/applications/audio/spotify/default.nix
··· 3 3 , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome3 }: 4 4 5 5 let 6 + # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update) 6 7 # "rev" decides what is actually being downloaded 7 - version = "1.0.80.474.gef6b503e-7"; 8 + version = "1.0.88.353.g15c26ea1-14"; 8 9 # To get the latest stable revision: 9 10 # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated' 10 11 # To get general information: 11 12 # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.' 12 13 # More exapmles of api usage: 13 14 # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py 14 - rev = "16"; 15 + rev = "19"; 15 16 16 17 17 18 deps = [ ··· 64 65 # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334 65 66 src = fetchurl { 66 67 url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap"; 67 - sha512 = "45b7ab574b30fb368e0b6f4dd60addbfd1ddc02173b4f98b31c524eed49073432352a361e75959ce8e2f752231e93c79ca1b538c4bd295c935d1e2e0585d147f"; 68 + sha512 = "3a068cbe3c1fca84ae67e28830216f993aa459947517956897c3b3f63063005c9db646960e85185b149747ffc302060c208a7f9968ea69d50a3496067089f3db"; 68 69 }; 69 70 70 71 buildInputs = [ squashfsTools makeWrapper ];
pkgs/applications/audio/spotify/update.sh
+2 -2
pkgs/applications/audio/transcribe/default.nix
··· 7 7 name = "transcribe-${version}"; 8 8 version = "8.40"; 9 9 10 - src = if stdenv.system == "i686-linux" then 10 + src = if stdenv.hostPlatform.system == "i686-linux" then 11 11 fetchzip { 12 12 url = "https://www.seventhstring.com/xscribe/downlinux32_old/xscsetup.tar.gz"; 13 13 sha256 = "1ngidmj9zz8bmv754s5xfsjv7v6xr03vck4kigzq4bpc9b1fdhjq"; 14 14 } 15 - else if stdenv.system == "x86_64-linux" then 15 + else if stdenv.hostPlatform.system == "x86_64-linux" then 16 16 fetchzip { 17 17 url = "https://www.seventhstring.com/xscribe/downlinux64_old/xsc64setup.tar.gz"; 18 18 sha256 = "0svzi8svj6zn06gj0hr8mpnhq4416dvb4g5al0gpb1g3paywdaf9";
+5 -2
pkgs/applications/display-managers/lightdm/default.nix
··· 9 9 10 10 stdenv.mkDerivation rec { 11 11 pname = "lightdm"; 12 - version = "1.26.0"; 12 + version = "1.28.0"; 13 13 14 14 name = "${pname}-${version}"; 15 15 16 + outputs = [ "out" "dev" ]; 17 + 16 18 src = fetchFromGitHub { 17 19 owner = "CanonicalLtd"; 18 20 repo = pname; 19 21 rev = version; 20 - sha256 = "1mhj6l025cnf2dzxnbzlk0qa9fm4gj2aw58qh5fl4ky87dp4wdyb"; 22 + sha256 = "1mmqy1jdvgc0h0h9gli7n4vdv5p8m5019qjr5ni4h73iz6mjdj2b"; 21 23 }; 22 24 23 25 nativeBuildInputs = [ ··· 73 75 74 76 meta = { 75 77 homepage = https://github.com/CanonicalLtd/lightdm; 78 + description = "A cross-desktop display manager."; 76 79 platforms = platforms.linux; 77 80 license = licenses.gpl3; 78 81 maintainers = with maintainers; [ ocharles wkennington worldofpeace ];
+1 -1
pkgs/applications/editors/eclipse/build-eclipse.nix
··· 2 2 , zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk 3 3 , makeWrapper, ... }: 4 4 5 - { name, src ? builtins.getAttr stdenv.system sources, sources ? null, description }: 5 + { name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description }: 6 6 7 7 stdenv.mkDerivation rec { 8 8 inherit name src;
+7 -7
pkgs/applications/editors/eclipse/default.nix
··· 27 27 name = "eclipse-cpp-4.7.0"; 28 28 description = "Eclipse IDE for C/C++ Developers, Oxygen release"; 29 29 src = 30 - if stdenv.system == "x86_64-linux" then 30 + if stdenv.hostPlatform.system == "x86_64-linux" then 31 31 fetchurl { 32 32 url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk-x86_64.tar.gz; 33 33 sha512 = "813c791e739d7d0e2ab242a5bacadca135bbeee20ef97aa830353cd90f63fa6e9c89cfcc6aadf635c742befe035bd6e3f15103013f63c419f6144e86ebde3ed1"; 34 34 } 35 - else if stdenv.system == "i686-linux" then 35 + else if stdenv.hostPlatform.system == "i686-linux" then 36 36 fetchurl { 37 37 url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk.tar.gz; 38 38 sha512 = "2b50f4a00306a89cda1aaaa606e62285cacbf93464a9dd3f3319dca3e2c578b802e685de6f78e5e617d269e21271188effe73d41f491a6de946e28795d82db8a"; 39 39 } 40 - else throw "Unsupported system: ${stdenv.system}"; 40 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 41 41 }; 42 42 43 43 eclipse-cpp-37 = buildEclipse { 44 44 name = "eclipse-cpp-3.7"; 45 45 description = "Eclipse IDE for C/C++ Developers"; 46 46 src = 47 - if stdenv.system == "x86_64-linux" then 47 + if stdenv.hostPlatform.system == "x86_64-linux" then 48 48 fetchurl { 49 49 url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk-x86_64.tar.gz; 50 50 sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3"; ··· 65 65 name = "eclipse-modeling-4.7"; 66 66 description = "Eclipse Modeling Tools"; 67 67 src = 68 - if stdenv.system == "x86_64-linux" then 68 + if stdenv.hostPlatform.system == "x86_64-linux" then 69 69 fetchurl { 70 70 url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-modeling-oxygen-R-linux-gtk-x86_64.tar.gz; 71 71 sha512 = "3b9a7ad4b5d6b77fbdd64e8d323e0adb6c2904763ad042b374b4d87cef8607408cb407e395870fc755d58c0c800e20818adcf456ebe193d76cede16c5fe12271"; ··· 81 81 name = "eclipse-modeling-3.6.2"; 82 82 description = "Eclipse Modeling Tools (includes Incubating components)"; 83 83 src = 84 - if stdenv.system == "x86_64-linux" then 84 + if stdenv.hostPlatform.system == "x86_64-linux" then 85 85 fetchurl { 86 86 url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk-x86_64.tar.gz; 87 87 sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61"; ··· 151 151 name = "eclipse-scala-sdk-4.4.1"; 152 152 description = "Eclipse IDE for Scala Developers"; 153 153 src = 154 - if stdenv.system == "x86_64-linux" then 154 + if stdenv.hostPlatform.system == "x86_64-linux" then 155 155 fetchurl { # tested 156 156 url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86_64.tar.gz; 157 157 sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";
+1 -2
pkgs/applications/editors/ed/default.nix
··· 1 1 { stdenv, fetchurl, lzip 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation (rec { ··· 36 35 maintainers = [ ]; 37 36 platforms = stdenv.lib.platforms.unix; 38 37 }; 39 - } // stdenv.lib.optionalAttrs (hostPlatform != buildPlatform) { 38 + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { 40 39 # This may be moved above during a stdenv rebuild. 41 40 preConfigure = '' 42 41 configureFlagsArray+=("CC=$CC")
+1 -1
pkgs/applications/editors/jetbrains/common.nix
··· 42 42 } 43 43 44 44 interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) 45 - if [ "${stdenv.system}" == "x86_64-linux" ]; then 45 + if [ "${stdenv.hostPlatform.system}" == "x86_64-linux" ]; then 46 46 target_size=$(get_file_size bin/fsnotifier64) 47 47 patchelf --set-interpreter "$interpreter" bin/fsnotifier64 48 48 munge_size_hack bin/fsnotifier64 $target_size
+7 -7
pkgs/applications/editors/kodestudio/default.nix
··· 8 8 9 9 version = "17.1"; 10 10 11 - sha256 = if stdenv.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" 12 - else if stdenv.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" 13 - else throw "Unsupported system: ${stdenv.system}"; 11 + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" 12 + else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" 13 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 14 14 15 15 urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-"; 16 16 17 - urlStr = if stdenv.system == "x86_64-linux" then urlBase + "linux64.tar.gz" 18 - else if stdenv.system == "i686-cygwin" then urlBase + "win32.zip" 19 - else throw "Unsupported system: ${stdenv.system}"; 17 + urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz" 18 + else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip" 19 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 20 20 21 21 in 22 22 ··· 47 47 cp -r ./* $out 48 48 ''; 49 49 50 - postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' 50 + postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' 51 51 # Patch Binaries 52 52 patchelf \ 53 53 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+2 -2
pkgs/applications/editors/music/tuxguitar/default.nix
··· 1 1 { stdenv, fetchurl, swt, jdk, makeWrapper, alsaLib }: 2 2 3 - let metadata = assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; 4 - if stdenv.system == "i686-linux" then 3 + let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"; 4 + if stdenv.hostPlatform.system == "i686-linux" then 5 5 { arch = "x86"; sha256 = "1qmb51k0538pn7gv4nsvhfv33xik4l4af0qmpllkzrikmj8wvzlb"; } 6 6 else 7 7 { arch = "x86_64"; sha256 = "12af47jhlrh9aq5b3d13l7cdhlndgnfpy61gz002hajbq7i00ixh"; };
+1 -1
pkgs/applications/editors/sublime/2/default.nix
··· 6 6 stdenv.mkDerivation rec { 7 7 name = "sublimetext-2.0.2"; 8 8 src = 9 - if stdenv.system == "i686-linux" then 9 + if stdenv.hostPlatform.system == "i686-linux" then 10 10 fetchurl { 11 11 name = "sublimetext-2.0.2.tar.bz2"; 12 12 url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2;
+2 -2
pkgs/applications/editors/sublime/3/common.nix
··· 13 13 ++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo"; 14 14 in let 15 15 archSha256 = 16 - if stdenv.system == "i686-linux" then 16 + if stdenv.hostPlatform.system == "i686-linux" then 17 17 x32sha256 18 18 else 19 19 x64sha256; 20 20 21 21 arch = 22 - if stdenv.system == "i686-linux" then 22 + if stdenv.hostPlatform.system == "i686-linux" then 23 23 "x32" 24 24 else 25 25 "x64";
+1 -1
pkgs/applications/editors/typora/default.nix
··· 6 6 version = "0.9.53"; 7 7 8 8 src = 9 - if stdenv.system == "x86_64-linux" then 9 + if stdenv.hostPlatform.system == "x86_64-linux" then 10 10 fetchurl { 11 11 url = "https://www.typora.io/linux/typora_${version}_amd64.deb"; 12 12 sha256 = "02k6x30l4mbjragqbq5rn663xbw3h4bxzgppfxqf5lwydswldklb";
+2 -3
pkgs/applications/editors/vim/default.nix
··· 7 7 } 8 8 # apple frameworks 9 9 , Carbon, Cocoa 10 - , buildPlatform, hostPlatform 11 10 }: 12 11 13 12 let ··· 20 19 21 20 nativeBuildInputs = [ gettext pkgconfig ]; 22 21 buildInputs = [ ncurses ] 23 - ++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ]; 22 + ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; 24 23 25 24 configureFlags = [ 26 25 "--enable-multibyte" 27 26 "--enable-nls" 28 - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 27 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 29 28 "vim_cv_toupper_broken=no" 30 29 "--with-tlib=ncurses" 31 30 "vim_cv_terminfo=yes"
+6 -6
pkgs/applications/editors/vscode/default.nix
··· 9 9 "i686-linux" = "linux-ia32"; 10 10 "x86_64-linux" = "linux-x64"; 11 11 "x86_64-darwin" = "darwin"; 12 - }.${stdenv.system}; 12 + }.${stdenv.hostPlatform.system}; 13 13 14 14 sha256 = { 15 15 "i686-linux" = "1g7kqbz6mrf8ngx2bnwpi9fifq5rjznxgsgwjb532z3nh92ypa8n"; 16 16 "x86_64-linux" = "02yldycakn5zxj1ji4nmhdyazqlkjqpzdj3g8j501c3j28pgiwjy"; 17 17 "x86_64-darwin" = "0pnsfkh20mj7pzqw7wlfd98jqc6a1mnsq1iira15n7fafqgj8zpl"; 18 - }.${stdenv.system}; 18 + }.${stdenv.hostPlatform.system}; 19 19 20 - archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz"; 20 + archive_fmt = if stdenv.hostPlatform.system == "x86_64-darwin" then "zip" else "tar.gz"; 21 21 22 22 rpath = lib.concatStringsSep ":" [ 23 23 atomEnv.libPath ··· 48 48 categories = "GNOME;GTK;Utility;TextEditor;Development;"; 49 49 }; 50 50 51 - buildInputs = if stdenv.system == "x86_64-darwin" 51 + buildInputs = if stdenv.hostPlatform.system == "x86_64-darwin" 52 52 then [ unzip libXScrnSaver libsecret ] 53 53 else [ wrapGAppsHook libXScrnSaver libxkbfile libsecret ]; 54 54 55 55 installPhase = 56 - if stdenv.system == "x86_64-darwin" then '' 56 + if stdenv.hostPlatform.system == "x86_64-darwin" then '' 57 57 mkdir -p $out/lib/vscode $out/bin 58 58 cp -r ./* $out/lib/vscode 59 59 ln -s $out/lib/vscode/Contents/Resources/app/bin/code $out/bin ··· 72 72 cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png 73 73 ''; 74 74 75 - postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' 75 + postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' 76 76 patchelf \ 77 77 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 78 78 --set-rpath "${rpath}" \
+7 -8
pkgs/applications/graphics/ImageMagick/7.0.nix
··· 2 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, libheif 4 4 , ApplicationServices 5 - , hostPlatform 6 5 }: 7 6 8 7 let 9 8 arch = 10 - if stdenv.system == "i686-linux" then "i686" 11 - else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64" 12 - else if stdenv.system == "armv7l-linux" then "armv7l" 13 - else if stdenv.system == "aarch64-linux" then "aarch64" 9 + if stdenv.hostPlatform.system == "i686-linux" then "i686" 10 + else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64" 11 + else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l" 12 + else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64" 14 13 else throw "ImageMagick is not supported on this platform."; 15 14 16 15 cfg = { ··· 46 45 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 47 46 "--with-gslib" 48 47 ] 49 - ++ lib.optionals hostPlatform.isMinGW 48 + ++ lib.optionals stdenv.hostPlatform.isMinGW 50 49 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 51 50 ; 52 51 ··· 56 55 [ zlib fontconfig freetype ghostscript 57 56 libpng libtiff libxml2 libheif 58 57 ] 59 - ++ lib.optionals (!hostPlatform.isMinGW) 58 + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) 60 59 [ openexr librsvg openjpeg ] 61 60 ++ lib.optional stdenv.isDarwin ApplicationServices; 62 61 63 62 propagatedBuildInputs = 64 63 [ bzip2 freetype libjpeg lcms2 ] 65 - ++ lib.optionals (!hostPlatform.isMinGW) 64 + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) 66 65 [ libX11 libXext libXt libwebp ] 67 66 ; 68 67
+8 -9
pkgs/applications/graphics/ImageMagick/default.nix
··· 2 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, fftw, libheif, libde265 4 4 , ApplicationServices 5 - , hostPlatform 6 5 }: 7 6 8 7 let 9 8 arch = 10 - if stdenv.system == "i686-linux" then "i686" 11 - else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64" 12 - else if stdenv.system == "armv7l-linux" then "armv7l" 13 - else if stdenv.system == "aarch64-linux" then "aarch64" 9 + if stdenv.hostPlatform.system == "i686-linux" then "i686" 10 + else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64" 11 + else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l" 12 + else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64" 14 13 else throw "ImageMagick is not supported on this platform."; 15 14 16 15 cfg = { ··· 20 19 } 21 20 # Freeze version on mingw so we don't need to port the patch too often. 22 21 # FIXME: This version has multiple security vulnerabilities 23 - // lib.optionalAttrs (hostPlatform.isMinGW) { 22 + // lib.optionalAttrs (stdenv.hostPlatform.isMinGW) { 24 23 version = "6.9.2-0"; 25 24 sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7"; 26 25 patches = [(fetchpatch { ··· 58 57 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 59 58 "--with-gslib" 60 59 ] 61 - ++ lib.optionals (hostPlatform.isMinGW) 60 + ++ lib.optionals (stdenv.hostPlatform.isMinGW) 62 61 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 63 62 ; 64 63 ··· 68 67 [ zlib fontconfig freetype ghostscript 69 68 libpng libtiff libxml2 libheif libde265 70 69 ] 71 - ++ lib.optionals (!hostPlatform.isMinGW) 70 + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) 72 71 [ openexr librsvg openjpeg ] 73 72 ++ lib.optional stdenv.isDarwin ApplicationServices; 74 73 75 74 propagatedBuildInputs = 76 75 [ bzip2 freetype libjpeg lcms2 fftw ] 77 - ++ lib.optionals (!hostPlatform.isMinGW) 76 + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) 78 77 [ libX11 libXext libXt libwebp ] 79 78 ; 80 79
+2 -2
pkgs/applications/graphics/gcolor2/default.nix
··· 3 3 let version = "0.4"; in 4 4 stdenv.mkDerivation { 5 5 name = "gcolor2-${version}"; 6 - arch = if stdenv.system == "x86_64-linux" then "amd64" else "386"; 6 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else "386"; 7 7 8 8 src = fetchurl { 9 9 url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2"; ··· 16 16 ''; 17 17 18 18 # from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches 19 - patches = if stdenv.system == "x86_64-linux" then 19 + patches = if stdenv.hostPlatform.system == "x86_64-linux" then 20 20 [ ./gcolor2-amd64.patch ] else 21 21 [ ]; 22 22
+3 -3
pkgs/applications/graphics/sane/backends/brscan4/default.nix
··· 12 12 in stdenv.mkDerivation rec { 13 13 name = "brscan4-0.4.4-4"; 14 14 src = 15 - if stdenv.system == "i686-linux" then 15 + if stdenv.hostPlatform.system == "i686-linux" then 16 16 fetchurl { 17 17 url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb"; 18 18 sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2"; 19 19 } 20 - else if stdenv.system == "x86_64-linux" then 20 + else if stdenv.hostPlatform.system == "x86_64-linux" then 21 21 fetchurl { 22 22 url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; 23 23 sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; 24 24 } 25 - else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; 25 + else throw "${name} is not supported on ${stdenv.hostPlatform.system} (only i686-linux and x86_64 linux are supported)"; 26 26 27 27 unpackPhase = '' 28 28 ar x $src
+3 -3
pkgs/applications/graphics/unigine-valley/default.nix
··· 17 17 let 18 18 version = "1.0"; 19 19 20 - arch = if stdenv.system == "x86_64-linux" then 20 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then 21 21 "x64" 22 - else if stdenv.system == "i686-linux" then 22 + else if stdenv.hostPlatform.system == "i686-linux" then 23 23 "x86" 24 24 else 25 - throw "Unsupported platform ${stdenv.system}"; 25 + throw "Unsupported platform ${stdenv.hostPlatform.system}"; 26 26 27 27 in 28 28 stdenv.mkDerivation rec {
+3 -3
pkgs/applications/misc/1password/default.nix
··· 4 4 name = "1password-${version}"; 5 5 version = "0.5.3"; 6 6 src = 7 - if stdenv.system == "i686-linux" then 7 + if stdenv.hostPlatform.system == "i686-linux" then 8 8 fetchzip { 9 9 url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip"; 10 10 sha256 = "05s223h1yps4k9kmignl0r5sbh6w7m1hnlmafnf1kiwv7gacvxjc"; 11 11 stripRoot = false; 12 12 } 13 - else if stdenv.system == "x86_64-linux" then 13 + else if stdenv.hostPlatform.system == "x86_64-linux" then 14 14 fetchzip { 15 15 url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip"; 16 16 sha256 = "0p9x1fx0309v8dxxaf88m8x8q15zzqywfmjn6v5wb9v3scp9396v"; 17 17 stripRoot = false; 18 18 } 19 - else if stdenv.system == "x86_64-darwin" then 19 + else if stdenv.hostPlatform.system == "x86_64-darwin" then 20 20 fetchzip { 21 21 url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip"; 22 22 sha256 = "1z2xp9bn93gr4ha6zx65va1fb58a2xlnnmpv583y96gq3vbnqdcj";
+1 -1
pkgs/applications/misc/adobe-reader/default.nix
··· 1 1 { stdenv, fetchurl, libX11, cups, zlib, libxml2, pango, atk, gtk2, glib 2 2 , gdk_pixbuf }: 3 3 4 - assert stdenv.system == "i686-linux"; 4 + assert stdenv.hostPlatform.system == "i686-linux"; 5 5 6 6 let version = "9.5.5"; in 7 7
+3 -3
pkgs/applications/misc/cura/lulzbot.nix
··· 8 8 version = "15.02.1-1.03-5064"; 9 9 10 10 src = 11 - if stdenv.system == "x86_64-linux" then 11 + if stdenv.hostPlatform.system == "x86_64-linux" then 12 12 fetchurl { 13 13 url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb"; 14 14 sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg"; 15 15 } 16 - else if stdenv.system == "i686-linux" then 16 + else if stdenv.hostPlatform.system == "i686-linux" then 17 17 fetchurl { 18 18 url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb"; 19 19 sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1"; 20 20 } 21 - else throw "${name} is not supported on ${stdenv.system}"; 21 + else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; 22 22 23 23 python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ]; 24 24 pythonPath = python_deps;
+3 -3
pkgs/applications/misc/googleearth/default.nix
··· 4 4 5 5 let 6 6 arch = 7 - if stdenv.system == "x86_64-linux" then "amd64" 8 - else if stdenv.system == "i686-linux" then "i386" 9 - else throw "Unsupported system ${stdenv.system}"; 7 + if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 8 + else if stdenv.hostPlatform.system == "i686-linux" then "i386" 9 + else throw "Unsupported system ${stdenv.hostPlatform.system}"; 10 10 sha256 = 11 11 if arch == "amd64" 12 12 then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
+2 -2
pkgs/applications/misc/icesl/default.nix
··· 6 6 name = "iceSL-${version}"; 7 7 version = "2.1.10"; 8 8 9 - src = if stdenv.system == "x86_64-linux" then fetchzip { 9 + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip { 10 10 url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip"; 11 11 sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2"; 12 - } else if stdenv.system == "i686-linux" then fetchzip { 12 + } else if stdenv.hostPlatform.system == "i686-linux" then fetchzip { 13 13 url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip"; 14 14 sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr"; 15 15 } else throw "Unsupported architecture";
+1 -1
pkgs/applications/misc/kdbplus/default.nix
··· 1 1 { stdenv, requireFile, unzip, rlwrap, bash }: 2 2 3 - assert (stdenv.system == "i686-linux"); 3 + assert (stdenv.hostPlatform.system == "i686-linux"); 4 4 5 5 let 6 6 libPath = stdenv.lib.makeLibraryPath
+1 -1
pkgs/applications/misc/kiwix/default.nix
··· 25 25 sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi"; 26 26 }; 27 27 28 - xulrunner = if stdenv.system == "x86_64-linux" 28 + xulrunner = if stdenv.hostPlatform.system == "x86_64-linux" 29 29 then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; } 30 30 else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; }; 31 31
+47
pkgs/applications/misc/notify-osd-customizable/default.nix
··· 1 + { stdenv 2 + , dbus-glib 3 + , fetchurl 4 + , glib 5 + , gnome3 6 + , libnotify 7 + , libtool 8 + , libwnck3 9 + , makeWrapper 10 + , pkgconfig 11 + }: 12 + 13 + let baseURI = "https://launchpad.net/~leolik/+archive/leolik"; 14 + in stdenv.mkDerivation rec { 15 + name = "notify-osd-${version}"; 16 + version = "0.9.35+16.04.20160415"; 17 + 18 + src = fetchurl { 19 + url = "${baseURI}/+files/notify-osd_${version}-0ubuntu1-leolik~ppa0.tar.gz"; 20 + sha256 = "026dr46jh3xc4103wnslzy7pxbxkkpflh52c59j8vzwaa7bvvzkv"; 21 + name = "notify-osd-customizable.tar.gz"; 22 + }; 23 + 24 + preConfigure = "./autogen.sh --libexecdir=$(out)/bin"; 25 + 26 + nativeBuildInputs = [ pkgconfig ]; 27 + buildInputs = [ 28 + glib libwnck3 libnotify dbus-glib makeWrapper 29 + gnome3.gsettings-desktop-schemas gnome3.gnome-common 30 + libtool 31 + ]; 32 + 33 + configureFlags = "--libexecdir=$(out)/bin"; 34 + 35 + preFixup = '' 36 + wrapProgram "$out/bin/notify-osd" \ 37 + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" 38 + ''; 39 + 40 + meta = with stdenv.lib; { 41 + description = "Daemon that displays passive pop-up notifications"; 42 + homepage = https://launchpad.net/notify-osd; 43 + license = licenses.gpl3; 44 + maintainers = [ maintainers.imalison ]; 45 + platforms = platforms.linux; 46 + }; 47 + }
+4 -4
pkgs/applications/misc/playonlinux/default.nix
··· 44 44 ]; 45 45 46 46 ld32 = 47 - if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32" 48 - else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker" 49 - else throw "Unsupported platform for PlayOnLinux: ${stdenv.system}"; 47 + if stdenv.hostPlatform.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32" 48 + else if stdenv.hostPlatform.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker" 49 + else throw "Unsupported platform for PlayOnLinux: ${stdenv.hostPlatform.system}"; 50 50 ld64 = "${stdenv.cc}/nix-support/dynamic-linker"; 51 51 libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xorg.libX11 ]; 52 52 ··· 83 83 84 84 bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2 85 85 patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86 86 - ${if stdenv.system == "x86_64-linux" then '' 86 + ${if stdenv.hostPlatform.system == "x86_64-linux" then '' 87 87 bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2 88 88 patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64 89 89 '' else ''
+1 -1
pkgs/applications/misc/rescuetime/default.nix
··· 2 2 3 3 let 4 4 src = 5 - if stdenv.system == "i686-linux" then fetchurl { 5 + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 6 6 name = "rescuetime-installer.deb"; 7 7 url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb"; 8 8 sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz";
+1 -1
pkgs/applications/misc/sweethome3d/default.nix
··· 55 55 56 56 makeWrapper ${jre}/bin/java $out/bin/$exec \ 57 57 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 58 - --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"}" 58 + --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 -d${toString stdenv.hostPlatform.parsed.cpu.bits}" 59 59 ''; 60 60 61 61 dontStrip = true;
+1 -1
pkgs/applications/misc/sweethome3d/editors.nix
··· 44 44 cp "${editorItem}/share/applications/"* $out/share/applications 45 45 makeWrapper ${jre}/bin/java $out/bin/$exec \ 46 46 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 47 - --add-flags "-jar $out/share/java/${module}-${version}.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" 47 + --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" 48 48 ''; 49 49 50 50 dontStrip = true;
+3 -3
pkgs/applications/misc/xmind/default.nix
··· 4 4 name = "xmind-${version}"; 5 5 version = "7.5-update1"; 6 6 7 - src = if stdenv.system == "i686-linux" then fetchurl { 7 + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 8 8 url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb"; 9 9 sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1"; 10 - } else if stdenv.system == "x86_64-linux" then fetchurl { 10 + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 11 11 url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb"; 12 12 sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9"; 13 - } else throw "platform ${stdenv.system} not supported!"; 13 + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; 14 14 15 15 nativeBuildInputs = [ dpkg makeWrapper ]; 16 16
+3 -3
pkgs/applications/networking/apache-directory-studio/default.nix
··· 21 21 version = "2.0.0.v20170904-M13"; 22 22 23 23 src = 24 - if stdenv.system == "x86_64-linux" then 24 + if stdenv.hostPlatform.system == "x86_64-linux" then 25 25 fetchurl { 26 26 url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz"; 27 27 sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq"; 28 28 } 29 - else if stdenv.system == "i686-linux" then 29 + else if stdenv.hostPlatform.system == "i686-linux" then 30 30 fetchurl { 31 31 url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz"; 32 32 sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n"; 33 33 } 34 - else throw "Unsupported system: ${stdenv.system}"; 34 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 35 35 36 36 buildInputs = [ makeWrapper ]; 37 37
+3 -3
pkgs/applications/networking/bittorrentsync/generic.nix
··· 4 4 arch = { 5 5 "x86_64-linux" = "x64"; 6 6 "i686-linux" = "i386"; 7 - }.${stdenv.system} or throwSystem; 7 + }.${stdenv.hostPlatform.system} or throwSystem; 8 8 libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; 9 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 9 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 10 10 in 11 11 12 12 stdenv.mkDerivation rec { ··· 20 20 "https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz" 21 21 "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz" 22 22 ]; 23 - sha256 = sha256s.${stdenv.system} or throwSystem; 23 + sha256 = sha256s.${stdenv.hostPlatform.system} or throwSystem; 24 24 }; 25 25 26 26 dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
+1 -1
pkgs/applications/networking/browsers/firefox-bin/default.nix
··· 59 59 "x86_64-linux" = "linux-x86_64"; 60 60 }; 61 61 62 - arch = mozillaPlatforms.${stdenv.system}; 62 + arch = mozillaPlatforms.${stdenv.hostPlatform.system}; 63 63 64 64 isPrefixOf = prefix: string: 65 65 builtins.substring 0 (builtins.stringLength prefix) string == prefix;
+4 -4
pkgs/applications/networking/browsers/firefox/wrapper.nix
··· 36 36 jre = cfg.jre or false; 37 37 icedtea = cfg.icedtea or false; 38 38 supportsJDK = 39 - stdenv.system == "i686-linux" || 40 - stdenv.system == "x86_64-linux" || 41 - stdenv.system == "armv7l-linux" || 42 - stdenv.system == "aarch64-linux"; 39 + stdenv.hostPlatform.system == "i686-linux" || 40 + stdenv.hostPlatform.system == "x86_64-linux" || 41 + stdenv.hostPlatform.system == "armv7l-linux" || 42 + stdenv.hostPlatform.system == "aarch64-linux"; 43 43 44 44 plugins = 45 45 assert !(jre && icedtea);
+3 -3
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix
··· 60 60 61 61 let 62 62 arch = 63 - if stdenv.system == "x86_64-linux" then 63 + if stdenv.hostPlatform.system == "x86_64-linux" then 64 64 "x86_64" 65 - else if stdenv.system == "i686-linux" then 65 + else if stdenv.hostPlatform.system == "i686-linux" then 66 66 "i386" 67 67 else throw "Flash Player is not supported on this platform"; 68 68 lib_suffix = 69 - if stdenv.system == "x86_64-linux" then 69 + if stdenv.hostPlatform.system == "x86_64-linux" then 70 70 "64" 71 71 else 72 72 "";
+2 -2
pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
··· 54 54 version = "5.41.3.0"; 55 55 56 56 src = 57 - if stdenv.system == "x86_64-linux" then 57 + if stdenv.hostPlatform.system == "x86_64-linux" then 58 58 fetchurl { 59 59 url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb"; 60 60 sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81"; 61 61 } 62 - else if stdenv.system == "i686-linux" then 62 + else if stdenv.hostPlatform.system == "i686-linux" then 63 63 fetchurl { 64 64 url = "${baseURL}/google-talkplugin_${version}-1_i386.deb"; 65 65 sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139";
+1 -1
pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix
··· 8 8 }; 9 9 10 10 src = 11 - if stdenv.system == "x86_64-linux" then 11 + if stdenv.hostPlatform.system == "x86_64-linux" then 12 12 fetchurl { 13 13 url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb; 14 14 sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z";
+6 -2
pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
··· 51 51 52 52 # Extra preferences 53 53 , extraPrefs ? "" 54 + 55 + # For meta 56 + , tor-browser-bundle 54 57 }: 55 58 56 59 with stdenv.lib; ··· 125 128 name = "tor-browser-bundle-bin-${version}"; 126 129 inherit version; 127 130 128 - src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); 131 + src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 129 132 130 133 preferLocalBuild = true; 131 134 allowSubstitutes = false; ··· 397 400 ''; 398 401 399 402 meta = with stdenv.lib; { 400 - description = "Tor Browser Bundle"; 403 + description = "Tor Browser Bundle built by torproject.org"; 404 + longDescription = tor-browser-bundle.meta.longDescription; 401 405 homepage = https://www.torproject.org/; 402 406 platforms = attrNames srcs; 403 407 maintainers = with maintainers; [ offline matejc doublec thoughtpolice joachifm ];
+23 -1
pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
··· 339 339 340 340 passthru.execdir = "/bin"; 341 341 meta = with stdenv.lib; { 342 - description = "An unofficial version of the tor browser bundle, built from source"; 342 + description = "An unofficial version of the Tor Browser Bundle, built from source"; 343 + longDescription = '' 344 + Tor Browser Bundle is a bundle of the Tor daemon, Tor Browser (heavily patched version of 345 + Firefox), several essential extensions for Tor Browser, and some tools that glue those 346 + together with a convenient UI. 347 + 348 + `tor-browser-bundle-bin` package is the official version built by torproject.org patched with 349 + `patchelf` to work under nix and with bundled scripts adapted to the read-only nature of 350 + the `/nix/store`. 351 + 352 + `tor-browser-bundle` package is the version built completely from source. It reuses the `tor` 353 + package for the tor daemon, `firefoxPackages.tor-browser` package for the tor-browser, and 354 + builds all the extensions from source. 355 + 356 + Note that `tor-browser-bundle` package is not only built from source, but also bundles Tor 357 + Browser differently from the official `tor-browser-bundle-bin` implementation. The official 358 + Tor Browser is not a normal UNIX program and is heavily patched for its use in the Tor Browser 359 + Bundle (which `tor-browser-bundle-bin` package then has to work around for the read-only 360 + /nix/store). Meanwhile, `firefoxPackages.tor-browser` reverts all those patches, allowing 361 + `firefoxPackages.tor-browser` to be used independently of the bundle, and then implements what 362 + `tor-browser-bundle` needs for the bundling using a much simpler patch. See the 363 + longDescription and expression of the `firefoxPackages.tor-browser` package for more info. 364 + ''; 343 365 homepage = https://torproject.org/; 344 366 license = licenses.free; 345 367 platforms = [ "x86_64-linux" ];
+4 -4
pkgs/applications/networking/cluster/minikube/default.nix
··· 1 1 { stdenv, buildGoPackage, fetchFromGitHub, go-bindata, libvirt, qemu 2 - , gpgme, makeWrapper, hostPlatform, vmnet, python 2 + , gpgme, makeWrapper, vmnet, python 3 3 , docker-machine-kvm, docker-machine-kvm2 4 4 , extraDrivers ? [] 5 5 }: ··· 25 25 sha256 = "0c36rzsdzxf9q6l4hl506bsd4qwmw033i0k1xhqszv9agg7qjlmm"; 26 26 }; 27 27 28 - buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional hostPlatform.isDarwin vmnet; 29 - subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional hostPlatform.isDarwin "cmd/drivers/hyperkit"; 28 + buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin vmnet; 29 + subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "cmd/drivers/hyperkit"; 30 30 31 31 preBuild = '' 32 32 pushd go/src/${goPackagePath} >/dev/null ··· 56 56 57 57 postFixup = '' 58 58 wrapProgram $bin/bin/${pname} --prefix PATH : $bin/bin:${stdenv.lib.makeBinPath binPath} 59 - '' + stdenv.lib.optionalString hostPlatform.isDarwin '' 59 + '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' 60 60 mv $bin/bin/hyperkit $bin/bin/docker-machine-driver-hyperkit 61 61 ''; 62 62
+2 -2
pkgs/applications/networking/dropbox/default.nix
··· 2 2 3 3 let platforms = [ "i686-linux" "x86_64-linux" ]; in 4 4 5 - assert lib.elem stdenv.system platforms; 5 + assert lib.elem stdenv.hostPlatform.system platforms; 6 6 7 7 # Dropbox client to bootstrap installation. 8 8 # The client is self-updating, so the actual version may be newer. ··· 12 12 arch = { 13 13 "x86_64-linux" = "x86_64"; 14 14 "i686-linux" = "x86"; 15 - }.${stdenv.system}; 15 + }.${stdenv.hostPlatform.system}; 16 16 17 17 installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz"; 18 18 in
+2 -2
pkgs/applications/networking/ids/bro/default.nix
··· 2 2 , geoip, gperftools, python, swig }: 3 3 4 4 stdenv.mkDerivation rec { 5 - name = "bro-2.5.4"; 5 + name = "bro-2.5.5"; 6 6 7 7 src = fetchurl { 8 8 url = "https://www.bro.org/downloads/${name}.tar.gz"; 9 - sha256 = "07sz1i4ly30257677b8vfrbsvxhz2awijyzn5ihg4m567x1ymnl0"; 9 + sha256 = "1kvkiq8jjsqryry9jd4vw45pbfb46jly988mq62mv4sd1fqsxwhq"; 10 10 }; 11 11 12 12 nativeBuildInputs = [ cmake flex bison file ];
+1 -1
pkgs/applications/networking/instant-messengers/franz/default.nix
··· 3 3 , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }: 4 4 5 5 let 6 - bits = if stdenv.system == "x86_64-linux" then "x64" 6 + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 7 7 else "ia32"; 8 8 9 9 version = "4.0.4";
+3 -3
pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
··· 41 41 version = "4.1.2"; 42 42 43 43 src = 44 - if stdenv.system == "x86_64-linux" then 44 + if stdenv.hostPlatform.system == "x86_64-linux" then 45 45 fetchurl { 46 46 url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz"; 47 47 sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s"; 48 48 } 49 - else if stdenv.system == "i686-linux" then 49 + else if stdenv.hostPlatform.system == "i686-linux" then 50 50 fetchurl { 51 51 url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz"; 52 52 sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr"; 53 53 } 54 54 else 55 - throw "Mattermost-Desktop is not currently supported on ${stdenv.system}"; 55 + throw "Mattermost-Desktop is not currently supported on ${stdenv.hostPlatform.system}"; 56 56 57 57 phases = [ "unpackPhase" "installPhase" ]; 58 58 installPhase = ''
+1 -1
pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix
··· 18 18 inherit version; 19 19 20 20 name = "sencha-bare-${version}"; 21 - src = srcs.${stdenv.system}; 21 + src = srcs.${stdenv.hostPlatform.system}; 22 22 23 23 nativeBuildInputs = [ gzip which unzip ]; 24 24 buildInputs = [ jdk ];
+2 -2
pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
··· 53 53 ] + ":${stdenv.cc.cc.lib}/lib64"; 54 54 55 55 src = 56 - if stdenv.system == "x86_64-linux" then 56 + if stdenv.hostPlatform.system == "x86_64-linux" then 57 57 fetchurl { 58 58 url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"; 59 59 sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x"; 60 60 } 61 61 else 62 - throw "Skype for linux is not supported on ${stdenv.system}"; 62 + throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}"; 63 63 64 64 in stdenv.mkDerivation { 65 65 name = "skypeforlinux-${version}";
+2 -2
pkgs/applications/networking/instant-messengers/slack/default.nix
··· 44 44 ] + ":${stdenv.cc.cc.lib}/lib64"; 45 45 46 46 src = 47 - if stdenv.system == "x86_64-linux" then 47 + if stdenv.hostPlatform.system == "x86_64-linux" then 48 48 fetchurl { 49 49 url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb"; 50 50 sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah"; 51 51 } 52 52 else 53 - throw "Slack is not supported on ${stdenv.system}"; 53 + throw "Slack is not supported on ${stdenv.hostPlatform.system}"; 54 54 55 55 in stdenv.mkDerivation { 56 56 name = "slack-${version}";
+2 -2
pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
··· 44 44 plat = { 45 45 "i686-linux" = "i386"; 46 46 "x86_64-linux" = "amd64"; 47 - }.${stdenv.system}; 47 + }.${stdenv.hostPlatform.system}; 48 48 49 49 sha256 = { 50 50 "i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq"; 51 51 "x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r"; 52 - }.${stdenv.system}; 52 + }.${stdenv.hostPlatform.system}; 53 53 54 54 in 55 55 stdenv.mkDerivation rec {
+2 -2
pkgs/applications/networking/instant-messengers/zoom-us/default.nix
··· 1 - { stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env 1 + { stdenv, fetchurl, makeWrapper, makeDesktopItem, autoPatchelfHook, env 2 2 # Dynamic libraries 3 3 , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative 4 4 , qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg ··· 31 31 in stdenv.mkDerivation { 32 32 name = "zoom-us-${version}"; 33 33 34 - src = srcs.${system}; 34 + src = srcs.${stdenv.hostPlatform.system}; 35 35 36 36 nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; 37 37
+2 -2
pkgs/applications/networking/insync/default.nix
··· 4 4 name = "insync-${version}"; 5 5 version = "1.4.5.37069"; 6 6 src = 7 - if stdenv.system == "x86_64-linux" then 7 + if stdenv.hostPlatform.system == "x86_64-linux" then 8 8 fetchurl { 9 9 url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2"; 10 10 sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd"; 11 11 } 12 12 else 13 - throw "${name} is not supported on ${stdenv.system}"; 13 + throw "${name} is not supported on ${stdenv.hostPlatform.system}"; 14 14 15 15 buildInputs = [ makeWrapper ]; 16 16
+2 -2
pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
··· 33 33 subVersion = "fec7941"; 34 34 35 35 src = 36 - if stdenv.system == "x86_64-linux" then 36 + if stdenv.hostPlatform.system == "x86_64-linux" then 37 37 fetchurl { 38 38 url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; 39 39 sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada"; 40 40 } 41 41 else 42 - throw "NylasMail is not supported on ${stdenv.system}"; 42 + throw "NylasMail is not supported on ${stdenv.hostPlatform.system}"; 43 43 44 44 propagatedBuildInputs = [ 45 45 alsaLib
+1 -1
pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
··· 47 47 with (import ./release_sources.nix); 48 48 49 49 let 50 - arch = if stdenv.system == "i686-linux" 50 + arch = if stdenv.hostPlatform.system == "i686-linux" 51 51 then "linux-i686" 52 52 else "linux-x86_64"; 53 53
+1 -1
pkgs/applications/networking/p2p/frostwire/default.nix
··· 75 75 cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib"; 76 76 x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so"; 77 77 i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so"; 78 - }.${stdenv.system} or (throw "unsupported system ${stdenv.system}") 78 + }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}") 79 79 } $out/lib 80 80 81 81 cp -dpR ${desktopItem}/share $out
+1 -1
pkgs/applications/networking/p2p/soulseekqt/default.nix
··· 37 37 38 38 name = "soulseekqt-${version}"; 39 39 inherit version; 40 - src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); 40 + src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 41 41 42 42 dontBuild = true; 43 43
+3 -9
pkgs/applications/networking/p2p/zeronet/default.nix
··· 3 3 python2Packages.buildPythonApplication rec { 4 4 pname = "zeronet"; 5 5 version = "0.6.2"; 6 + format = "other"; 6 7 7 8 src = fetchFromGitHub { 8 9 owner = "HelloZeroNet"; ··· 12 13 }; 13 14 14 15 propagatedBuildInputs = with python2Packages; [ msgpack gevent ]; 15 - 16 - format = "other"; 17 - 18 16 buildPhase = "${python2Packages.python.interpreter} -O -m compileall ."; 19 17 20 18 installPhase = '' ··· 22 20 cp -r plugins src tools *.py $out/share/ 23 21 ''; 24 22 25 - # Wrap the main executable and set the log and data dir to something out of 26 - # the store 27 23 postFixup = '' 28 24 makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \ 29 - --set PYTHONPATH "$PYTHONPATH" \ 30 - --set PATH ${python2Packages.python}/bin \ 31 - --add-flags "--log_dir \$HOME/.local/share/zeronet/logs" \ 32 - --add-flags "--data_dir \$HOME/.local/share/zeronet" 25 + --set PYTHONPATH "$PYTHONPATH" \ 26 + --set PATH ${python2Packages.python}/bin 33 27 ''; 34 28 35 29 meta = with stdenv.lib; {
+2 -2
pkgs/applications/networking/remote/anydesk/default.nix
··· 6 6 sha256 = { 7 7 "x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2"; 8 8 "i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45"; 9 - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); 9 + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); 10 10 11 11 arch = { 12 12 "x86_64-linux" = "amd64"; 13 13 "i686-linux" = "i686"; 14 - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); 14 + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); 15 15 16 16 description = "Desktop sharing application, providing remote support and online meetings"; 17 17
+9 -8
pkgs/applications/networking/remote/putty/default.nix
··· 1 - { stdenv, fetchurl, autoconf, automake, pkgconfig, libtool 1 + { stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool 2 2 , gtk2, halibut, ncurses, perl 3 - , hostPlatform, lib }: 3 + }: 4 4 5 5 stdenv.mkDerivation rec { 6 6 version = "0.70"; ··· 14 14 sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv"; 15 15 }; 16 16 17 - preConfigure = lib.optionalString hostPlatform.isUnix '' 17 + preConfigure = lib.optionalString stdenv.hostPlatform.isUnix '' 18 18 perl mkfiles.pl 19 19 ( cd doc ; make ); 20 20 sed -e '/AM_PATH_GTK(/d' \ ··· 22 22 -e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac 23 23 ./mkauto.sh 24 24 cd unix 25 - '' + lib.optionalString hostPlatform.isWindows '' 25 + '' + lib.optionalString stdenv.hostPlatform.isWindows '' 26 26 cd windows 27 27 ''; 28 28 29 29 TOOLPATH = stdenv.cc.targetPrefix; 30 - makefile = if hostPlatform.isWindows then "Makefile.mgw" else null; 30 + makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null; 31 31 32 - installPhase = if hostPlatform.isWindows then '' 32 + installPhase = if stdenv.hostPlatform.isWindows then '' 33 33 for exe in *.exe; do 34 34 install -D $exe $out/bin/$exe 35 35 done 36 36 '' else null; 37 37 38 38 nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ]; 39 - buildInputs = [] 40 - ++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ]; 39 + buildInputs = lib.optionals stdenv.hostPlatform.isUnix [ 40 + gtk2 ncurses 41 + ]; 41 42 enableParallelBuilding = true; 42 43 43 44 meta = with lib; {
+2 -2
pkgs/applications/networking/resilio-sync/default.nix
··· 4 4 arch = { 5 5 "x86_64-linux" = "x64"; 6 6 "i686-linux" = "i386"; 7 - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); 7 + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 8 8 libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; 9 9 10 10 in stdenv.mkDerivation rec { ··· 16 16 sha256 = { 17 17 "x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz"; 18 18 "i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs"; 19 - }.${stdenv.system}; 19 + }.${stdenv.hostPlatform.system}; 20 20 }; 21 21 22 22 dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
+9 -9
pkgs/applications/networking/spideroak/default.nix
··· 4 4 }: 5 5 6 6 let 7 - arch = if stdenv.system == "x86_64-linux" then "x64" 8 - else if stdenv.system == "i686-linux" then "x86" 9 - else throw "Spideroak client for: ${stdenv.system} not supported!"; 7 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 8 + else if stdenv.hostPlatform.system == "i686-linux" then "x86" 9 + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; 10 10 11 - interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" 12 - else if stdenv.system == "i686-linux" then "ld-linux.so.2" 13 - else throw "Spideroak client for: ${stdenv.system} not supported!"; 11 + interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2" 12 + else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2" 13 + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; 14 14 15 - sha256 = if stdenv.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533" 16 - else if stdenv.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16" 17 - else throw "Spideroak client for: ${stdenv.system} not supported!"; 15 + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533" 16 + else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16" 17 + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; 18 18 19 19 ldpath = stdenv.lib.makeLibraryPath [ 20 20 fontconfig freetype glib libICE libSM
+2 -2
pkgs/applications/networking/super-productivity/default.nix
··· 44 44 ] + ":${stdenv.cc.cc.lib}/lib64"; 45 45 46 46 src = 47 - if stdenv.system == "x86_64-linux" then 47 + if stdenv.hostPlatform.system == "x86_64-linux" then 48 48 fetchurl { 49 49 url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb"; 50 50 sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1"; 51 51 } 52 52 else 53 - throw "super-productivity is not supported on ${stdenv.system}"; 53 + throw "super-productivity is not supported on ${stdenv.hostPlatform.system}"; 54 54 55 55 in stdenv.mkDerivation { 56 56 name = "super-productivity-${version}";
+4 -4
pkgs/applications/office/jameica/default.nix
··· 6 6 version = "${_version}-${_build}"; 7 7 name = "jameica-${version}"; 8 8 9 - swtSystem = if stdenv.system == "i686-linux" then "linux" 10 - else if stdenv.system == "x86_64-linux" then "linux64" 11 - else if stdenv.system == "x86_64-darwin" then "macos64" 12 - else throw "Unsupported system: ${stdenv.system}"; 9 + swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux" 10 + else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" 11 + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macos64" 12 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 13 13 14 14 desktopItem = makeDesktopItem { 15 15 name = "jameica";
+2 -2
pkgs/applications/office/mendeley/default.nix
··· 37 37 let 38 38 arch32 = "i686-linux"; 39 39 40 - arch = if stdenv.system == arch32 40 + arch = if stdenv.hostPlatform.system == arch32 41 41 then "i386" 42 42 else "amd64"; 43 43 ··· 46 46 version = "${shortVersion}_${arch}"; 47 47 48 48 url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb"; 49 - sha256 = if stdenv.system == arch32 49 + sha256 = if stdenv.hostPlatform.system == arch32 50 50 then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad" 51 51 else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6"; 52 52
+2 -2
pkgs/applications/office/moneyplex/default.nix
··· 21 21 name = "moneyplex-${version}"; 22 22 version = "16.0.22424"; 23 23 24 - src = fetchurl (if stdenv.system == "i686-linux" then src_i686 25 - else if stdenv.system == "x86_64-linux" then src_x86_64 24 + src = fetchurl (if stdenv.hostPlatform.system == "i686-linux" then src_i686 25 + else if stdenv.hostPlatform.system == "x86_64-linux" then src_x86_64 26 26 else throw "moneyplex requires i686-linux or x86_64-linux"); 27 27 28 28
+1 -1
pkgs/applications/office/wpsoffice/default.nix
··· 3 3 , zlib, libpng12, libICE, libXrender, cups }: 4 4 5 5 let 6 - bits = if stdenv.system == "x86_64-linux" then "x86_64" 6 + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" 7 7 else "x86"; 8 8 9 9 version = "10.1.0.5672";
+3 -3
pkgs/applications/science/electronics/eagle/eagle7.nix
··· 17 17 version = "7.7.0"; 18 18 19 19 src = 20 - if stdenv.system == "i686-linux" then 20 + if stdenv.hostPlatform.system == "i686-linux" then 21 21 fetchurl { 22 22 url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin32-${version}.run"; 23 23 sha256 = "16fa66p77xigc7zvzfm7737mllrcs6nrgk2p7wvkjw3p9lvbz7z1"; 24 24 } 25 - else if stdenv.system == "x86_64-linux" then 25 + else if stdenv.hostPlatform.system == "x86_64-linux" then 26 26 fetchurl { 27 27 url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin64-${version}.run"; 28 28 sha256 = "18dcn6wqph1sqh0ah98qzfi05wip8a8ifbkaq79iskbrsi8iqnrg"; 29 29 } 30 30 else 31 - throw "Unsupported system: ${stdenv.system}"; 31 + throw "Unsupported system: ${stdenv.hostPlatform.system}"; 32 32 33 33 desktopItem = makeDesktopItem { 34 34 name = "eagle";
+1 -1
pkgs/applications/science/logic/isabelle/default.nix
··· 48 48 rm -rf $comp/x86* 49 49 done 50 50 '' + (if ! stdenv.isLinux then "" else '' 51 - arch=${if stdenv.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} 51 + arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} 52 52 for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do 53 53 patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" 54 54 done
+1 -1
pkgs/applications/science/logic/saw-tools/default.nix
··· 12 12 url = "https://github.com/GaloisInc/saw-script/releases/download"; 13 13 14 14 saw-bin = 15 - if stdenv.system == "i686-linux" 15 + if stdenv.hostPlatform.system == "i686-linux" 16 16 then fetchurl { 17 17 url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz"; 18 18 sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9";
+2 -2
pkgs/applications/science/math/mathematica/10.nix
··· 18 18 19 19 let 20 20 platform = 21 - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then 21 + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then 22 22 "Linux" 23 23 else 24 24 throw "Mathematica requires i686-linux or x86_64 linux"; ··· 70 70 ]); 71 71 72 72 ldpath = stdenv.lib.makeLibraryPath buildInputs 73 - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") 73 + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") 74 74 (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); 75 75 76 76 phases = "unpackPhase installPhase fixupPhase";
+2 -2
pkgs/applications/science/math/mathematica/9.nix
··· 16 16 17 17 let 18 18 platform = 19 - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then 19 + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then 20 20 "Linux" 21 21 else 22 22 throw "Mathematica requires i686-linux or x86_64 linux"; ··· 60 60 ]); 61 61 62 62 ldpath = stdenv.lib.makeLibraryPath buildInputs 63 - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") 63 + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") 64 64 (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); 65 65 66 66 phases = "unpackPhase installPhase fixupPhase";
+1 -1
pkgs/applications/science/math/mathematica/default.nix
··· 69 69 ]); 70 70 71 71 ldpath = stdenv.lib.makeLibraryPath buildInputs 72 - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") 72 + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") 73 73 (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); 74 74 75 75 phases = "unpackPhase installPhase fixupPhase";
+4 -4
pkgs/applications/science/math/scilab-bin/default.nix
··· 10 10 badArch = throw "${name} requires i686-linux or x86_64-linux"; 11 11 12 12 architecture = 13 - if stdenv.system == "i686-linux" then 13 + if stdenv.hostPlatform.system == "i686-linux" then 14 14 "i686" 15 - else if stdenv.system == "x86_64-linux" then 15 + else if stdenv.hostPlatform.system == "x86_64-linux" then 16 16 "x86_64" 17 17 else 18 18 badArch; ··· 23 23 src = fetchurl { 24 24 url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz"; 25 25 sha256 = 26 - if stdenv.system == "i686-linux" then 26 + if stdenv.hostPlatform.system == "i686-linux" then 27 27 "0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib" 28 - else if stdenv.system == "x86_64-linux" then 28 + else if stdenv.hostPlatform.system == "x86_64-linux" then 29 29 "1scswlznc14vyzg0gqa1q9gcpwx05kz1sbn563463mzkdp7nd35d" 30 30 else 31 31 badArch;
+4 -4
pkgs/applications/search/catfish/default.nix
··· 5 5 6 6 pythonPackages.buildPythonApplication rec { 7 7 majorver = "1.4"; 8 - minorver = "4"; 8 + minorver = "6"; 9 9 version = "${majorver}.${minorver}"; 10 10 pname = "catfish"; 11 11 12 12 src = fetchurl { 13 - url = "https://launchpad.net/catfish-search/${majorver}/${version}/+download/${pname}-${version}.tar.gz"; 14 - sha256 = "1mw7py6si6y88jblmzm04hf049bpww7h87k2wypq07zm1dw55m52"; 13 + url = "https://archive.xfce.org/src/apps/${pname}/${majorver}/${pname}-${version}.tar.bz2"; 14 + sha256 = "1gxdk5gx0gjq95jhdbpiq39cxpzd4vmw00a78f0wg2i6qlafxjp1"; 15 15 }; 16 16 17 17 nativeBuildInputs = [ ··· 52 52 doCheck = false; 53 53 54 54 meta = with stdenv.lib; { 55 - homepage = https://launchpad.net/catfish-search; 55 + homepage = https://docs.xfce.org/apps/catfish/start; 56 56 description = "A handy file search tool"; 57 57 longDescription = '' 58 58 Catfish is a handy file searching tool. The interface is
+1 -1
pkgs/applications/search/recoll/default.nix
··· 5 5 , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib 6 6 , withGui ? true }: 7 7 8 - assert stdenv.system != "powerpc-linux"; 8 + assert stdenv.hostPlatform.system != "powerpc-linux"; 9 9 10 10 stdenv.mkDerivation rec { 11 11 ver = "1.23.7";
+2 -2
pkgs/applications/version-management/git-and-tools/git-cola/default.nix
··· 4 4 inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify; 5 5 in buildPythonApplication rec { 6 6 name = "git-cola-${version}"; 7 - version = "3.1"; 7 + version = "3.2"; 8 8 9 9 src = fetchFromGitHub { 10 10 owner = "git-cola"; 11 11 repo = "git-cola"; 12 12 rev = "v${version}"; 13 - sha256 = "1xzm8694zndl2pb4nanzhldn7wrsc1gjd5ldjncidw1msp9fczq1"; 13 + sha256 = "1ivaqhvdbmlp0lmrwb2pv3kjqlcpqbxbinbvjjn3g81r4avjs7yy"; 14 14 }; 15 15 16 16 buildInputs = [ git gettext ];
+2 -2
pkgs/applications/video/lightworks/default.nix
··· 23 23 name = "lightworks-${version}"; 24 24 25 25 src = 26 - if stdenv.system == "x86_64-linux" then 26 + if stdenv.hostPlatform.system == "x86_64-linux" then 27 27 fetchurl { 28 28 url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb"; 29 29 sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033"; 30 30 } 31 - else throw "${name} is not supported on ${stdenv.system}"; 31 + else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; 32 32 33 33 buildInputs = [ dpkg makeWrapper ]; 34 34
+3 -3
pkgs/applications/video/mplayer/default.nix
··· 60 60 let 61 61 dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/; 62 62 in 63 - if stdenv.system == "i686-linux" then fetchurl { 63 + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 64 64 url = "${dir}/essential-20071007.tar.bz2"; 65 65 sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic"; 66 - } else if stdenv.system == "x86_64-linux" then fetchurl { 66 + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 67 67 url = "${dir}/essential-amd64-20071007.tar.bz2"; 68 68 sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x"; 69 - } else if stdenv.system == "powerpc-linux" then fetchurl { 69 + } else if stdenv.hostPlatform.system == "powerpc-linux" then fetchurl { 70 70 url = "${dir}/essential-ppc-20071007.tar.bz2"; 71 71 sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z"; 72 72 } else null;
+3 -4
pkgs/applications/video/omxplayer/default.nix
··· 1 1 { stdenv, fetchurl 2 2 , raspberrypifw, pcre, boost, freetype, zlib 3 - , hostPlatform 4 3 }: 5 4 6 5 let ··· 14 13 15 14 configurePlatforms = []; 16 15 configureFlags = [ 17 - "--arch=${hostPlatform.parsed.cpu.name}" 16 + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" 18 17 ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [ 19 18 # TODO be better with condition 20 19 "--cpu=arm1176jzf-s" ··· 46 45 "--enable-hardcoded-tables" 47 46 "--disable-runtime-cpudetect" 48 47 "--disable-debug" 49 - "--arch=${hostPlatform.parsed.cpu.name}" 50 - "--target_os=${hostPlatform.parsed.kernel.name}" 48 + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" 49 + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" 51 50 ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 52 51 "--cross-prefix=${stdenv.cc.targetPrefix}" 53 52 "--enable-cross-compile"
+2 -2
pkgs/applications/video/webtorrent_desktop/default.nix
··· 42 42 version = "0.20.0"; 43 43 44 44 src = 45 - if stdenv.system == "x86_64-linux" then 45 + if stdenv.hostPlatform.system == "x86_64-linux" then 46 46 fetchurl { 47 47 url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb"; 48 48 sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k"; 49 49 } 50 50 else 51 - throw "Webtorrent is not currently supported on ${stdenv.system}"; 51 + throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; 52 52 phases = [ "unpackPhase" "installPhase" ]; 53 53 nativeBuildInputs = [ dpkg ]; 54 54 unpackPhase = "dpkg-deb -x $src .";
+1 -1
pkgs/applications/virtualization/qemu/default.nix
··· 22 22 23 23 with stdenv.lib; 24 24 let 25 - audio = optionalString (hasSuffix "linux" stdenv.system) "alsa," 25 + audio = optionalString (hasSuffix "linux" stdenv.hostPlatform.system) "alsa," 26 26 + optionalString pulseSupport "pa," 27 27 + optionalString sdlSupport "sdl,"; 28 28
+8 -8
pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
··· 44 44 ''; 45 45 46 46 buildCommand = with xorg; '' 47 - ${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' 47 + ${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then '' 48 48 isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run 49 49 chmod 755 ./VBoxLinuxAdditions.run 50 50 ./VBoxLinuxAdditions.run --noexec --keep 51 51 '' 52 - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") 52 + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") 53 53 } 54 54 55 55 # Unpack files 56 56 cd install 57 - ${if stdenv.system == "i686-linux" then '' 57 + ${if stdenv.hostPlatform.system == "i686-linux" then '' 58 58 tar xfvj VBoxGuestAdditions-x86.tar.bz2 59 59 '' 60 - else if stdenv.system == "x86_64-linux" then '' 60 + else if stdenv.hostPlatform.system == "x86_64-linux" then '' 61 61 tar xfvj VBoxGuestAdditions-amd64.tar.bz2 62 62 '' 63 - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") 63 + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") 64 64 } 65 65 66 66 cd ../ ··· 81 81 # Change the interpreter for various binaries 82 82 for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf 83 83 do 84 - ${if stdenv.system == "i686-linux" then '' 84 + ${if stdenv.hostPlatform.system == "i686-linux" then '' 85 85 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i 86 86 '' 87 - else if stdenv.system == "x86_64-linux" then '' 87 + else if stdenv.hostPlatform.system == "x86_64-linux" then '' 88 88 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i 89 89 '' 90 - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") 90 + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") 91 91 } 92 92 patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i 93 93 done
+2 -2
pkgs/applications/virtualization/vpcs/default.nix
··· 1 - { stdenv, fetchurl, glibc, buildPlatform }: 1 + { stdenv, fetchurl, glibc }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "${pname}-${version}"; ··· 17 17 18 18 buildPhase = ''( 19 19 cd src 20 - ./mk.sh ${buildPlatform.platform.kernelArch} 20 + ./mk.sh ${stdenv.buildPlatform.platform.kernelArch} 21 21 )''; 22 22 23 23 installPhase = ''
+2 -1
pkgs/applications/virtualization/xen/4.10.nix
··· 1 1 { stdenv, callPackage, fetchurl, fetchpatch, fetchgit 2 + , ocaml-ng 2 3 , withInternalQemu ? true 3 4 , withInternalTraditionalQemu ? true 4 5 , withInternalSeabios ? true ··· 177 178 else throw "this xen has no qemu builtin"; 178 179 }; 179 180 180 - })) args 181 + })) ({ ocamlPackages = ocaml-ng.ocamlPackages_4_05; } // args)
+2 -1
pkgs/applications/virtualization/xen/4.8.nix
··· 1 1 { stdenv, callPackage, fetchurl, fetchpatch, fetchgit 2 + , ocaml-ng 2 3 , withInternalQemu ? true 3 4 , withInternalTraditionalQemu ? true 4 5 , withInternalSeabios ? true ··· 181 182 else throw "this xen has no qemu builtin"; 182 183 }; 183 184 184 - })) args 185 + })) ({ ocamlPackages = ocaml-ng.ocamlPackages_4_05; } // args)
+2 -2
pkgs/applications/window-managers/i3/default.nix
··· 36 36 # they shouldn't, and then even once that's fixed have some 37 37 # perl-related errors later on. For more, see 38 38 # https://github.com/NixOS/nixpkgs/issues/7957 39 - doCheck = false; # stdenv.system == "x86_64-linux"; 39 + doCheck = false; # stdenv.hostPlatform.system == "x86_64-linux"; 40 40 41 - checkPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") 41 + checkPhase = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") 42 42 '' 43 43 (cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output) 44 44 ! grep -q '^not ok' testcases/latest/complete-run.log
+2 -2
pkgs/applications/window-managers/way-cooler/way-cooler.nix
··· 1 1 # Generated by carnix 0.6.5: carnix -o way-cooler.nix Cargo.lock 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 4 4 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 5 5 mapFeatures = features: map (fun: fun { features = features; }); 6 6 mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-bg.nix
··· 1 1 # Generated by carnix 0.6.5: carnix -o wc-bg.nix Cargo.lock 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 4 4 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 5 5 mapFeatures = features: map (fun: fun { features = features; }); 6 6 mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-grab.nix
··· 1 1 # Generated by carnix 0.6.5: carnix -o wc-grab.nix Cargo.lock 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.hostPlatform.parsed.kernel.name; 4 4 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 5 5 mapFeatures = features: map (fun: fun { features = features; }); 6 6 mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-lock.nix
··· 1 1 # Generated by carnix 0.6.5: carnix -o wc-lock.nix Cargo.lock 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.hostPlatform.parsed.kernel.name; 4 4 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 5 5 mapFeatures = features: map (fun: fun { features = features; }); 6 6 mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/build-support/build-fhs-userenv/env.nix
··· 1 - { stdenv, buildEnv, writeText, pkgs, pkgsi686Linux, system }: 1 + { stdenv, buildEnv, writeText, pkgs, pkgsi686Linux }: 2 2 3 3 { name, profile ? "" 4 4 , targetPkgs ? pkgs: [], multiPkgs ? pkgs: [] ··· 22 22 # /lib will link to /lib32 23 23 24 24 let 25 - is64Bit = system == "x86_64-linux"; 25 + is64Bit = stdenv.hostPlatform.parsed.cpu.bits == 64; 26 26 isMultiBuild = multiPkgs != null && is64Bit; 27 27 isTargetBuild = !isMultiBuild; 28 28
+1 -2
pkgs/build-support/kernel/make-initrd.nix
··· 13 13 # argument. 14 14 15 15 { stdenv, perl, cpio, contents, compressor, prepend, ubootTools 16 - , hostPlatform 17 16 }: 18 17 19 18 stdenv.mkDerivation rec { 20 19 name = "initrd"; 21 20 builder = ./make-initrd.sh; 22 21 23 - makeUInitrd = hostPlatform.platform.kernelTarget == "uImage"; 22 + makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage"; 24 23 25 24 nativeBuildInputs = [ perl cpio ] 26 25 ++ stdenv.lib.optional makeUInitrd ubootTools;
+1 -1
pkgs/build-support/release/nix-build.nix
··· 148 148 postPhases = postPhases ++ ["finalPhase"]; 149 149 150 150 meta = (if args ? meta then args.meta else {}) // { 151 - description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.system}"; 151 + description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.hostPlatform.system}"; 152 152 }; 153 153 154 154 }
+12 -12
pkgs/build-support/rust/build-rust-crate.nix
··· 4 4 # This can be useful for deploying packages with NixOps, and to share 5 5 # binary dependencies between projects. 6 6 7 - { lib, buildPlatform, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }: 7 + { lib, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }: 8 8 9 9 let makeDeps = dependencies: 10 10 (lib.concatMapStringsSep " " (dep: ··· 12 12 (if dep.crateType == "lib" then 13 13 " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib" 14 14 else 15 - " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${buildPlatform.extensions.sharedLibrary}") 15 + " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") 16 16 ) dependencies); 17 17 18 18 # This doesn't appear to be officially documented anywhere yet. 19 19 # See https://github.com/rust-lang-nursery/rust-forge/issues/101. 20 - target_os = if buildPlatform.isDarwin 20 + target_os = if stdenv.hostPlatform.isDarwin 21 21 then "macos" 22 - else buildPlatform.parsed.kernel.name; 22 + else stdenv.hostPlatform.parsed.kernel.name; 23 23 24 24 echo_build_heading = colors: '' 25 25 echo_build_heading() { ··· 106 106 export CARGO_PKG_VERSION=${crateVersion} 107 107 export CARGO_PKG_AUTHORS="${authors}" 108 108 109 - export CARGO_CFG_TARGET_ARCH=${buildPlatform.parsed.cpu.name} 109 + export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name} 110 110 export CARGO_CFG_TARGET_OS=${target_os} 111 111 export CARGO_CFG_TARGET_FAMILY="unix" 112 112 export CARGO_CFG_UNIX=1 113 113 export CARGO_CFG_TARGET_ENV="gnu" 114 - export CARGO_CFG_TARGET_ENDIAN=${if buildPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"} 115 - export CARGO_CFG_TARGET_POINTER_WIDTH=${toString buildPlatform.parsed.cpu.bits} 116 - export CARGO_CFG_TARGET_VENDOR=${buildPlatform.parsed.vendor.name} 114 + export CARGO_CFG_TARGET_ENDIAN=${if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"} 115 + export CARGO_CFG_TARGET_POINTER_WIDTH=${toString stdenv.hostPlatform.parsed.cpu.bits} 116 + export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name} 117 117 118 118 export CARGO_MANIFEST_DIR="." 119 119 export DEBUG="${toString (!release)}" 120 120 export OPT_LEVEL="${toString optLevel}" 121 - export TARGET="${buildPlatform.config}" 122 - export HOST="${buildPlatform.config}" 121 + export TARGET="${stdenv.hostPlatform.config}" 122 + export HOST="${stdenv.hostPlatform.config}" 123 123 export PROFILE=${if release then "release" else "debug"} 124 124 export OUT_DIR=$(pwd)/target/build/${crateName}.out 125 125 export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0} ··· 218 218 $BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors} 219 219 220 220 EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib" 221 - if [ -e target/deps/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary} ]; then 222 - EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary}" 221 + if [ -e target/deps/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary} ]; then 222 + EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary}" 223 223 fi 224 224 } 225 225
+3 -3
pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix
··· 1 1 # Generated by carnix 0.5.2: carnix Cargo.lock -o cargo-vendor.nix 2 - { lib, buildPlatform, buildRustCrate }: 3 - let kernel = buildPlatform.parsed.kernel.name; 4 - abi = buildPlatform.parsed.abi.name; 2 + { lib, stdenv, buildRustCrate }: 3 + let kernel = stdenv.hostPlatform.parsed.kernel.name; 4 + abi = stdenv.hostPlatform.parsed.abi.name; 5 5 hasFeature = feature: 6 6 lib.lists.any 7 7 (originName: feature.${originName})
+3 -3
pkgs/build-support/rust/carnix.nix
··· 1 1 # Generated by carnix 0.7.2: carnix nix 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 4 - abi = buildPlatform.parsed.abi.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.hostPlatform.parsed.kernel.name; 4 + abi = stdenv.hostPlatform.parsed.abi.name; 5 5 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 6 6 mapFeatures = features: map (fun: fun { features = features; }); 7 7 mkFeatures = feat: lib.lists.foldl (features: featureName:
+1 -1
pkgs/build-support/vm/windows/controller/default.nix
··· 157 157 "-net vde,vlan=0,sock=$QEMU_VDE_SOCKET" 158 158 ]); 159 159 160 - maybeKvm64 = optional (stdenv.system == "x86_64-linux") "-cpu kvm64"; 160 + maybeKvm64 = optional (stdenv.hostPlatform.system == "x86_64-linux") "-cpu kvm64"; 161 161 162 162 cygwinQemuArgs = concatStringsSep " " (maybeKvm64 ++ [ 163 163 "-monitor unix:$MONITOR_SOCKET,server,nowait"
+1 -1
pkgs/build-support/vm/windows/cygwin-iso/default.nix
··· 17 17 }; 18 18 19 19 cygwinCross = (import ../../../../.. { 20 - inherit (stdenv) system; 20 + localSystem = stdenv.hostPlatform; 21 21 crossSystem = { 22 22 libc = "msvcrt"; 23 23 platform = {};
+11 -7
pkgs/development/arduino/arduino-core/default.nix
··· 13 13 # xdotool script; the cause of this hang is not yet known. 14 14 # TODO: There is a fair chance that Teensyduino works with arm-linux, but it 15 15 # has not yet been tested. 16 - if withTeensyduino && (stdenv.system != "x86_64-linux") then throw 16 + if withTeensyduino && (stdenv.hostPlatform.system != "x86_64-linux") then throw 17 17 "Teensyduino is only supported on x86_64-linux at this time (patches welcome)." 18 18 else 19 19 let 20 - externalDownloads = import ./downloads.nix {inherit fetchurl; inherit (lib) optionalAttrs; inherit (stdenv) system;}; 20 + externalDownloads = import ./downloads.nix { 21 + inherit fetchurl; 22 + inherit (lib) optionalAttrs; 23 + inherit (stdenv.hostPlatform) system; 24 + }; 21 25 # Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand 22 26 patchelfInJars = 23 - lib.optional (stdenv.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";} 24 - ++ lib.optional (stdenv.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";} 27 + lib.optional (stdenv.hostPlatform.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";} 28 + ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";} 25 29 ; 26 30 # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable 27 31 ncurses5 = ncurses.override { abiVersion = "5"; }; ··· 46 50 zlib 47 51 ]; 48 52 teensy_architecture = 49 - lib.optionalString (stdenv.system == "x86_64-linux") "linux64" 50 - + lib.optionalString (stdenv.system == "i686-linux") "linux32" 51 - + lib.optionalString (stdenv.system == "arm-linux") "linuxarm"; 53 + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "linux64" 54 + + lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "linux32" 55 + + lib.optionalString (stdenv.hostPlatform.system == "arm-linux") "linuxarm"; 52 56 53 57 flavor = (if withTeensyduino then "teensyduino" else "arduino") 54 58 + stdenv.lib.optionalString (!withGui) "-core";
+1 -1
pkgs/development/compilers/ccl/default.nix
··· 29 29 }; 30 30 armv6l-linux = armv7l-linux; 31 31 }; 32 - cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}"); 32 + cfg = options."${stdenv.hostPlatform.system}" or (throw "missing source url for platform ${stdenv.hostPlatform.system}"); 33 33 in 34 34 35 35 stdenv.mkDerivation rec {
+2 -2
pkgs/development/compilers/clean/default.nix
··· 4 4 name = "clean-2.4"; 5 5 6 6 src = 7 - if stdenv.system == "i686-linux" then (fetchurl { 7 + if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { 8 8 url = "http://clean.cs.ru.nl/download/Clean24/linux/clean2.4_boot.tar.gz"; 9 9 sha256 = "1w8vvmkwzq8g51639r62apcy75sj69nm08082a34xvqm9ymfgkq5"; 10 10 }) 11 - else if stdenv.system == "x86_64-linux" then (fetchurl { 11 + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { 12 12 url = "https://clean.cs.ru.nl/download/Clean24/linux/clean2.4_64_boot.tar.gz"; 13 13 sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r"; 14 14 })
+1 -1
pkgs/development/compilers/cmucl/binary.nix
··· 1 1 {stdenv, fetchurl}: 2 2 3 3 let 4 - inherit (stdenv) system; 4 + inherit (stdenv.hostPlatform) system; 5 5 version = "21b"; 6 6 downloadUrl = arch: 7 7 "http://common-lisp.net/project/cmucl/downloads/release/" +
+2 -2
pkgs/development/compilers/crystal/default.nix
··· 15 15 "x86_64-linux" = "linux-x86_64"; 16 16 "i686-linux" = "linux-i686"; 17 17 "x86_64-darwin" = "darwin-x86_64"; 18 - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); 18 + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); 19 19 in fetchurl { 20 20 url = "https://github.com/crystal-lang/crystal/releases/download/0.26.0/${prebuiltName}-${arch}.tar.gz"; 21 21 sha256 = { 22 22 "x86_64-linux" = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45"; 23 23 "i686-linux" = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic"; 24 24 "x86_64-darwin" = "0hzc65ccajr0yhmvi5vbdgbzbp1gbjy56da24ds3zwwkam1ddk0k"; 25 - }."${stdenv.system}"; 25 + }."${stdenv.hostPlatform.system}"; 26 26 }; 27 27 28 28 unpackPhase = ''
+3 -3
pkgs/development/compilers/fpc/binary.nix
··· 4 4 name = "fpc-2.6.0-binary"; 5 5 6 6 src = 7 - if stdenv.system == "i686-linux" then 7 + if stdenv.hostPlatform.system == "i686-linux" then 8 8 fetchurl { 9 9 url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.i386-linux.tar"; 10 10 sha256 = "08yklvrfxvk59bxsd4rh1i6s3cjn0q06dzjs94h9fbq3n1qd5zdf"; 11 11 } 12 - else if stdenv.system == "x86_64-linux" then 12 + else if stdenv.hostPlatform.system == "x86_64-linux" then 13 13 fetchurl { 14 14 url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.x86_64-linux.tar"; 15 15 sha256 = "0k9vi75k39y735fng4jc2vppdywp82j4qhzn7x4r6qjkad64d8lx"; 16 16 } 17 - else throw "Not supported on ${stdenv.system}."; 17 + else throw "Not supported on ${stdenv.hostPlatform.system}."; 18 18 19 19 builder = ./binary-builder.sh; 20 20
+1 -1
pkgs/development/compilers/fpc/default.nix
··· 14 14 buildInputs = [ startFPC gawk ]; 15 15 16 16 preConfigure = 17 - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' 17 + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then '' 18 18 sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas 19 19 sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas 20 20 '' else "";
+8 -6
pkgs/development/compilers/gcc/4.8/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langJava ? false 6 6 , langGo ? false 7 7 , profiledCompiler ? false ··· 20 20 , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null 21 21 , x11Support ? langJava 22 22 , enableMultilib ? false 23 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 23 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 27 , # Strip kills static libs of other archs (hence no cross) 28 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 28 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 29 + && stdenv.targetPlatform == stdenv.hostPlatform 29 30 , gnused ? null 30 - , buildPlatform, hostPlatform, targetPlatform 31 31 , buildPackages 32 32 }: 33 33 ··· 42 42 assert libelf != null -> zlib != null; 43 43 44 44 # Make sure we get GNU sed. 45 - assert hostPlatform.isDarwin -> gnused != null; 45 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 46 46 47 47 # The go frontend is written in c++ 48 48 assert langGo -> langCC; ··· 53 53 let version = "4.8.5"; 54 54 55 55 enableParallelBuilding = true; 56 + 57 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 56 58 57 59 patches = [ ] 58 60 ++ optional enableParallelBuilding ../parallel-bconfig.patch
+8 -6
pkgs/development/compilers/gcc/4.9/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langJava ? false 6 6 , langGo ? false 7 7 , profiledCompiler ? false ··· 20 20 , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null 21 21 , x11Support ? langJava 22 22 , enableMultilib ? false 23 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 23 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 27 , # Strip kills static libs of other archs (hence no cross) 28 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 28 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 29 + && stdenv.targetPlatform == stdenv.hostPlatform 29 30 , gnused ? null 30 - , buildPlatform, hostPlatform, targetPlatform 31 31 , buildPackages 32 32 }: 33 33 ··· 42 42 assert libelf != null -> zlib != null; 43 43 44 44 # Make sure we get GNU sed. 45 - assert hostPlatform.isDarwin -> gnused != null; 45 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 46 46 47 47 # The go frontend is written in c++ 48 48 assert langGo -> langCC; ··· 53 53 let version = "4.9.4"; 54 54 55 55 enableParallelBuilding = true; 56 + 57 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 56 58 57 59 patches = 58 60 [ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/5/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langJava ? false 6 6 , langGo ? false 7 7 , profiledCompiler ? false ··· 20 20 , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null 21 21 , x11Support ? langJava 22 22 , enableMultilib ? false 23 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 23 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 27 , # Strip kills static libs of other archs (hence no cross) 28 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 28 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 29 + && stdenv.targetPlatform == stdenv.hostPlatform 29 30 , gnused ? null 30 31 , cloog # unused; just for compat with gcc4, as we override the parameter on some places 31 - , buildPlatform, hostPlatform, targetPlatform 32 32 , buildPackages 33 33 }: 34 34 ··· 40 40 assert libelf != null -> zlib != null; 41 41 42 42 # Make sure we get GNU sed. 43 - assert hostPlatform.isDarwin -> gnused != null; 43 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 44 44 45 45 # The go frontend is written in c++ 46 46 assert langGo -> langCC; ··· 52 52 sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k"; 53 53 54 54 enableParallelBuilding = true; 55 + 56 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 55 57 56 58 patches = 57 59 [ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/6/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langJava ? false 6 6 , langGo ? false 7 7 , profiledCompiler ? false ··· 20 20 , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null 21 21 , x11Support ? langJava 22 22 , enableMultilib ? false 23 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 23 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 27 , # Strip kills static libs of other archs (hence no cross) 28 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 28 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 29 + && stdenv.targetPlatform == stdenv.hostPlatform 29 30 , gnused ? null 30 31 , cloog # unused; just for compat with gcc4, as we override the parameter on some places 31 - , buildPlatform, hostPlatform, targetPlatform 32 32 , buildPackages 33 33 }: 34 34 ··· 40 40 assert libelf != null -> zlib != null; 41 41 42 42 # Make sure we get GNU sed. 43 - assert hostPlatform.isDarwin -> gnused != null; 43 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 44 44 45 45 # The go frontend is written in c++ 46 46 assert langGo -> langCC; ··· 51 51 let version = "6.4.0"; 52 52 53 53 enableParallelBuilding = true; 54 + 55 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 54 56 55 57 patches = 56 58 [ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/7/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langGo ? false 6 6 , profiledCompiler ? false 7 7 , staticCompiler ? false ··· 13 13 , isl ? null # optional, for the Graphite optimization framework. 14 14 , zlib ? null 15 15 , enableMultilib ? false 16 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 16 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 20 , # Strip kills static libs of other archs (hence no cross) 21 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 21 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 22 + && stdenv.targetPlatform == stdenv.hostPlatform 22 23 , gnused ? null 23 24 , cloog # unused; just for compat with gcc4, as we override the parameter on some places 24 - , buildPlatform, hostPlatform, targetPlatform 25 25 , buildPackages 26 26 }: 27 27 ··· 29 29 assert libelf != null -> zlib != null; 30 30 31 31 # Make sure we get GNU sed. 32 - assert hostPlatform.isDarwin -> gnused != null; 32 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 33 33 34 34 # The go frontend is written in c++ 35 35 assert langGo -> langCC; ··· 40 40 let version = "7.3.0"; 41 41 42 42 enableParallelBuilding = true; 43 + 44 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 43 45 44 46 patches = 45 47 [ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
+8 -6
pkgs/development/compilers/gcc/8/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langGo ? false 6 6 , profiledCompiler ? false 7 7 , staticCompiler ? false ··· 13 13 , isl ? null # optional, for the Graphite optimization framework. 14 14 , zlib ? null 15 15 , enableMultilib ? false 16 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 16 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 20 , # Strip kills static libs of other archs (hence no cross) 21 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 21 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 22 + && stdenv.targetPlatform == stdenv.hostPlatform 22 23 , gnused ? null 23 24 , cloog # unused; just for compat with gcc4, as we override the parameter on some places 24 - , buildPlatform, hostPlatform, targetPlatform 25 25 , buildPackages 26 26 }: 27 27 ··· 29 29 assert libelf != null -> zlib != null; 30 30 31 31 # Make sure we get GNU sed. 32 - assert hostPlatform.isDarwin -> gnused != null; 32 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 33 33 34 34 # The go frontend is written in c++ 35 35 assert langGo -> langCC; ··· 40 40 let version = "8.2.0"; 41 41 42 42 enableParallelBuilding = true; 43 + 44 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 43 45 44 46 patches = 45 47 optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+8 -6
pkgs/development/compilers/gcc/snapshot/default.nix
··· 1 1 { stdenv, targetPackages, fetchurl, noSysDirs 2 2 , langC ? true, langCC ? true, langFortran ? false 3 - , langObjC ? targetPlatform.isDarwin 4 - , langObjCpp ? targetPlatform.isDarwin 3 + , langObjC ? stdenv.targetPlatform.isDarwin 4 + , langObjCpp ? stdenv.targetPlatform.isDarwin 5 5 , langGo ? false 6 6 , profiledCompiler ? false 7 7 , staticCompiler ? false ··· 13 13 , isl ? null # optional, for the Graphite optimization framework. 14 14 , zlib ? null 15 15 , enableMultilib ? false 16 - , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 16 + , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 20 , # Strip kills static libs of other archs (hence no cross) 21 - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 21 + stripped ? stdenv.hostPlatform == stdenv.buildPlatform 22 + && stdenv.targetPlatform == stdenv.hostPlatform 22 23 , gnused ? null 23 24 , cloog # unused; just for compat with gcc4, as we override the parameter on some places 24 25 , flex ? null 25 - , buildPlatform, hostPlatform, targetPlatform 26 26 , buildPackages 27 27 }: 28 28 ··· 30 30 assert libelf != null -> zlib != null; 31 31 32 32 # Make sure we get GNU sed. 33 - assert hostPlatform.isDarwin -> gnused != null; 33 + assert stdenv.hostPlatform.isDarwin -> gnused != null; 34 34 35 35 # The go frontend is written in c++ 36 36 assert langGo -> langCC; ··· 41 41 let version = "7-20170409"; 42 42 43 43 enableParallelBuilding = true; 44 + 45 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 44 46 45 47 patches = 46 48 [ ]
+5 -4
pkgs/development/compilers/ghc/7.10.3.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, hscolour ··· 8 7 9 8 , libiconv ? null, ncurses 10 9 11 - , useLLVM ? !targetPlatform.isx86 10 + , useLLVM ? !stdenv.targetPlatform.isx86 12 11 , # LLVM is conceptually a run-time-only depedendency, but for 13 12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 14 13 # build-time dependency too. ··· 19 18 enableIntegerSimple ? !(gmp.meta.available or false), gmp 20 19 21 20 , # If enabled, use -fPIC when compiling static libs. 22 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 21 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 23 22 24 23 , # Whether to build dynamic libs for the standard library (on the target 25 24 # platform). Static libs are always built. ··· 27 26 28 27 , # What flavour to build. An empty string indicates no 29 28 # specific flavour and falls back to ghc default values. 30 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 29 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 31 30 }: 32 31 33 32 let 33 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 34 + 34 35 inherit (bootPkgs) ghc; 35 36 36 37 # TODO(@Ericson2314) Make unconditional
+5 -4
pkgs/development/compilers/ghc/8.0.2.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, hscolour ··· 7 6 8 7 , libiconv ? null, ncurses 9 8 10 - , useLLVM ? !targetPlatform.isx86 9 + , useLLVM ? !stdenv.targetPlatform.isx86 11 10 , # LLVM is conceptually a run-time-only depedendency, but for 12 11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 13 12 # build-time dependency too. ··· 18 17 enableIntegerSimple ? !(gmp.meta.available or false), gmp 19 18 20 19 , # If enabled, use -fPIC when compiling static libs. 21 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 20 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 22 21 23 22 , # Whether to build dynamic libs for the standard library (on the target 24 23 # platform). Static libs are always built. ··· 26 25 27 26 , # What flavour to build. An empty string indicates no 28 27 # specific flavour and falls back to ghc default values. 29 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 28 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 30 29 }: 31 30 32 31 assert !enableIntegerSimple -> gmp != null; 33 32 34 33 let 34 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 35 + 35 36 inherit (bootPkgs) ghc; 36 37 37 38 # TODO(@Ericson2314) Make unconditional
+5 -4
pkgs/development/compilers/ghc/8.2.2.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, alex, happy, hscolour ··· 8 7 9 8 , libiconv ? null, ncurses 10 9 11 - , useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) 10 + , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) 12 11 , # LLVM is conceptually a run-time-only depedendency, but for 13 12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 14 13 # build-time dependency too. ··· 19 18 enableIntegerSimple ? !(gmp.meta.available or false), gmp 20 19 21 20 , # If enabled, use -fPIC when compiling static libs. 22 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 21 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 23 22 24 23 , # Whether to build dynamic libs for the standard library (on the target 25 24 # platform). Static libs are always built. ··· 27 26 28 27 , # What flavour to build. An empty string indicates no 29 28 # specific flavour and falls back to ghc default values. 30 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 29 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 31 30 , # Whether to backport https://phabricator.haskell.org/D4388 for 32 31 # deterministic profiling symbol names, at the cost of a slightly 33 32 # non-standard GHC API ··· 37 36 assert !enableIntegerSimple -> gmp != null; 38 37 39 38 let 39 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 40 + 40 41 inherit (bootPkgs) ghc; 41 42 42 43 # TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/8.4.3.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, alex, happy, hscolour ··· 7 6 8 7 , libiconv ? null, ncurses 9 8 10 - , useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) 9 + , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) 11 10 , # LLVM is conceptually a run-time-only depedendency, but for 12 11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 13 12 # build-time dependency too. ··· 18 17 enableIntegerSimple ? !(gmp.meta.available or false), gmp 19 18 20 19 , # If enabled, use -fPIC when compiling static libs. 21 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 20 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 22 21 23 22 , # Whether to build dynamic libs for the standard library (on the target 24 23 # platform). Static libs are always built. 25 - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt 24 + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt 26 25 27 26 , # Whetherto build terminfo. 28 - enableTerminfo ? !targetPlatform.isWindows 27 + enableTerminfo ? !stdenv.targetPlatform.isWindows 29 28 30 29 , # What flavour to build. An empty string indicates no 31 30 # specific flavour and falls back to ghc default values. 32 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 31 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 33 32 , # Whether to backport https://phabricator.haskell.org/D4388 for 34 33 # deterministic profiling symbol names, at the cost of a slightly 35 34 # non-standard GHC API ··· 39 38 assert !enableIntegerSimple -> gmp != null; 40 39 41 40 let 41 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 42 + 42 43 inherit (bootPkgs) ghc; 43 44 44 45 # TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/8.6.1.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, alex, happy, hscolour ··· 7 6 8 7 , libiconv ? null, ncurses 9 8 10 - , useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) 9 + , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) 11 10 , # LLVM is conceptually a run-time-only depedendency, but for 12 11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 13 12 # build-time dependency too. ··· 18 17 enableIntegerSimple ? !(gmp.meta.available or false), gmp 19 18 20 19 , # If enabled, use -fPIC when compiling static libs. 21 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 20 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 22 21 23 22 , # Whether to build dynamic libs for the standard library (on the target 24 23 # platform). Static libs are always built. 25 - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt 24 + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt 26 25 27 26 , # Whetherto build terminfo. 28 - enableTerminfo ? !targetPlatform.isWindows 27 + enableTerminfo ? !stdenv.targetPlatform.isWindows 29 28 30 29 , # What flavour to build. An empty string indicates no 31 30 # specific flavour and falls back to ghc default values. 32 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 31 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 33 32 }: 34 33 35 34 assert !enableIntegerSimple -> gmp != null; 36 35 37 36 let 37 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 38 + 38 39 inherit (bootPkgs) ghc; 39 40 40 41 # TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/head.nix
··· 1 1 { stdenv, targetPackages 2 - , buildPlatform, hostPlatform, targetPlatform 3 2 4 3 # build-tools 5 4 , bootPkgs, alex, happy, hscolour ··· 7 6 8 7 , libiconv ? null, ncurses 9 8 10 - , useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) 9 + , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) 11 10 , # LLVM is conceptually a run-time-only depedendency, but for 12 11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a 13 12 # build-time dependency too. ··· 18 17 enableIntegerSimple ? !(gmp.meta.available or false), gmp 19 18 20 19 , # If enabled, use -fPIC when compiling static libs. 21 - enableRelocatedStaticLibs ? targetPlatform != hostPlatform 20 + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 22 21 23 22 , # Whether to build dynamic libs for the standard library (on the target 24 23 # platform). Static libs are always built. 25 - enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt 24 + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt 26 25 27 26 , # Whetherto build terminfo. 28 - enableTerminfo ? !targetPlatform.isWindows 27 + enableTerminfo ? !stdenv.targetPlatform.isWindows 29 28 30 29 , version ? "8.5.20180118" 31 30 , # What flavour to build. An empty string indicates no 32 31 # specific flavour and falls back to ghc default values. 33 - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" 32 + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" 34 33 }: 35 34 36 35 let 36 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 37 + 37 38 inherit (bootPkgs) ghc; 38 39 39 40 # TODO(@Ericson2314) Make unconditional
+1 -1
pkgs/development/compilers/ghcjs-ng/default.nix
··· 59 59 }; 60 60 61 61 bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs; 62 - libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; 62 + libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.buildPlatform.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; 63 63 64 64 in stdenv.mkDerivation { 65 65 name = bootGhcjs.name;
+3 -3
pkgs/development/compilers/go/1.10.nix
··· 134 134 135 135 GOOS = if stdenv.isDarwin then "darwin" else "linux"; 136 136 GOARCH = if stdenv.isDarwin then "amd64" 137 - else if stdenv.system == "i686-linux" then "386" 138 - else if stdenv.system == "x86_64-linux" then "amd64" 137 + else if stdenv.hostPlatform.system == "i686-linux" then "386" 138 + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 139 139 else if stdenv.isAarch32 then "arm" 140 140 else if stdenv.isAarch64 then "arm64" 141 141 else throw "Unsupported system"; 142 - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; 142 + GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; 143 143 GO386 = 387; # from Arch: don't assume sse2 on i686 144 144 CGO_ENABLED = 1; 145 145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+5 -5
pkgs/development/compilers/go/1.11.nix
··· 134 134 135 135 GOOS = if stdenv.isDarwin then "darwin" else "linux"; 136 136 GOARCH = if stdenv.isDarwin then "amd64" 137 - else if stdenv.system == "i686-linux" then "386" 138 - else if stdenv.system == "x86_64-linux" then "amd64" 139 - else if stdenv.isAarch32 then "arm" 140 - else if stdenv.isAarch64 then "arm64" 137 + else if stdenv.targetPlatform.isi686 then "386" 138 + else if stdenv.targetPlatform.isx86_64 then "amd64" 139 + else if stdenv.targetPlatform.isAarch32 then "arm" 140 + else if stdenv.targetPlatform.isAarch64 then "arm64" 141 141 else throw "Unsupported system"; 142 - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; 142 + GOARM = stdenv.targetPlatform.parsed.cpu.version or ""; 143 143 GO386 = 387; # from Arch: don't assume sse2 on i686 144 144 CGO_ENABLED = 1; 145 145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+3 -3
pkgs/development/compilers/go/1.4.nix
··· 128 128 129 129 GOOS = if stdenv.isDarwin then "darwin" else "linux"; 130 130 GOARCH = if stdenv.isDarwin then "amd64" 131 - else if stdenv.system == "i686-linux" then "386" 132 - else if stdenv.system == "x86_64-linux" then "amd64" 131 + else if stdenv.hostPlatform.system == "i686-linux" then "386" 132 + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 133 133 else if stdenv.isAarch32 then "arm" 134 134 else throw "Unsupported system"; 135 - GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; 135 + GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; 136 136 GO386 = 387; # from Arch: don't assume sse2 on i686 137 137 CGO_ENABLED = 0; 138 138
+3 -3
pkgs/development/compilers/go/1.9.nix
··· 134 134 135 135 GOOS = if stdenv.isDarwin then "darwin" else "linux"; 136 136 GOARCH = if stdenv.isDarwin then "amd64" 137 - else if stdenv.system == "i686-linux" then "386" 138 - else if stdenv.system == "x86_64-linux" then "amd64" 137 + else if stdenv.hostPlatform.system == "i686-linux" then "386" 138 + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 139 139 else if stdenv.isAarch32 then "arm" 140 140 else if stdenv.isAarch64 then "arm64" 141 141 else throw "Unsupported system"; 142 - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; 142 + GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; 143 143 GO386 = 387; # from Arch: don't assume sse2 on i686 144 144 CGO_ENABLED = 1; 145 145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+2 -2
pkgs/development/compilers/jetbrains-jdk/default.nix
··· 10 10 version = "152b1248.6"; 11 11 name = pname + "-" + version; 12 12 13 - src = if stdenv.system == "x86_64-linux" then 13 + src = if stdenv.hostPlatform.system == "x86_64-linux" then 14 14 fetchurl { 15 15 url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz"; 16 16 sha256 = "12l81g8zhaymh4rzyfl9nyzmpkgzc7wrphm3j4plxx129yn9i7d7"; 17 17 } 18 18 else 19 - throw "unsupported system: ${stdenv.system}"; 19 + throw "unsupported system: ${stdenv.hostPlatform.system}"; 20 20 21 21 nativeBuildInputs = [ file ]; 22 22
+6
pkgs/development/compilers/julia/0.7.nix
··· 1 + import ./shared.nix { 2 + majorVersion = "0"; 3 + minorVersion = "7"; 4 + maintenanceVersion = "0"; 5 + src_sha256 = "1j57569qm2ii8ddzsp08hds2navpk7acdz83kh27dvk44axhwj6f"; 6 + }
+6
pkgs/development/compilers/julia/1.0.nix
··· 1 + import ./shared.nix { 2 + majorVersion = "1"; 3 + minorVersion = "0"; 4 + maintenanceVersion = "0"; 5 + src_sha256 = "083277z90m1jxr2d1ysb96rgjj9h5q97l6h54mx3pb3f38ykshz2"; 6 + }
+1 -1
pkgs/development/compilers/julia/default.nix
··· 101 101 102 102 makeFlags = 103 103 let 104 - arch = head (splitString "-" stdenv.system); 104 + arch = head (splitString "-" stdenv.hostPlatform.system); 105 105 march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" 106 106 or (throw "unsupported architecture: ${arch}"); 107 107 # Julia requires Pentium 4 (SSE2) or better
+218
pkgs/development/compilers/julia/shared.nix
··· 1 + { majorVersion 2 + , minorVersion 3 + , maintenanceVersion 4 + , src_sha256 5 + }: 6 + { stdenv, fetchurl, fetchzip 7 + # build tools 8 + , gfortran, m4, makeWrapper, patchelf, perl, which, python2, paxctl 9 + , llvm, cmake 10 + # libjulia dependencies 11 + , libunwind, readline, utf8proc, zlib 12 + # standard library dependencies 13 + , curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2 14 + # linear algebra 15 + , openblas, arpack 16 + # Darwin frameworks 17 + , CoreServices, ApplicationServices 18 + }: 19 + 20 + with stdenv.lib; 21 + 22 + # All dependencies must use the same OpenBLAS. 23 + let 24 + arpack_ = arpack; 25 + in 26 + let 27 + arpack = arpack_.override { inherit openblas; }; 28 + in 29 + 30 + let 31 + dsfmtVersion = "2.2.3"; 32 + dsfmt = fetchurl { 33 + url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz"; 34 + sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"; 35 + }; 36 + 37 + libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e"; 38 + libuv = fetchurl { 39 + url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}"; 40 + sha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs"; 41 + }; 42 + 43 + rmathVersion = "0.1"; 44 + rmath-julia = fetchurl { 45 + url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}"; 46 + sha256 = "1qyps217175qhid46l8f5i1v8i82slgp23ia63x2hzxwfmx8617p"; 47 + }; 48 + 49 + virtualenvVersion = "15.0.0"; 50 + virtualenv = fetchurl { 51 + url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz"; 52 + sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh"; 53 + }; 54 + 55 + libwhichVersion = "81e9723c0273d78493dc8c8ed570f68d9ce7e89e"; 56 + libwhich = fetchurl { 57 + url = "https://api.github.com/repos/vtjnash/libwhich/tarball/${libwhichVersion}"; 58 + sha256 = "1p7zg31kpmpbmh1znrk1xrbd074agx13b9q4dcw8n2zrwwdlbz3b"; 59 + }; 60 + 61 + llvmVersion = "6.0.0"; 62 + llvm = fetchurl { 63 + url = "http://releases.llvm.org/6.0.0/llvm-${llvmVersion}.src.tar.xz"; 64 + sha256 = "0224xvfg6h40y5lrbnb9qaq3grmdc5rg00xq03s1wxjfbf8krx8z"; 65 + }; 66 + 67 + suitesparseVersion = "4.4.5"; 68 + suitesparse = fetchurl { 69 + url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${suitesparseVersion}.tar.gz"; 70 + sha256 = "1jcbxb8jx5wlcixzf6n5dca2rcfx6mlcms1k2rl5gp67ay3bix43"; 71 + }; 72 + version = "${majorVersion}.${minorVersion}.${maintenanceVersion}"; 73 + in 74 + 75 + stdenv.mkDerivation rec { 76 + pname = "julia"; 77 + inherit version; 78 + name = "${pname}-${version}"; 79 + 80 + src = fetchzip { 81 + url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz"; 82 + sha256 = src_sha256; 83 + }; 84 + prePatch = '' 85 + export PATH=$PATH:${cmake}/bin 86 + mkdir deps/srccache 87 + cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz" 88 + cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz" 89 + cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz" 90 + cp "${virtualenv}" "./deps/srccache/virtualenv-${virtualenvVersion}.tar.gz" 91 + cp "${libwhich}" "./deps/srccache/libwhich-${libwhichVersion}.tar.gz" 92 + cp "${llvm}" "./deps/srccache/llvm-${llvmVersion}.src.tar.xz" 93 + cp "${suitesparse}" "./deps/srccache/SuiteSparse-${suitesparseVersion}.tar.gz" 94 + ''; 95 + 96 + patches = [ 97 + ./0001.1-use-system-utf8proc.patch 98 + ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch; 99 + 100 + postPatch = '' 101 + patchShebangs . contrib 102 + for i in backtrace cmdlineargs; do 103 + mv test/$i.jl{,.off} 104 + touch test/$i.jl 105 + done 106 + rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl 107 + sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl 108 + sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl 109 + ''; 110 + 111 + buildInputs = [ 112 + arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr 113 + pcre2.dev openblas openlibm openspecfun readline utf8proc 114 + zlib 115 + ] 116 + ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] 117 + ; 118 + 119 + nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ] 120 + ++ stdenv.lib.optional stdenv.needsPax paxctl; 121 + 122 + makeFlags = 123 + let 124 + arch = head (splitString "-" stdenv.system); 125 + march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" 126 + or (throw "unsupported architecture: ${arch}"); 127 + # Julia requires Pentium 4 (SSE2) or better 128 + cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" 129 + or (throw "unsupported architecture: ${arch}"); 130 + in [ 131 + "ARCH=${arch}" 132 + "MARCH=${march}" 133 + "JULIA_CPU_TARGET=${cpuTarget}" 134 + "PREFIX=$(out)" 135 + "prefix=$(out)" 136 + "SHELL=${stdenv.shell}" 137 + 138 + "USE_SYSTEM_BLAS=1" 139 + "USE_BLAS64=${if openblas.blas64 then "1" else "0"}" 140 + "LIBBLAS=-lopenblas" 141 + "LIBBLASNAME=libopenblas" 142 + 143 + "USE_SYSTEM_LAPACK=1" 144 + "LIBLAPACK=-lopenblas" 145 + "LIBLAPACKNAME=libopenblas" 146 + 147 + "USE_SYSTEM_ARPACK=1" 148 + "USE_SYSTEM_FFTW=1" 149 + "USE_SYSTEM_GMP=1" 150 + "USE_SYSTEM_LIBGIT2=1" 151 + "USE_SYSTEM_LIBUNWIND=1" 152 + 153 + #"USE_SYSTEM_LLVM=1" 154 + "LLVM_VER=6.0.0" 155 + 156 + "USE_SYSTEM_MPFR=1" 157 + "USE_SYSTEM_OPENLIBM=1" 158 + "USE_SYSTEM_OPENSPECFUN=1" 159 + "USE_SYSTEM_PATCHELF=1" 160 + "USE_SYSTEM_PCRE=1" 161 + "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config" 162 + "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h" 163 + "USE_SYSTEM_READLINE=1" 164 + "USE_SYSTEM_UTF8PROC=1" 165 + "USE_SYSTEM_ZLIB=1" 166 + ]; 167 + 168 + NIX_CFLAGS_COMPILE = [ "-fPIC" ]; 169 + 170 + LD_LIBRARY_PATH = makeLibraryPath [ 171 + arpack fftw fftwSinglePrec gmp libgit2 mpfr openblas openlibm 172 + openspecfun pcre2 173 + ]; 174 + 175 + dontStrip = true; 176 + dontPatchELF = true; 177 + 178 + enableParallelBuilding = true; 179 + 180 + doCheck = !stdenv.isDarwin; 181 + checkTarget = "testall"; 182 + # Julia's tests require read/write access to $HOME 183 + preCheck = '' 184 + export HOME="$NIX_BUILD_TOP" 185 + ''; 186 + 187 + preBuild = '' 188 + sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile 189 + sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile 190 + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} 191 + ''; 192 + 193 + postInstall = '' 194 + # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, 195 + # as using a wrapper with LD_LIBRARY_PATH causes segmentation 196 + # faults when program returns an error: 197 + # $ julia -e 'throw(Error())' 198 + find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do 199 + if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then 200 + ln -sv $lib $out/lib/julia/$(basename $lib) 201 + fi 202 + done 203 + ''; 204 + 205 + passthru = { 206 + inherit majorVersion minorVersion maintenanceVersion; 207 + site = "share/julia/site/v${majorVersion}.${minorVersion}"; 208 + }; 209 + 210 + meta = { 211 + description = "High-level performance-oriented dynamical language for technical computing"; 212 + homepage = https://julialang.org/; 213 + license = stdenv.lib.licenses.mit; 214 + maintainers = with stdenv.lib.maintainers; [ raskin rob ]; 215 + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; 216 + broken = stdenv.isi686; 217 + }; 218 + }
+3 -5
pkgs/development/compilers/llvm/3.9/llvm.nix
··· 13 13 , zlib 14 14 , compiler-rt_src 15 15 , debugVersion ? false 16 - , enableSharedLibraries ? (buildPlatform == hostPlatform) 16 + , enableSharedLibraries ? (stdenv.buildPlatform == stdenv.hostPlatform) 17 17 , buildPackages 18 - , buildPlatform 19 - , hostPlatform 20 18 }: 21 19 22 - assert (hostPlatform != buildPlatform) -> !enableSharedLibraries; 20 + assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries; 23 21 24 22 let 25 23 src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"; ··· 131 129 ++ stdenv.lib.optionals (isDarwin) [ 132 130 "-DLLVM_ENABLE_LIBCXX=ON" 133 131 "-DCAN_TARGET_i386=false" 134 - ] ++ stdenv.lib.optionals (buildPlatform != hostPlatform) [ 132 + ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 135 133 "-DCMAKE_CROSSCOMPILING=True" 136 134 "-DLLVM_TABLEGEN=${buildPackages.llvmPackages_39.llvm}/bin/llvm-tblgen" 137 135 ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+4
pkgs/development/compilers/mezzo/default.nix
··· 1 1 { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "mezzo is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 let 4 8 check-ocaml-version = with stdenv.lib; versionAtLeast (getVersion ocaml); 5 9 in
+3 -3
pkgs/development/compilers/mlton/default.nix
··· 14 14 name = "mlton-${version}"; 15 15 16 16 binSrc = 17 - if stdenv.system == "i686-linux" then (fetchurl { 17 + if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { 18 18 url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.x86-linux.tgz"; 19 19 sha256 = "1kxjjmnw4xk2d9hpvz43w9dvyhb3025k4zvjx785c33nrwkrdn4j"; 20 20 }) 21 - else if stdenv.system == "x86_64-linux" then (fetchurl { 21 + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { 22 22 url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-linux.tgz"; 23 23 sha256 = "0fyhwxb4nmpirjbjcvk9f6w67gmn2gkz7xcgz0xbfih9kc015ygn"; 24 24 }) 25 - else if stdenv.system == "x86_64-darwin" then (fetchurl { 25 + else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl { 26 26 url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-darwin.gmp-macports.tgz"; 27 27 sha256 = "044wnh9hhg6if886xy805683k0as347xd37r0r1yi4x7qlxzzgx9"; 28 28 })
+1 -1
pkgs/development/compilers/mozart/binary.nix
··· 20 20 21 21 preferLocalBuild = true; 22 22 23 - src = binaries."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); 23 + src = binaries."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 24 24 25 25 libPath = stdenv.lib.makeLibraryPath 26 26 [ stdenv.cc.cc
+3 -3
pkgs/development/compilers/nvidia-cg-toolkit/default.nix
··· 10 10 name = "nvidia-cg-toolkit-${version}"; 11 11 12 12 src = 13 - if stdenv.system == "x86_64-linux" then 13 + if stdenv.hostPlatform.system == "x86_64-linux" then 14 14 fetchurl { 15 15 url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz"; 16 16 sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878"; 17 17 } 18 - else if stdenv.system == "i686-linux" then 18 + else if stdenv.hostPlatform.system == "i686-linux" then 19 19 fetchurl { 20 20 url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz"; 21 21 sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879"; 22 22 } 23 - else throw "nvidia-cg-toolkit does not support platform ${stdenv.system}"; 23 + else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}"; 24 24 25 25 installPhase = '' 26 26 for b in cgc cgfxcat cginfo
+3 -3
pkgs/development/compilers/opendylan/bin.nix
··· 5 5 stdenv.mkDerivation { 6 6 name = "opendylan-2013.2"; 7 7 8 - src = if stdenv.system == "x86_64-linux" then fetchurl { 8 + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 9 9 url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2; 10 10 sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h"; 11 11 } 12 - else if stdenv.system == "i686-linux" then fetchurl { 12 + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 13 13 url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2; 14 14 sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5"; 15 15 } 16 - else throw "platform ${stdenv.system} not supported."; 16 + else throw "platform ${stdenv.hostPlatform.system} not supported."; 17 17 18 18 buildInputs = [ patchelf boehmgc gnused makeWrapper ]; 19 19
+3 -3
pkgs/development/compilers/opendylan/default.nix
··· 11 11 fetchSubmodules = true; 12 12 }; 13 13 14 - buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [ 14 + buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [ 15 15 opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper 16 16 ]; 17 17 18 - preConfigure = if stdenv.system == "i686-linux" then '' 18 + preConfigure = if stdenv.hostPlatform.system == "i686-linux" then '' 19 19 mkdir -p $TMPDIR/mps 20 20 tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps 21 21 ./autogen.sh ··· 25 25 ''; 26 26 27 27 configureFlags = [ 28 - (if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}") 28 + (if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}") 29 29 ]; 30 30 buildPhase = "make 3-stage-bootstrap"; 31 31
+1 -1
pkgs/development/compilers/openjdk/10.nix
··· 13 13 * The JRE libraries are in directories that depend on the CPU. 14 14 */ 15 15 architecture = 16 - if stdenv.system == "i686-linux" then 16 + if stdenv.hostPlatform.system == "i686-linux" then 17 17 "i386" 18 18 else "amd64"; 19 19
+3 -3
pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
··· 46 46 x86_64-linux = "amd64"; 47 47 armv7l-linux = "arm"; 48 48 aarch64-linux = "aarch64"; 49 - }.${stdenv.system}; 49 + }.${stdenv.hostPlatform.system}; 50 50 51 51 jce = 52 52 if installjce then ··· 77 77 x86_64-linux = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz"; 78 78 armv7l-linux = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz"; 79 79 aarch64-linux = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz"; 80 - }.${stdenv.system}; 80 + }.${stdenv.hostPlatform.system}; 81 81 url = downloadUrl; 82 - sha256 = sha256.${stdenv.system}; 82 + sha256 = sha256.${stdenv.hostPlatform.system}; 83 83 }; 84 84 85 85 nativeBuildInputs = [ file ]
+1 -1
pkgs/development/compilers/orc/default.nix
··· 16 16 ''; 17 17 18 18 # https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15 19 - doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling 19 + doCheck = stdenv.hostPlatform.system != "i686-linux"; # not sure about cross-compiling 20 20 21 21 meta = with stdenv.lib; { 22 22 description = "The Oil Runtime Compiler";
+2 -2
pkgs/development/compilers/picat/default.nix
··· 8 8 sha256 = "0wvl95gf4pjs93632g4wi0mw1glzzhjp9g4xg93ll2zxggbxibli"; 9 9 }; 10 10 11 - ARCH = if stdenv.system == "i686-linux" then "linux32" 12 - else if stdenv.system == "x86_64-linux" then "linux64" 11 + ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32" 12 + else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" 13 13 else throw "Unsupported system"; 14 14 15 15 hardeningDisable = [ "format" ];
+7 -7
pkgs/development/compilers/rust/bootstrap.nix
··· 16 16 }; 17 17 18 18 platform = 19 - if stdenv.system == "i686-linux" 19 + if stdenv.hostPlatform.system == "i686-linux" 20 20 then "i686-unknown-linux-gnu" 21 - else if stdenv.system == "x86_64-linux" 21 + else if stdenv.hostPlatform.system == "x86_64-linux" 22 22 then "x86_64-unknown-linux-gnu" 23 - else if stdenv.system == "armv7l-linux" 23 + else if stdenv.hostPlatform.system == "armv7l-linux" 24 24 then "armv7-unknown-linux-gnueabihf" 25 - else if stdenv.system == "aarch64-linux" 25 + else if stdenv.hostPlatform.system == "aarch64-linux" 26 26 then "aarch64-unknown-linux-gnu" 27 - else if stdenv.system == "i686-darwin" 27 + else if stdenv.hostPlatform.system == "i686-darwin" 28 28 then "i686-apple-darwin" 29 - else if stdenv.system == "x86_64-darwin" 29 + else if stdenv.hostPlatform.system == "x86_64-darwin" 30 30 then "x86_64-apple-darwin" 31 - else throw "missing bootstrap url for platform ${stdenv.system}"; 31 + else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}"; 32 32 33 33 src = fetchurl { 34 34 url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
-1
pkgs/development/compilers/rust/rustc.nix
··· 12 12 , targetToolchains 13 13 , doCheck ? true 14 14 , broken ? false 15 - , buildPlatform, hostPlatform 16 15 }: 17 16 18 17 let
+2 -2
pkgs/development/compilers/sbcl/bootstrap.nix
··· 39 39 sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0"; 40 40 }; 41 41 }; 42 - cfg = options.${stdenv.system}; 42 + cfg = options.${stdenv.hostPlatform.system}; 43 43 in 44 - assert builtins.hasAttr stdenv.system options; 44 + assert builtins.hasAttr stdenv.hostPlatform.system options; 45 45 stdenv.mkDerivation rec { 46 46 name = "sbcl-bootstrap-${version}"; 47 47 version = cfg.version;
+1 -1
pkgs/development/compilers/sbcl/default.nix
··· 1 1 { stdenv, fetchurl, writeText, sbclBootstrap 2 2 , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" 3 - , threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system) 3 + , threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system) 4 4 # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die. 5 5 # Note that the created binaries still need `patchelf --set-interpreter ...` 6 6 # to get rid of ${glibc} dependency.
+8 -9
pkgs/development/haskell-modules/generic-builder.nix
··· 1 1 { stdenv, buildPackages, buildHaskellPackages, ghc 2 2 , jailbreak-cabal, hscolour, cpphs, nodejs 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 let 7 - isCross = buildPlatform != hostPlatform; 6 + isCross = stdenv.buildPlatform != stdenv.hostPlatform; 8 7 inherit (buildPackages) 9 8 fetchurl removeReferencesTo 10 9 pkgconfig coreutils gnugrep gnused glibcLocales; ··· 32 31 , enableSharedExecutables ? false 33 32 , enableSharedLibraries ? (ghc.enableShared or false) 34 33 , enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin 35 - , enableStaticLibraries ? !hostPlatform.isWindows 36 - , enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4" 34 + , enableStaticLibraries ? !stdenv.hostPlatform.isWindows 35 + , enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4" 37 36 , extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? [] 38 37 # On macOS, statically linking against system frameworks is not supported; 39 38 # see https://developer.apple.com/library/content/qa/qa1118/_index.html ··· 79 78 80 79 # --enable-static does not work on windows. This is a bug in GHC. 81 80 # --enable-static will pass -staticlib to ghc, which only works for mach-o and elf. 82 - assert hostPlatform.isWindows -> enableStaticLibraries == false; 81 + assert stdenv.hostPlatform.isWindows -> enableStaticLibraries == false; 83 82 84 83 let 85 84 ··· 144 143 (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") 145 144 (optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES") 146 145 (optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp") 147 - (enableFeature (enableDeadCodeElimination && !hostPlatform.isAarch32 && !hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs") 146 + (enableFeature (enableDeadCodeElimination && !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs") 148 147 (enableFeature enableLibraryProfiling "library-profiling") 149 148 (optionalString ((enableExecutableProfiling || enableLibraryProfiling) && versionOlder "8" ghc.version) "--profiling-detail=${profilingDetail}") 150 149 (enableFeature enableExecutableProfiling (if versionOlder ghc.version "8" then "executable-profiling" else "profiling")) ··· 163 162 ] ++ optionals isGhcjs [ 164 163 "--ghcjs" 165 164 ] ++ optionals isCross ([ 166 - "--configure-option=--host=${hostPlatform.config}" 165 + "--configure-option=--host=${stdenv.hostPlatform.config}" 167 166 ] ++ crossCabalFlags); 168 167 169 168 setupCompileFlags = [ ··· 285 284 fi 286 285 '' 287 286 # It is not clear why --extra-framework-dirs does work fine on Linux 288 - + optionalString (!buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") '' 287 + + optionalString (!stdenv.buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") '' 289 288 if [[ -d "$p/Library/Frameworks" ]]; then 290 289 configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks" 291 290 fi ··· 486 485 // optionalAttrs (postFixup != "") { inherit postFixup; } 487 486 // optionalAttrs (dontStrip) { inherit dontStrip; } 488 487 // optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; } 489 - // optionalAttrs (buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } 488 + // optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } 490 489 )
+3 -3
pkgs/development/haskell-modules/with-packages-wrapper.nix
··· 1 - { lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper 1 + { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper 2 2 , withLLVM ? false 3 3 , postBuild ? "" 4 4 , ghcLibdir ? null # only used by ghcjs, when resolving plugins ··· 48 48 # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm 49 49 llvm = lib.makeBinPath 50 50 ([ llvmPackages.llvm ] 51 - ++ lib.optional targetPlatform.isDarwin llvmPackages.clang); 51 + ++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang); 52 52 in 53 53 if paths == [] && !withLLVM then ghc else 54 54 symlinkJoin { ··· 105 105 --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}" 106 106 fi 107 107 108 - '' + (lib.optionalString (targetPlatform.isDarwin && !isGhcjs && !targetPlatform.isiOS) '' 108 + '' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) '' 109 109 # Work around a linker limit in macOS Sierra (see generic-builder.nix): 110 110 local packageConfDir="$out/lib/${ghc.name}/package.conf.d"; 111 111 local dynamicLinksDir="$out/lib/links"
+1 -1
pkgs/development/interpreters/dart/default.nix
··· 45 45 unzip 46 46 ]; 47 47 48 - src = sources."${version}-${stdenv.system}" or (throw "unsupported version/system: ${version}/${stdenv.system}"); 48 + src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}"); 49 49 50 50 installPhase = '' 51 51 mkdir -p $out
+1 -2
pkgs/development/interpreters/guile/1.8.nix
··· 1 1 { stdenv, buildPackages 2 - , buildPlatform, hostPlatform 3 2 , fetchurl, makeWrapper, gawk, pkgconfig 4 3 , libtool, readline, gmp 5 4 }: ··· 23 22 "--with-threads=no"; 24 23 25 24 depsBuildBuild = [ buildPackages.stdenv.cc ] 26 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) 25 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 27 26 buildPackages.buildPackages.guile_1_8; 28 27 nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; 29 28 buildInputs = [ readline libtool ];
+1 -2
pkgs/development/interpreters/guile/2.0.nix
··· 1 1 { stdenv, buildPackages 2 - , buildPlatform, hostPlatform 3 2 , fetchpatch, fetchurl, makeWrapper, gawk, pkgconfig 4 3 , libffi, libtool, readline, gmp, boehmgc, libunistring 5 4 , coverageAnalysis ? null ··· 22 21 setOutputFlags = false; # $dev gets into the library otherwise 23 22 24 23 depsBuildBuild = [ buildPackages.stdenv.cc ] 25 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) 24 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 26 25 buildPackages.buildPackages.guile_2_0; 27 26 nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; 28 27 buildInputs = [ readline libtool libunistring libffi ];
+1 -2
pkgs/development/interpreters/guile/default.nix
··· 1 1 { stdenv, buildPackages 2 - , buildPlatform, hostPlatform 3 2 , fetchurl, makeWrapper, gawk, pkgconfig 4 3 , libffi, libtool, readline, gmp, boehmgc, libunistring 5 4 , coverageAnalysis ? null ··· 23 22 setOutputFlags = false; # $dev gets into the library otherwise 24 23 25 24 depsBuildBuild = [ buildPackages.stdenv.cc ] 26 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) 25 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 27 26 buildPackages.buildPackages.guile; 28 27 nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; 29 28 buildInputs = [ readline libtool libunistring libffi ];
+11 -11
pkgs/development/interpreters/python/cpython/2.7/default.nix
··· 1 - { stdenv, hostPlatform, buildPlatform, buildPackages, fetchurl 1 + { stdenv, buildPackages, fetchurl 2 2 , bzip2 3 3 , gdbm 4 4 , fetchpatch ··· 85 85 # libuuid, slowing down program startup a lot). 86 86 ./no-ldconfig.patch 87 87 88 - ] ++ optionals hostPlatform.isCygwin [ 88 + ] ++ optionals stdenv.hostPlatform.isCygwin [ 89 89 ./2.5.2-ctypes-util-find_library.patch 90 90 ./2.5.2-tkinter-x11.patch 91 91 ./2.6.2-ssl-threads.patch ··· 125 125 "--enable-shared" 126 126 "--with-threads" 127 127 "--enable-unicode=ucs${toString ucsEncoding}" 128 - ] ++ optionals (hostPlatform.isCygwin || hostPlatform.isAarch64) [ 128 + ] ++ optionals (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) [ 129 129 "--with-system-ffi" 130 - ] ++ optionals hostPlatform.isCygwin [ 130 + ] ++ optionals stdenv.hostPlatform.isCygwin [ 131 131 "--with-system-expat" 132 132 "ac_cv_func_bind_textdomain_codeset=yes" 133 133 ] ++ optionals stdenv.isDarwin [ 134 134 "--disable-toolbox-glue" 135 - ] ++ optionals (hostPlatform != buildPlatform) [ 135 + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 136 136 "PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python" 137 137 "ac_cv_buggy_getaddrinfo=no" 138 138 # Assume little-endian IEEE 754 floating point when cross compiling ··· 157 157 ] 158 158 # Never even try to use lchmod on linux, 159 159 # don't rely on detecting glibc-isms. 160 - ++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no"; 160 + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"; 161 161 162 162 buildInputs = 163 163 optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ 164 164 [ bzip2 openssl zlib ] 165 - ++ optional (hostPlatform.isCygwin || hostPlatform.isAarch64) libffi 166 - ++ optional hostPlatform.isCygwin expat 165 + ++ optional (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) libffi 166 + ++ optional stdenv.hostPlatform.isCygwin expat 167 167 ++ [ db gdbm ncurses sqlite readline ] 168 168 ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] 169 169 ++ optionals stdenv.isDarwin ([ CF ] ++ optional (configd != null) configd); 170 170 nativeBuildInputs = 171 - optionals (hostPlatform != buildPlatform) 171 + optionals (stdenv.hostPlatform != stdenv.buildPlatform) 172 172 [ buildPackages.stdenv.cc buildPackages.python ]; 173 173 174 174 mkPaths = paths: { ··· 190 190 inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; 191 191 192 192 NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2" 193 - + optionalString hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; 193 + + optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; 194 194 DETERMINISTIC_BUILD = 1; 195 195 196 196 setupHook = python-setup-hook sitePackages; ··· 235 235 find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i - 236 236 find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i - 237 237 find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i - 238 - '' + optionalString hostPlatform.isCygwin '' 238 + '' + optionalString stdenv.hostPlatform.isCygwin '' 239 239 cp libpython2.7.dll.a $out/lib 240 240 ''; 241 241
+1 -1
pkgs/development/interpreters/spidermonkey/1.8.5.nix
··· 43 43 # of polkit, which is what matters most, it does not override the allocator 44 44 # so the failure of that test does not matter much. 45 45 configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++ 46 - stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [ 46 + stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [ 47 47 "--with-cpu-arch=armv5t" 48 48 "--disable-tracejit" ]; 49 49
+2 -3
pkgs/development/libraries/SDL/default.nix
··· 1 1 { stdenv, lib, fetchurl, fetchpatch, pkgconfig, audiofile, libcap, libiconv 2 2 , openglSupport ? false, libGL, libGLU 3 3 , alsaSupport ? true, alsaLib 4 - , x11Support ? hostPlatform == buildPlatform, libXext, libICE, libXrandr 4 + , x11Support ? stdenv.hostPlatform == stdenv.buildPlatform, libXext, libICE, libXrandr 5 5 , pulseaudioSupport ? true, libpulseaudio 6 6 , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa 7 - , hostPlatform, buildPlatform 8 7 }: 9 8 10 9 # NOTE: When editing this expression see if the same change applies to ··· 41 40 ++ optional stdenv.isDarwin Cocoa; 42 41 43 42 buildInputs = [ ] 44 - ++ optional (!hostPlatform.isMinGW) audiofile 43 + ++ optional (!stdenv.hostPlatform.isMinGW) audiofile 45 44 ++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; 46 45 47 46 configureFlags = [
+1 -1
pkgs/development/libraries/apr/default.nix
··· 26 26 configureFlags = 27 27 # Including the Windows headers breaks unistd.h. 28 28 # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 29 - stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no"; 29 + stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no"; 30 30 31 31 enableParallelBuilding = true; 32 32
+2 -2
pkgs/development/libraries/attr/default.nix
··· 1 - { stdenv, fetchurl, gettext, hostPlatform }: 1 + { stdenv, fetchurl, gettext }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "attr-2.4.47"; ··· 16 16 17 17 installTargets = [ "install" "install-lib" "install-dev" ]; 18 18 19 - patches = if (hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; 19 + patches = if (stdenv.hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; 20 20 21 21 postPatch = '' 22 22 for script in install-sh include/install-sh; do
+2 -2
pkgs/development/libraries/audio/libbass/default.nix
··· 41 41 dontBuild = true; 42 42 installPhase = 43 43 let so = 44 - if bass.so ? ${stdenv.system} then bass.so.${stdenv.system} 45 - else throw "${name} not packaged for ${stdenv.system} (yet)."; 44 + if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system} 45 + else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet)."; 46 46 in '' 47 47 mkdir -p $out/{lib,include} 48 48 install -m644 -t $out/lib/ ${so}
+2 -3
pkgs/development/libraries/boehm-gc/default.nix
··· 1 1 { lib, stdenv, fetchurl, fetchpatch, pkgconfig, libatomic_ops 2 2 , enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec { ··· 30 29 sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3"; 31 30 }) ] ++ 32 31 # https://github.com/ivmai/bdwgc/pull/208 33 - lib.optional hostPlatform.isRiscV ./riscv.patch; 32 + lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch; 34 33 35 34 configureFlags = 36 35 [ "--enable-cplusplus" ] ··· 40 39 doCheck = true; # not cross; 41 40 42 41 # Don't run the native `strip' when cross-compiling. 43 - dontStrip = hostPlatform != buildPlatform; 42 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; 44 43 45 44 enableParallelBuilding = true; 46 45
+1 -1
pkgs/development/libraries/boost/1.66.nix
··· 1 - { stdenv, callPackage, fetchurl, hostPlatform, buildPlatform, ... } @ args: 1 + { stdenv, callPackage, fetchurl, ... } @ args: 2 2 3 3 callPackage ./generic.nix (args // rec { 4 4 version = "1.66_0";
+1 -1
pkgs/development/libraries/boost/1.67.nix
··· 1 - { stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args: 1 + { stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: 2 2 3 3 callPackage ./generic.nix (args // rec { 4 4 version = "1.67_0";
+1 -1
pkgs/development/libraries/boost/1.68.nix
··· 1 - { stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args: 1 + { stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: 2 2 3 3 callPackage ./generic.nix (args // rec { 4 4 version = "1.68_0";
+19 -19
pkgs/development/libraries/boost/generic.nix
··· 1 1 { stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv 2 2 , which 3 - , buildPackages, buildPlatform, hostPlatform 3 + , buildPackages 4 4 , toolset ? /**/ if stdenv.cc.isClang then "clang" 5 5 else null 6 6 , enableRelease ? true 7 7 , enableDebug ? false 8 8 , enableSingleThreaded ? false 9 9 , enableMultiThreaded ? true 10 - , enableShared ? !(hostPlatform.libc == "msvcrt") # problems for now 10 + , enableShared ? !(stdenv.hostPlatform.libc == "msvcrt") # problems for now 11 11 , enableStatic ? !enableShared 12 12 , enablePython ? false 13 13 , enableNumpy ? false ··· 24 24 assert enableShared || enableStatic; 25 25 26 26 # Python isn't supported when cross-compiling 27 - assert enablePython -> hostPlatform == buildPlatform; 27 + assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform; 28 28 assert enableNumpy -> enablePython; 29 29 30 30 with stdenv.lib; ··· 59 59 "-sEXPAT_LIBPATH=${expat.out}/lib" 60 60 61 61 # TODO: make this unconditional 62 - ] ++ optionals (hostPlatform != buildPlatform) [ 63 - "address-model=${toString hostPlatform.parsed.cpu.bits}" 64 - "architecture=${toString hostPlatform.parsed.cpu.family}" 65 - "binary-format=${toString hostPlatform.parsed.kernel.execFormat.name}" 66 - "target-os=${toString hostPlatform.parsed.kernel.name}" 62 + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 63 + "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}" 64 + "architecture=${toString stdenv.hostPlatform.parsed.cpu.family}" 65 + "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}" 66 + "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}" 67 67 68 68 # adapted from table in boost manual 69 69 # https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html 70 - "abi=${if hostPlatform.parsed.cpu.family == "arm" then "aapcs" 71 - else if hostPlatform.isWindows then "ms" 72 - else if hostPlatform.isMips then "o32" 70 + "abi=${if stdenv.hostPlatform.parsed.cpu.family == "arm" then "aapcs" 71 + else if stdenv.hostPlatform.isWindows then "ms" 72 + else if stdenv.hostPlatform.isMips then "o32" 73 73 else "sysv"}" 74 74 ] ++ optional (link != "static") "runtime-link=${runtime-link}" 75 75 ++ optional (variant == "release") "debug-symbols=off" 76 76 ++ optional (toolset != null) "toolset=${toolset}" 77 - ++ optional (mpi != null || hostPlatform != buildPlatform) "--user-config=user-config.jam" 78 - ++ optionals (hostPlatform.libc == "msvcrt") [ 77 + ++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" 78 + ++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ 79 79 "threadapi=win32" 80 80 ]); 81 81 ··· 86 86 87 87 inherit src; 88 88 89 - patchFlags = optionalString (hostPlatform.libc == "msvcrt") "-p0"; 89 + patchFlags = optionalString (stdenv.hostPlatform.libc == "msvcrt") "-p0"; 90 90 patches = patches 91 91 ++ optional stdenv.isDarwin ./darwin-no-system-python.patch 92 - ++ optional (hostPlatform.libc == "msvcrt") (fetchurl { 92 + ++ optional (stdenv.hostPlatform.libc == "msvcrt") (fetchurl { 93 93 url = "https://svn.boost.org/trac/boost/raw-attachment/tickaet/7262/" 94 94 + "boost-mingw.patch"; 95 95 sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; ··· 113 113 cat << EOF >> user-config.jam 114 114 using mpi : ${mpi}/bin/mpiCC ; 115 115 EOF 116 - '' + optionalString (hostPlatform != buildPlatform) '' 116 + '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 117 117 cat << EOF >> user-config.jam 118 118 using gcc : cross : ${stdenv.cc.targetPrefix}c++ ; 119 119 EOF ··· 126 126 127 127 nativeBuildInputs = [ which buildPackages.stdenv.cc ]; 128 128 buildInputs = [ expat zlib bzip2 libiconv ] 129 - ++ optional (hostPlatform == buildPlatform) icu 129 + ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu 130 130 ++ optional stdenv.isDarwin fixDarwinDylibNames 131 131 ++ optional enablePython python 132 132 ++ optional enableNumpy python.pkgs.numpy; ··· 137 137 "--includedir=$(dev)/include" 138 138 "--libdir=$(out)/lib" 139 139 ] ++ optional enablePython "--with-python=${python.interpreter}" 140 - ++ [ (if hostPlatform == buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ] 140 + ++ [ (if stdenv.hostPlatform == stdenv.buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ] 141 141 ++ optional (toolset != null) "--with-toolset=${toolset}"; 142 142 143 143 buildPhase = '' ··· 157 157 # Make boost header paths relative so that they are not runtime dependencies 158 158 cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ 159 159 -exec sed '1i#line 1 "{}"' -i '{}' \; 160 - '' + optionalString (hostPlatform.libc == "msvcrt") '' 160 + '' + optionalString (stdenv.hostPlatform.libc == "msvcrt") '' 161 161 $RANLIB "$out/lib/"*.a 162 162 ''; 163 163
+1 -1
pkgs/development/libraries/bootil/default.nix
··· 28 28 platform = 29 29 if stdenv.isLinux then "linux" 30 30 else if stdenv.isDarwin then "macosx" 31 - else throw "unrecognized system ${stdenv.system}"; 31 + else throw "unrecognized system ${stdenv.hostPlatform.system}"; 32 32 33 33 buildInputs = [ premake4 ]; 34 34
+3 -3
pkgs/development/libraries/c-ares/default.nix
··· 1 - { targetPlatform, stdenv, fetchurl, writeTextDir }: 1 + { stdenv, fetchurl, writeTextDir }: 2 2 3 3 let self = 4 4 stdenv.mkDerivation rec { ··· 40 40 ) 41 41 set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 42 42 set_target_properties(c-ares::cares PROPERTIES 43 - IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${targetPlatform.extensions.sharedLibrary}" 44 - IMPORTED_SONAME_RELEASE "libcares${targetPlatform.extensions.sharedLibrary}" 43 + IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${stdenv.targetPlatform.extensions.sharedLibrary}" 44 + IMPORTED_SONAME_RELEASE "libcares${stdenv.targetPlatform.extensions.sharedLibrary}" 45 45 ) 46 46 add_library(c-ares::cares_shared INTERFACE IMPORTED) 47 47 set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
+4 -3
pkgs/development/libraries/crypto++/default.nix
··· 12 12 sha256 = "1yk7jyf4va9425cg05llskpls2jm7n3jwy2hj5jm74zkr4mwpvl7"; 13 13 }; 14 14 15 - patches = with stdenv; 16 - lib.optional (system != "i686-cygwin") ./dll.patch 17 - ++ lib.optional isDarwin ./GNUmakefile-darwin.patch; 15 + patches = stdenv.lib.concatLists [ 16 + (stdenv.lib.optional (stdenv.hostPlatform.system != "i686-cygwin") ./dll.patch) 17 + (stdenv.lib.optional stdenv.hostPlatform.isDarwin ./GNUmakefile-darwin.patch) 18 + ]; 18 19 19 20 20 21 configurePhase = let
+2 -3
pkgs/development/libraries/ffmpeg-full/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm 2 - , hostPlatform 3 2 /* 4 3 * Licensing options (yes some are listed twice, filters and such are not listed) 5 4 */ ··· 253 252 254 253 configurePlatforms = []; 255 254 configureFlags = [ 256 - "--target_os=${hostPlatform.parsed.kernel.name}" 257 - "--arch=${hostPlatform.parsed.cpu.name}" 255 + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" 256 + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" 258 257 /* 259 258 * Licensing flags 260 259 */
+2 -3
pkgs/development/libraries/ffmpeg/generic.nix
··· 2 2 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg 3 3 , libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr 4 4 , x264, x265, xvidcore, zlib, libopus 5 - , hostPlatform 6 5 , openglSupport ? false, libGLU_combined ? null 7 6 # Build options 8 7 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime ··· 83 82 84 83 configurePlatforms = []; 85 84 configureFlags = [ 86 - "--arch=${hostPlatform.parsed.cpu.name}" 87 - "--target_os=${hostPlatform.parsed.kernel.name}" 85 + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" 86 + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" 88 87 # License 89 88 "--enable-gpl" 90 89 "--enable-version3"
+2 -3
pkgs/development/libraries/fontconfig/2.10.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, freetype, expat 2 - , hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation rec { ··· 17 16 buildInputs = [ expat ]; 18 17 19 18 configureFlags = [ 20 - "--with-arch=${hostPlatform.parsed.cpu.name}" 19 + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" 21 20 "--sysconfdir=/etc" 22 21 "--with-cache-dir=/var/cache/fontconfig" 23 22 "--disable-docs" 24 23 "--with-default-fonts=" 25 24 ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 26 - "--with-arch=${hostPlatform.parsed.cpu.name}" 25 + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" 27 26 ]; 28 27 29 28 enableParallelBuilding = true;
+2 -3
pkgs/development/libraries/fontconfig/default.nix
··· 1 1 { stdenv, substituteAll, fetchurl 2 2 , pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts 3 - , hostPlatform 4 3 }: 5 4 6 5 /** Font configuration scheme ··· 40 39 buildInputs = [ expat ]; 41 40 42 41 configureFlags = [ 43 - "--with-arch=${hostPlatform.parsed.cpu.name}" 42 + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" 44 43 "--with-cache-dir=/var/cache/fontconfig" # otherwise the fallback is in $out/ 45 44 "--disable-docs" 46 45 # just <1MB; this is what you get when loading config fails for some reason 47 46 "--with-default-fonts=${dejavu_fonts.minimal}" 48 47 ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 49 - "--with-arch=${hostPlatform.parsed.cpu.name}" 48 + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" 50 49 ]; 51 50 52 51 enableParallelBuilding = true;
+1 -1
pkgs/development/libraries/gbenchmark/default.nix
··· 19 19 description = "A microbenchmark support library"; 20 20 homepage = https://github.com/google/benchmark; 21 21 license = licenses.asl20; 22 - platforms = platforms.linux; 22 + platforms = platforms.linux ++ platforms.darwin; 23 23 maintainers = with maintainers; [ abbradar ]; 24 24 }; 25 25 }
+12 -12
pkgs/development/libraries/gcc/libgcc/default.nix
··· 1 - { stdenvNoLibs, buildPackages, buildPlatform, hostPlatform 1 + { stdenvNoLibs, buildPackages 2 2 , gcc, glibc 3 3 , libiberty 4 4 }: ··· 29 29 # Drop in libiberty, as external builds are not expected 30 30 + '' 31 31 ( 32 - mkdir -p build-${buildPlatform.config}/libiberty/ 33 - cd build-${buildPlatform.config}/libiberty/ 32 + mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/ 33 + cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/ 34 34 ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ 35 35 ) 36 36 '' ··· 83 83 '' 84 84 # Preparing to configure + build libgcc itself 85 85 + '' 86 - mkdir -p "$buildRoot/gcc/${hostPlatform.config}/libgcc" 87 - cd "$buildRoot/gcc/${hostPlatform.config}/libgcc" 86 + mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" 87 + cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" 88 88 configureScript=$sourceRoot/configure 89 89 chmod +x "$configureScript" 90 90 ··· 107 107 ''; 108 108 109 109 gccConfigureFlags = [ 110 - "--build=${buildPlatform.config}" 111 - "--host=${buildPlatform.config}" 112 - "--target=${hostPlatform.config}" 110 + "--build=${stdenvNoLibs.buildPlatform.config}" 111 + "--host=${stdenvNoLibs.buildPlatform.config}" 112 + "--target=${stdenvNoLibs.hostPlatform.config}" 113 113 114 114 "--disable-bootstrap" 115 115 "--disable-multilib" "--with-multilib-list=" ··· 128 128 "--disable-vtable-verify" 129 129 130 130 "--with-system-zlib" 131 - ] ++ stdenvNoLibs.lib.optional (hostPlatform.libc == "glibc") 131 + ] ++ stdenvNoLibs.lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") 132 132 "--with-glibc-version=${glibc.version}"; 133 133 134 134 configurePlatforms = [ "build" "host" ]; ··· 144 144 makeFlags = [ "MULTIBUILDTOP:=../" ]; 145 145 146 146 postInstall = '' 147 - moveToOutput "lib/gcc/${hostPlatform.config}/${version}/include" "$dev" 147 + moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include" "$dev" 148 148 mkdir -p "$out/lib" "$dev/include" 149 - ln -s "$out/lib/gcc/${hostPlatform.config}/${version}"/* "$out/lib" 150 - ln -s "$dev/lib/gcc/${hostPlatform.config}/${version}/include"/* "$dev/include/" 149 + ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}"/* "$out/lib" 150 + ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include"/* "$dev/include/" 151 151 ''; 152 152 }
+2 -2
pkgs/development/libraries/gdbm/default.nix
··· 1 - { stdenv, lib, buildPlatform, fetchurl }: 1 + { stdenv, lib, fetchurl }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "gdbm-1.17"; ··· 18 18 # Disable dbmfetch03.at test because it depends on unlink() 19 19 # failing on a link in a chmod -w directory, which cygwin 20 20 # apparently allows. 21 - postPatch = lib.optionalString buildPlatform.isCygwin '' 21 + postPatch = lib.optionalString stdenv.buildPlatform.isCygwin '' 22 22 substituteInPlace tests/Makefile.in --replace \ 23 23 '_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \ 24 24 '_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la'
+4 -4
pkgs/development/libraries/gettext/default.nix
··· 1 - { stdenv, lib, hostPlatform, fetchurl, libiconv, xz }: 1 + { stdenv, lib, fetchurl, libiconv, xz }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "gettext-${version}"; ··· 35 35 substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd 36 36 substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd 37 37 substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd 38 - '' + lib.optionalString hostPlatform.isCygwin '' 38 + '' + lib.optionalString stdenv.hostPlatform.isCygwin '' 39 39 sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in 40 40 sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in 41 41 ''; 42 42 43 43 nativeBuildInputs = [ xz xz.bin ]; 44 44 # HACK, see #10874 (and 14664) 45 - buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; 45 + buildInputs = stdenv.lib.optional (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) libiconv; 46 46 47 47 setupHooks = [ 48 48 ../../../build-support/setup-hooks/role.bash 49 49 ./gettext-setup-hook.sh 50 50 ]; 51 - gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl; 51 + gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl; 52 52 53 53 enableParallelBuilding = true; 54 54
+2 -3
pkgs/development/libraries/glew/1.10.nix
··· 1 1 { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi 2 - , buildPlatform, hostPlatform 3 2 , AGL ? null 4 3 }: 5 4 ··· 19 18 20 19 patchPhase = '' 21 20 sed -i 's|lib64|lib|' config/Makefile.linux 22 - ${optionalString (hostPlatform != buildPlatform) '' 21 + ${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 23 22 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 24 23 ''} 25 24 ''; ··· 39 38 ''; 40 39 41 40 makeFlags = [ 42 - "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}" 41 + "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}" 43 42 ]; 44 43 45 44 meta = with stdenv.lib; {
+2 -3
pkgs/development/libraries/glew/default.nix
··· 1 1 { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 with stdenv.lib; ··· 20 19 patchPhase = '' 21 20 sed -i 's|lib64|lib|' config/Makefile.linux 22 21 substituteInPlace config/Makefile.darwin --replace /usr/local "$out" 23 - ${optionalString (hostPlatform != buildPlatform) '' 22 + ${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 24 23 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 25 24 ''} 26 25 ''; ··· 41 40 ''; 42 41 43 42 makeFlags = [ 44 - "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}" 43 + "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}" 45 44 ]; 46 45 47 46 enableParallelBuilding = true;
+5 -6
pkgs/development/libraries/glibc/common.nix
··· 18 18 */ 19 19 20 20 { stdenv, lib 21 - , buildPlatform, hostPlatform 22 21 , buildPackages 23 22 , fetchurl ? null 24 23 , linuxHeaders ? null ··· 119 118 else "--disable-profile") 120 119 ] ++ lib.optionals withLinuxHeaders [ 121 120 "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 122 - ] ++ lib.optionals (hostPlatform != buildPlatform) [ 123 - (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft" 121 + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 122 + (if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" 124 123 then "--without-fp" 125 124 else "--with-fp") 126 125 "--with-__thread" 127 - ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [ 126 + ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ 128 127 "--host=arm-linux-gnueabi" 129 128 "--build=arm-linux-gnueabi" 130 129 ··· 176 175 } 177 176 178 177 179 - '' + lib.optionalString (hostPlatform != buildPlatform) '' 178 + '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 180 179 sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" 181 180 182 181 cat > config.cache << "EOF" ··· 210 209 } // meta; 211 210 } 212 211 213 - // lib.optionalAttrs (hostPlatform != buildPlatform) { 212 + // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { 214 213 preInstall = null; # clobber the native hook 215 214 216 215 dontStrip = true;
+2 -2
pkgs/development/libraries/gmp/6.x.nix
··· 1 - { stdenv, fetchurl, m4, cxx ? !hostPlatform.useAndroidPrebuilt 2 - , buildPackages, hostPlatform 1 + { stdenv, fetchurl, m4, cxx ? !stdenv.hostPlatform.useAndroidPrebuilt 2 + , buildPackages 3 3 , withStatic ? false }: 4 4 5 5 let inherit (stdenv.lib) optional optionalString; in
+4 -1
pkgs/development/libraries/gpgme/default.nix
··· 7 7 , withPython ? false, swig2 ? null, python ? null 8 8 }: 9 9 10 - let inherit (stdenv) lib system; in 10 + let 11 + inherit (stdenv) lib; 12 + inherit (stdenv.hostPlatform) system; 13 + in 11 14 12 15 stdenv.mkDerivation rec { 13 16 name = "gpgme-${version}";
+1 -1
pkgs/development/libraries/gsl/default.nix
··· 14 14 ]; 15 15 16 16 # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html 17 - doCheck = stdenv.system != "i686-linux" && stdenv.system != "aarch64-linux"; 17 + doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux"; 18 18 19 19 meta = { 20 20 description = "The GNU Scientific Library, a large numerical library";
+2 -2
pkgs/development/libraries/icu/base.nix
··· 1 1 { version, sha256, patches ? [], patchFlags ? "" }: 2 2 { stdenv, fetchurl, fixDarwinDylibNames 3 3 # Cross-compiled icu4c requires a build-root of a native compile 4 - , buildRootOnly ? false, nativeBuildRoot, buildPlatform, hostPlatform 4 + , buildRootOnly ? false, nativeBuildRoot 5 5 }: 6 6 7 7 let ··· 38 38 39 39 configureFlags = [ "--disable-debug" ] 40 40 ++ stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath" 41 - ++ stdenv.lib.optional (buildPlatform != hostPlatform) "--with-cross-build=${nativeBuildRoot}"; 41 + ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--with-cross-build=${nativeBuildRoot}"; 42 42 43 43 enableParallelBuilding = true; 44 44
+31
pkgs/development/libraries/igraph/default.nix
··· 1 + { stdenv, lib, fetchFromGitHub, 2 + pkgconfig, autoreconfHook, 3 + flex, yacc, zlib, libxml2 }: 4 + 5 + stdenv.mkDerivation rec { 6 + name = "igraph"; 7 + version = "0.7.1"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "igraph"; 11 + repo = name; 12 + rev = version; 13 + sha256 = "1wsy0r511gk069il6iqjs27q8cjvqz20gf0a7inybx1bw84845z8"; 14 + }; 15 + 16 + nativeBuildInputs = [ pkgconfig autoreconfHook ]; 17 + buildInputs = [ flex yacc zlib libxml2 ]; 18 + 19 + # This file is normally generated by igraph's bootstrap.sh, but we can do it 20 + # ourselves. ~ C. 21 + postPatch = '' 22 + echo "${version}" > VERSION 23 + ''; 24 + 25 + meta = { 26 + description = "The network analysis package"; 27 + homepage = http://igraph.org/; 28 + license = lib.licenses.gpl2; 29 + maintainers = [ lib.maintainers.MostAwesomeDude ]; 30 + }; 31 + }
+1 -1
pkgs/development/libraries/java/jzmq/default.nix
··· 15 15 buildInputs = [ zeromq3 jdk ]; 16 16 17 17 preConfigure = '' 18 - ${if stdenv.system == "x86_64-darwin" then 18 + ${if stdenv.hostPlatform.system == "x86_64-darwin" then 19 19 '' sed -i -e 's~/Headers~/include~' -e 's~_JNI_INC_SUBDIRS=\".*\"~_JNI_INC_SUBDIRS=\"darwin\"~' configure 20 20 '' else ""} 21 21 '';
+1 -1
pkgs/development/libraries/java/swt/default.nix
··· 16 16 sha256 = "00k1mfbncvyh8klgmk0891w8jwnd5niqb16j1j8yacrm2smmlb05"; }; 17 17 }; 18 18 19 - metadata = assert platformMap ? ${stdenv.system}; platformMap.${stdenv.system}; 19 + metadata = assert platformMap ? ${stdenv.hostPlatform.system}; platformMap.${stdenv.hostPlatform.system}; 20 20 21 21 in stdenv.mkDerivation rec { 22 22 version = "4.5";
+2 -3
pkgs/development/libraries/libav/default.nix
··· 13 13 , SDL # only for avplay in $bin, adds nontrivial closure to it 14 14 , enableGPL ? true # ToDo: some additional default stuff may need GPL 15 15 , enableUnfree ? faacSupport 16 - , hostPlatform 17 16 }: 18 17 19 18 assert faacSupport -> enableUnfree; ··· 53 52 54 53 configurePlatforms = []; 55 54 configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [ 56 - "--arch=${hostPlatform.parsed.cpu.name}" 57 - "--target_os=${hostPlatform.parsed.kernel.name}" 55 + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" 56 + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" 58 57 #"--enable-postproc" # it's now a separate package in upstream 59 58 "--disable-avserver" # upstream says it's in a bad state 60 59 "--enable-avplay"
+2 -2
pkgs/development/libraries/libb2/default.nix
··· 1 - { stdenv, hostPlatform, fetchurl, autoconf, automake, libtool }: 1 + { stdenv, fetchurl, autoconf, automake, libtool }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "libb2-${version}"; ··· 14 14 ./autogen.sh 15 15 ''; 16 16 17 - configureFlags = stdenv.lib.optional hostPlatform.isx86 "--enable-fat=yes"; 17 + configureFlags = stdenv.lib.optional stdenv.hostPlatform.isx86 "--enable-fat=yes"; 18 18 19 19 nativeBuildInputs = [ autoconf automake libtool ]; 20 20
+3 -4
pkgs/development/libraries/libelf/default.nix
··· 1 1 { stdenv 2 2 , fetchurl, autoreconfHook, gettext 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec { ··· 20 19 configureFlags = [] 21 20 # Configure check for dynamic lib support is broken, see 22 21 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html 23 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes" 22 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes" 24 23 # Libelf's custom NLS macros fail to determine the catalog file extension 25 24 # on Darwin, so disable NLS for now. 26 - ++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls"; 25 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls"; 27 26 28 27 nativeBuildInputs = [ gettext ] 29 28 # Need to regenerate configure script with newer version in order to pass 30 29 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper` 31 30 # which doesn't work with the bootstrapTools bash, so can only do this 32 31 # for cross builds when `stdenv.shell` is a newer bash. 33 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook; 32 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook; 34 33 35 34 meta = { 36 35 description = "ELF object file access library";
+5 -5
pkgs/development/libraries/libffi/default.nix
··· 1 1 { stdenv, fetchurl, fetchpatch 2 - , buildPlatform, hostPlatform, autoreconfHook 2 + , autoreconfHook 3 3 4 4 # libffi is used in darwin stdenv 5 5 # we cannot run checks within it ··· 19 19 url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch; 20 20 sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc"; 21 21 }) 22 - ++ stdenv.lib.optional hostPlatform.isMusl (fetchpatch { 22 + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch { 23 23 name = "gnu-linux-define.patch"; 24 24 url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580"; 25 25 sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2"; 26 26 }) 27 - ++ stdenv.lib.optional hostPlatform.isRiscV (fetchpatch { 27 + ++ stdenv.lib.optional stdenv.hostPlatform.isRiscV (fetchpatch { 28 28 name = "riscv-support.patch"; 29 29 url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch; 30 30 sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y"; ··· 44 44 45 45 outputs = [ "out" "dev" "man" "info" ]; 46 46 47 - nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook; 47 + nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isRiscV autoreconfHook; 48 48 49 49 configureFlags = [ 50 50 "--with-gcc-arch=generic" # no detection of -march= or -mtune= ··· 60 60 61 61 inherit doCheck; 62 62 63 - dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling. 63 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling. 64 64 65 65 # Install headers and libs in the right places. 66 66 postFixup = ''
+2 -3
pkgs/development/libraries/libiconv/default.nix
··· 1 1 { fetchurl, stdenv, lib 2 - , buildPlatform, hostPlatform 3 2 , enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt 4 3 , enableShared ? !stdenv.hostPlatform.useAndroidPrebuilt 5 4 }: 6 5 7 - # assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross 6 + # assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross 8 7 9 8 stdenv.mkDerivation rec { 10 9 name = "libiconv-${version}"; ··· 21 20 ]; 22 21 23 22 postPatch = 24 - lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) 23 + lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) 25 24 '' 26 25 sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h 27 26 ''
+1 -2
pkgs/development/libraries/libjpeg-turbo/default.nix
··· 1 1 { stdenv, fetchurl, nasm 2 - , hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation rec { ··· 12 11 }; # github releases still need autotools, surprisingly 13 12 14 13 patches = 15 - stdenv.lib.optional (hostPlatform.libc or null == "msvcrt") 14 + stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") 16 15 ./mingw-boolean.patch; 17 16 18 17 outputs = [ "bin" "dev" "out" "man" "doc" ];
-26
pkgs/development/libraries/libnfsidmap/default.nix
··· 1 - { stdenv, fetchurl }: 2 - 3 - stdenv.mkDerivation rec { 4 - name = "libnfsidmap-0.25"; 5 - 6 - src = fetchurl { 7 - url = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${name}.tar.gz"; 8 - sha256 = "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"; 9 - }; 10 - 11 - postPatch = '' 12 - sed -i '1i#include <sys/types.h>' cfg.h 13 - ''; 14 - 15 - preConfigure = 16 - '' 17 - configureFlags="--with-pluginpath=$out/lib/libnfsidmap" 18 - ''; 19 - 20 - meta = { 21 - homepage = http://www.citi.umich.edu/projects/nfsv4/linux/; 22 - description = "Library for holding mulitiple methods of mapping names to id's and visa versa, mainly for NFSv4"; 23 - license = "BSD"; 24 - platforms = stdenv.lib.platforms.unix; 25 - }; 26 - }
+2 -4
pkgs/development/libraries/libpng/12.nix
··· 1 - { stdenv, fetchurl, zlib 2 - , buildPlatform, hostPlatform 3 - }: 1 + { stdenv, fetchurl, zlib }: 4 2 5 - assert hostPlatform == buildPlatform -> zlib != null; 3 + assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null; 6 4 7 5 stdenv.mkDerivation rec { 8 6 name = "libpng-1.2.57";
+6 -6
pkgs/development/libraries/libspotify/default.nix
··· 2 2 3 3 let 4 4 version = "12.1.51"; 5 - isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"); 5 + isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux"); 6 6 in 7 7 8 - if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux") 8 + if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux") 9 9 then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here" 10 10 else stdenv.mkDerivation { 11 11 name = "libspotify-${version}"; 12 12 13 13 src = 14 - if stdenv.system == "x86_64-linux" then 14 + if stdenv.hostPlatform.system == "x86_64-linux" then 15 15 fetchurl { 16 16 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz"; 17 17 sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3"; 18 18 } 19 - else if stdenv.system == "x86_64-darwin" then 19 + else if stdenv.hostPlatform.system == "x86_64-darwin" then 20 20 fetchurl { 21 21 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip"; 22 22 sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0"; 23 23 } 24 - else if stdenv.system == "i686-linux" then 24 + else if stdenv.hostPlatform.system == "i686-linux" then 25 25 fetchurl { 26 26 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz"; 27 27 sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll"; ··· 46 46 47 47 48 48 # darwin-specific 49 - buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip; 49 + buildInputs = stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip; 50 50 51 51 # linux-specific 52 52 installFlags = stdenv.lib.optionalString (isLinux)
+2 -4
pkgs/development/libraries/libssh2/default.nix
··· 1 - { stdenv, fetchurlBoot, openssl, zlib, windows 2 - , hostPlatform 3 - }: 1 + { stdenv, fetchurlBoot, openssl, zlib, windows }: 4 2 5 3 stdenv.mkDerivation rec { 6 4 name = "libssh2-1.8.0"; ··· 13 11 outputs = [ "out" "dev" "devdoc" ]; 14 12 15 13 buildInputs = [ openssl zlib ] 16 - ++ stdenv.lib.optional hostPlatform.isMinGW windows.mingw_w64; 14 + ++ stdenv.lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64; 17 15 18 16 meta = { 19 17 description = "A client-side C library implementing the SSH2 protocol";
+9 -10
pkgs/development/libraries/libvpx/default.nix
··· 1 1 { stdenv, fetchFromGitHub, perl, yasm 2 - , hostPlatform 3 2 , vp8DecoderSupport ? true # VP8 decoder 4 3 , vp8EncoderSupport ? true # VP8 encoder 5 4 , vp9DecoderSupport ? true # VP9 decoder ··· 141 140 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 142 141 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 143 142 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 144 - "--force-target=${hostPlatform.config}${ 145 - if hostPlatform.isDarwin then 146 - if hostPlatform.osxMinVersion == "10.10" then "14" 147 - else if hostPlatform.osxMinVersion == "10.9" then "13" 148 - else if hostPlatform.osxMinVersion == "10.8" then "12" 149 - else if hostPlatform.osxMinVersion == "10.7" then "11" 150 - else if hostPlatform.osxMinVersion == "10.6" then "10" 151 - else if hostPlatform.osxMinVersion == "10.5" then "9" 143 + "--force-target=${stdenv.hostPlatform.config}${ 144 + if stdenv.hostPlatform.isDarwin then 145 + if stdenv.hostPlatform.osxMinVersion == "10.10" then "14" 146 + else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13" 147 + else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12" 148 + else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11" 149 + else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10" 150 + else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9" 152 151 else "8" 153 152 else ""}-gcc" 154 - (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 153 + (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 155 154 ] # Experimental features 156 155 ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" 157 156 ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+9 -10
pkgs/development/libraries/libvpx/git.nix
··· 1 1 { stdenv, fetchgit, perl, yasm 2 - , hostPlatform 3 2 , vp8DecoderSupport ? true # VP8 decoder 4 3 , vp8EncoderSupport ? true # VP8 encoder 5 4 , vp9DecoderSupport ? true # VP9 decoder ··· 148 147 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 149 148 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 150 149 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 151 - "--force-target=${hostPlatform.config}${ 152 - if hostPlatform.isDarwin then 153 - if hostPlatform.osxMinVersion == "10.10" then "14" 154 - else if hostPlatform.osxMinVersion == "10.9" then "13" 155 - else if hostPlatform.osxMinVersion == "10.8" then "12" 156 - else if hostPlatform.osxMinVersion == "10.7" then "11" 157 - else if hostPlatform.osxMinVersion == "10.6" then "10" 158 - else if hostPlatform.osxMinVersion == "10.5" then "9" 150 + "--force-target=${stdenv.hostPlatform.config}${ 151 + if stdenv.hostPlatform.isDarwin then 152 + if stdenv.hostPlatform.osxMinVersion == "10.10" then "14" 153 + else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13" 154 + else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12" 155 + else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11" 156 + else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10" 157 + else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9" 159 158 else "8" 160 159 else ""}-gcc" 161 - (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 160 + (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 162 161 ] # Experimental features 163 162 ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" 164 163 ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+3 -4
pkgs/development/libraries/libxml2/default.nix
··· 1 1 { stdenv, lib, fetchurl, fetchpatch 2 2 , zlib, xz, python2, findXMLCatalogs 3 - , buildPlatform, hostPlatform 4 - , pythonSupport ? buildPlatform == hostPlatform 3 + , pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform 5 4 , icuSupport ? false, icu ? null 6 - , enableShared ? hostPlatform.libc != "msvcrt" 5 + , enableShared ? stdenv.hostPlatform.libc != "msvcrt" 7 6 , enableStatic ? !enableShared, 8 7 }: 9 8 ··· 56 55 enableParallelBuilding = true; 57 56 58 57 doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin && 59 - hostPlatform.libc != "musl"; 58 + stdenv.hostPlatform.libc != "musl"; 60 59 61 60 preInstall = lib.optionalString pythonSupport 62 61 ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
+2 -3
pkgs/development/libraries/libxslt/default.nix
··· 1 1 { stdenv, fetchurl, libxml2, findXMLCatalogs, python2 2 - , buildPlatform, hostPlatform 3 2 , cryptoSupport ? false 4 - , pythonSupport ? buildPlatform == hostPlatform 3 + , pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform 5 4 }: 6 5 7 6 assert pythonSupport -> python2 != null; ··· 22 21 patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch; 23 22 24 23 # fixes: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified 25 - postPatch = optionalString hostPlatform.isCygwin '' 24 + postPatch = optionalString stdenv.hostPlatform.isCygwin '' 26 25 substituteInPlace tests/plugins/Makefile.in \ 27 26 --replace 'la_LDFLAGS =' 'la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS)' 28 27 '';
+1 -1
pkgs/development/libraries/live555/default.nix
··· 28 28 i686-linux = "linux"; 29 29 x86_64-linux = "linux-64bit"; 30 30 aarch64-linux = "linux-64bit"; 31 - }.${stdenv.system}} 31 + }.${stdenv.hostPlatform.system}} 32 32 ''; 33 33 34 34 installPhase = ''
+1 -1
pkgs/development/libraries/mesa/default.nix
··· 23 23 24 24 with stdenv.lib; 25 25 26 - if ! lists.elem stdenv.system platforms.mesaPlatforms then 26 + if ! lists.elem stdenv.hostPlatform.system platforms.mesaPlatforms then 27 27 throw "unsupported platform for Mesa" 28 28 else 29 29
+1 -2
pkgs/development/libraries/microsoft_gsl/default.nix
··· 1 1 { stdenv, fetchgit, cmake 2 - , hostPlatform, buildPlatform 3 2 }: 4 3 5 4 let 6 - nativeBuild = hostPlatform == buildPlatform; 5 + nativeBuild = stdenv.hostPlatform == stdenv.buildPlatform; 7 6 in 8 7 stdenv.mkDerivation rec { 9 8 name = "microsoft_gsl-${version}";
+3 -5
pkgs/development/libraries/mpfr/default.nix
··· 1 - { stdenv, fetchurl, gmp 2 - , hostPlatform 3 - }: 1 + { stdenv, fetchurl, gmp }: 4 2 5 3 stdenv.mkDerivation rec { 6 4 version = "4.0.1"; ··· 17 15 propagatedBuildInputs = [ gmp ]; 18 16 19 17 configureFlags = 20 - stdenv.lib.optional hostPlatform.isSunOS "--disable-thread-safe" ++ 21 - stdenv.lib.optional hostPlatform.is64bit "--with-pic"; 18 + stdenv.lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++ 19 + stdenv.lib.optional stdenv.hostPlatform.is64bit "--with-pic"; 22 20 23 21 doCheck = true; # not cross; 24 22
+1 -2
pkgs/development/libraries/msgpack/generic.nix
··· 1 1 { stdenv, cmake 2 2 , version, src, patches ? [ ] 3 - , hostPlatform 4 3 , ... 5 4 }: 6 5 ··· 16 15 cmakeFlags = [] 17 16 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 18 17 "-DMSGPACK_BUILD_EXAMPLES=OFF" 19 - ++ stdenv.lib.optional (hostPlatform.libc == "msvcrt") 18 + ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "msvcrt") 20 19 "-DCMAKE_SYSTEM_NAME=Windows" 21 20 ; 22 21
+3 -4
pkgs/development/libraries/ncurses/default.nix
··· 8 8 9 9 , gpm 10 10 11 - , buildPlatform, hostPlatform 12 11 , buildPackages 13 12 }: 14 13 ··· 36 35 ] ++ lib.optional unicode "--enable-widec" 37 36 ++ lib.optional (!withCxx) "--without-cxx" 38 37 ++ lib.optional (abiVersion == "5") "--with-abi-version=5" 39 - ++ lib.optionals hostPlatform.isWindows [ 38 + ++ lib.optionals stdenv.hostPlatform.isWindows [ 40 39 "--enable-sp-funcs" 41 40 "--enable-term-driver" 42 41 ]; ··· 47 46 depsBuildBuild = [ buildPackages.stdenv.cc ]; 48 47 nativeBuildInputs = [ 49 48 pkgconfig 50 - ] ++ lib.optionals (buildPlatform != hostPlatform) [ 49 + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 51 50 buildPackages.ncurses 52 51 ]; 53 52 buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; ··· 137 136 moveToOutput "bin/infotocap" "$out" 138 137 ''; 139 138 140 - preFixup = lib.optionalString (!hostPlatform.isCygwin && !enableStatic) '' 139 + preFixup = lib.optionalString (!stdenv.hostPlatform.isCygwin && !enableStatic) '' 141 140 rm "$out"/lib/*.a 142 141 ''; 143 142
+2 -2
pkgs/development/libraries/nettle/generic.nix
··· 16 16 nativeBuildInputs = [ gnum4 ]; 17 17 propagatedBuildInputs = [ gmp ]; 18 18 19 - doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin); 19 + doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin); 20 20 21 21 enableParallelBuilding = true; 22 22 23 - patches = stdenv.lib.optional (stdenv.system == "i686-cygwin") 23 + patches = stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") 24 24 ./cygwin.patch; 25 25 26 26 meta = with stdenv.lib; {
+1 -2
pkgs/development/libraries/nlohmann_json/default.nix
··· 1 1 { stdenv, fetchFromGitHub, cmake 2 - , hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation rec { ··· 19 18 20 19 cmakeFlags = [ 21 20 "-DBuildTests=${if doCheck then "ON" else "OFF"}" 22 - ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ 21 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ 23 22 "-DCMAKE_SYSTEM_NAME=Windows" 24 23 ]; 25 24
+24 -7
pkgs/development/libraries/opencolorio/default.nix
··· 1 - { stdenv, lib, fetchurl, cmake, unzip, boost }: 1 + { stdenv, lib, fetchFromGitHub, cmake, boost, pkgconfig, lcms2, tinyxml, git }: 2 + 3 + with lib; 2 4 3 5 stdenv.mkDerivation rec { 4 6 name = "opencolorio-${version}"; 5 7 version = "1.1.0"; 6 8 7 - src = fetchurl { 8 - url = "https://github.com/imageworks/OpenColorIO/archive/v1.0.9.zip"; 9 - sha256 = "1vi5pcgj7gv8fp6cdnhszwfh7lh38rl2rk4c5yzsvmgcb7xf48bx"; 9 + src = fetchFromGitHub { 10 + owner = "imageworks"; 11 + repo = "OpenColorIO"; 12 + rev = "v${version}"; 13 + sha256 = "0cjsyn681xsg89lirlll5pqlsqg2vnk1278iiicmzjy2a2v8x7zq"; 10 14 }; 11 15 12 16 outputs = [ "bin" "out" "dev" ]; 13 17 14 - buildInputs = [ cmake unzip ] ++ lib.optional stdenv.isDarwin boost; 18 + # TODO: Investigate whether git can be dropped: It's only used to apply patches 19 + nativeBuildInputs = [ cmake pkgconfig git ]; 20 + 21 + buildInputs = [ lcms2 tinyxml ] ++ optional stdenv.isDarwin boost; 15 22 16 - cmakeFlags = lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"; 23 + postPatch = '' 24 + substituteInPlace src/core/CMakeLists.txt --replace "-Werror" "" 25 + substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" "" 26 + ''; 27 + 28 + cmakeFlags = [ 29 + "-DUSE_EXTERNAL_LCMS=ON" 30 + "-DUSE_EXTERNAL_TINYXML=ON" 31 + # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517 32 + "-DUSE_EXTERNAL_YAML=OFF" 33 + ] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON" 34 + ++ optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF"; 17 35 18 36 postInstall = '' 19 - rm $out/lib/*.a 20 37 mkdir -p $bin/bin; mv $out/bin $bin/ 21 38 ''; 22 39
+3 -3
pkgs/development/libraries/opencv/3.x.nix
··· 63 63 sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8"; 64 64 } + "/ippicv"; 65 65 files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in 66 - if stdenv.system == "x86_64-linux" then 66 + if stdenv.hostPlatform.system == "x86_64-linux" then 67 67 { ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; } 68 - else if stdenv.system == "i686-linux" then 68 + else if stdenv.hostPlatform.system == "i686-linux" then 69 69 { ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; } 70 - else if stdenv.system == "x86_64-darwin" then 70 + else if stdenv.hostPlatform.system == "x86_64-darwin" then 71 71 { ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; } 72 72 else 73 73 throw "ICV is not available for this platform (or not yet supported by this package)";
+14 -15
pkgs/development/libraries/openssl/default.nix
··· 1 1 { stdenv, fetchurl, buildPackages, perl 2 - , buildPlatform, hostPlatform 3 2 , withCryptodev ? false, cryptodevHeaders 4 3 , enableSSL2 ? false 5 4 , static ? false ··· 20 19 (args.patches or []) 21 20 ++ [ ./nix-ssl-cert-file.patch ] 22 21 ++ optional (versionOlder version "1.1.0") 23 - (if hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) 24 - ++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin) 22 + (if stdenv.hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) 23 + ++ optional (versionOlder version "1.0.2" && stdenv.hostPlatform.isDarwin) 25 24 ./darwin-arch.patch; 26 25 27 26 postPatch = '' ··· 40 39 41 40 outputs = [ "bin" "dev" "out" "man" ]; 42 41 setOutputFlags = false; 43 - separateDebugInfo = hostPlatform.isLinux; 42 + separateDebugInfo = stdenv.hostPlatform.isLinux; 44 43 45 44 nativeBuildInputs = [ perl ]; 46 45 buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; ··· 50 49 configureScript = { 51 50 "x86_64-darwin" = "./Configure darwin64-x86_64-cc"; 52 51 "x86_64-solaris" = "./Configure solaris64-x86_64-gcc"; 53 - }.${hostPlatform.system} or ( 54 - if hostPlatform == buildPlatform 52 + }.${stdenv.hostPlatform.system} or ( 53 + if stdenv.hostPlatform == stdenv.buildPlatform 55 54 then "./config" 56 - else if hostPlatform.isMinGW 55 + else if stdenv.hostPlatform.isMinGW 57 56 then "./Configure mingw${optionalString 58 - (hostPlatform.parsed.cpu.bits != 32) 59 - (toString hostPlatform.parsed.cpu.bits)}" 60 - else if hostPlatform.isLinux 61 - then "./Configure linux-generic${toString hostPlatform.parsed.cpu.bits}" 62 - else if hostPlatform.isiOS 63 - then "./Configure ios${toString hostPlatform.parsed.cpu.bits}-cross" 57 + (stdenv.hostPlatform.parsed.cpu.bits != 32) 58 + (toString stdenv.hostPlatform.parsed.cpu.bits)}" 59 + else if stdenv.hostPlatform.isLinux 60 + then "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}" 61 + else if stdenv.hostPlatform.isiOS 62 + then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross" 64 63 else 65 - throw "Not sure what configuration to use for ${hostPlatform.config}" 64 + throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}" 66 65 ); 67 66 68 67 configureFlags = [ ··· 73 72 "-DHAVE_CRYPTODEV" 74 73 "-DUSE_CRYPTODEV_DIGESTS" 75 74 ] ++ stdenv.lib.optional enableSSL2 "enable-ssl2" 76 - ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && hostPlatform.isAarch64) "no-afalgeng"; 75 + ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng"; 77 76 78 77 makeFlags = [ "MANDIR=$(man)/share/man" ]; 79 78
+3 -3
pkgs/development/libraries/oracle-instantclient/default.nix
··· 14 14 sha256 = hash; 15 15 }); 16 16 17 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 17 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 18 18 19 19 arch = { 20 20 "x86_64-linux" = "linux.x64"; 21 21 "x86_64-darwin" = "macos.x64"; 22 - }."${stdenv.system}" or throwSystem; 22 + }."${stdenv.hostPlatform.system}" or throwSystem; 23 23 24 24 srcs = { 25 25 "x86_64-linux" = [ ··· 32 32 (requireSource "sdk" arch version "2" "e0befca9c4e71ebc9f444957ffa70f01aeeec5976ea27c40406471b04c34848b") 33 33 (requireSource "sqlplus" arch version "2" "d147cbb5b2a954fdcb4b642df4f0bd1153fd56e0f56e7fa301601b4f7e2abe0e") ] 34 34 ++ optional odbcSupport (requireSource "odbc" arch version "2" "1805c1ab6c8c5e8df7bdcc35d7f2b94c329ecf4dff9bde55d5f9b159ecd8b64e"); 35 - }."${stdenv.system}" or throwSystem; 35 + }."${stdenv.hostPlatform.system}" or throwSystem; 36 36 37 37 extLib = stdenv.hostPlatform.extensions.sharedLibrary; 38 38 in stdenv.mkDerivation rec {
+3 -4
pkgs/development/libraries/pcre/default.nix
··· 1 1 { stdenv, fetchurl 2 2 , pcre, windows ? null 3 - , buildPlatform, hostPlatform 4 3 , variant ? null 5 4 }: 6 5 ··· 24 23 25 24 outputs = [ "bin" "dev" "out" "doc" "man" ]; 26 25 27 - configureFlags = optional (!hostPlatform.isRiscV) "--enable-jit" ++ [ 26 + configureFlags = optional (!stdenv.hostPlatform.isRiscV) "--enable-jit" ++ [ 28 27 "--enable-unicode-properties" 29 28 "--disable-cpp" 30 29 ] 31 30 ++ optional (variant != null) "--enable-${variant}"; 32 31 33 - buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; 32 + buildInputs = optional (stdenv.hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; 34 33 35 34 # https://bugs.exim.org/show_bug.cgi?id=2173 36 35 patches = [ ./stacksize-detection.patch ]; ··· 39 38 patchShebangs RunGrepTest 40 39 ''; 41 40 42 - doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform; 41 + doCheck = !(with stdenv.hostPlatform; isCygwin || isFreeBSD) && stdenv.hostPlatform == stdenv.buildPlatform; 43 42 # XXX: test failure on Cygwin 44 43 # we are running out of stack on both freeBSDs on Hydra 45 44
+1 -1
pkgs/development/libraries/physics/geant4/fetch.nix
··· 1 1 { stdenv, fetchurl }: 2 2 3 3 let 4 - fetch = { version, src ? builtins.getAttr stdenv.system sources, sources ? null }: 4 + fetch = { version, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null }: 5 5 { 6 6 inherit version src; 7 7 };
+1 -2
pkgs/development/libraries/readline/6.2.nix
··· 1 1 { fetchurl, stdenv, ncurses 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation (rec { ··· 59 58 // 60 59 61 60 # Don't run the native `strip' when cross-compiling. 62 - (if hostPlatform != buildPlatform 61 + (if stdenv.hostPlatform != stdenv.buildPlatform 63 62 then { dontStrip = true; } 64 63 else { }))
+2 -4
pkgs/development/libraries/readline/6.3.nix
··· 1 - { fetchurl, stdenv, ncurses 2 - , buildPlatform, hostPlatform 3 - }: 1 + { fetchurl, stdenv, ncurses }: 4 2 5 3 stdenv.mkDerivation rec { 6 4 name = "readline-6.3p08"; ··· 37 35 import ./readline-6.3-patches.nix patch); 38 36 39 37 # Don't run the native `strip' when cross-compiling. 40 - dontStrip = hostPlatform != buildPlatform; 38 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; 41 39 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 42 40 43 41 meta = with stdenv.lib; {
+1 -2
pkgs/development/libraries/readline/7.0.nix
··· 1 1 { fetchurl, stdenv, ncurses 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation rec { ··· 34 33 ++ upstreamPatches; 35 34 36 35 # Don't run the native `strip' when cross-compiling. 37 - dontStrip = hostPlatform != buildPlatform; 36 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; 38 37 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 39 38 40 39 meta = with stdenv.lib; {
+3 -3
pkgs/development/libraries/science/math/openblas/default.nix
··· 67 67 68 68 let 69 69 config = 70 - configs.${stdenv.system} 71 - or (throw "unsupported system: ${stdenv.system}"); 70 + configs.${stdenv.hostPlatform.system} 71 + or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 72 72 in 73 73 74 74 let 75 75 blas64 = 76 76 if blas64_ != null 77 77 then blas64_ 78 - else hasPrefix "x86_64" stdenv.system; 78 + else hasPrefix "x86_64" stdenv.hostPlatform.system; 79 79 in 80 80 stdenv.mkDerivation rec { 81 81 name = "openblas-${version}";
+2 -2
pkgs/development/libraries/scmccid/default.nix
··· 5 5 stdenv.mkDerivation rec { 6 6 name = "scmccid-5.0.11"; 7 7 8 - src = if stdenv.system == "i686-linux" then (fetchurl { 8 + src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { 9 9 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz"; 10 10 sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm"; 11 11 }) 12 - else if stdenv.system == "x86_64-linux" then (fetchurl { 12 + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { 13 13 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz"; 14 14 sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i"; 15 15 })
+1 -1
pkgs/development/libraries/skalibs/default.nix
··· 33 33 # Explicitly setting target ensures code can be compiled against a skalibs 34 34 # binary built on a different version of darwin. 35 35 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph 36 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 36 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 37 37 38 38 postInstall = '' 39 39 mkdir -p $doc/share/doc/skalibs
+9 -9
pkgs/development/libraries/tachyon/default.nix
··· 34 34 export USEPNG=" -DUSEPNG" 35 35 export PNGLIB=" -lpng -lz" 36 36 ''; 37 - arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else 38 - if stdenv.system == "i686-linux" then "linux-thr" else 39 - if stdenv.system == "aarch64-linux" then "linux-arm-thr" else 40 - if stdenv.system == "armv7l-linux" then "linux-arm-thr" else 41 - if stdenv.system == "x86_64-darwin" then "macosx-thr" else 42 - if stdenv.system == "i686-darwin" then "macosx-64-thr" else 43 - if stdenv.system == "i686-cygwin" then "win32" else 44 - if stdenv.system == "x86_64-freebsd" then "bsd" else 45 - if stdenv.system == "x686-freebsd" then "bsd" else 37 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else 38 + if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else 39 + if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else 40 + if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else 41 + if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else 42 + if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else 43 + if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else 44 + if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else 45 + if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else 46 46 throw "Don't know what arch to select for tachyon build"; 47 47 makeFlags = "${arch}"; 48 48 patches = [
+1 -1
pkgs/development/libraries/v8/3.14.nix
··· 65 65 66 66 installPhase = '' 67 67 install -vD out/Release/d8 "$out/bin/d8" 68 - ${if stdenv.system == "x86_64-darwin" then '' 68 + ${if stdenv.hostPlatform.system == "x86_64-darwin" then '' 69 69 install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib" 70 70 '' else '' 71 71 install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
+1 -1
pkgs/development/libraries/vigra/default.nix
··· 21 21 preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\""; 22 22 23 23 cmakeFlags = [ "-DWITH_OPENEXR=1" ] 24 - ++ stdenv.lib.optionals (stdenv.system == "x86_64-linux") 24 + ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") 25 25 [ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ]; 26 26 27 27 enableParallelBuilding = true;
+1 -1
pkgs/development/libraries/vxl/default.nix
··· 15 15 # in stdenv linux headers 16 16 # BUILD_BRL fails to find open() 17 17 cmakeFlags = "-DBUILD_TESTING=OFF -DBUILD_OUL=OFF -DBUILD_BRL=OFF -DBUILD_CONTRIB=OFF " 18 - + (if stdenv.system == "x86_64-linux" then 18 + + (if stdenv.hostPlatform.system == "x86_64-linux" then 19 19 "-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC" 20 20 else 21 21 "");
+1 -1
pkgs/development/libraries/wtk/default.nix
··· 1 1 { stdenv, requireFile, unzip, xorg }: 2 2 3 - assert stdenv.system == "i686-linux"; 3 + assert stdenv.hostPlatform.system == "i686-linux"; 4 4 5 5 stdenv.mkDerivation rec { 6 6 name = "sun-java-wtk-2.5.2_01";
+8 -9
pkgs/development/libraries/zlib/default.nix
··· 1 1 { stdenv 2 2 , fetchurl 3 - , buildPlatform, hostPlatform 4 3 , static ? false 5 4 }: 6 5 ··· 16 15 sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"; 17 16 }; 18 17 19 - patches = stdenv.lib.optional hostPlatform.isCygwin ./disable-cygwin-widechar.patch; 18 + patches = stdenv.lib.optional stdenv.hostPlatform.isCygwin ./disable-cygwin-widechar.patch; 20 19 21 - postPatch = stdenv.lib.optionalString hostPlatform.isDarwin '' 20 + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' 22 21 substituteInPlace configure \ 23 22 --replace '/usr/bin/libtool' 'ar' \ 24 23 --replace 'AR="libtool"' 'AR="ar"' \ ··· 37 36 # jww (2015-01-06): Sometimes this library install as a .so, even on 38 37 # Darwin; others time it installs as a .dylib. I haven't yet figured out 39 38 # what causes this difference. 40 - + stdenv.lib.optionalString hostPlatform.isDarwin '' 39 + + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' 41 40 for file in $out/lib/*.so* $out/lib/*.dylib* ; do 42 41 install_name_tool -id "$file" $file 43 42 done 44 43 '' 45 44 # Non-typical naming confuses libtool which then refuses to use zlib's DLL 46 45 # in some cases, e.g. when compiling libpng. 47 - + stdenv.lib.optionalString (hostPlatform.libc == "msvcrt") '' 46 + + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") '' 48 47 ln -s zlib1.dll $out/bin/libz.dll 49 48 ''; 50 49 51 50 # As zlib takes part in the stdenv building, we don't want references 52 51 # to the bootstrap-tools libgcc (as uses to happen on arm/mips) 53 - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!hostPlatform.isDarwin) "-static-libgcc"; 52 + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc"; 54 53 55 - dontStrip = hostPlatform != buildPlatform && static; 54 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static; 56 55 configurePlatforms = []; 57 56 58 - installFlags = stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ 57 + installFlags = stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ 59 58 "BINARY_PATH=$(out)/bin" 60 59 "INCLUDE_PATH=$(dev)/include" 61 60 "LIBRARY_PATH=$(out)/lib" ··· 63 62 64 63 makeFlags = [ 65 64 "PREFIX=${stdenv.cc.targetPrefix}" 66 - ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ 65 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ 67 66 "-f" "win32/Makefile.gcc" 68 67 ] ++ stdenv.lib.optionals (!static) [ 69 68 "SHARED_MODE=1"
+2 -2
pkgs/development/misc/amdapp-sdk/default.nix
··· 5 5 6 6 let 7 7 8 - bits = if stdenv.system == "x86_64-linux" then "64" 8 + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "64" 9 9 else "32"; 10 10 11 - arch = if stdenv.system == "x86_64-linux" then "x86_64" 11 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" 12 12 else "x86"; 13 13 14 14 src_info = {
+14 -14
pkgs/development/mobile/androidenv/androidndk-pkgs.nix
··· 1 - { lib, hostPlatform, targetPlatform 1 + { lib 2 2 , makeWrapper 3 3 , runCommand, wrapBintoolsWith, wrapCCWith 4 4 , buildAndroidndk, androidndk, targetAndroidndkPkgs ··· 33 33 }.${config} or 34 34 (throw "Android NDK doesn't support ${config}, as far as we know"); 35 35 36 - hostInfo = ndkInfoFun hostPlatform; 37 - targetInfo = ndkInfoFun targetPlatform; 36 + hostInfo = ndkInfoFun stdenv.hostPlatform; 37 + targetInfo = ndkInfoFun stdenv.targetPlatform; 38 38 39 39 in 40 40 ··· 51 51 mkdir -p $out/bin 52 52 for prog in ${ndkBinDir}/${targetInfo.triple}-*; do 53 53 prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//') 54 - ln -s $prog $out/bin/${targetPlatform.config}-$prog_suffix 54 + ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix 55 55 done 56 56 ''; 57 57 ··· 68 68 bintools = binutils; 69 69 libc = targetAndroidndkPkgs.libraries; 70 70 extraBuildCommands = '' 71 - echo "-D__ANDROID_API__=${targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags 71 + echo "-D__ANDROID_API__=${stdenv.targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags 72 72 '' 73 - + lib.optionalString targetPlatform.isAarch32 (let 74 - p = targetPlatform.platform.gcc or {} 75 - // targetPlatform.parsed.abi; 73 + + lib.optionalString stdenv.targetPlatform.isAarch32 (let 74 + p = stdenv.targetPlatform.platform.gcc or {} 75 + // stdenv.targetPlatform.parsed.abi; 76 76 flags = lib.concatLists [ 77 77 (lib.optional (p ? arch) "-march=${p.arch}") 78 78 (lib.optional (p ? cpu) "-mcpu=${p.cpu}") ··· 84 84 ]; 85 85 in '' 86 86 sed -E -i \ 87 - $out/bin/${targetPlatform.config}-cc \ 88 - $out/bin/${targetPlatform.config}-c++ \ 89 - $out/bin/${targetPlatform.config}-gcc \ 90 - $out/bin/${targetPlatform.config}-g++ \ 87 + $out/bin/${stdenv.targetPlatform.config}-cc \ 88 + $out/bin/${stdenv.targetPlatform.config}-c++ \ 89 + $out/bin/${stdenv.targetPlatform.config}-gcc \ 90 + $out/bin/${stdenv.targetPlatform.config}-g++ \ 91 91 -e '130i extraBefore+=(-Wl,--fix-cortex-a8)' \ 92 92 -e 's|^(extraBefore=)\(\)$|\1(${builtins.toString flags})|' 93 93 '') ··· 107 107 libraries = 108 108 let 109 109 includePath = if buildAndroidndk.version == "10e" then 110 - "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/" 110 + "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/" 111 111 else 112 112 "${buildAndroidndk}/libexec/${buildAndroidndk.name}/sysroot/usr/include"; 113 - libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/"; 113 + libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/"; 114 114 in 115 115 runCommand "bionic-prebuilt" {} '' 116 116 mkdir -p $out
+2 -2
pkgs/development/mobile/androidenv/androidndk.nix
··· 10 10 name = "android-ndk-r${version}"; 11 11 inherit version; 12 12 13 - src = if stdenv.system == "x86_64-linux" then fetchurl { 13 + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 14 14 url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip"; 15 15 inherit sha256; 16 - } else throw "platform ${stdenv.system} not supported!"; 16 + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; 17 17 18 18 phases = "buildPhase"; 19 19
+3 -3
pkgs/development/mobile/androidenv/androidndk_r8e.nix
··· 9 9 stdenv.mkDerivation rec { 10 10 name = "android-ndk-r8e"; 11 11 12 - src = if stdenv.system == "i686-linux" 12 + src = if stdenv.hostPlatform.system == "i686-linux" 13 13 then fetchurl { 14 14 url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2"; 15 15 sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98"; 16 16 } 17 - else if stdenv.system == "x86_64-linux" then fetchurl { 17 + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 18 18 url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2"; 19 19 sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7"; 20 20 } 21 - else throw "platform ${stdenv.system} not supported!"; 21 + else throw "platform ${stdenv.hostPlatform.system} not supported!"; 22 22 23 23 phases = "buildPhase"; 24 24
+9 -9
pkgs/development/mobile/androidenv/androidsdk.nix
··· 22 22 name = "android-sdk-${version}"; 23 23 version = "25.2.5"; 24 24 25 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 25 + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 26 26 then fetchurl { 27 27 url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip"; 28 28 sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap"; 29 29 } 30 - else if stdenv.system == "x86_64-darwin" then fetchurl { 30 + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 31 31 url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip"; 32 32 sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb"; 33 33 } 34 - else throw "platform not ${stdenv.system} supported!"; 34 + else throw "platform not ${stdenv.hostPlatform.system} supported!"; 35 35 36 36 buildCommand = '' 37 37 mkdir -p $out/libexec ··· 44 44 sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f" 45 45 done 46 46 47 - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 47 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 48 48 '' 49 49 # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++ 50 50 ··· 54 54 patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i 55 55 done 56 56 57 - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' 57 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' 58 58 for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs} 59 59 do 60 60 patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i ··· 62 62 done 63 63 ''} 64 64 65 - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' 65 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' 66 66 # We must also patch the 64-bit emulator instances, if needed 67 67 68 68 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-* ··· 89 89 90 90 # The emulators need additional libraries, which are dynamically loaded => let's wrap them 91 91 92 - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' 92 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' 93 93 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service 94 94 do 95 95 wrapProgram `pwd`/$i \ ··· 102 102 103 103 patchShebangs . 104 104 105 - ${if stdenv.system == "i686-linux" then 105 + ${if stdenv.hostPlatform.system == "i686-linux" then 106 106 '' 107 107 # The monitor requires some more patching 108 108 ··· 115 115 116 116 cd ../.. 117 117 '' 118 - else if stdenv.system == "x86_64-linux" then 118 + else if stdenv.hostPlatform.system == "x86_64-linux" then 119 119 '' 120 120 # The monitor requires some more patching 121 121
+4 -4
pkgs/development/mobile/androidenv/build-tools.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 version = "26.0.2"; 5 5 name = "android-build-tools-r${version}"; 6 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 6 + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 7 7 then fetchurl { 8 8 url = "https://dl.google.com/android/repository/build-tools_r${version}-linux.zip"; 9 9 sha256 = "1kii880bwhjkc343zwx1ysxyisxhczrwhphnxbwsgi45mjgq8lm7"; 10 10 } 11 - else if stdenv.system == "x86_64-darwin" then fetchurl { 11 + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 12 12 url = "https://dl.google.com/android/repository/build-tools_r${version}-macosx.zip"; 13 13 sha256 = "1x0ycprl6hgsm23kck5ind7x00hzydc5k3h3ch4a13407xbpvzvx"; 14 14 } 15 - else throw "System ${stdenv.system} not supported!"; 15 + else throw "System ${stdenv.hostPlatform.system} not supported!"; 16 16 17 17 buildCommand = '' 18 18 mkdir -p $out/build-tools ··· 20 20 unzip $src 21 21 mv android-* ${version} 22 22 23 - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 23 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 24 24 '' 25 25 cd ${version} 26 26
+3 -3
pkgs/development/mobile/androidenv/default.nix
··· 25 25 inherit (pkgs) stdenv fetchurl unzip; 26 26 }; 27 27 28 - platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux") 28 + platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux") 29 29 then import ./platforms-linux.nix { 30 30 inherit (pkgs) stdenv fetchurl unzip; 31 31 } 32 - else if pkgs.stdenv.system == "x86_64-darwin" 32 + else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" 33 33 then import ./platforms-macosx.nix { 34 34 inherit (pkgs) stdenv fetchurl unzip; 35 35 } 36 - else throw "Platform: ${pkgs.stdenv.system} not supported!"; 36 + else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!"; 37 37 38 38 sysimages = import ./sysimages.nix { 39 39 inherit (pkgs) stdenv fetchurl unzip;
+4 -4
pkgs/development/mobile/androidenv/platform-tools.nix
··· 8 8 stdenv.mkDerivation rec { 9 9 version = "26.0.2"; 10 10 name = "android-platform-tools-r${version}"; 11 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 11 + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 12 12 then fetchurl { 13 13 url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip"; 14 14 sha256 = "0695npvxljbbh8xwfm65k34fcpyfkzvfkssgnp46wkmnq8w5mcb3"; 15 15 } 16 - else if stdenv.system == "x86_64-darwin" then fetchurl { 16 + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 17 17 url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip"; 18 18 sha256 = "0gy7apw9pmnnm41z6ywglw5va4ghmny4j57778may4q7ar751l56"; 19 19 } 20 - else throw "System ${stdenv.system} not supported!"; 20 + else throw "System ${stdenv.hostPlatform.system} not supported!"; 21 21 22 22 buildCommand = '' 23 23 mkdir -p $out ··· 25 25 unzip $src 26 26 cd platform-tools 27 27 28 - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") 28 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 29 29 '' 30 30 for i in adb dmtracedump fastboot hprof-conv sqlite3 31 31 do
+1 -1
pkgs/development/mobile/titaniumenv/build-app.nix
··· 26 26 name = stdenv.lib.replaceChars [" "] [""] name; 27 27 inherit src; 28 28 29 - buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper; 29 + buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") xcodewrapper; 30 30 31 31 buildPhase = '' 32 32 ${preBuild}
+1 -1
pkgs/development/mobile/titaniumenv/default.nix
··· 3 3 rec { 4 4 androidenv = pkgs.androidenv; 5 5 6 - xcodeenv = if pkgs.stdenv.system == "x86_64-darwin" then pkgs.xcodeenv.override { 6 + xcodeenv = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then pkgs.xcodeenv.override { 7 7 version = xcodeVersion; 8 8 inherit xcodeBaseDir; 9 9 } else null;
+6 -6
pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix
··· 2 2 3 3 stdenv.mkDerivation { 4 4 name = "mobilesdk-6.3.1.GA"; 5 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 5 + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { 6 6 url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip; 7 7 sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj"; 8 8 } 9 - else if stdenv.system == "x86_64-darwin" then fetchurl { 9 + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 10 10 url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip; 11 11 sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj"; 12 12 } 13 - else throw "Platform: ${stdenv.system} not supported!"; 13 + else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; 14 14 15 15 buildInputs = [ unzip makeWrapper ]; 16 16 ··· 23 23 cd mobilesdk/* 24 24 mv * 6.3.1.GA 25 25 cd * 26 - ${stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") '' 26 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") '' 27 27 # Fixes a bad archive copying error when generating an IPA file 28 28 sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js 29 29 ''} 30 30 31 31 # Patch some executables 32 32 33 - ${if stdenv.system == "i686-linux" then 33 + ${if stdenv.hostPlatform.system == "i686-linux" then 34 34 '' 35 35 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 36 36 '' 37 - else if stdenv.system == "x86_64-linux" then 37 + else if stdenv.hostPlatform.system == "x86_64-linux" then 38 38 '' 39 39 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 40 40 ''
+5 -5
pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix
··· 54 54 in 55 55 stdenv.mkDerivation { 56 56 name = "mobilesdk-7.1.0.GA"; 57 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 57 + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { 58 58 url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-linux.zip; 59 59 sha256 = "18b3jnr65sdn5wj191bcl48gvhyklxmighxakv4vrz1fb59kyvqn"; 60 60 } 61 - else if stdenv.system == "x86_64-darwin" then fetchurl { 61 + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 62 62 url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-osx.zip; 63 63 sha256 = "1f62616biwsw1fqxz2sq7lpa6bsfjazffliplyf5dpnh298cnc1m"; 64 64 } 65 - else throw "Platform: ${stdenv.system} not supported!"; 65 + else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; 66 66 67 67 buildInputs = [ unzip makeWrapper ]; 68 68 ··· 89 89 90 90 # Patch some executables 91 91 92 - ${if stdenv.system == "i686-linux" then 92 + ${if stdenv.hostPlatform.system == "i686-linux" then 93 93 '' 94 94 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 95 95 '' 96 - else if stdenv.system == "x86_64-linux" then 96 + else if stdenv.hostPlatform.system == "x86_64-linux" then 97 97 '' 98 98 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 99 99 ''
+3 -2
pkgs/development/node-packages/default-v10.nix
··· 1 - {pkgs, system, nodejs, stdenv}: 1 + { pkgs, nodejs, stdenv }: 2 2 3 3 let 4 4 nodePackages = import ./composition-v10.nix { 5 - inherit pkgs system nodejs; 5 + inherit pkgs nodejs; 6 + inherit (stdenv.hostPlatform) system; 6 7 }; 7 8 in 8 9 nodePackages // {
+3 -2
pkgs/development/node-packages/default-v6.nix
··· 1 - {pkgs, system, nodejs, stdenv}: 1 + { pkgs, nodejs, stdenv }: 2 2 3 3 let 4 4 nodePackages = import ./composition-v6.nix { 5 - inherit pkgs system nodejs; 5 + inherit pkgs nodejs; 6 + inherit (stdenv.hostPlatform) system; 6 7 }; 7 8 in 8 9 nodePackages // {
+3 -2
pkgs/development/node-packages/default-v8.nix
··· 1 - {pkgs, system, nodejs, stdenv}: 1 + { pkgs, nodejs, stdenv }: 2 2 3 3 let 4 4 nodePackages = import ./composition-v8.nix { 5 - inherit pkgs system nodejs; 5 + inherit pkgs nodejs; 6 + inherit (stdenv.hostPlatform) system; 6 7 }; 7 8 in 8 9 nodePackages // {
+5 -1
pkgs/development/ocaml-modules/bin_prot/default.nix
··· 1 - {stdenv, buildOcaml, fetchurl, type_conv}: 1 + { stdenv, buildOcaml, fetchurl, ocaml, type_conv }: 2 + 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}" 5 + else 2 6 3 7 buildOcaml rec { 4 8 name = "bin_prot";
+4
pkgs/development/ocaml-modules/bolt/default.nix
··· 5 5 assert versionAtLeast (getVersion ocaml) "4.00.0"; 6 6 assert versionAtLeast (getVersion findlib) "1.3.3"; 7 7 8 + if versionAtLeast ocaml.version "4.06" 9 + then throw "bolt is not available for OCaml ${ocaml.version}" 10 + else 11 + 8 12 stdenv.mkDerivation rec { 9 13 10 14 name = "bolt-1.4";
+4
pkgs/development/ocaml-modules/camlimages/4.1.nix
··· 2 2 3 3 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; 4 4 5 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 6 + then throw "camlimages-4.1.2 is not available for OCaml ${ocaml.version}" 7 + else 8 + 5 9 let 6 10 pname = "camlimages"; 7 11 version = "4.1.2";
+5
pkgs/development/ocaml-modules/cil/default.nix
··· 1 1 { stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }: 2 + 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "cil is not available for OCaml ${ocaml.version}" 5 + else 6 + 2 7 stdenv.mkDerivation { 3 8 name = "ocaml-cil-1.7.3"; 4 9 src = fetchurl {
+4
pkgs/development/ocaml-modules/cryptgps/default.nix
··· 1 1 {stdenv, fetchurl, ocaml, findlib}: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "cryptgps is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 stdenv.mkDerivation rec { 4 8 name = "ocaml-cryptgps-${version}"; 5 9 version = "0.2.1";
+4
pkgs/development/ocaml-modules/dypgen/default.nix
··· 4 4 pname = "dypgen"; 5 5 in 6 6 7 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 8 + then throw "${pname} is not available for OCaml ${ocaml.version}" 9 + else 10 + 7 11 stdenv.mkDerivation rec { 8 12 name = "${pname}-${version}"; 9 13 version = "20120619-1";
+4
pkgs/development/ocaml-modules/enumerate/default.nix
··· 2 2 3 3 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; 4 4 5 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 6 + then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}" 7 + else 8 + 5 9 stdenv.mkDerivation { 6 10 name = "ocaml-enumerate-111.08.00"; 7 11
+4
pkgs/development/ocaml-modules/erm_xml/default.nix
··· 1 1 { stdenv, fetchzip, ocaml, findlib, ocamlbuild }: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "erm_xml is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 let version = "0.3"; in 4 8 5 9 stdenv.mkDerivation {
+5 -1
pkgs/development/ocaml-modules/faillib/default.nix
··· 1 - {stdenv, buildOcaml, fetchurl, herelib, camlp4}: 1 + { stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }: 2 + 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "faillib-111.17.00 is not available for OCaml ${ocaml.version}" 5 + else 2 6 3 7 buildOcaml rec { 4 8 minimumSupportedOcamlVersion = "4.00";
+4
pkgs/development/ocaml-modules/fieldslib/default.nix
··· 2 2 3 3 assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml); 4 4 5 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 6 + then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}" 7 + else 8 + 5 9 stdenv.mkDerivation { 6 10 name = "ocaml-fieldslib-109.20.03"; 7 11
+5 -1
pkgs/development/ocaml-modules/frontc/default.nix
··· 1 - {lib, buildOcaml, fetchurl}: 1 + { lib, buildOcaml, fetchurl, ocaml }: 2 + 3 + if lib.versionAtLeast ocaml.version "4.06" 4 + then throw "FrontC is not available for OCaml ${ocaml.version}" 5 + else 2 6 3 7 buildOcaml rec { 4 8 name = "FrontC";
+4
pkgs/development/ocaml-modules/gtktop/default.nix
··· 2 2 3 3 let pname = "gtktop-2.0"; in 4 4 5 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 6 + then throw "${pname} is not available for OCaml ${ocaml.version}" 7 + else 8 + 5 9 stdenv.mkDerivation { 6 10 name = "ocaml-${pname}"; 7 11
+1
pkgs/development/ocaml-modules/lwt/legacy.nix
··· 6 6 }: 7 7 8 8 if !stdenv.lib.versionAtLeast ocaml.version "4" 9 + || stdenv.lib.versionAtLeast ocaml.version "4.06" 9 10 then throw "lwt is not available for OCaml ${ocaml.version}" 10 11 else 11 12
+4
pkgs/development/ocaml-modules/magick/default.nix
··· 1 1 { stdenv, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "magick is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 stdenv.mkDerivation { 4 8 name = "ocaml-magick-0.34"; 5 9 src = fetchurl {
+4
pkgs/development/ocaml-modules/ocaml-cairo/default.nix
··· 4 4 pname = "ocaml-cairo"; 5 5 in 6 6 7 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 8 + then throw "${pname} is not available for OCaml ${ocaml.version}" 9 + else 10 + 7 11 stdenv.mkDerivation rec { 8 12 name = "${pname}-${version}"; 9 13 version = "1.2.0";
+4
pkgs/development/ocaml-modules/ocamlsdl/default.nix
··· 4 4 pname = "ocamlsdl"; 5 5 in 6 6 7 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 8 + then throw "${pname} is not available for OCaml ${ocaml.version}" 9 + else 10 + 7 11 stdenv.mkDerivation rec { 8 12 name = "${pname}-${version}"; 9 13 version = "0.9.1";
+4
pkgs/development/ocaml-modules/odn/default.nix
··· 1 1 { stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 stdenv.mkDerivation { 4 8 name = "ocaml-data-notation-0.0.11"; 5 9
+4
pkgs/development/ocaml-modules/ojquery/default.nix
··· 1 1 { stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, lwt3, react }: 2 2 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "ojquery is not available for OCaml ${ocaml.version}" 5 + else 6 + 3 7 stdenv.mkDerivation rec { 4 8 version = "0.1"; 5 9 name = "ocaml-ojquery-${version}";
+5 -1
pkgs/development/ocaml-modules/pa_ounit/default.nix
··· 1 - {stdenv, buildOcaml, fetchurl, ounit}: 1 + { stdenv, buildOcaml, ocaml, fetchurl, ounit }: 2 + 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "pa_ounit is not available for OCaml ${ocaml.version}" 5 + else 2 6 3 7 buildOcaml rec { 4 8 name = "pa_ounit";
+4
pkgs/development/ocaml-modules/sqlite3EZ/default.nix
··· 2 2 3 3 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; 4 4 5 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 6 + then throw "sqlite3EZ is not available for OCaml ${ocaml.version}" 7 + else 8 + 5 9 stdenv.mkDerivation { 6 10 name = "ocaml-sqlite3EZ-0.1.0"; 7 11
+4
pkgs/development/ocaml-modules/ulex/0.8/default.nix
··· 4 4 pname = "ulex"; 5 5 in 6 6 7 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 8 + then throw "ulex-0.8 is not available for OCaml ${ocaml.version}" 9 + else 10 + 7 11 stdenv.mkDerivation rec { 8 12 name = "${pname}-${version}"; 9 13 version = "0.8";
+5 -1
pkgs/development/ocaml-modules/variantslib/default.nix
··· 1 - {stdenv, buildOcaml, fetchurl, type_conv}: 1 + { stdenv, buildOcaml, ocaml, fetchurl, type_conv }: 2 + 3 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 4 + then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}" 5 + else 2 6 3 7 buildOcaml rec { 4 8 name = "variantslib";
+38
pkgs/development/python-modules/cozy/default.nix
··· 1 + { buildPythonPackage, fetchFromGitHub, lib, 2 + z3, ply, python-igraph, oset, ordered-set, dictionaries }: 3 + 4 + buildPythonPackage { 5 + pname = "cozy"; 6 + version = "2.0a1"; 7 + 8 + propagatedBuildInputs = [ 9 + z3 ply python-igraph oset ordered-set dictionaries 10 + ]; 11 + 12 + src = fetchFromGitHub { 13 + owner = "CozySynthesizer"; 14 + repo = "cozy"; 15 + rev = "f553e9b"; 16 + sha256 = "1jhr5gzihj8dkg0yc5dmi081v2isxharl0ph7v2grqj0bwqzl40j"; 17 + }; 18 + 19 + # Yoink the Z3 dependency name, because our Z3 package doesn't provide it. 20 + postPatch = '' 21 + sed -i -e '/z3-solver/d' requirements.txt 22 + ''; 23 + 24 + # Tests are not correctly set up in the source tree. 25 + doCheck = false; 26 + 27 + # There is some first-time-run codegen that we will force to happen. 28 + postInstall = '' 29 + $out/bin/cozy --help 30 + ''; 31 + 32 + meta = { 33 + description = "The collection synthesizer"; 34 + homepage = https://cozy.uwplse.org/; 35 + license = lib.licenses.asl20; 36 + maintainers = [ lib.maintainers.MostAwesomeDude ]; 37 + }; 38 + }
+19
pkgs/development/python-modules/dictionaries/default.nix
··· 1 + { buildPythonPackage, fetchPypi, lib, six }: 2 + 3 + buildPythonPackage rec { 4 + pname = "dictionaries"; 5 + version = "0.0.1"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "1jx2ph509sk4l7spslz16y8l6xn97d13nspn4ds2lxn5ward9ihy"; 10 + }; 11 + 12 + buildInputs = [ six ]; 13 + 14 + meta = { 15 + description = "Dict implementations with attribute access"; 16 + license = lib.licenses.mit; 17 + maintainers = [ lib.maintainers.MostAwesomeDude ]; 18 + }; 19 + }
+6 -7
pkgs/development/python-modules/ecpy/default.nix
··· 1 - { stdenv, fetchPypi, buildPythonPackage, isPy3k, hidapi 2 - , pycrypto, pillow, protobuf, future 3 - }: 1 + { lib, fetchPypi, buildPythonPackage, isPy3k, future }: 4 2 5 3 buildPythonPackage rec { 6 4 pname = "ECPy"; 7 5 version = "0.9.1"; 8 6 9 - disabled = !isPy3k; 10 - 11 7 src = fetchPypi { 12 8 inherit pname version; 13 9 sha256 = "f0df66be67f3de0152dfb3c453f4247bdfa2b4e37aa75b98617a637376032229"; 14 10 }; 15 11 16 - buildInputs = [ hidapi pycrypto pillow protobuf future ]; 12 + propagatedBuildInputs = lib.optional (!isPy3k) future; 17 13 18 - meta = with stdenv.lib; { 14 + # No tests implemented 15 + doCheck = false; 16 + 17 + meta = with lib; { 19 18 description = "Pure Pyhton Elliptic Curve Library"; 20 19 homepage = https://github.com/ubinity/ECPy; 21 20 license = licenses.asl20;
+1 -1
pkgs/development/python-modules/folium/default.nix
··· 22 22 }; 23 23 24 24 checkInputs = [ pytest numpy nbconvert pandas mock ]; 25 - propagatedBuildInputs = [ jinja2 branca six requests ]; 25 + propagatedBuildInputs = [ jinja2 branca six requests numpy ]; 26 26 27 27 # No tests in archive 28 28 doCheck = false;
+32
pkgs/development/python-modules/httpsig/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , setuptools_scm 5 + , pycryptodome 6 + , requests 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "httpsig"; 11 + version = "1.2.0"; 12 + 13 + src = fetchPypi { 14 + inherit pname version; 15 + sha256 = "19ng7y7blp13z081z5a6dxng1p8xlih7g6frmsg3q5ri8lvpybc7"; 16 + }; 17 + 18 + buildInputs = [ setuptools_scm ]; 19 + propagatedBuildInputs = [ pycryptodome requests ]; 20 + 21 + # Jailbreak pycryptodome 22 + preBuild = '' 23 + substituteInPlace setup.py --replace "==3.4.7" "" 24 + ''; 25 + 26 + meta = with lib; { 27 + description = "Sign HTTP requests with secure signatures"; 28 + license = licenses.mit; 29 + maintainers = with maintainers; [ srhb ]; 30 + homepage = https://github.com/ahknight/httpsig; 31 + }; 32 + }
+2 -2
pkgs/development/python-modules/numpy/default.nix
··· 1 - {lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, pytest, blas, hostPlatform }: 1 + { stdenv, lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, pytest, blas }: 2 2 3 3 buildPythonPackage rec { 4 4 pname = "numpy"; ··· 20 20 ./numpy-distutils-C++.patch 21 21 ]; 22 22 23 - postPatch = lib.optionalString hostPlatform.isMusl '' 23 + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' 24 24 # Use fenv.h 25 25 sed -i \ 26 26 numpy/core/src/npymath/ieee754.c.src \
+26
pkgs/development/python-modules/ordered-set/default.nix
··· 1 + { buildPythonPackage, fetchPypi, lib, pytest }: 2 + 3 + buildPythonPackage rec { 4 + pname = "ordered-set"; 5 + version = "3.0.1"; 6 + 7 + buildInputs = [ pytest ]; 8 + 9 + src = fetchPypi { 10 + inherit pname version; 11 + sha256 = "0yyfkkfzpwlx4jlfqzb7p1xpzmn2jyzq2qlakqx62pxizfzxfvrx"; 12 + }; 13 + 14 + checkPhase = '' 15 + py.test test.py 16 + ''; 17 + 18 + meta = { 19 + description = "A MutableSet that remembers its order, so that every entry has an index."; 20 + license = lib.licenses.mit; 21 + maintainers = [ lib.maintainers.MostAwesomeDude ]; 22 + }; 23 + } 24 + 25 + 26 +
+2 -2
pkgs/development/python-modules/pyserial/default.nix
··· 1 - { lib, fetchPypi, buildPythonPackage, hostPlatform }: 1 + { stdenv, lib, fetchPypi, buildPythonPackage }: 2 2 3 3 buildPythonPackage rec { 4 4 pname = "pyserial"; ··· 10 10 }; 11 11 12 12 checkPhase = "python -m unittest discover -s test"; 13 - doCheck = !hostPlatform.isDarwin; # broken on darwin 13 + doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin 14 14 15 15 meta = with lib; { 16 16 homepage = "https://github.com/pyserial/pyserial";
+22
pkgs/development/python-modules/python-igraph/default.nix
··· 1 + { buildPythonPackage, fetchPypi, lib, 2 + pkgconfig, igraph }: 3 + 4 + buildPythonPackage rec { 5 + pname = "python-igraph"; 6 + version = "0.7.1.post6"; 7 + 8 + buildInputs = [ pkgconfig igraph ]; 9 + 10 + src = fetchPypi { 11 + inherit pname version; 12 + sha256 = "0xp61zz710qlzhmzbfr65d5flvsi8zf2xy78s6rsszh719wl5sm5"; 13 + }; 14 + 15 + meta = { 16 + description = "High performance graph data structures and algorithms"; 17 + license = lib.licenses.gpl2; 18 + maintainers = [ lib.maintainers.MostAwesomeDude ]; 19 + }; 20 + } 21 + 22 +
+1 -1
pkgs/development/ruby-modules/testing/stubs.nix
··· 6 6 text = (builtins.toJSON (lib.filterAttrs ( n: v: builtins.any (x: x == n) ["name" "system"]) argSet)); 7 7 builder = stdenv.shell; 8 8 args = [ "-c" "echo $(<$textPath) > $out"]; 9 - system = stdenv.system; 9 + system = stdenv.hostPlatform.system; 10 10 passAsFile = ["text"]; 11 11 }; 12 12 fetchurl = {url?"", urls ? [],...}: "fetchurl:${if urls == [] then url else builtins.head urls}";
+1 -1
pkgs/development/tools/analysis/cov-build/default.nix
··· 11 11 version = "7.0.2"; 12 12 13 13 src = 14 - if stdenv.system == "i686-linux" 14 + if stdenv.hostPlatform.system == "i686-linux" 15 15 then requireFile { 16 16 name = "cov-analysis-linux32-${version}.tar.gz"; 17 17 sha256 = "0i06wbd7blgx9adh9w09by4i18vwmldfp9ix97a5dph2cjymsviy";
+1 -1
pkgs/development/tools/analysis/valgrind/default.nix
··· 57 57 ''; 58 58 59 59 configureFlags = 60 - stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit"; 60 + stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit"; 61 61 62 62 doCheck = false; # fails 63 63
+1 -2
pkgs/development/tools/build-managers/cmake/2.8.nix
··· 1 1 { stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2 2 2 , useNcurses ? false, ncurses, useQt4 ? false, qt4, ps 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 with stdenv.lib; ··· 35 34 })] ++ 36 35 # Don't search in non-Nix locations such as /usr, but do search in our libc. 37 36 [ ./search-path.patch ] ++ 38 - optional (hostPlatform != buildPlatform) (fetchurl { 37 + optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchurl { 39 38 name = "fix-darwin-cross-compile.patch"; 40 39 url = "https://public.kitware.com/Bug/file_download.php?" 41 40 + "file_id=4981&type=bug";
+5 -5
pkgs/development/tools/build-managers/meson/default.nix
··· 1 - { lib, python3Packages, stdenv, targetPlatform, writeTextDir, substituteAll }: 1 + { lib, python3Packages, stdenv, writeTextDir, substituteAll }: 2 2 3 3 python3Packages.buildPythonApplication rec { 4 4 version = "0.46.1"; ··· 57 57 needs_exe_wrapper = true 58 58 59 59 [host_machine] 60 - system = '${targetPlatform.parsed.kernel.name}' 61 - cpu_family = '${targetPlatform.parsed.cpu.family}' 62 - cpu = '${targetPlatform.parsed.cpu.name}' 63 - endian = ${if targetPlatform.isLittleEndian then "'little'" else "'big'"} 60 + system = '${stdenv.targetPlatform.parsed.kernel.name}' 61 + cpu_family = '${stdenv.targetPlatform.parsed.cpu.family}' 62 + cpu = '${stdenv.targetPlatform.parsed.cpu.name}' 63 + endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} 64 64 ''; 65 65 66 66 # 0.45 update enabled tests but they are failing
+2 -2
pkgs/development/tools/electron/default.nix
··· 4 4 version = "1.8.2"; 5 5 name = "electron-${version}"; 6 6 7 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 7 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 8 8 9 9 meta = with stdenv.lib; { 10 10 description = "Cross platform desktop application shell"; ··· 34 34 url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; 35 35 sha256 = "0k4np2d4y15x1qfay8y9m8v9y223vdpbq5fdxa3ywbbyf8j361zd"; 36 36 }; 37 - }.${stdenv.system} or throwSystem; 37 + }.${stdenv.hostPlatform.system} or throwSystem; 38 38 39 39 buildInputs = [ unzip makeWrapper ]; 40 40
+3 -3
pkgs/development/tools/github/github-release/default.nix
··· 1 1 { stdenv, fetchurl }: 2 2 3 3 let 4 - linuxPredicate = stdenv.system == "x86_64-linux"; 5 - bsdPredicate = stdenv.system == "x86_64-freebsd"; 6 - darwinPredicate = stdenv.system == "x86_64-darwin"; 4 + linuxPredicate = stdenv.hostPlatform.system == "x86_64-linux"; 5 + bsdPredicate = stdenv.hostPlatform.system == "x86_64-freebsd"; 6 + darwinPredicate = stdenv.hostPlatform.system == "x86_64-darwin"; 7 7 metadata = assert linuxPredicate || bsdPredicate || darwinPredicate; 8 8 if linuxPredicate then 9 9 { arch = "linux-amd64";
+1 -1
pkgs/development/tools/google-app-engine-go-sdk/default.nix
··· 6 6 name = "google-app-engine-go-sdk-${version}"; 7 7 version = "1.9.61"; 8 8 src = 9 - if stdenv.system == "x86_64-linux" then 9 + if stdenv.hostPlatform.system == "x86_64-linux" then 10 10 fetchzip { 11 11 url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip"; 12 12 sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";
+2 -2
pkgs/development/tools/minizinc/default.nix
··· 1 1 { stdenv, fetchFromGitHub, cmake, flex, bison }: 2 2 let 3 - version = "2.1.7"; 3 + version = "2.2.0"; 4 4 in 5 5 stdenv.mkDerivation { 6 6 name = "minizinc-${version}"; ··· 11 11 rev = "${version}"; 12 12 owner = "MiniZinc"; 13 13 repo = "libminizinc"; 14 - sha256 = "05rifsgzfaalv5ymv59sjcvhr6i1byzbmq5p36hj3hpi5f929kip"; 14 + sha256 = "05is1r5y06jfqwvka90dn2ffxnvbgyswaxl00aqz6455hnggnxvm"; 15 15 }; 16 16 17 17 # meta is all the information about the package..
+6 -7
pkgs/development/tools/misc/binutils/default.nix
··· 1 1 { stdenv, buildPackages 2 2 , fetchurl, zlib, autoreconfHook264 3 - , hostPlatform, buildPlatform, targetPlatform 4 3 , noSysDirs, gold ? true, bison ? null 5 4 }: 6 5 ··· 13 12 inherit (stdenv.lib) optionals optionalString; 14 13 # The targetPrefix prepended to binary names to allow multiple binuntils on the 15 14 # PATH to both be usable. 16 - targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; 15 + targetPrefix = optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "${stdenv.targetPlatform.config}-"; 17 16 in 18 17 19 18 stdenv.mkDerivation rec { ··· 65 64 # be satisfied on aarch64 platform. Add backported fix from bugzilla. 66 65 # https://sourceware.org/bugzilla/show_bug.cgi?id=22764 67 66 ./relax-R_AARCH64_ABS32-R_AARCH64_ABS16-absolute.patch 68 - ] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch; 67 + ] ++ stdenv.lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; 69 68 70 69 outputs = [ "out" "info" "man" ]; 71 70 72 71 depsBuildBuild = [ buildPackages.stdenv.cc ]; 73 72 nativeBuildInputs = [ 74 73 bison 75 - ] ++ stdenv.lib.optionals targetPlatform.isiOS [ 74 + ] ++ stdenv.lib.optionals stdenv.targetPlatform.isiOS [ 76 75 autoreconfHook264 77 76 ]; 78 77 buildInputs = [ zlib ]; ··· 94 93 95 94 # As binutils takes part in the stdenv building, we don't want references 96 95 # to the bootstrap-tools libgcc (as uses to happen on arm/mips) 97 - NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin 96 + NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin 98 97 then "-Wno-string-plus-int -Wno-deprecated-declarations" 99 98 else "-static-libgcc"; 100 99 101 100 hardeningDisable = [ "format" ]; 102 101 103 102 # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. 104 - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 103 + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; 105 104 106 105 configureFlags = [ 107 106 "--enable-targets=all" "--enable-64-bit-bfd" ··· 122 121 doCheck = false; # fails 123 122 124 123 # else fails with "./sanity.sh: line 36: $out/bin/size: not found" 125 - doInstallCheck = buildPlatform == hostPlatform && hostPlatform == targetPlatform; 124 + doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform; 126 125 127 126 enableParallelBuilding = true; 128 127
+1 -1
pkgs/development/tools/misc/cflow/default.nix
··· 17 17 buildInputs = [ gettext ] ++ 18 18 # We don't have Emacs/GTK/etc. on {Dar,Cyg}win. 19 19 stdenv.lib.optional 20 - (! (stdenv.lib.lists.any (x: stdenv.system == x) 20 + (! (stdenv.lib.lists.any (x: stdenv.hostPlatform.system == x) 21 21 [ "i686-cygwin" ])) 22 22 emacs; 23 23
+4 -6
pkgs/development/tools/misc/gdb/default.nix
··· 6 6 # Run time 7 7 , ncurses, readline, gmp, mpfr, expat, zlib, dejagnu 8 8 9 - , buildPlatform, hostPlatform, targetPlatform 10 - 11 - , pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null 9 + , pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python ? null 12 10 , guile ? null 13 11 14 12 }: ··· 22 20 23 21 stdenv.mkDerivation rec { 24 22 name = 25 - stdenv.lib.optionalString (targetPlatform != hostPlatform) 26 - (targetPlatform.config + "-") 23 + stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) 24 + (stdenv.targetPlatform.config + "-") 27 25 + basename; 28 26 29 27 src = fetchurl { ··· 50 48 NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; 51 49 52 50 # TODO(@Ericson2314): Always pass "--target" and always prefix. 53 - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 51 + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; 54 52 55 53 configureFlags = with stdenv.lib; [ 56 54 "--enable-targets=all" "--enable-64-bit-bfd"
+2 -2
pkgs/development/tools/misc/gnum4/default.nix
··· 1 - { stdenv, hostPlatform, fetchurl }: 1 + { stdenv, fetchurl }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "gnum4-1.4.18"; ··· 13 13 configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]; 14 14 15 15 # Upstream is aware of it; it may be in the next release. 16 - patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional hostPlatform.isDarwin stdenv.secure-format-patch; 16 + patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch; 17 17 18 18 meta = { 19 19 homepage = http://www.gnu.org/software/m4/;
+3 -3
pkgs/development/tools/misc/help2man/default.nix
··· 1 - { stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }: 1 + { stdenv, fetchurl, perl, gettext, LocaleGettext }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "help2man-1.47.6"; ··· 13 13 14 14 doCheck = false; # target `check' is missing 15 15 16 - patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null; 16 + patches = if stdenv.hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null; 17 17 18 18 # We don't use makeWrapper here because it uses substitutions our 19 19 # bootstrap shell can't handle. ··· 23 23 cat > $out/bin/help2man <<EOF 24 24 #! $SHELL -e 25 25 export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl 26 - ${stdenv.lib.optionalString hostPlatform.isCygwin 26 + ${stdenv.lib.optionalString stdenv.hostPlatform.isCygwin 27 27 "export PATH=\''${PATH:+:}${gettext}/bin"} 28 28 exec -a \$0 $out/bin/.help2man-wrapped "\$@" 29 29 EOF
+5 -5
pkgs/development/tools/misc/iozone/default.nix
··· 1 1 { stdenv, fetchurl, gnuplot }: 2 2 3 3 let 4 - target = if stdenv.system == "i686-linux" then 4 + target = if stdenv.hostPlatform.system == "i686-linux" then 5 5 "linux" 6 - else if stdenv.system == "x86_64-linux" then 6 + else if stdenv.hostPlatform.system == "x86_64-linux" then 7 7 "linux-AMD64" 8 - else if stdenv.system == "x86_64-darwin" then 8 + else if stdenv.hostPlatform.system == "x86_64-darwin" then 9 9 "macosx" 10 - else if stdenv.system == "aarch64-linux" then 10 + else if stdenv.hostPlatform.system == "aarch64-linux" then 11 11 "linux-arm" 12 - else throw "Platform ${stdenv.system} not yet supported."; 12 + else throw "Platform ${stdenv.hostPlatform.system} not yet supported."; 13 13 in 14 14 15 15 stdenv.mkDerivation rec {
+2 -2
pkgs/development/tools/misc/kibana/5.x.nix
··· 6 6 archOverrides = { 7 7 "i686" = "x86"; 8 8 }; 9 - info = splitString "-" stdenv.system; 9 + info = splitString "-" stdenv.hostPlatform.system; 10 10 arch = (elemAt info 0); 11 11 elasticArch = archOverrides."${arch}" or arch; 12 12 plat = elemAt info 1; ··· 21 21 22 22 src = fetchurl { 23 23 url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${elasticArch}.tar.gz"; 24 - sha256 = shas."${stdenv.system}" or (throw "Unknown architecture"); 24 + sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture"); 25 25 }; 26 26 27 27 buildInputs = [ makeWrapper ];
+2 -2
pkgs/development/tools/misc/kibana/default.nix
··· 12 12 with stdenv.lib; 13 13 let 14 14 inherit (builtins) elemAt; 15 - info = splitString "-" stdenv.system; 15 + info = splitString "-" stdenv.hostPlatform.system; 16 16 arch = elemAt info 0; 17 17 plat = elemAt info 1; 18 18 shas = ··· 44 44 45 45 src = fetchurl { 46 46 url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz"; 47 - sha256 = shas."${stdenv.system}" or (throw "Unknown architecture"); 47 + sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture"); 48 48 }; 49 49 50 50 buildInputs = [ makeWrapper ];
+1 -2
pkgs/development/tools/misc/libtool/libtool2.nix
··· 1 1 { stdenv, fetchurl, m4, perl, help2man 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 stdenv.mkDerivation rec { ··· 26 25 27 26 # Don't run the native `strip' when cross-compiling. This breaks at least 28 27 # with `.a' files for MinGW. 29 - dontStrip = hostPlatform != buildPlatform; 28 + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; 30 29 31 30 meta = { 32 31 description = "GNU Libtool, a generic library support script";
+1 -1
pkgs/development/tools/misc/lsof/default.nix
··· 1 1 { stdenv, fetchurl, buildPackages, ncurses }: 2 2 3 - let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in 3 + let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in 4 4 5 5 stdenv.mkDerivation rec { 6 6 name = "lsof-${version}";
+2 -2
pkgs/development/tools/misc/saleae-logic/default.nix
··· 27 27 name = "${pname}-${version}"; 28 28 29 29 src = 30 - if stdenv.system == "i686-linux" then 30 + if stdenv.hostPlatform.system == "i686-linux" then 31 31 fetchurl { 32 32 name = "saleae-logic-${version}-32bit.zip"; 33 33 url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(32-bit).zip"; 34 34 sha256 = "1dyrj07cgj2fvwi1sk97vady9ri8f8n7mxy9zyzmw9isngs7bmll"; 35 35 } 36 - else if stdenv.system == "x86_64-linux" then 36 + else if stdenv.hostPlatform.system == "x86_64-linux" then 37 37 fetchurl { 38 38 name = "saleae-logic-${version}-64bit.zip"; 39 39 url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip";
+1 -1
pkgs/development/tools/neoload/default.nix
··· 34 34 name = "neoload-4.1.4"; 35 35 36 36 src = fetchurl ( 37 - if stdenv.system == "x86_64-linux" then 37 + if stdenv.hostPlatform.system == "x86_64-linux" then 38 38 { url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x64.sh; 39 39 sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; } 40 40 else
+1 -1
pkgs/development/tools/node-webkit/nw12.nix
··· 3 3 , gdk_pixbuf, cairo, nss, nspr, gconf, expat, systemd, libcap 4 4 , libnotify}: 5 5 let 6 - bits = if stdenv.system == "x86_64-linux" then "x64" 6 + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 7 7 else "ia32"; 8 8 9 9 nwEnv = buildEnv {
+1 -1
pkgs/development/tools/nwjs/default.nix
··· 7 7 , sqlite, udev 8 8 }: 9 9 let 10 - bits = if stdenv.system == "x86_64-linux" then "x64" 10 + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 11 11 else "ia32"; 12 12 13 13 nwEnv = buildEnv {
+5
pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
··· 4 4 version = "0.9.8.6-0.rc1"; 5 5 webpage = "http://omake.metaprl.org"; 6 6 in 7 + 8 + if stdenv.lib.versionAtLeast ocaml.version "4.06" 9 + then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" 10 + else 11 + 7 12 stdenv.mkDerivation { 8 13 9 14 name = "${pname}-${version}";
+2 -2
pkgs/development/tools/phantomjs/default.nix
··· 12 12 # because it has bundled a lot of external libraries (like QT and Webkit) 13 13 # and no easy/nice way to use the system versions of these 14 14 15 - src = if stdenv.system == "i686-linux" then 15 + src = if stdenv.hostPlatform.system == "i686-linux" then 16 16 fetchurl { 17 17 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2"; 18 18 sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1"; 19 19 } 20 20 else 21 - if stdenv.system == "x86_64-linux" then 21 + if stdenv.hostPlatform.system == "x86_64-linux" then 22 22 fetchurl { 23 23 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2"; 24 24 sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";
+2 -2
pkgs/development/tools/sauce-connect/default.nix
··· 7 7 version = "4.4.12"; 8 8 9 9 src = fetchurl ( 10 - if stdenv.system == "x86_64-linux" then { 10 + if stdenv.hostPlatform.system == "x86_64-linux" then { 11 11 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz"; 12 12 sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw"; 13 - } else if stdenv.system == "i686-linux" then { 13 + } else if stdenv.hostPlatform.system == "i686-linux" then { 14 14 url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz"; 15 15 sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6"; 16 16 } else {
+2 -2
pkgs/development/tools/selenium/chromedriver/default.nix
··· 15 15 }; 16 16 }; 17 17 18 - spec = allSpecs."${stdenv.system}" 19 - or (throw "missing chromedriver binary for ${stdenv.system}"); 18 + spec = allSpecs."${stdenv.hostPlatform.system}" 19 + or (throw "missing chromedriver binary for ${stdenv.hostPlatform.system}"); 20 20 21 21 libs = stdenv.lib.makeLibraryPath [ 22 22 stdenv.cc.cc.lib
+3 -4
pkgs/development/tools/xcbuild/wrapper.nix
··· 1 1 { stdenv, lib, buildPackages, makeWrapper, writeText, runCommand 2 2 , CoreServices, ImageIO, CoreGraphics 3 - , targetPlatform 4 - , xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX" 5 - , xcodeVer ? targetPlatform.xcodeVer or "9.4.1" 6 - , sdkVer ? targetPlatform.sdkVer or "10.10" }: 3 + , xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" 4 + , xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" 5 + , sdkVer ? stdenv.targetPlatform.sdkVer or "10.10" }: 7 6 8 7 let 9 8
+1 -1
pkgs/development/web/remarkjs/default.nix
··· 13 13 14 14 nodePackages = import ./nodepkgs.nix { 15 15 inherit pkgs; 16 - inherit (stdenv) system; 16 + inherit (stdenv.hostPlatform) system; 17 17 }; 18 18 19 19 in stdenv.mkDerivation rec {
+4 -4
pkgs/games/andyetitmoves/default.nix
··· 7 7 stdenv.mkDerivation rec { 8 8 name = "${plainName}-${version}"; 9 9 10 - src = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" 10 + src = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" 11 11 then 12 - let postfix = if stdenv.system == "i686-linux" then "i386" else "x86_64"; 12 + let postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64"; 13 13 commercialName = "${plainName}-${version}_${postfix}.tar.gz"; 14 14 demoUrl = "http://www.andyetitmoves.net/demo/${plainName}Demo-${version}_${postfix}.tar.gz"; 15 15 in ··· 22 22 directory where yousaved it. 23 23 ''; 24 24 name = commercialName; 25 - sha256 = if stdenv.system == "i686-linux" 25 + sha256 = if stdenv.hostPlatform.system == "i686-linux" 26 26 then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01" 27 27 else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql"; 28 28 } 29 29 else fetchurl { 30 30 url = demoUrl; 31 - sha256 = if stdenv.system == "i686-linux" 31 + sha256 = if stdenv.hostPlatform.system == "i686-linux" 32 32 then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525" 33 33 else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4"; 34 34 }
+2 -2
pkgs/games/dwarf-fortress/dfhack/default.nix
··· 13 13 xmlRev = "23500e4e9bd1885365d0a2ef1746c321c1dd5094"; 14 14 15 15 arch = 16 - if stdenv.system == "x86_64-linux" then "64" 17 - else if stdenv.system == "i686-linux" then "32" 16 + if stdenv.hostPlatform.system == "x86_64-linux" then "64" 17 + else if stdenv.hostPlatform.system == "i686-linux" then "32" 18 18 else throw "Unsupported architecture"; 19 19 20 20 fakegit = writeScriptBin "git" ''
+3 -3
pkgs/games/dwarf-fortress/game.nix
··· 33 33 game = if hasAttr dfVersion df-hashes 34 34 then getAttr dfVersion df-hashes 35 35 else throw "Unknown Dwarf Fortress version: ${dfVersion}"; 36 - dfPlatform = if hasAttr stdenv.system platforms 37 - then getAttr stdenv.system platforms 38 - else throw "Unsupported system: ${stdenv.system}"; 36 + dfPlatform = if hasAttr stdenv.hostPlatform.system platforms 37 + then getAttr stdenv.hostPlatform.system platforms 38 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 39 39 sha256 = if hasAttr dfPlatform game 40 40 then getAttr dfPlatform game 41 41 else throw "Unsupported dfPlatform: ${dfPlatform}";
+1 -1
pkgs/games/eduke32/default.nix
··· 15 15 }; 16 16 17 17 buildInputs = [ flac gtk2 libvorbis libvpx libGLU_combined SDL2 SDL2_mixer ] 18 - ++ stdenv.lib.optional (stdenv.system == "i686-linux") nasm; 18 + ++ stdenv.lib.optional (stdenv.hostPlatform.system == "i686-linux") nasm; 19 19 nativeBuildInputs = [ pkgconfig ]; 20 20 21 21 postPatch = ''
+2 -2
pkgs/games/ezquake/default.nix
··· 20 20 ]; 21 21 22 22 installPhase = with stdenv.lib; let 23 - sys = last (splitString "-" stdenv.system); 24 - arch = head (splitString "-" stdenv.system); 23 + sys = last (splitString "-" stdenv.hostPlatform.system); 24 + arch = head (splitString "-" stdenv.hostPlatform.system); 25 25 in '' 26 26 mkdir -p $out/bin 27 27 find .
+1 -1
pkgs/games/factorio/default.nix
··· 46 46 }; 47 47 }; 48 48 }; 49 - actual = binDists.${stdenv.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform"); 49 + actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform"); 50 50 51 51 bdistForArch = arch: { sha256 ? null 52 52 , version ? "0.16.51"
+1 -1
pkgs/games/nethack/default.nix
··· 6 6 let 7 7 platform = 8 8 if stdenv.hostPlatform.isUnix then "unix" 9 - else throw "Unknown platform for NetHack: ${stdenv.system}"; 9 + else throw "Unknown platform for NetHack: ${stdenv.hostPlatform.system}"; 10 10 unixHint = 11 11 if x11Mode then "linux-x11" 12 12 else if qtMode then "linux-qt4"
+2 -2
pkgs/games/oilrush/default.nix
··· 13 13 assert url != null && sha256 != null; 14 14 fetchurl { inherit url sha256; }; 15 15 shell = stdenv.shell; 16 - arch = if stdenv.system == "x86_64-linux" then "x64" 17 - else if stdenv.system == "i686-linux" then "x86" 16 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 17 + else if stdenv.hostPlatform.system == "i686-linux" then "x86" 18 18 else ""; 19 19 unpackPhase = '' 20 20 mkdir oilrush
+1 -1
pkgs/games/openarena/default.nix
··· 21 21 cd $out 22 22 unzip $src 23 23 24 - ${if stdenv.system == "x86_64-linux" then '' 24 + ${if stdenv.hostPlatform.system == "x86_64-linux" then '' 25 25 patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64" 26 26 makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \ 27 27 --prefix LD_LIBRARY_PATH : "${libPath}"
+2 -2
pkgs/games/racer/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 name = "racer-1.1"; 5 5 6 - src = if stdenv.system == "i686-linux" then fetchurl { 6 + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 7 7 url = http://hippo.nipax.cz/src/racer-1.1.tar.gz; 8 8 sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9"; 9 - } else if stdenv.system == "x86_64-linux" then fetchurl { 9 + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 10 10 url = https://hippo.nipax.cz/src/racer-1.1.64.tar.gz; 11 11 sha256 = "0rjy3gmlhwfkb9zs58j0mc0dar0livwpbc19r6zw5r2k6r7xdan0"; 12 12 } else
-1
pkgs/games/scummvm/default.nix
··· 1 1 { stdenv, fetchurl, nasm 2 2 , alsaLib, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libvorbis, libGLU_combined, SDL2, zlib 3 - , hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec {
+1 -1
pkgs/games/sdlmame/default.nix
··· 4 4 version = "0.151.u0-1"; 5 5 name = "sdlmame-${version}"; 6 6 7 - src = if stdenv.system == "x86_64-linux" 7 + src = if stdenv.hostPlatform.system == "x86_64-linux" 8 8 then fetchurl { 9 9 url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-x86_64.pkg.tar.xz"; 10 10 sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
+3 -3
pkgs/games/steam/default.nix
··· 4 4 callPackage = newScope self; 5 5 6 6 self = rec { 7 - steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64" 8 - else if pkgs.stdenv.system == "i686-linux" then "i386" 9 - else throw "Unsupported platform: ${pkgs.stdenv.system}"; 7 + steamArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 8 + else if pkgs.stdenv.hostPlatform.system == "i686-linux" then "i386" 9 + else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}"; 10 10 11 11 steam-runtime = callPackage ./runtime.nix { }; 12 12 steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
+2 -2
pkgs/games/ut2004/demo.nix
··· 2 2 3 3 let 4 4 arch = 5 - if stdenv.system == "x86_64-linux" then "amd64" 6 - else if stdenv.system == "i686-linux" then "x86" 5 + if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 6 + else if stdenv.hostPlatform.system == "i686-linux" then "x86" 7 7 else throw "Unsupported architecture"; 8 8 9 9 in stdenv.mkDerivation rec {
+1 -1
pkgs/games/vessel/default.nix
··· 15 15 message = goBuyItNow; 16 16 name = "${name}-bin"; 17 17 sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96"; 18 - } else throw "unsupported platform ${stdenv.system} only i686-linux supported for now."; 18 + } else throw "unsupported platform ${stdenv.hostPlatform.system} only i686-linux supported for now."; 19 19 20 20 phases = "installPhase"; 21 21 ld_preload = ./isatty.c;
+1 -1
pkgs/games/worldofgoo/default.nix
··· 9 9 then "WorldOfGooDemo-1.41" 10 10 else "WorldofGoo-1.41"; 11 11 12 - arch = if stdenv.system == "x86_64-linux" then "supported" 12 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported" 13 13 else throw "Sorry. World of Goo only is only supported on x86_64 now."; 14 14 15 15 goBuyItNow = ''
+2 -2
pkgs/games/xjump/default.nix
··· 1 - { stdenv, buildPlatform, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?null }: 1 + { stdenv, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?null }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "xjump-${version}"; ··· 12 12 nativeBuildInputs = [ autoconf automake ]; 13 13 buildInputs = [ libX11 libXt libXpm libXaw ]; 14 14 preConfigure = "autoreconf --install"; 15 - patches = if buildPlatform.isDarwin then [ ./darwin.patch ] else []; 15 + patches = if stdenv.buildPlatform.isDarwin then [ ./darwin.patch ] else []; 16 16 configureFlags = 17 17 if localStateDir != null then 18 18 ["--localstatedir=${localStateDir}"]
+1 -1
pkgs/games/zandronum/fmod.nix
··· 1 1 { stdenv, lib, fetchurl, alsaLib, libpulseaudio, undmg }: 2 2 3 3 let 4 - bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; 4 + bits = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "64"; 5 5 libPath = lib.makeLibraryPath [ stdenv.cc.cc alsaLib libpulseaudio ]; 6 6 7 7 in
+1 -1
pkgs/misc/base16-builder/default.nix
··· 11 11 # 12 12 nodePackages = import ./node-packages.nix { 13 13 inherit pkgs; 14 - inherit (stdenv) system; 14 + inherit (stdenv.hostPlatform) system; 15 15 }; 16 16 in nodePackages.base16-builder
+3 -3
pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
··· 7 7 file included in the tarball */ 8 8 9 9 let arch = 10 - if stdenv.system == "x86_64-linux" then "64" 11 - else if stdenv.system == "i686-linux" then "32" 12 - else throw "Unsupported system ${stdenv.system}"; 10 + if stdenv.hostPlatform.system == "x86_64-linux" then "64" 11 + else if stdenv.hostPlatform.system == "i686-linux" then "32" 12 + else throw "Unsupported system ${stdenv.hostPlatform.system}"; 13 13 14 14 in stdenv.mkDerivation rec { 15 15 name = "cnijfilter-${version}";
+3 -3
pkgs/misc/cups/drivers/kyocera/default.nix
··· 2 2 3 3 let 4 4 platform = 5 - if stdenv.system == "x86_64-linux" then "64bit" 6 - else if stdenv.system == "i686-linux" then "32bit" 7 - else throw "Unsupported system: ${stdenv.system}"; 5 + if stdenv.hostPlatform.system == "x86_64-linux" then "64bit" 6 + else if stdenv.hostPlatform.system == "i686-linux" then "32bit" 7 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 8 8 9 9 libPath = lib.makeLibraryPath [ cups ]; 10 10 in
+3 -3
pkgs/misc/cups/drivers/kyodialog3/default.nix
··· 6 6 7 7 let 8 8 platform = 9 - if stdenv.system == "x86_64-linux" then "64bit" 10 - else if stdenv.system == "i686-linux" then "32bit" 11 - else throw "Unsupported system: ${stdenv.system}"; 9 + if stdenv.hostPlatform.system == "x86_64-linux" then "64bit" 10 + else if stdenv.hostPlatform.system == "i686-linux" then "32bit" 11 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 12 12 debPlatform = 13 13 if platform == "64bit" then "amd64" 14 14 else "i386";
+2 -2
pkgs/misc/cups/drivers/samsung/4.01.17.nix
··· 16 16 # Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html> 17 17 # to see what will break when upgrading. Consider a new versioned attribute. 18 18 let 19 - installationPath = if stdenv.system == "x86_64-linux" then "x86_64" else "i386"; 20 - appendPath = if stdenv.system == "x86_64-linux" then "64" else ""; 19 + installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386"; 20 + appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else ""; 21 21 libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}"; 22 22 in stdenv.mkDerivation rec { 23 23 name = "samsung-UnifiedLinuxDriver-${version}";
+1 -1
pkgs/misc/cups/drivers/samsung/default.nix
··· 2 2 3 3 let 4 4 5 - arch = if stdenv.system == "x86_64-linux" 5 + arch = if stdenv.hostPlatform.system == "x86_64-linux" 6 6 then "x86_64" 7 7 else "i386"; 8 8
+1 -1
pkgs/misc/drivers/gutenprint/bin.nix
··· 27 27 stdenv.mkDerivation { 28 28 name = "cups-gutenprint-binary-5.0.1"; 29 29 30 - src = if stdenv.system == "x86_64-linux" then fetchurl { 30 + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 31 31 url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb; 32 32 sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc"; 33 33 } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
+3 -3
pkgs/misc/drivers/hplip/3.16.11.nix
··· 34 34 "armv7l-linux" = "arm32"; 35 35 }; 36 36 37 - hplipArch = hplipPlatforms."${stdenv.system}" 38 - or (throw "HPLIP not supported on ${stdenv.system}"); 37 + hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}" 38 + or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}"); 39 39 40 40 pluginArches = [ "x86_32" "x86_64" "arm32" ]; 41 41 42 42 in 43 43 44 44 assert withPlugin -> builtins.elem hplipArch pluginArches 45 - || throw "HPLIP plugin not supported on ${stdenv.system}"; 45 + || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; 46 46 47 47 pythonPackages.buildPythonApplication { 48 48 inherit name src;
+3 -3
pkgs/misc/drivers/hplip/default.nix
··· 36 36 "armv7l-linux" = "arm32"; 37 37 }; 38 38 39 - hplipArch = hplipPlatforms."${stdenv.system}" 40 - or (throw "HPLIP not supported on ${stdenv.system}"); 39 + hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}" 40 + or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}"); 41 41 42 42 pluginArches = [ "x86_32" "x86_64" "arm32" ]; 43 43 44 44 in 45 45 46 46 assert withPlugin -> builtins.elem hplipArch pluginArches 47 - || throw "HPLIP plugin not supported on ${stdenv.system}"; 47 + || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; 48 48 49 49 pythonPackages.buildPythonApplication { 50 50 inherit name src;
+2 -2
pkgs/misc/emulators/retroarch/cores.nix
··· 272 272 273 273 extraBuildInputs = [ libGLU_combined libpng ]; 274 274 }).override { 275 - buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}"; 275 + buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; 276 276 }; 277 277 278 278 nestopia = (mkLibRetroCore rec { ··· 300 300 301 301 extraBuildInputs = [ libGLU_combined libpng ]; 302 302 }).override { 303 - buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}"; 303 + buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; 304 304 }; 305 305 306 306 picodrive = (mkLibRetroCore rec {
+2 -2
pkgs/misc/emulators/retroarch/default.nix
··· 12 12 , udev ? null 13 13 , enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null 14 14 , withVulkan ? stdenv.isLinux, vulkan-loader ? null 15 - , targetPlatform, fetchurl 15 + , fetchurl 16 16 }: 17 17 18 18 with stdenv.lib; ··· 50 50 51 51 postInstall = optionalString withVulkan '' 52 52 wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib 53 - '' + optionalString targetPlatform.isDarwin '' 53 + '' + optionalString stdenv.targetPlatform.isDarwin '' 54 54 EXECUTABLE_NAME=RetroArch 55 55 PRODUCT_NAME=RetroArch 56 56 MACOSX_DEPLOYMENT_TARGET=10.5
+2 -2
pkgs/misc/emulators/wine/default.nix
··· 6 6 # }; 7 7 # Make additional configurations on demand: 8 8 # wine.override { wineBuild = "wine32"; wineRelease = "staging"; }; 9 - { lib, system, callPackage, 9 + { lib, stdenv, callPackage, 10 10 wineRelease ? "stable", 11 - wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"), 11 + wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32", 12 12 libtxc_dxtn_Name ? "libtxc_dxtn_s2tc", 13 13 pngSupport ? false, 14 14 jpegSupport ? false,
+4 -4
pkgs/os-specific/bsd/netbsd/default.nix
··· 1 - { stdenv, hostPlatform, fetchcvs, lib, groff, mandoc, zlib, buildPackages 1 + { stdenv, fetchcvs, lib, groff, mandoc, zlib, buildPackages 2 2 , yacc, flex, libressl, bash, less, writeText }: 3 3 4 4 let ··· 32 32 MKUNPRIVED = "yes"; 33 33 HOST_SH = "${bash}/bin/sh"; 34 34 OBJCOPY = if stdenv.isDarwin then "true" else "objcopy"; 35 - MACHINE_ARCH = hostPlatform.parsed.cpu.name; 36 - MACHINE_CPU = hostPlatform.parsed.cpu.name; 35 + MACHINE_ARCH = stdenv.hostPlatform.parsed.cpu.name; 36 + MACHINE_CPU = stdenv.hostPlatform.parsed.cpu.name; 37 37 38 38 INSTALL_FILE = "install -U -c"; 39 39 INSTALL_DIR = "xinstall -U -d"; ··· 478 478 "-DOXTABS=XTABS" 479 479 "-DRANDOM_MAX=RAND_MAX" 480 480 "-DINFTIM=-1" 481 - (lib.optionalString hostPlatform.isMusl "-include sys/ttydefaults.h -include sys/file.h") 481 + (lib.optionalString stdenv.hostPlatform.isMusl "-include sys/ttydefaults.h -include sys/file.h") 482 482 "-DBE32TOH(x)=((void)0)" 483 483 "-DBE64TOH(x)=((void)0)" 484 484 "-D__c99inline=__inline"
+3 -3
pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
··· 1 - { stdenv, appleDerivation, lib, targetPlatform 2 - , enableStatic ? targetPlatform.isiOS 3 - , enableShared ? !targetPlatform.isiOS 1 + { stdenv, appleDerivation, lib 2 + , enableStatic ? stdenv.targetPlatform.isiOS 3 + , enableShared ? !stdenv.targetPlatform.isiOS 4 4 }: 5 5 6 6 appleDerivation {
+6 -7
pkgs/os-specific/darwin/cctools/port.nix
··· 1 1 { stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook 2 2 , libcxxabi, libuuid 3 3 , libobjc ? null, maloader ? null 4 - , hostPlatform, targetPlatform 5 4 , enableDumpNormalizedLibArgs ? false 6 5 }: 7 6 ··· 12 11 # 10.x. For 11.0 and higher we will need to upgrade to a newer cctools than the 13 12 # default version here, which can support the new TBD format via Apple's 14 13 # libtapi. 15 - useOld = targetPlatform.isiOS; 14 + useOld = stdenv.targetPlatform.isiOS; 16 15 17 16 # The targetPrefix prepended to binary names to allow multiple binuntils on the 18 17 # PATH to both be usable. 19 18 targetPrefix = stdenv.lib.optionalString 20 - (targetPlatform != hostPlatform) 21 - "${targetPlatform.config}-"; 19 + (stdenv.targetPlatform != stdenv.hostPlatform) 20 + "${stdenv.targetPlatform.config}-"; 22 21 in 23 22 24 23 # Non-Darwin alternatives 25 - assert (!hostPlatform.isDarwin) -> maloader != null; 24 + assert (!stdenv.hostPlatform.isDarwin) -> maloader != null; 26 25 27 26 assert enableDumpNormalizedLibArgs -> (!useOld); 28 27 ··· 77 76 enableParallelBuilding = true; 78 77 79 78 # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. 80 - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 79 + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; 81 80 82 81 postPatch = '' 83 82 sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp ··· 131 130 }; 132 131 133 132 meta = { 134 - broken = !targetPlatform.isDarwin; # Only supports darwin targets 133 + broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets 135 134 homepage = http://www.opensource.apple.com/source/cctools/; 136 135 description = "MacOS Compiler Tools (cross-platform port)"; 137 136 license = stdenv.lib.licenses.apsl20;
+2 -2
pkgs/os-specific/darwin/xcode/default.nix
··· 1 - { stdenv, requireFile, targetPlatform, lib }: 1 + { stdenv, requireFile, lib }: 2 2 3 3 let requireXcode = version: sha256: 4 4 let ··· 46 46 xcode_9_1 = requireXcode "9.1" "0ab1403wy84ys3yn26fj78cazhpnslmh3nzzp1wxib3mr1afjvic"; 47 47 xcode_9_2 = requireXcode "9.2" "1bgfgdp266cbbqf2axcflz92frzvhi0qw0jdkcw6r85kdpc8dj4c"; 48 48 xcode_9_4 = requireXcode "9.4" "6731381785075602a52489f7ea47ece8f6daf225007ba3ffae1fd59b1c0b5f01"; 49 - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if targetPlatform.useiOSPrebuilt then targetPlatform.xcodeVer else "8.2")}"; 49 + xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}"; 50 50 })
+1 -1
pkgs/os-specific/linux/alsa-plugins/wrapper.nix
··· 1 1 { writeScriptBin, stdenv, alsaPlugins }: 2 - writeScriptBin "ap${if stdenv.system == "i686-linux" then "32" else "64"}" '' 2 + writeScriptBin "ap${if stdenv.hostPlatform.system == "i686-linux" then "32" else "64"}" '' 3 3 #/bin/sh 4 4 ALSA_PLUGIN_DIRS=${alsaPlugins}/lib/alsa-lib "$@" 5 5 ''
+2 -2
pkgs/os-specific/linux/amdgpu-pro/default.nix
··· 16 16 bitness = if stdenv.is64bit then "64" else "32"; 17 17 18 18 libArch = 19 - if stdenv.system == "i686-linux" then 19 + if stdenv.hostPlatform.system == "i686-linux" then 20 20 "i386-linux-gnu" 21 - else if stdenv.system == "x86_64-linux" then 21 + else if stdenv.hostPlatform.system == "x86_64-linux" then 22 22 "x86_64-linux-gnu" 23 23 else throw "amdgpu-pro is Linux only. Sorry. The build was stopped."; 24 24
+2 -2
pkgs/os-specific/linux/ati-drivers/default.nix
··· 37 37 build = "15.302"; 38 38 39 39 linuxonly = 40 - if stdenv.system == "i686-linux" then 40 + if stdenv.hostPlatform.system == "i686-linux" then 41 41 true 42 - else if stdenv.system == "x86_64-linux" then 42 + else if stdenv.hostPlatform.system == "x86_64-linux" then 43 43 true 44 44 else throw "ati-drivers are Linux only. Sorry. The build was stopped."; 45 45
+2 -2
pkgs/os-specific/linux/broadcom-sta/default.nix
··· 7 7 x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz"; 8 8 }; 9 9 10 - arch = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "_64"; 10 + arch = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "_64"; 11 11 tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version; 12 12 tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz"; 13 13 in ··· 16 16 17 17 src = fetchurl { 18 18 url = "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/${tarball}"; 19 - sha256 = hashes.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); 19 + sha256 = hashes.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 20 20 }; 21 21 22 22 hardeningDisable = [ "pic" ];
+2 -2
pkgs/os-specific/linux/busybox/sandbox-shell.nix
··· 1 - { busybox, hostPlatform }: 1 + { busybox, stdenv}: 2 2 3 3 # Minimal shell for use as basic /bin/sh in sandbox builds 4 4 busybox.override { 5 5 # musl roadmap has RISC-V support projected for 1.1.20 6 - useMusl = !hostPlatform.isRiscV; 6 + useMusl = !stdenv.hostPlatform.isRiscV; 7 7 enableStatic = true; 8 8 enableMinimal = true; 9 9 extraConfig = ''
+2 -2
pkgs/os-specific/linux/displaylink/default.nix
··· 3 3 4 4 let 5 5 arch = 6 - if stdenv.system == "x86_64-linux" then "x64" 7 - else if stdenv.system == "i686-linux" then "x86" 6 + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 7 + else if stdenv.hostPlatform.system == "i686-linux" then "x86" 8 8 else throw "Unsupported architecture"; 9 9 bins = "${arch}-ubuntu-1604"; 10 10 libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ];
+1 -1
pkgs/os-specific/linux/fusionio/util.nix
··· 39 39 description = "Fusionio command line utilities"; 40 40 license = licenses.unfree; 41 41 platforms = [ "x86_64-linux" ]; 42 - broken = stdenv.system != "x86_64-linux"; 42 + broken = stdenv.hostPlatform.system != "x86_64-linux"; 43 43 maintainers = with maintainers; [ wkennington ]; 44 44 }; 45 45 }
+1 -1
pkgs/os-specific/linux/fusionio/vsl.nix
··· 33 33 description = "Kernel driver for accessing fusion-io cards"; 34 34 license = licenses.unfree; 35 35 platforms = [ "x86_64-linux" ]; 36 - broken = stdenv.system != "x86_64-linux"; 36 + broken = stdenv.hostPlatform.system != "x86_64-linux"; 37 37 maintainers = with maintainers; [ wkennington ]; 38 38 }; 39 39 }
+1
pkgs/os-specific/linux/jool/cli.nix
··· 24 24 homepage = https://www.jool.mx/; 25 25 description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools"; 26 26 platforms = platforms.linux; 27 + license = licenses.gpl2; 27 28 maintainers = with maintainers; [ fpletz ]; 28 29 }; 29 30 }
+3 -4
pkgs/os-specific/linux/kernel-headers/default.nix
··· 1 1 { stdenvNoCC, lib, buildPackages 2 - , hostPlatform 3 2 , fetchurl, perl 4 3 }: 5 4 6 - assert hostPlatform.isLinux; 5 + assert stdenvNoCC.hostPlatform.isLinux; 7 6 8 7 let 9 8 common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation { ··· 14 13 inherit sha256; 15 14 }; 16 15 17 - ARCH = hostPlatform.platform.kernelArch; 16 + ARCH = stdenvNoCC.hostPlatform.platform.kernelArch; 18 17 19 18 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. 20 19 # We do this so we have a build->build, not build->host, C compiler. 21 20 depsBuildBuild = [ buildPackages.stdenv.cc ]; 22 21 nativeBuildInputs = [ perl ]; 23 22 24 - extraIncludeDirs = lib.optional hostPlatform.isPowerPC ["ppc"]; 23 + extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"]; 25 24 26 25 # "patches" array defaults to 'null' to avoid changing hash 27 26 # and causing mass rebuild
+3 -3
pkgs/os-specific/linux/kernel/common-config.nix
··· 114 114 IP_DCCP_CCID3 = no; # experimental 115 115 CLS_U32_PERF = yes; 116 116 CLS_U32_MARK = yes; 117 - BPF_JIT = when (stdenv.system == "x86_64-linux") yes; 117 + BPF_JIT = when (stdenv.hostPlatform.system == "x86_64-linux") yes; 118 118 WAN = yes; 119 119 # Required by systemd per-cgroup firewalling 120 120 CGROUP_BPF = option yes; ··· 184 184 FB_VESA = yes; 185 185 FRAMEBUFFER_CONSOLE = yes; 186 186 FRAMEBUFFER_CONSOLE_ROTATION = yes; 187 - FB_GEODE = when (stdenv.system == "i686-linux") yes; 187 + FB_GEODE = when (stdenv.hostPlatform.system == "i686-linux") yes; 188 188 }; 189 189 190 190 video = { ··· 497 497 }; 498 498 499 499 # Support x2APIC (which requires IRQ remapping) 500 - x2apic = optionalAttrs (stdenv.system == "x86_64-linux") { 500 + x2apic = optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { 501 501 X86_X2APIC = yes; 502 502 IRQ_REMAP = yes; 503 503 };
+11 -12
pkgs/os-specific/linux/kernel/generic.nix
··· 35 35 # symbolic name and `patch' is the actual patch. The patch may 36 36 # optionally be compressed with gzip or bzip2. 37 37 kernelPatches ? [] 38 - , ignoreConfigErrors ? hostPlatform.platform.name != "pc" || 39 - hostPlatform != stdenv.buildPlatform 38 + , ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || 39 + stdenv.hostPlatform != stdenv.buildPlatform 40 40 , extraMeta ? {} 41 - , hostPlatform 42 41 43 - # easy overrides to hostPlatform.platform members 44 - , autoModules ? hostPlatform.platform.kernelAutoModules 45 - , preferBuiltin ? hostPlatform.platform.kernelPreferBuiltin or false 46 - , kernelArch ? hostPlatform.platform.kernelArch 42 + # easy overrides to stdenv.hostPlatform.platform members 43 + , autoModules ? stdenv.hostPlatform.platform.kernelAutoModules 44 + , preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false 45 + , kernelArch ? stdenv.hostPlatform.platform.kernelArch 47 46 48 47 , mkValueOverride ? null 49 48 , ... ··· 69 68 inherit stdenv version structuredExtraConfig mkValueOverride; 70 69 71 70 # append extraConfig for backwards compatibility but also means the user can't override the kernelExtraConfig part 72 - extraConfig = extraConfig + lib.optionalString (hostPlatform.platform ? kernelExtraConfig) hostPlatform.platform.kernelExtraConfig; 71 + extraConfig = extraConfig + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; 73 72 74 73 features = kernelFeatures; # Ensure we know of all extra patches, etc. 75 74 }; ··· 93 92 nativeBuildInputs = [ perl ] 94 93 ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]; 95 94 96 - platformName = hostPlatform.platform.name; 95 + platformName = stdenv.hostPlatform.platform.name; 97 96 # e.g. "defconfig" 98 - kernelBaseConfig = if defconfig != null then defconfig else hostPlatform.platform.kernelBaseConfig; 97 + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; 99 98 # e.g. "bzImage" 100 - kernelTarget = hostPlatform.platform.kernelTarget; 99 + kernelTarget = stdenv.hostPlatform.platform.kernelTarget; 101 100 102 101 prePatch = kernel.prePatch + '' 103 102 # Patch kconfig to print "###" after every question so that ··· 128 127 }; 129 128 130 129 kernel = (callPackage ./manual-config.nix {}) { 131 - inherit version modDirVersion src kernelPatches stdenv extraMeta configfile hostPlatform; 130 + inherit version modDirVersion src kernelPatches stdenv extraMeta configfile; 132 131 133 132 config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; }; 134 133 };
+1 -1
pkgs/os-specific/linux/kernel/linux-4.14.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 2 2 3 3 with stdenv.lib; 4 4
+1 -1
pkgs/os-specific/linux/kernel/linux-4.17.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 2 2 3 3 with stdenv.lib; 4 4
+1 -1
pkgs/os-specific/linux/kernel/linux-4.18.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: 2 2 3 3 with stdenv.lib; 4 4
+1 -1
pkgs/os-specific/linux/kernel/linux-4.4.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.4.153";
+1 -1
pkgs/os-specific/linux/kernel/linux-4.9.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.9.124";
+1 -1
pkgs/os-specific/linux/kernel/linux-beagleboard.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args: 2 2 3 3 let 4 4 modDirVersion = "4.14.12";
+1 -1
pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 2 3 3 with stdenv.lib; 4 4
+1 -1
pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.14.66-147";
+1 -1
pkgs/os-specific/linux/kernel/linux-mptcp-93.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 2 3 3 buildLinux (rec { 4 4 mptcpVersion = "0.93";
+1 -1
pkgs/os-specific/linux/kernel/linux-mptcp.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 2 3 3 buildLinux (rec { 4 4 mptcpVersion = "0.94";
+1 -1
pkgs/os-specific/linux/kernel/linux-riscv.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.16-rc6";
+2 -2
pkgs/os-specific/linux/kernel/linux-rpi.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 2 3 3 let 4 4 modDirVersion = "4.14.50"; ··· 18 18 defconfig = { 19 19 "armv6l-linux" = "bcmrpi_defconfig"; 20 20 "armv7l-linux" = "bcm2709_defconfig"; 21 - }.${stdenv.system} or (throw "linux_rpi not supported on '${stdenv.system}'"); 21 + }.${stdenv.hostPlatform.system} or (throw "linux_rpi not supported on '${stdenv.hostPlatform.system}'"); 22 22 23 23 features = { 24 24 efiBootStub = false;
+1 -1
pkgs/os-specific/linux/kernel/linux-samus-4.12.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args: 1 + { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.12.2";
+1 -1
pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchgit, perl, buildLinux, ... } @ args: 1 + { stdenv, buildPackages, fetchgit, perl, buildLinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.16.2018.08.03";
+1 -1
pkgs/os-specific/linux/kernel/linux-testing.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args: 1 + { stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args: 2 2 3 3 buildLinux (args // rec { 4 4 version = "4.19-rc1";
+4 -6
pkgs/os-specific/linux/kernel/manual-config.nix
··· 36 36 allowImportFromDerivation ? false, 37 37 # ignored 38 38 features ? null, 39 - 40 - hostPlatform 41 39 }: 42 40 43 41 let ··· 56 54 57 55 commonMakeFlags = [ 58 56 "O=$(buildRoot)" 59 - ] ++ stdenv.lib.optionals (hostPlatform.platform ? kernelMakeFlags) 60 - hostPlatform.platform.kernelMakeFlags; 57 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags) 58 + stdenv.hostPlatform.platform.kernelMakeFlags; 61 59 62 60 drvAttrs = config_: platform: kernelPatches: configfile: 63 61 let ··· 255 253 256 254 assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null; 257 255 assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null; 258 - stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches configfile) // { 256 + stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { 259 257 name = "linux-${version}"; 260 258 261 259 enableParallelBuilding = true; ··· 279 277 "CROSS_COMPILE=${stdenv.cc.targetPrefix}" 280 278 ]; 281 279 282 - karch = hostPlatform.platform.kernelArch; 280 + karch = stdenv.hostPlatform.platform.kernelArch; 283 281 })
+5 -7
pkgs/os-specific/linux/klibc/default.nix
··· 1 - { stdenv, fetchurl, linuxHeaders, perl 2 - , buildPlatform, hostPlatform 3 - }: 1 + { stdenv, fetchurl, linuxHeaders, perl }: 4 2 5 3 let 6 4 commonMakeFlags = [ ··· 25 23 hardeningDisable = [ "format" "stackprotector" ]; 26 24 27 25 makeFlags = commonMakeFlags ++ [ 28 - "KLIBCARCH=${hostPlatform.platform.kernelArch}" 26 + "KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}" 29 27 "KLIBCKERNELSRC=${linuxHeaders}" 30 28 ] # TODO(@Ericson2314): We now can get the ABI from 31 - # `hostPlatform.parsed.abi`, is this still a good idea? 32 - ++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" 33 - ++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; 29 + # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? 30 + ++ stdenv.lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" 31 + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; 34 32 35 33 # Install static binaries as well. 36 34 postInstall = ''
+3 -2
pkgs/os-specific/linux/kmod/default.nix
··· 33 33 ln -s bin $out/sbin 34 34 ''; 35 35 36 - meta = { 36 + meta = with stdenv.lib; { 37 37 homepage = https://www.kernel.org/pub/linux/utils/kernel/kmod/; 38 38 description = "Tools for loading and managing Linux kernel modules"; 39 - platforms = stdenv.lib.platforms.linux; 39 + license = licenses.lgpl21; 40 + platforms = platforms.linux; 40 41 }; 41 42 }
+4 -3
pkgs/os-specific/linux/libatasmart/default.nix
··· 11 11 nativeBuildInputs = [ pkgconfig ]; 12 12 buildInputs = [ udev ]; 13 13 14 - meta = { 15 - homepage = http://0pointer.de/public/; 14 + meta = with stdenv.lib; { 15 + homepage = http://0pointer.de/blog/projects/being-smart.html; 16 16 description = "Library for querying ATA SMART status"; 17 - platforms = stdenv.lib.platforms.linux; 17 + license = licenses.lgpl21; 18 + platforms = platforms.linux; 18 19 }; 19 20 }
+3 -2
pkgs/os-specific/linux/lksctp-tools/default.nix
··· 8 8 sha256 = "05da6c2v3acc18ndvmkrag6x5lf914b7s0xkkr6wkvrbvd621sqs"; 9 9 }; 10 10 11 - meta = { 11 + meta = with stdenv.lib; { 12 12 description = "Linux Kernel Stream Control Transmission Protocol Tools."; 13 13 homepage = http://lksctp.sourceforge.net/; 14 - platforms = stdenv.lib.platforms.linux; 14 + license = with licenses; [ gpl2 lgpl21 ]; # library is lgpl21 15 + platforms = platforms.linux; 15 16 }; 16 17 }
+3 -2
pkgs/os-specific/linux/lm-sensors/default.nix
··· 27 27 ${stdenv.lib.optionalString sensord "PROG_EXTRA=sensord"}) 28 28 ''; 29 29 30 - meta = { 30 + meta = with stdenv.lib; { 31 31 homepage = http://www.lm-sensors.org/; 32 32 description = "Tools for reading hardware sensors"; 33 - platforms = stdenv.lib.platforms.linux; 33 + license = with licenses; [ gpl2 lgpl21 ]; 34 + platforms = platforms.linux; 34 35 }; 35 36 }
+1 -2
pkgs/os-specific/linux/mdadm/default.nix
··· 1 1 { stdenv, writeScript 2 2 , fetchurl, groff 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 let ··· 32 31 "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" 33 32 "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" 34 33 "STRIP=" 35 - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 34 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 36 35 "CROSS_COMPILE=${stdenv.cc.targetPrefix}" 37 36 ]; 38 37
+3 -2
pkgs/os-specific/linux/multipath-tools/default.nix
··· 31 31 "unitdir=$(out)/lib/systemd/system" 32 32 ]; 33 33 34 - meta = { 34 + meta = with stdenv.lib; { 35 35 description = "Tools for the Linux multipathing driver"; 36 36 homepage = http://christophe.varoqui.free.fr/; 37 - platforms = stdenv.lib.platforms.linux; 37 + license = licenses.gpl2; 38 + platforms = platforms.linux; 38 39 }; 39 40 }
+2 -2
pkgs/os-specific/linux/musl/default.nix
··· 1 - { stdenv, lib, fetchurl, hostPlatform 1 + { stdenv, lib, fetchurl 2 2 , linuxHeaders ? null 3 3 , useBSDCompatHeaders ? true 4 4 }: ··· 61 61 configureFlagsArray+=("--syslibdir=$out/lib") 62 62 ''; 63 63 64 - CFLAGS="-fstack-protector-strong" + lib.optionalString hostPlatform.isPower " -mlong-double-64"; 64 + CFLAGS="-fstack-protector-strong" + lib.optionalString stdenv.hostPlatform.isPower " -mlong-double-64"; 65 65 66 66 configureFlags = [ 67 67 "--enable-shared"
+12 -7
pkgs/os-specific/linux/nfs-utils/default.nix
··· 1 - { stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap 1 + { stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent 2 2 , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers 3 3 , buildEnv 4 4 }: ··· 14 14 15 15 in stdenv.mkDerivation rec { 16 16 name = "nfs-utils-${version}"; 17 - version = "2.1.1"; 17 + version = "2.3.2"; 18 18 19 19 src = fetchurl { 20 - url = "mirror://sourceforge/nfs/${name}.tar.bz2"; 21 - sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a"; 20 + url = "https://kernel.org/pub/linux/utils/nfs-utils/${version}/${name}.tar.xz"; 21 + sha256 = "06av6cjf8h18dpaxh8cd1awsra75zf6s5sj5r2z5g7scbj051ziw"; 22 22 }; 23 23 24 + # libnfsidmap is built together with nfs-utils from the same source, 25 + # put it in the "lib" output, and the headers in "dev" 26 + outputs = [ "out" "dev" "lib" "man" ]; 27 + 24 28 nativeBuildInputs = [ pkgconfig ]; 25 29 26 30 buildInputs = [ 27 - libtirpc libcap libevent libnfsidmap sqlite lvm2 31 + libtirpc libcap libevent sqlite lvm2 28 32 libuuid keyutils kerberos tcp_wrappers 29 33 ]; 30 34 ··· 34 38 [ "--enable-gss" 35 39 "--with-statedir=/var/lib/nfs" 36 40 "--with-krb5=${kerberosEnv}" 37 - "--with-systemd=$(out)/etc/systemd/system" 41 + "--with-systemd=${placeholder "out"}/etc/systemd/system" 38 42 "--enable-libmount-mount" 43 + "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap 39 44 ] 40 45 ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; 41 46 ··· 99 104 daemons. 100 105 ''; 101 106 102 - homepage = https://sourceforge.net/projects/nfs/; 107 + homepage = https://linux-nfs.org/; 103 108 license = licenses.gpl2; 104 109 platforms = platforms.linux; 105 110 maintainers = with maintainers; [ abbradar ];
+4 -4
pkgs/os-specific/linux/nvidia-x11/generic.nix
··· 34 34 builder = ./builder.sh; 35 35 36 36 src = 37 - if stdenv.system == "i686-linux" then 37 + if stdenv.hostPlatform.system == "i686-linux" then 38 38 fetchurl { 39 39 url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run"; 40 40 sha256 = sha256_32bit; 41 41 } 42 - else if stdenv.system == "x86_64-linux" then 42 + else if stdenv.hostPlatform.system == "x86_64-linux" then 43 43 fetchurl { 44 44 url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run"; 45 45 sha256 = sha256_64bit; 46 46 } 47 - else throw "nvidia-x11 does not support platform ${stdenv.system}"; 47 + else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}"; 48 48 49 49 patches = if libsOnly then null else patches; 50 50 inherit prePatch; 51 51 inherit version useGLVND useProfiles; 52 - inherit (stdenv) system; 52 + inherit (stdenv.hostPlatform) system; 53 53 54 54 outputs = [ "out" ] ++ optional (!libsOnly) "bin"; 55 55 outputDev = if libsOnly then null else "bin";
+3 -3
pkgs/os-specific/linux/pam/default.nix
··· 1 - { stdenv, buildPackages, hostPlatform, fetchurl, fetchpatch, flex, cracklib, db4 }: 1 + { stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4 }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "linux-pam-${version}"; ··· 9 9 sha256 = "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"; 10 10 }; 11 11 12 - patches = stdenv.lib.optionals (hostPlatform.libc == "musl") [ 12 + patches = stdenv.lib.optionals (stdenv.hostPlatform.libc == "musl") [ 13 13 (fetchpatch { 14 14 url = "https://git.alpinelinux.org/cgit/aports/plain/main/linux-pam/fix-compat.patch?id=05a62bda8ec255d7049a2bd4cf0fdc4b32bdb2cc"; 15 15 sha256 = "1h5yp5h2mqp1fcwiwwklyfpa69a3i03ya32pivs60fd7g5bqa7sf"; ··· 47 47 48 48 preConfigure = '' 49 49 configureFlags="$configureFlags --includedir=$out/include/security" 50 - '' + stdenv.lib.optionalString (hostPlatform.libc == "musl") '' 50 + '' + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "musl") '' 51 51 # export ac_cv_search_crypt=no 52 52 # (taken from Alpine linux, apparently insecure but also doesn't build O:)) 53 53 # disable insecure modules
+5 -3
pkgs/os-specific/linux/pam_ccreds/default.nix
··· 11 11 sed 's/-o root -g root//' -i Makefile.in 12 12 ''; 13 13 14 - buildInputs = [pam openssl db]; 15 - meta = { 14 + buildInputs = [ pam openssl db ]; 15 + 16 + meta = with stdenv.lib; { 16 17 homepage = http://www.padl.com/OSS/pam_ccreds.html; 17 18 description = "PAM module to locally authenticate using an enterprise identity when the network is unavailable"; 18 - platforms = stdenv.lib.platforms.linux; 19 + license = licenses.gpl2; 20 + platforms = platforms.linux; 19 21 }; 20 22 }
+4 -3
pkgs/os-specific/linux/pam_mount/default.nix
··· 27 27 rm -r $out/nix 28 28 ''; 29 29 30 - meta = { 30 + meta = with stdenv.lib; { 31 31 homepage = http://pam-mount.sourceforge.net/; 32 32 description = "PAM module to mount volumes for a user session"; 33 - maintainers = [ stdenv.lib.maintainers.tstrobel ]; 34 - platforms = stdenv.lib.platforms.linux; 33 + maintainers = [ maintainers.tstrobel ]; 34 + license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ]; 35 + platforms = platforms.linux; 35 36 }; 36 37 }
+4 -3
pkgs/os-specific/linux/perf-tools/default.nix
··· 34 34 mv $d/man $out/share/ 35 35 ''; 36 36 37 - meta = { 38 - platforms = lib.platforms.linux; 37 + meta = with stdenv.lib; { 38 + platforms = platforms.linux; 39 39 homepage = https://github.com/brendangregg/perf-tools; 40 40 description = "Performance analysis tools based on Linux perf_events (aka perf) and ftrace"; 41 - maintainers = [ lib.maintainers.eelco ]; 41 + maintainers = [ maintainers.eelco ]; 42 + license = licenses.gpl2; 42 43 }; 43 44 }
+2 -2
pkgs/os-specific/linux/prl-tools/default.nix
··· 10 10 11 11 let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version; 12 12 xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer)); 13 - x64 = if stdenv.system == "x86_64-linux" then true 14 - else if stdenv.system == "i686-linux" then false 13 + x64 = if stdenv.hostPlatform.system == "x86_64-linux" then true 14 + else if stdenv.hostPlatform.system == "i686-linux" then false 15 15 else throw "Parallels Tools for Linux only support {x86-64,i686}-linux targets"; 16 16 in 17 17 stdenv.mkDerivation rec {
+4 -3
pkgs/os-specific/linux/rfkill/default.nix
··· 10 10 11 11 makeFlags = "PREFIX=$(out)"; 12 12 13 - meta = { 13 + meta = with stdenv.lib; { 14 14 homepage = http://wireless.kernel.org/en/users/Documentation/rfkill; 15 15 description = "A tool to query, enable and disable wireless devices"; 16 - platforms = stdenv.lib.platforms.linux; 17 - maintainers = [ stdenv.lib.maintainers.eelco ]; 16 + platforms = platforms.linux; 17 + maintainers = [ maintainers.eelco ]; 18 + license = licenses.isc; 18 19 }; 19 20 }
+3 -2
pkgs/os-specific/linux/rtkit/default.nix
··· 35 35 nativeBuildInputs = [ pkgconfig ]; 36 36 buildInputs = [ dbus libcap ]; 37 37 38 - meta = { 38 + meta = with stdenv.lib; { 39 39 homepage = http://0pointer.de/blog/projects/rtkit; 40 40 description = "A daemon that hands out real-time priority to processes"; 41 - platforms = stdenv.lib.platforms.linux; 41 + license = with licenses; [ gpl3 bsd0 ]; # lib is bsd license 42 + platforms = platforms.linux; 42 43 }; 43 44 }
+4 -5
pkgs/os-specific/linux/shadow/default.nix
··· 1 1 { stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2 2 2 , docbook_xml_dtd_412, docbook_xsl, gnome-doc-utils, flex, bison 3 3 , pam ? null, glibcCross ? null 4 - , buildPlatform, hostPlatform 5 4 }: 6 5 7 6 let 8 7 9 8 glibc = 10 - if hostPlatform != buildPlatform 9 + if stdenv.hostPlatform != stdenv.buildPlatform 11 10 then glibcCross 12 - else assert hostPlatform.libc == "glibc"; stdenv.cc.libc; 11 + else assert stdenv.hostPlatform.libc == "glibc"; stdenv.cc.libc; 13 12 14 13 dots_in_usernames = fetchpatch { 15 14 url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch; ··· 63 62 configureFlags = [ 64 63 "--enable-man" 65 64 "--with-group-name-max-length=32" 66 - ] ++ stdenv.lib.optional (hostPlatform.libc != "glibc") "--disable-nscd"; 65 + ] ++ stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc") "--disable-nscd"; 67 66 68 - preBuild = stdenv.lib.optionalString (hostPlatform.libc == "glibc") 67 + preBuild = stdenv.lib.optionalString (stdenv.hostPlatform.libc == "glibc") 69 68 '' 70 69 substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc.bin}/bin/nscd 71 70 '';
+2 -2
pkgs/os-specific/linux/sssd/default.nix
··· 1 1 { stdenv, fetchurl, pkgs, glibc, augeas, dnsutils, c-ares, curl, 2 - cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, libnfsidmap, doxygen, 2 + cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen, 3 3 python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap, 4 4 pcre, kerberos, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2, 5 5 libuuid, ldap, systemd, nspr, check, cmocka, uid_wrapper, ··· 48 48 49 49 enableParallelBuilding = true; 50 50 buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss 51 - samba libnfsidmap doxygen python python3 popt 51 + samba nfs-utils doxygen python python3 popt 52 52 talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos 53 53 cifs-utils glib keyutils dbus fakeroot libxslt libxml2 54 54 libuuid ldap systemd nspr check cmocka uid_wrapper
+1 -2
pkgs/os-specific/linux/systemd/default.nix
··· 8 8 , ninja, meson, python3Packages, glibcLocales 9 9 , patchelf 10 10 , getent 11 - , hostPlatform 12 11 , buildPackages 13 12 , withSelinux ? false, libselinux 14 13 , withLibseccomp ? libseccomp.meta.available, libseccomp ··· 79 78 "-Dsystem-gid-max=499" 80 79 # "-Dtime-epoch=1" 81 80 82 - (if stdenv.isAarch32 || stdenv.isAarch64 || !hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") 81 + (if stdenv.isAarch32 || stdenv.isAarch64 || !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") 83 82 "-Defi-libdir=${toString gnu-efi}/lib" 84 83 "-Defi-includedir=${toString gnu-efi}/include/efi" 85 84 "-Defi-ldsdir=${toString gnu-efi}/lib"
+3 -4
pkgs/os-specific/linux/uclibc/default.nix
··· 1 1 { stdenv, buildPackages 2 2 , fetchurl, linuxHeaders, libiconvReal 3 - , buildPlatform, hostPlatform 4 3 , extraConfig ? "" 5 4 }: 6 5 ··· 40 39 UCLIBC_SUSV4_LEGACY y 41 40 UCLIBC_HAS_THREADS_NATIVE y 42 41 KERNEL_HEADERS "${linuxHeaders}/include" 43 - '' + stdenv.lib.optionalString (stdenv.isAarch32 && buildPlatform != hostPlatform) '' 42 + '' + stdenv.lib.optionalString (stdenv.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) '' 44 43 CONFIG_ARM_EABI y 45 44 ARCH_WANTS_BIG_ENDIAN n 46 45 ARCH_BIG_ENDIAN n ··· 69 68 cat << EOF | parseconfig 70 69 ${nixConfig} 71 70 ${extraConfig} 72 - ${hostPlatform.platform.uclibc.extraConfig or ""} 71 + ${stdenv.hostPlatform.platform.uclibc.extraConfig or ""} 73 72 EOF 74 73 ( set +o pipefail; yes "" | make oldconfig ) 75 74 ''; ··· 82 81 depsBuildBuild = [ buildPackages.stdenv.cc ]; 83 82 84 83 makeFlags = [ 85 - "ARCH=${hostPlatform.parsed.cpu.name}" 84 + "ARCH=${stdenv.hostPlatform.parsed.cpu.name}" 86 85 "VERBOSE=1" 87 86 ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 88 87 "CROSS=${stdenv.cc.targetPrefix}"
+3 -2
pkgs/os-specific/linux/udisks/1-default.nix
··· 35 35 36 36 configureFlags = [ "--localstatedir=/var" "--enable-lvm2" ]; 37 37 38 - meta = { 38 + meta = with stdenv.lib; { 39 39 homepage = http://www.freedesktop.org/wiki/Software/udisks; 40 40 description = "A daemon and command-line utility for querying and manipulating storage devices"; 41 - platforms = stdenv.lib.platforms.linux; 41 + platforms = platforms.linux; 42 + license = with licenses; [ gpl2 lgpl2Plus ]; 42 43 }; 43 44 }
+3 -2
pkgs/os-specific/linux/usbutils/default.nix
··· 17 17 --replace /usr/share/usb.ids ${hwdata}/data/hwdata/usb.ids 18 18 ''; 19 19 20 - meta = { 20 + meta = with stdenv.lib; { 21 21 homepage = http://www.linux-usb.org/; 22 22 description = "Tools for working with USB devices, such as lsusb"; 23 - platforms = stdenv.lib.platforms.linux; 23 + license = licenses.gpl2Plus; 24 + platforms = platforms.linux; 24 25 }; 25 26 }
+4 -2
pkgs/os-specific/linux/wpa_supplicant/gui.nix
··· 23 23 cp -av icons/hicolor $out/share/icons 24 24 ''; 25 25 26 - meta = { 26 + meta = with stdenv.lib; { 27 27 description = "Qt-based GUI for wpa_supplicant"; 28 - platforms = stdenv.lib.platforms.linux; 28 + homepage = http://hostap.epitest.fi/wpa_supplicant/; 29 + license = licenses.bsd3; 30 + platforms = platforms.linux; 29 31 }; 30 32 }
+2 -2
pkgs/os-specific/windows/pthread-w32/default.nix
··· 1 - { fetchurl, stdenv, hostPlatform, buildPlatform, mingwrt }: 1 + { fetchurl, stdenv, mingwrt }: 2 2 3 3 # This file is tweaked for cross-compilation only. 4 - assert hostPlatform != buildPlatform; 4 + assert stdenv.hostPlatform != stdenv.buildPlatform; 5 5 6 6 stdenv.mkDerivation { 7 7 name = "pthread-w32-1.10.0";
+1 -3
pkgs/os-specific/windows/wxMSW-2.8/default.nix
··· 1 - { stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true 2 - , hostPlatform 3 - }: 1 + { stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true }: 4 2 5 3 stdenv.mkDerivation { 6 4 name = "wxMSW-2.8.11";
+3 -2
pkgs/servers/fingerd/bsd-fingerd/default.nix
··· 18 18 19 19 preInstall = '' mkdir -p $out/man/man8 $out/sbin ''; 20 20 21 - meta = { 22 - platforms = stdenv.lib.platforms.linux; 21 + meta = with stdenv.lib; { 22 + platforms = platforms.linux; 23 + license = licenses.bsdOriginal; 23 24 }; 24 25 }
+2 -2
pkgs/servers/http/nginx/mainline.nix
··· 1 1 { callPackage, ... }@args: 2 2 3 3 callPackage ./generic.nix (args // { 4 - version = "1.15.2"; 5 - sha256 = "145dcypq8dqc5as03iy1ycwifwynq9p4i8m56fn7g0myryp0kfpf"; 4 + version = "1.15.3"; 5 + sha256 = "11dysslkz76cdzhshc6w5qivdplk10pjpb73li0d1sz2qf8zp4ck"; 6 6 })
+2 -2
pkgs/servers/matrix-synapse/default.nix
··· 26 26 }; 27 27 in python2Packages.buildPythonApplication rec { 28 28 name = "matrix-synapse-${version}"; 29 - version = "0.33.0"; 29 + version = "0.33.3"; 30 30 31 31 src = fetchFromGitHub { 32 32 owner = "matrix-org"; 33 33 repo = "synapse"; 34 34 rev = "v${version}"; 35 - sha256 = "1immk6k0wgiks1s39dhyjg79n6rgans9zy85r5wmkp4dlc3r5rx6"; 35 + sha256 = "0yxxrs8yrrkp3pffdfab8apdmyhdcl90wgmglryy4q8vsksxn7d4"; 36 36 }; 37 37 38 38 patches = [
+2 -2
pkgs/servers/web-apps/wallabag/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "wallabag-${version}"; 5 - version = "2.3.2"; 5 + version = "2.3.3"; 6 6 7 7 # remember to rm -r var/cache/* after a rebuild or unexpected errors will occur 8 8 9 9 src = fetchurl { 10 10 url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz"; 11 - sha256 = "17yczdvgl43j6wa7hksxi2b51afvyd56vdya6hbbv68iiba4jyh4"; 11 + sha256 = "12q5daigqn4xqp9pyfzac881qm9ywrflm8sivhl3spczyh41gwpg"; 12 12 }; 13 13 14 14 outputs = [ "out" ];
+9 -10
pkgs/shells/bash/4.4.nix
··· 1 1 { stdenv, buildPackages 2 2 , fetchurl, binutils ? null, bison, autoconf, utillinux 3 - , buildPlatform, hostPlatform 4 3 5 4 # patch for cygwin requires readline support 6 5 , interactive ? stdenv.isCygwin, readline70 ? null ··· 11 10 12 11 assert interactive -> readline70 != null; 13 12 assert withDocs -> texinfo != null; 14 - assert hostPlatform.isDarwin -> binutils != null; 13 + assert stdenv.hostPlatform.isDarwin -> binutils != null; 15 14 16 15 let 17 16 upstreamPatches = import ./bash-4.4-patches.nix (nr: sha256: fetchurl { ··· 45 44 patchFlags = "-p0"; 46 45 47 46 patches = upstreamPatches 48 - ++ optional hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch 47 + ++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch 49 48 # https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html 50 - ++ optional hostPlatform.isMusl (fetchurl { 49 + ++ optional stdenv.hostPlatform.isMusl (fetchurl { 51 50 url = "https://lists.gnu.org/archive/html/bug-bash/2016-10/patchJxugOXrY2y.patch"; 52 51 sha256 = "1m4v9imidb1cc1h91f2na0b8y9kc5c5fgmpvy9apcyv2kbdcghg1"; 53 52 }); 54 53 55 54 configureFlags = [ 56 55 (if interactive then "--with-installed-readline" else "--disable-readline") 57 - ] ++ optionals (hostPlatform != buildPlatform) [ 56 + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 58 57 "bash_cv_job_control_missing=nomissing" 59 58 "bash_cv_sys_named_pipes=nomissing" 60 59 "bash_cv_getcwd_malloc=yes" 61 - ] ++ optionals hostPlatform.isCygwin [ 60 + ] ++ optionals stdenv.hostPlatform.isCygwin [ 62 61 "--without-libintl-prefix --without-libiconv-prefix" 63 62 "--with-installed-readline" 64 63 "bash_cv_dev_stdin=present" 65 64 "bash_cv_dev_fd=standard" 66 65 "bash_cv_termcap_lib=libncurses" 67 - ] ++ optionals (hostPlatform.libc == "musl") [ 66 + ] ++ optionals (stdenv.hostPlatform.libc == "musl") [ 68 67 "--without-bash-malloc" 69 68 "--disable-nls" 70 69 ]; ··· 73 72 depsBuildBuild = [ buildPackages.stdenv.cc ]; 74 73 nativeBuildInputs = [ bison ] 75 74 ++ optional withDocs texinfo 76 - ++ optional hostPlatform.isDarwin binutils 77 - ++ optional (hostPlatform.libc == "musl") autoconf; 75 + ++ optional stdenv.hostPlatform.isDarwin binutils 76 + ++ optional (stdenv.hostPlatform.libc == "musl") autoconf; 78 77 79 78 buildInputs = optional interactive readline70; 80 79 ··· 82 81 # build `version.h'. 83 82 enableParallelBuilding = false; 84 83 85 - makeFlags = optional hostPlatform.isCygwin [ 84 + makeFlags = optional stdenv.hostPlatform.isCygwin [ 86 85 "LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a" 87 86 "SHOBJ_LIBS=-lbash" 88 87 ];
+3 -2
pkgs/stdenv/cross/default.nix
··· 23 23 inherit config overlays; 24 24 selfBuild = false; 25 25 stdenv = 26 - assert vanillaPackages.hostPlatform == localSystem; 27 - assert vanillaPackages.targetPlatform == localSystem; 26 + assert vanillaPackages.stdenv.buildPlatform == localSystem; 27 + assert vanillaPackages.stdenv.hostPlatform == localSystem; 28 + assert vanillaPackages.stdenv.targetPlatform == localSystem; 28 29 vanillaPackages.stdenv.override { targetPlatform = crossSystem; }; 29 30 # It's OK to change the built-time dependencies 30 31 allowCustomOverrides = true;
+2 -2
pkgs/stdenv/darwin/default.nix
··· 348 348 349 349 darwin = super.darwin // { 350 350 inherit (darwin) dyld ICU Libsystem libiconv; 351 - } // lib.optionalAttrs (super.targetPlatform == localSystem) { 351 + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { 352 352 inherit (darwin) binutils binutils-unwrapped cctools; 353 353 }; 354 - } // lib.optionalAttrs (super.targetPlatform == localSystem) { 354 + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { 355 355 # Need to get rid of these when cross-compiling. 356 356 inherit binutils binutils-unwrapped; 357 357 };
+1 -1
pkgs/stdenv/generic/make-derivation.nix
··· 187 187 builder = attrs.realBuilder or stdenv.shell; 188 188 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; 189 189 inherit stdenv; 190 - inherit (stdenv) system; 190 + inherit (stdenv.hostPlatform) system; 191 191 userHook = config.stdenv.userHook or null; 192 192 __ignoreNulls = true; 193 193
+1 -1
pkgs/stdenv/linux/default.nix
··· 366 366 gnumake gnused gnutar gnugrep gnupatch patchelf 367 367 attr acl paxctl zlib pcre; 368 368 ${localSystem.libc} = getLibc prevStage; 369 - } // lib.optionalAttrs (super.targetPlatform == localSystem) { 369 + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { 370 370 # Need to get rid of these when cross-compiling. 371 371 inherit (prevStage) binutils binutils-unwrapped; 372 372 gcc = cc;
+3 -3
pkgs/tools/X11/xwinwrap/default.nix
··· 16 16 xlibsWrapper 17 17 ]; 18 18 19 - buildPhase = if stdenv.system == "x86_64-linux" then '' 19 + buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then '' 20 20 make all64 21 - '' else if stdenv.system == "i686-linux" then '' 21 + '' else if stdenv.hostPlatform.system == "i686-linux" then '' 22 22 make all32 23 - '' else throw "xwinwrap is not supported on ${stdenv.system}"; 23 + '' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}"; 24 24 25 25 installPhase = '' 26 26 mkdir -p $out/bin
+1 -1
pkgs/tools/admin/bluemix-cli/default.nix
··· 5 5 version = "0.8.0"; 6 6 7 7 src = 8 - if stdenv.system == "i686-linux" then 8 + if stdenv.hostPlatform.system == "i686-linux" then 9 9 fetchurl { 10 10 name = "linux32-${version}.tar.gz"; 11 11 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
+1 -1
pkgs/tools/admin/google-cloud-sdk/default.nix
··· 32 32 name = "google-cloud-sdk-${version}"; 33 33 version = "206.0.0"; 34 34 35 - src = fetchurl (sources name stdenv.system); 35 + src = fetchurl (sources name stdenv.hostPlatform.system); 36 36 37 37 buildInputs = [ python makeWrapper ]; 38 38
+1 -1
pkgs/tools/archivers/gnutar/default.nix
··· 30 30 31 31 # May have some issues with root compilation because the bootstrap tool 32 32 # cannot be used as a login shell for now. 33 - FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1"; 33 + FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1"; 34 34 35 35 preConfigure = if stdenv.isCygwin then '' 36 36 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
+5 -7
pkgs/tools/archivers/zpaq/zpaqd.nix
··· 1 - { stdenv, fetchurl, unzip 2 - , hostPlatform 3 - }: 1 + { stdenv, fetchurl, unzip }: 4 2 5 3 let 6 4 # Generated upstream information ··· 14 12 }; 15 13 16 14 compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ] 17 - ++ stdenv.lib.optional (hostPlatform.isUnix) "-Dunix -pthread" 18 - ++ stdenv.lib.optional (hostPlatform.isi686) "-march=i686" 19 - ++ stdenv.lib.optional (hostPlatform.isx86_64) "-march=nocona" 20 - ++ stdenv.lib.optional (!hostPlatform.isx86) "-DNOJIT"); 15 + ++ stdenv.lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread" 16 + ++ stdenv.lib.optional (stdenv.hostPlatform.isi686) "-march=i686" 17 + ++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "-march=nocona" 18 + ++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT"); 21 19 in 22 20 stdenv.mkDerivation { 23 21 inherit (s) name version;
+1 -1
pkgs/tools/bootloaders/refind/default.nix
··· 7 7 }; 8 8 9 9 inherit 10 - (archids.${stdenv.system} or (throw "unsupported system: ${stdenv.system}")) 10 + (archids.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}")) 11 11 hostarch efiPlatform; 12 12 in 13 13
+1 -1
pkgs/tools/compression/bzip2/default.nix
··· 1 1 { stdenv, fetchurl 2 - , linkStatic ? (stdenv.system == "i686-cygwin") 2 + , linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin") 3 3 }: 4 4 5 5 stdenv.mkDerivation rec {
+1 -1
pkgs/tools/filesystems/sshfs-fuse/default.nix
··· 19 19 checkInputs = [ which python3Packages.pytest ]; 20 20 21 21 NIX_CFLAGS_COMPILE = stdenv.lib.optional 22 - (stdenv.system == "i686-linux") 22 + (stdenv.hostPlatform.system == "i686-linux") 23 23 "-D_FILE_OFFSET_BITS=64"; 24 24 25 25 postInstall = ''
+2 -3
pkgs/tools/graphics/optipng/default.nix
··· 1 1 { stdenv, fetchurl, libpng, static ? false 2 - , buildPlatform, hostPlatform 3 2 }: 4 3 5 4 # This package comes with its own copy of zlib, libpng and pngxtern ··· 26 25 configureFlags = [ 27 26 "--with-system-zlib" 28 27 "--with-system-libpng" 29 - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 28 + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 30 29 #"-prefix=$out" 31 30 ]; 32 31 33 - postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then '' 32 + postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then '' 34 33 mv "$out"/bin/optipng{,.exe} 35 34 '' else null; 36 35
+5 -5
pkgs/tools/graphics/pngout/default.nix
··· 1 1 {stdenv, fetchurl}: 2 2 3 3 let 4 - folder = if stdenv.system == "i686-linux" then "i686" 5 - else if stdenv.system == "x86_64-linux" then "x86_64" 6 - else throw "Unsupported system: ${stdenv.system}"; 4 + folder = if stdenv.hostPlatform.system == "i686-linux" then "i686" 5 + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" 6 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 7 7 in 8 8 stdenv.mkDerivation { 9 9 name = "pngout-20130221"; ··· 17 17 mkdir -p $out/bin 18 18 cp ${folder}/pngout $out/bin 19 19 20 - ${if stdenv.system == "i686-linux" then '' 20 + ${if stdenv.hostPlatform.system == "i686-linux" then '' 21 21 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout 22 - '' else if stdenv.system == "x86_64-linux" then '' 22 + '' else if stdenv.hostPlatform.system == "x86_64-linux" then '' 23 23 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout 24 24 '' else ""} 25 25 '';
+5 -5
pkgs/tools/misc/bandwidth/default.nix
··· 2 2 3 3 let 4 4 arch = 5 - if stdenv.system == "x86_64-linux" then "bandwidth64" 6 - else if stdenv.system == "i686-linux" then "bandwidth32" 7 - else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64" 8 - else if stdenv.system == "i686-darwin" then "bandwidth-mac32" 9 - else if stdenv.system == "i686-cygwin" then "bandwidth-win32" 5 + if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64" 6 + else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32" 7 + else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64" 8 + else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32" 9 + else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32" 10 10 else throw "Unknown architecture"; 11 11 in 12 12 stdenv.mkDerivation rec {
+12 -13
pkgs/tools/misc/coreutils/default.nix
··· 1 1 { stdenv, lib, buildPackages 2 2 , autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null 3 - , hostPlatform, buildPlatform 4 3 , aclSupport ? false, acl ? null 5 4 , attrSupport ? false, attr ? null 6 5 , selinuxSupport? false, libselinux ? null, libsepol ? null ··· 21 20 sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j"; 22 21 }; 23 22 24 - patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch; 23 + patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch; 25 24 26 25 # The test tends to fail on btrfs and maybe other unusual filesystems. 27 - postPatch = optionalString (!hostPlatform.isDarwin) '' 26 + postPatch = optionalString (!stdenv.hostPlatform.isDarwin) '' 28 27 sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh 29 28 sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh 30 29 sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh ··· 40 39 configureFlags = 41 40 optional (singleBinary != false) 42 41 ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") 43 - ++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no" 42 + ++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no" 44 43 ++ optional withPrefix "--program-prefix=g" 45 - ++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [ 44 + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [ 46 45 # TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I 47 46 # don't know why it is not properly detected cross building with glibc. 48 47 "fu_cv_sys_stat_statfs2_bsize=yes" ··· 52 51 buildInputs = [ gmp ] 53 52 ++ optional aclSupport acl 54 53 ++ optional attrSupport attr 55 - ++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch 54 + ++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch 56 55 ++ optionals selinuxSupport [ libselinux libsepol ] 57 56 # TODO(@Ericson2314): Investigate whether Darwin could benefit too 58 - ++ optional (hostPlatform != buildPlatform && hostPlatform.libc != "glibc") libiconv; 57 + ++ optional (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc != "glibc") libiconv; 59 58 60 59 # The tests are known broken on Cygwin 61 60 # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025), 62 61 # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351), 63 62 # and {Open,Free}BSD. 64 63 # With non-standard storeDir: https://github.com/NixOS/nix/issues/512 65 - doCheck = hostPlatform == buildPlatform 66 - && hostPlatform.libc == "glibc" 64 + doCheck = stdenv.hostPlatform == stdenv.buildPlatform 65 + && stdenv.hostPlatform.libc == "glibc" 67 66 && builtins.storeDir == "/nix/store"; 68 67 69 68 # Prevents attempts of running 'help2man' on cross-built binaries. 70 - PERL = if hostPlatform == buildPlatform then null else "missing"; 69 + PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing"; 71 70 72 71 # Saw random failures like ‘help2man: can't get '--help' info from 73 72 # man/sha512sum.td/sha512sum’. 74 73 enableParallelBuilding = false; 75 74 76 75 NIX_LDFLAGS = optionalString selinuxSupport "-lsepol"; 77 - FORCE_UNSAFE_CONFIGURE = optionalString hostPlatform.isSunOS "1"; 76 + FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1"; 78 77 79 78 # Works around a bug with 8.26: 80 79 # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop. 81 - preInstall = optionalString (hostPlatform != buildPlatform) '' 80 + preInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 82 81 sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|' 83 82 ''; 84 83 85 - postInstall = optionalString (hostPlatform != buildPlatform) '' 84 + postInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 86 85 rm $out/share/man/man1/* 87 86 cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1 88 87 '';
+1 -1
pkgs/tools/misc/execline/default.nix
··· 32 32 "--with-dynlib=${skalibs.lib}/lib" 33 33 ] 34 34 ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) 35 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 35 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 36 36 37 37 postInstall = '' 38 38 mkdir -p $doc/share/doc/execline
+4 -5
pkgs/tools/misc/findutils/default.nix
··· 1 1 { stdenv, fetchurl 2 2 , coreutils 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec { ··· 17 16 18 17 # Since glibc-2.25 the i686 tests hang reliably right after test-sleep. 19 18 doCheck 20 - = !hostPlatform.isDarwin 21 - && !(hostPlatform.libc == "glibc" && hostPlatform.isi686) 22 - && (hostPlatform.libc != "musl") 23 - && hostPlatform == buildPlatform; 19 + = !stdenv.hostPlatform.isDarwin 20 + && !(stdenv.hostPlatform.libc == "glibc" && stdenv.hostPlatform.isi686) 21 + && (stdenv.hostPlatform.libc != "musl") 22 + && stdenv.hostPlatform == stdenv.buildPlatform; 24 23 25 24 outputs = [ "out" "info" ]; 26 25
+6 -6
pkgs/tools/misc/grub/2.0x.nix
··· 28 28 "aarch64-linux".target = "arm64"; 29 29 }; 30 30 31 - canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); 32 - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); 31 + canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); 32 + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); 33 33 34 34 version = "2.02"; 35 35 ··· 86 86 87 87 configureFlags = [ "--enable-grub-mount" ] # dep of os-prober 88 88 ++ optional zfsSupport "--enable-libzfs" 89 - ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ] 90 - ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"]; 89 + ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] 90 + ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; 91 91 92 92 # save target that grub is compiled for 93 93 grubTarget = if efiSupport 94 - then "${efiSystemsInstall.${stdenv.system}.target}-efi" 94 + then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi" 95 95 else if inPCSystems 96 - then "${pcSystems.${stdenv.system}.target}-pc" 96 + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" 97 97 else ""; 98 98 99 99 doCheck = false;
+4 -4
pkgs/tools/misc/grub/pvgrub_image/default.nix
··· 22 22 tar -cf memdisk.tar grub.cfg 23 23 # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table" 24 24 # if we include it. 25 - grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \ 26 - -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \ 27 - $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') 25 + grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \ 26 + -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \ 27 + $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') 28 28 mkdir -p "$out/lib/grub-xen" 29 - cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/ 29 + cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/ 30 30 ''; 31 31 32 32 meta = with stdenv.lib; {
+2 -2
pkgs/tools/misc/grub/trusted.nix
··· 10 10 "x86_64-linux".target = "i386"; 11 11 }; 12 12 13 - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); 13 + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); 14 14 15 15 version = if for_HP_laptop then "1.2.1" else "1.2.0"; 16 16 ··· 84 84 85 85 # save target that grub is compiled for 86 86 grubTarget = if inPCSystems 87 - then "${pcSystems.${stdenv.system}.target}-pc" 87 + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" 88 88 else ""; 89 89 90 90 doCheck = false;
+2 -2
pkgs/tools/misc/mongodb-compass/default.nix
··· 43 43 ] + ":${stdenv.cc.cc.lib}/lib64"; 44 44 45 45 src = 46 - if stdenv.system == "x86_64-linux" then 46 + if stdenv.hostPlatform.system == "x86_64-linux" then 47 47 fetchurl { 48 48 url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb"; 49 49 sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p"; 50 50 } 51 51 else 52 - throw "MongoDB compass is not supported on ${stdenv.system}"; 52 + throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}"; 53 53 54 54 in stdenv.mkDerivation { 55 55 name = "mongodb-compass-${version}";
+7 -7
pkgs/tools/misc/mprime/default.nix
··· 2 2 3 3 let 4 4 srcDir = 5 - if stdenv.system == "x86_64-linux" then "linux64" 6 - else if stdenv.system == "i686-linux" then "linux" 7 - else if stdenv.system == "x86_64-darwin" then "macosx64" 5 + if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" 6 + else if stdenv.hostPlatform.system == "i686-linux" then "linux" 7 + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64" 8 8 else throwSystem; 9 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 9 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 10 10 gwnum = 11 - if stdenv.system == "x86_64-linux" then "make64" 12 - else if stdenv.system == "i686-linux" then "makefile" 13 - else if stdenv.system == "x86_64-darwin" then "makemac" 11 + if stdenv.hostPlatform.system == "x86_64-linux" then "make64" 12 + else if stdenv.hostPlatform.system == "i686-linux" then "makefile" 13 + else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac" 14 14 else throwSystem; 15 15 in 16 16
+1 -1
pkgs/tools/misc/ocz-ssd-guru/default.nix
··· 1 1 { fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }: 2 2 3 3 let 4 - system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32"; 4 + system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32"; 5 5 in 6 6 stdenv.mkDerivation rec { 7 7 name = "ocz-ssd-guru-${version}";
+1 -1
pkgs/tools/misc/os-prober/default.nix
··· 24 24 install -Dt $out/share common.sh 25 25 26 26 # probes 27 - case "${stdenv.system}" in 27 + case "${stdenv.hostPlatform.system}" in 28 28 i686*|x86_64*) ARCH=x86;; 29 29 powerpc*) ARCH=powerpc;; 30 30 arm*) ARCH=arm;;
+2 -2
pkgs/tools/misc/otfcc/default.nix
··· 1 - { stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }: 1 + { stdenv, fetchFromGitHub, premake5, ninja }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "otfcc-${version}"; ··· 17 17 premake5 ninja 18 18 ''; 19 19 20 - ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in 20 + ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in 21 21 [ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ]; 22 22 23 23 installPhase = ''
+2 -2
pkgs/tools/misc/pspg/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "pspg-${version}"; 5 - version = "1.3.0"; 5 + version = "1.4.2"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "okbob"; 9 9 repo = "pspg"; 10 10 rev = "${version}"; 11 - sha256 = "1m63bhhglrpc2g68i5bigrzlpvg98qs83jgvf2gsbc4gnx9hywk5"; 11 + sha256 = "0hmx9p5pbydnf8sil4vqpmly5mq2rvcj8a33s9fvfisnxxsqz73v"; 12 12 }; 13 13 14 14 nativeBuildInputs = [ pkgconfig ];
+1 -1
pkgs/tools/misc/s6-portable-utils/default.nix
··· 29 29 # Explicitly setting target ensures code can be compiled against a skalibs 30 30 # binary built on a different version of darwin. 31 31 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph 32 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 32 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 33 33 34 34 postInstall = '' 35 35 mkdir -p $doc/share/doc/s6-portable-utils/
+1 -1
pkgs/tools/misc/staruml/default.nix
··· 13 13 name = "staruml-${version}"; 14 14 15 15 src = 16 - if stdenv.system == "i686-linux" then fetchurl { 16 + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 17 17 url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb"; 18 18 sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n"; 19 19 } else fetchurl {
+2 -2
pkgs/tools/misc/ttyrec/default.nix
··· 1 - { stdenv, fetchurl, buildPlatform }: 1 + { stdenv, fetchurl }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "ttyrec-${version}"; ··· 11 11 12 12 patches = [ ./clang-fixes.patch ]; 13 13 14 - makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4" 14 + makeFlags = stdenv.lib.optional stdenv.buildPlatform.isLinux "CFLAGS=-DSVR4" 15 15 ++ stdenv.lib.optional stdenv.cc.isClang "CC=clang"; 16 16 17 17 installPhase = ''
+2 -2
pkgs/tools/misc/youtube-dl/default.nix
··· 15 15 buildPythonPackage rec { 16 16 17 17 pname = "youtube-dl"; 18 - version = "2018.08.04"; 18 + version = "2018.08.28"; 19 19 20 20 src = fetchurl { 21 21 url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; 22 - sha256 = "1hcx99qbbyigc8k98c8bcc6a2wnhq6493fmrkl7rysc8krlxr0pm"; 22 + sha256 = "1swdp4czvm0752psbi8a4qw5i9x18s7nhivh7iw92274pmqxq9wi"; 23 23 }; 24 24 25 25 nativeBuildInputs = [ makeWrapper ];
+1 -1
pkgs/tools/networking/airfield/default.nix
··· 6 6 let 7 7 nodePackages = import ./node.nix { 8 8 inherit pkgs; 9 - system = stdenv.system; 9 + system = stdenv.hostPlatform.system; 10 10 }; 11 11 12 12 runtimeEnv = buildEnv {
+1 -1
pkgs/tools/networking/filegive/default.nix
··· 21 21 buildInputs = [ go ]; 22 22 23 23 buildPhase = '' 24 - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} 24 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} 25 25 26 26 mkdir $TMPDIR/go 27 27 export GOPATH=$TMPDIR/go
+5 -5
pkgs/tools/networking/logmein-hamachi/default.nix
··· 4 4 5 5 let 6 6 arch = 7 - if stdenv.system == "x86_64-linux" then "x64" 8 - else if stdenv.system == "i686-linux" then "x86" 7 + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 8 + else if stdenv.hostPlatform.system == "i686-linux" then "x86" 9 9 else throwSystem; 10 - throwSystem = throw "Unsupported system: ${stdenv.system}"; 10 + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 11 11 sha256 = 12 - if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" 13 - else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" 12 + if stdenv.hostPlatform.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" 13 + else if stdenv.hostPlatform.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" 14 14 else throwSystem; 15 15 libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]; 16 16
+1 -1
pkgs/tools/networking/ngrok-2/default.nix
··· 15 15 } else if stdenv.isDarwin then fetchurl { 16 16 url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip"; 17 17 sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh"; 18 - } else throw "platform ${stdenv.system} not supported!"; 18 + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; 19 19 20 20 sourceRoot = "."; 21 21
+1 -1
pkgs/tools/networking/s6-dns/default.nix
··· 33 33 "--with-dynlib=${skalibs.lib}/lib" 34 34 ] 35 35 ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) 36 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 36 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 37 37 38 38 postInstall = '' 39 39 mkdir -p $doc/share/doc/s6-dns/
+1 -1
pkgs/tools/networking/s6-networking/default.nix
··· 61 61 "--with-include=${lib.getDev sslLibs.${sslSupport}}/include" 62 62 "--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib" 63 63 ]) 64 - ++ (lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 64 + ++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 65 65 66 66 postInstall = '' 67 67 mkdir -p $doc/share/doc/s6-networking/
+1 -1
pkgs/tools/networking/strongswan/default.nix
··· 68 68 "--enable-af-alg" "--enable-xauth-pam" "--enable-chapoly" 69 69 "--enable-curl" ] 70 70 ++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] 71 - ++ optional (stdenv.system == "i686-linux") "--enable-padlock" 71 + ++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" 72 72 ++ optionals enableTNC [ 73 73 "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" 74 74 "--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20"
+1 -1
pkgs/tools/package-management/cargo-edit/cargo-edit.nix
··· 2 2 { pkgs }: 3 3 4 4 with pkgs; 5 - let kernel = buildPlatform.parsed.kernel.name; 5 + let kernel = stdenv.buildPlatform.parsed.kernel.name; 6 6 updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); 7 7 mapFeatures = features: map (fun: fun { features = features; }); 8 8 mkFeatures = feat: lib.lists.foldl (features: featureName:
+3 -3
pkgs/tools/package-management/cargo-update/cargo-update.nix
··· 1 1 # Generated by carnix 0.6.6: carnix -o cargo-update.nix --src ./. Cargo.lock --standalone 2 - { lib, buildPlatform, buildRustCrate, fetchgit }: 3 - let kernel = buildPlatform.parsed.kernel.name; 4 - abi = buildPlatform.parsed.abi.name; 2 + { lib, stdenv, buildRustCrate, fetchgit }: 3 + let kernel = stdenv.hostPlatform.parsed.kernel.name; 4 + abi = stdenv.hostPlatform.parsed.abi.name; 5 5 include = includedFiles: src: builtins.filterSource (path: type: 6 6 lib.lists.any (f: 7 7 let p = toString (src + ("/" + f)); in
+1 -1
pkgs/tools/package-management/checkinstall/default.nix
··· 37 37 ./set-buildroot.patch 38 38 ] 39 39 40 - ++ stdenv.lib.optional (stdenv.system == "x86_64-linux") 40 + ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux") 41 41 # Force use of old memcpy so that installwatch works on Glibc < 42 42 # 2.14. 43 43 ./use-old-memcpy.patch;
+2 -3
pkgs/tools/package-management/nix/default.nix
··· 2 2 , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost 3 3 , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns 4 4 , busybox-sandbox-shell 5 - , hostPlatform, buildPlatform 6 5 , storeDir ? "/nix/store" 7 6 , stateDir ? "/nix/var" 8 7 , confDir ? "/etc" ··· 73 72 "--with-sandbox-shell=${sh}/bin/busybox" 74 73 ] 75 74 ++ lib.optional ( 76 - hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system 77 - ) ''--with-system=${hostPlatform.nix.system}'' 75 + stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system 76 + ) ''--with-system=${stdenv.hostPlatform.nix.system}'' 78 77 # RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50 79 78 ++ lib.optional (!libseccomp.meta.available) "--disable-seccomp-sandboxing"; 80 79
+1 -1
pkgs/tools/package-management/nixui/default.nix
··· 9 9 }; 10 10 nixui = (import ./nixui.nix { 11 11 inherit pkgs; 12 - inherit (stdenv) system; 12 + inherit (stdenv.hostPlatform) system; 13 13 })."nixui-git://github.com/matejc/nixui.git#0.2.1"; 14 14 script = writeScript "nixui" '' 15 15 #! ${stdenv.shell}
+3 -3
pkgs/tools/security/afl/default.nix
··· 4 4 5 5 let 6 6 afl-qemu = callPackage ./qemu.nix {}; 7 - qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64" 8 - else if stdenv.system == "i686-linux" then "qemu-i386" 9 - else throw "afl: no support for ${stdenv.system}!"; 7 + qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64" 8 + else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386" 9 + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; 10 10 in 11 11 12 12 stdenv.mkDerivation rec {
+4 -4
pkgs/tools/security/afl/qemu.nix
··· 16 16 aflTypesFile = writeText "afl-types.h" 17 17 (builtins.readFile ./qemu-patches/afl-types.h); 18 18 19 - cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user" 20 - else if stdenv.system == "i686-linux" then "i386-linux-user" 21 - else throw "afl: no support for ${stdenv.system}!"; 19 + cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user" 20 + else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user" 21 + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; 22 22 in 23 23 stdenv.mkDerivation rec { 24 24 name = "afl-${n}"; ··· 33 33 vde2 texinfo libuuid flex bison lzo snappy autoconf 34 34 libcap_ng gnutls 35 35 ] 36 - ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ]; 36 + ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ]; 37 37 38 38 enableParallelBuilding = true; 39 39
+6 -6
pkgs/tools/security/encryptr/default.nix
··· 5 5 }: 6 6 7 7 let 8 - arch = if stdenv.system == "x86_64-linux" then "amd" 9 - else if stdenv.system == "i686-linux" then "i386" 10 - else throw "Encryptr for ${stdenv.system} not supported!"; 8 + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd" 9 + else if stdenv.hostPlatform.system == "i686-linux" then "i386" 10 + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; 11 11 12 - sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" 13 - else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" 14 - else throw "Encryptr for ${stdenv.system} not supported!"; 12 + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" 13 + else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" 14 + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; 15 15 16 16 in stdenv.mkDerivation rec { 17 17 name = "encryptr-${version}";
+4 -3
pkgs/tools/security/enpass/default.nix
··· 1 - {stdenv, system, fetchurl, dpkg, openssl, xorg 1 + { stdenv, fetchurl, dpkg, openssl, xorg 2 2 , glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype 3 3 , gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig 4 4 , makeWrapper , python, pythonPackages, lib 5 - , libredirect, lsof}: 5 + , libredirect, lsof 6 + }: 6 7 7 8 let 8 9 all_data = builtins.fromJSON (builtins.readFile ./data.json); ··· 11 12 x86_64-linux = "amd64"; 12 13 }; 13 14 14 - data = all_data.${system_map.${system} or (throw "Unsupported platform")}; 15 + data = all_data.${system_map.${stdenv.hostPlatform.system} or (throw "Unsupported platform")}; 15 16 16 17 baseUrl = http://repo.sinew.in; 17 18
+3 -3
pkgs/tools/security/pcsc-scm-scl011/default.nix
··· 1 1 { stdenv, fetchurl, unzip, libusb }: 2 2 3 3 let 4 - arch = if stdenv.system == "i686-linux" then "32" 5 - else if stdenv.system == "x86_64-linux" then "64" 6 - else throw "Unsupported system: ${stdenv.system}"; 4 + arch = if stdenv.hostPlatform.system == "i686-linux" then "32" 5 + else if stdenv.hostPlatform.system == "x86_64-linux" then "64" 6 + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 7 7 in 8 8 stdenv.mkDerivation rec { 9 9 name = "pcsc-scm-scl-${version}";
+1 -1
pkgs/tools/security/sshuttle/default.nix
··· 12 12 13 13 patches = [ ./sudo.patch ]; 14 14 15 - nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.system != "i686-linux") pandoc; 15 + nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.hostPlatform.system != "i686-linux") pandoc; 16 16 buildInputs = 17 17 [ coreutils openssh procps nettools ] 18 18 ++ stdenv.lib.optionals stdenv.isLinux [ iptables ];
+2 -2
pkgs/tools/system/at/default.nix
··· 5 5 6 6 stdenv.mkDerivation rec { 7 7 name = "at-${version}"; 8 - version = "3.1.20"; 8 + version = "3.1.23"; 9 9 10 10 src = fetchurl { 11 11 # Debian is apparently the last location where it can be found. 12 12 url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz"; 13 - sha256 = "1fgsrqpx0r6qcjxmlsqnwilydhfxn976c870mjc0n1bkmcy94w88"; 13 + sha256 = "040pr2ivfbrhvrhzis97cpwfkzpr7nin33nc301aga5aajlhlicp"; 14 14 }; 15 15 16 16 patches = [
+36
pkgs/tools/system/incron/default.nix
··· 1 + { stdenv, fetchFromGitHub, bash }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "incron-0.5.12"; 5 + src = fetchFromGitHub { 6 + owner = "ar-"; 7 + repo = "incron"; 8 + rev = name; 9 + sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih"; 10 + }; 11 + 12 + patches = [ ./default_path.patch ]; 13 + 14 + prePatch = '' 15 + sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp 16 + ''; 17 + 18 + installFlags = [ "PREFIX=$(out)" ]; 19 + installTargets = [ "install-man" ]; 20 + 21 + preInstall = '' 22 + mkdir -p $out/bin 23 + 24 + # make install doesn't work because setuid and permissions 25 + # just manually install the binaries instead 26 + cp incrond incrontab $out/bin/ 27 + ''; 28 + 29 + meta = with stdenv.lib; { 30 + description = "A cron-like daemon which handles filesystem events."; 31 + homepage = https://github.com/ar-/incron; 32 + license = licenses.gpl2; 33 + maintainers = [ maintainers.aanderse ]; 34 + platforms = platforms.linux; 35 + }; 36 + }
+36
pkgs/tools/system/incron/default_path.patch
··· 1 + diff --git usertable.cpp usertable.cpp 2 + index 11fd04b..a8681bd 100644 3 + --- a/usertable.cpp 4 + +++ b/usertable.cpp 5 + @@ -43,9 +43,6 @@ 6 + #define DONT_FOLLOW(mask) (false) 7 + #endif // IN_DONT_FOLLOW 8 + 9 + -// this is not enough, but... 10 + -#define DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin" 11 + - 12 + 13 + PROC_MAP UserTable::s_procMap; 14 + 15 + @@ -597,12 +594,20 @@ void UserTable::RunAsUser(std::string cmd) const 16 + if (clearenv() != 0) 17 + goto failed; 18 + 19 + + // try to recreate the user path as best as possible 20 + + std::string DEFAULT_PATH; 21 + + DEFAULT_PATH += "/run/wrappers/bin:"; 22 + + DEFAULT_PATH += pwd->pw_dir; 23 + + DEFAULT_PATH += "/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/"; 24 + + DEFAULT_PATH += pwd->pw_name; 25 + + DEFAULT_PATH += "/bin"; 26 + + 27 + if ( setenv("LOGNAME", pwd->pw_name, 1) != 0 28 + || setenv("USER", pwd->pw_name, 1) != 0 29 + || setenv("USERNAME", pwd->pw_name, 1) != 0 30 + || setenv("HOME", pwd->pw_dir, 1) != 0 31 + || setenv("SHELL", pwd->pw_shell, 1) != 0 32 + - || setenv("PATH", DEFAULT_PATH, 1) != 0) 33 + + || setenv("PATH", DEFAULT_PATH.c_str(), 1) != 0) 34 + { 35 + goto failed; 36 + }
+1 -1
pkgs/tools/system/s6-rc/default.nix
··· 39 39 "--with-dynlib=${s6.out}/lib" 40 40 ] 41 41 ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) 42 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 42 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 43 43 44 44 postInstall = '' 45 45 mkdir -p $doc/share/doc/s6-rc/
+1 -1
pkgs/tools/system/s6/default.nix
··· 40 40 "--with-dynlib=${execline.lib}/lib" 41 41 ] 42 42 ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) 43 - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); 43 + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); 44 44 45 45 postInstall = '' 46 46 mkdir -p $doc/share/doc/s6/
+1 -1
pkgs/tools/system/storebrowse/default.nix
··· 21 21 mkdir $TMPDIR/go 22 22 export GOPATH=$TMPDIR/go 23 23 24 - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} 24 + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} 25 25 26 26 GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite 27 27 mkdir -p $GOSQLITE
+1 -1
pkgs/tools/text/gawk/default.nix
··· 1 1 { stdenv, fetchurl 2 2 # TODO: links -lsigsegv but loses the reference for some reason 3 - , withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv 3 + , withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv 4 4 , interactive ? false, readline 5 5 6 6 /* Test suite broke on:
+2 -3
pkgs/tools/text/gnupatch/default.nix
··· 1 1 { stdenv, fetchurl 2 2 , ed, autoreconfHook 3 - , buildPlatform, hostPlatform 4 3 }: 5 4 6 5 stdenv.mkDerivation rec { ··· 27 26 buildInputs = stdenv.lib.optional doCheck ed; 28 27 nativeBuildInputs = [ autoreconfHook ]; 29 28 30 - configureFlags = stdenv.lib.optionals (hostPlatform != buildPlatform) [ 29 + configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 31 30 "ac_cv_func_strnlen_working=yes" 32 31 ]; 33 32 34 - doCheck = hostPlatform.libc != "musl"; # not cross; 33 + doCheck = stdenv.hostPlatform.libc != "musl"; # not cross; 35 34 36 35 meta = { 37 36 description = "GNU Patch, a program to apply differences to files";
+2 -4
pkgs/tools/text/html-tidy/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake, libxslt 2 - , hostPlatform 3 - }: 1 + { stdenv, fetchFromGitHub, cmake, libxslt }: 4 2 5 3 stdenv.mkDerivation rec { 6 4 name = "html-tidy-${version}"; ··· 16 14 nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; 17 15 18 16 cmakeFlags = stdenv.lib.optional 19 - (hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; 17 + (stdenv.hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; 20 18 21 19 # ATM bin/tidy is statically linked, as upstream provides no other option yet. 22 20 # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
+3 -3
pkgs/tools/text/xidel/default.nix
··· 11 11 #}; 12 12 13 13 src = 14 - if stdenv.system == "x86_64-linux" then 14 + if stdenv.hostPlatform.system == "x86_64-linux" then 15 15 fetchurl { 16 16 url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb"; 17 17 sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7"; 18 18 } 19 - else if stdenv.system == "i686-linux" then 19 + else if stdenv.hostPlatform.system == "i686-linux" then 20 20 fetchurl { 21 21 url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb"; 22 22 sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6"; 23 23 } 24 - else throw "xidel is not supported on ${stdenv.system}"; 24 + else throw "xidel is not supported on ${stdenv.hostPlatform.system}"; 25 25 26 26 buildInputs = [ dpkg ]; 27 27
+2 -2
pkgs/tools/typesetting/kindlegen/default.nix
··· 11 11 "i686-darwin" = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs"; 12 12 "x86_64-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; 13 13 "i686-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; 14 - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); 14 + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); 15 15 16 16 url = { 17 17 "x86_64-linux" = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz"; ··· 20 20 "i686-darwin" = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip"; 21 21 "x86_64-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; 22 22 "i686-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; 23 - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); 23 + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); 24 24 25 25 in stdenv.mkDerivation rec { 26 26 name = "kindlegen-${version}";
+2 -1
pkgs/top-level/aliases.nix
··· 151 151 libgnome_keyring = libgnome-keyring; # added 2018-02-25 152 152 libgnome_keyring3 = libgnome-keyring3; # added 2018-02-25 153 153 libgumbo = gumbo; # added 2018-01-21 154 - libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || hostPlatform.libc != "glibc") gettext; # added 2018-03-14 154 + libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || stdenv.hostPlatform.libc != "glibc") gettext; # added 2018-03-14 155 155 libjson_rpc_cpp = libjson-rpc-cpp; # added 2017-02-28 156 156 libmysql = mysql.connector-c; # added # 2017-12-28, this was a misnomer refering to libmysqlclient 157 157 librecad2 = librecad; # backwards compatibility alias, added 2015-10 ··· 278 278 tex-gyre-schola-math = tex-gyre-math.schola; # added 2018-04-03 279 279 tex-gyre-termes-math = tex-gyre-math.termes; # added 2018-04-03 280 280 tftp_hpa = tftp-hpa; # added 2015-04-03 281 + torbrowser = tor-browser-bundle-bin; # added 2017-04-05 281 282 trang = jing-trang; # added 2018-04-25 282 283 transmission_gtk = transmission-gtk; # added 2018-01-06 283 284 transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06
+110 -82
pkgs/top-level/all-packages.nix
··· 18 18 # A stdenv capable of building 32-bit binaries. On x86_64-linux, 19 19 # it uses GCC compiled with multilib support; on i686-linux, it's 20 20 # just the plain stdenv. 21 - stdenv_32bit = lowPrio (if hostPlatform.is32bit then stdenv else multiStdenv); 21 + stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv); 22 22 23 23 stdenvNoCC = stdenv.override { cc = null; }; 24 24 ··· 1744 1744 chunksync = callPackage ../tools/backup/chunksync { }; 1745 1745 1746 1746 cipherscan = callPackage ../tools/security/cipherscan { 1747 - openssl = if stdenv.system == "x86_64-linux" 1747 + openssl = if stdenv.hostPlatform.system == "x86_64-linux" 1748 1748 then openssl-chacha 1749 1749 else openssl; 1750 1750 }; ··· 3266 3266 inadyn = callPackage ../tools/networking/inadyn { }; 3267 3267 3268 3268 inboxer = callPackage ../applications/networking/mailreaders/inboxer { }; 3269 + 3270 + incron = callPackage ../tools/system/incron { }; 3269 3271 3270 3272 inetutils = callPackage ../tools/networking/inetutils { }; 3271 3273 ··· 4292 4294 4293 4295 notify-osd = callPackage ../applications/misc/notify-osd { }; 4294 4296 4297 + notify-osd-customizable = callPackage ../applications/misc/notify-osd-customizable { }; 4298 + 4295 4299 nox = callPackage ../tools/package-management/nox { }; 4296 4300 4297 4301 nq = callPackage ../tools/system/nq { }; ··· 5564 5568 5565 5569 tor-arm = callPackage ../tools/security/tor/tor-arm.nix { }; 5566 5570 5567 - # added 2017-04-05 5568 - torbrowser = /* builtins.trace '' 5569 - WARNING: torbrowser package was renamed to tor-browser-bundle-bin. 5570 - 5571 - Also, consider using nix-built tor-browser-unwrapped package instead. Read its longDescription. 5572 - '' */ tor-browser-bundle-bin; 5573 - 5574 5571 tor-browser-bundle-bin = callPackage ../applications/networking/browsers/tor-browser-bundle-bin { }; 5575 5572 5576 5573 tor-browser-bundle = callPackage ../applications/networking/browsers/tor-browser-bundle { ··· 6058 6055 6059 6056 wv2 = callPackage ../tools/misc/wv2 { }; 6060 6057 6061 - wyrd = callPackage ../tools/misc/wyrd { }; 6058 + wyrd = callPackage ../tools/misc/wyrd { 6059 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 6060 + }; 6062 6061 6063 6062 x86info = callPackage ../os-specific/linux/x86info { }; 6064 6063 ··· 6423 6422 cc = gcc; 6424 6423 # Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses 6425 6424 # clang's internal assembler). 6426 - extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc; 6425 + extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; 6427 6426 }; 6428 6427 6429 6428 gcc7Stdenv = overrideCC gccStdenv gcc7; 6430 6429 gcc8Stdenv = overrideCC gccStdenv gcc8; 6431 6430 6432 6431 wrapCCMulti = cc: 6433 - if system == "x86_64-linux" then let 6432 + if stdenv.targetPlatform.system == "x86_64-linux" then let 6434 6433 # Binutils with glibc multi 6435 6434 bintools = cc.bintools.override { 6436 6435 libc = glibc_multi; ··· 6450 6449 extraBuildCommands = '' 6451 6450 echo "dontMoveLib64=1" >> $out/nix-support/setup-hook 6452 6451 ''; 6453 - }) else throw "Multilib ${cc.name} not supported on ‘${system}’"; 6452 + }) else throw "Multilib ${cc.name} not supported for ‘${stdenv.targetPlatform.system}’"; 6454 6453 6455 6454 wrapClangMulti = clang: 6456 - if system == "x86_64-linux" then 6455 + if stdenv.targetPlatform.system == "x86_64-linux" then 6457 6456 callPackage ../development/compilers/llvm/multi.nix { 6458 6457 inherit clang; 6459 6458 gcc32 = pkgsi686Linux.gcc; 6460 6459 gcc64 = pkgs.gcc; 6461 6460 } 6462 - else throw "Multilib ${clang.cc.name} not supported on '${system}'"; 6461 + else throw "Multilib ${clang.cc.name} not supported for '${stdenv.targetPlatform.system}'"; 6463 6462 6464 6463 gcc_multi = wrapCCMulti gcc; 6465 6464 clang_multi = wrapClangMulti clang; ··· 6480 6479 6481 6480 # The GCC used to build libc for the target platform. Normal gccs will be 6482 6481 # built with, and use, that cross-compiled libc. 6483 - gccCrossStageStatic = assert targetPlatform != buildPlatform; let 6482 + gccCrossStageStatic = assert stdenv.targetPlatform != stdenv.hostPlatform; let 6484 6483 libcCross1 = 6485 - if targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers 6486 - else if targetPlatform.libc == "libSystem" then darwin.xcode 6487 - else if targetPlatform.libc == "musl" then musl 6484 + if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers 6485 + else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode 6486 + else if stdenv.targetPlatform.libc == "musl" then musl 6488 6487 else null; 6489 6488 binutils1 = wrapBintoolsWith { 6490 6489 bintools = binutils-unwrapped; ··· 6515 6514 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6516 6515 profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64)); 6517 6516 6518 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6517 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6519 6518 6520 6519 isl = if !stdenv.isDarwin then isl_0_14 else null; 6521 6520 cloog = if !stdenv.isDarwin then cloog else null; ··· 6528 6527 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6529 6528 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6530 6529 6531 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6530 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6532 6531 6533 6532 isl = if !stdenv.isDarwin then isl_0_11 else null; 6534 6533 ··· 6541 6540 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6542 6541 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6543 6542 6544 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6543 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6545 6544 6546 6545 isl = if !stdenv.isDarwin then isl_0_14 else null; 6547 6546 })); ··· 6552 6551 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6553 6552 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6554 6553 6555 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6554 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6556 6555 6557 6556 isl = if !stdenv.isDarwin then isl_0_14 else null; 6558 6557 })); ··· 6563 6562 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6564 6563 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6565 6564 6566 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6565 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6567 6566 6568 6567 isl = if !stdenv.isDarwin then isl_0_17 else null; 6569 6568 })); ··· 6574 6573 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6575 6574 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6576 6575 6577 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6576 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6578 6577 6579 6578 isl = if !stdenv.isDarwin then isl_0_17 else null; 6580 6579 })); ··· 6585 6584 # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 6586 6585 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 6587 6586 6588 - libcCross = if targetPlatform != buildPlatform then libcCross else null; 6587 + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 6589 6588 6590 6589 isl = isl_0_17; 6591 6590 })); ··· 6724 6723 graphviz = graphviz-nox; 6725 6724 }); 6726 6725 6727 - inherit (ocamlPackages.haxe) haxe_3_2 haxe_3_4; 6726 + inherit (ocaml-ng.ocamlPackages_4_05.haxe) haxe_3_2 haxe_3_4; 6728 6727 haxe = haxe_3_4; 6729 6728 haxePackages = recurseIntoAttrs (callPackage ./haxe-packages.nix { }); 6730 6729 inherit (haxePackages) hxcpp; ··· 6741 6740 mono = mono46; 6742 6741 }; 6743 6742 6744 - fstar = callPackage ../development/compilers/fstar { 6745 - ocamlPackages = ocaml-ng.ocamlPackages_4_06; 6746 - }; 6743 + fstar = callPackage ../development/compilers/fstar { }; 6747 6744 6748 - pyre = callPackage ../development/tools/pyre { 6749 - ocamlPackages = ocaml-ng.ocamlPackages_4_06; 6750 - }; 6745 + pyre = callPackage ../development/tools/pyre { }; 6751 6746 6752 6747 dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {}); 6753 6748 ··· 6915 6910 llvm = llvm_39; 6916 6911 }; 6917 6912 6913 + julia_07 = callPackage ../development/compilers/julia/0.7.nix { 6914 + gmp = gmp6; 6915 + openblas = openblasCompat; 6916 + inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; 6917 + }; 6918 + 6919 + julia_10 = callPackage ../development/compilers/julia/1.0.nix { 6920 + gmp = gmp6; 6921 + openblas = openblasCompat; 6922 + inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; 6923 + }; 6924 + 6918 6925 jwasm = callPackage ../development/compilers/jwasm { }; 6919 6926 6920 6927 kotlin = callPackage ../development/compilers/kotlin { }; ··· 7096 7103 7097 7104 nvidia_cg_toolkit = callPackage ../development/compilers/nvidia-cg-toolkit { }; 7098 7105 7099 - obliv-c = callPackage ../development/compilers/obliv-c {}; 7106 + obliv-c = callPackage ../development/compilers/obliv-c { 7107 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 7108 + }; 7100 7109 7101 7110 ocaml-ng = callPackage ./ocaml-packages.nix { }; 7102 7111 ocaml = ocamlPackages.ocaml; ··· 7121 7130 7122 7131 opaline = callPackage ../development/tools/ocaml/opaline { }; 7123 7132 7124 - opam = callPackage ../development/tools/ocaml/opam { }; 7133 + opam = callPackage ../development/tools/ocaml/opam { 7134 + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; 7135 + }; 7125 7136 7126 7137 picat = callPackage ../development/compilers/picat { 7127 7138 stdenv = overrideCC stdenv gcc49; ··· 7286 7297 # Others should instead delegate to the next stage's choice with 7287 7298 # `targetPackages.stdenv.cc.bintools`. This one is different just to 7288 7299 # provide the default choice, avoiding infinite recursion. 7289 - bintools ? if targetPlatform.isDarwin then darwin.binutils else binutils 7300 + bintools ? if stdenv.targetPlatform.isDarwin then darwin.binutils else binutils 7290 7301 , libc ? bintools.libc 7291 7302 , ... 7292 7303 } @ extraArgs: 7293 7304 callPackage ../build-support/cc-wrapper (let self = { 7294 - nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; 7295 - nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; 7305 + nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false; 7306 + nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false; 7296 7307 nativePrefix = stdenv.cc.nativePrefix or ""; 7297 7308 noLibc = !self.nativeLibc && (self.libc == null); 7298 7309 ··· 7308 7319 7309 7320 wrapBintoolsWith = 7310 7321 { bintools 7311 - , libc ? if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc 7322 + , libc ? if stdenv.targetPlatform != stdenv.hostPlatform then libcCross else stdenv.cc.libc 7312 7323 , ... 7313 7324 } @ extraArgs: 7314 7325 callPackage ../build-support/bintools-wrapper (let self = { 7315 - nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; 7316 - nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; 7326 + nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false; 7327 + nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false; 7317 7328 nativePrefix = stdenv.cc.nativePrefix or ""; 7318 7329 7319 7330 noLibc = (self.libc == null); ··· 7952 7963 7953 7964 binutils-unwrapped = callPackage ../development/tools/misc/binutils { 7954 7965 # FHS sys dirs presumably only have stuff for the build platform 7955 - noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; 7966 + noSysDirs = (stdenv.targetPlatform != stdenv.hostPlatform) || noSysDirs; 7956 7967 }; 7957 7968 binutils = wrapBintoolsWith { 7958 7969 bintools = binutils-unwrapped; ··· 8095 8106 # Does not actually depend on Qt 5 8096 8107 inherit (kdeFrameworks) extra-cmake-modules kapidox kdoctools; 8097 8108 8098 - coccinelle = callPackage ../development/tools/misc/coccinelle { }; 8109 + coccinelle = callPackage ../development/tools/misc/coccinelle { 8110 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 8111 + }; 8099 8112 8100 8113 cpptest = callPackage ../development/libraries/cpptest { }; 8101 8114 ··· 8938 8951 bicgl = callPackage ../development/libraries/science/biology/bicgl { }; 8939 8952 8940 8953 # TODO(@Ericson2314): Build bionic libc from source 8941 - bionic = assert hostPlatform.useAndroidPrebuilt; 8942 - androidenv."androidndkPkgs_${hostPlatform.ndkVer}".libraries; 8954 + bionic = assert stdenv.hostPlatform.useAndroidPrebuilt; 8955 + androidenv."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries; 8943 8956 8944 8957 bobcat = callPackage ../development/libraries/bobcat { }; 8945 8958 ··· 9518 9531 else if name == "uclibc" then targetPackages.uclibcCross 9519 9532 else if name == "musl" then targetPackages.muslCross or muslCross 9520 9533 else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 9521 - else if targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries 9534 + else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries 9522 9535 else if name == "libSystem" then targetPackages.darwin.xcode 9523 9536 else throw "Unknown libc"; 9524 9537 9525 - libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc; 9538 + libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc; 9526 9539 9527 9540 # Only supported on Linux, using glibc 9528 - glibcLocales = if hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null; 9541 + glibcLocales = if stdenv.hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null; 9529 9542 9530 9543 glibcInfo = callPackage ../development/libraries/glibc/info.nix { }; 9531 9544 ··· 9643 9656 9644 9657 gnu-config = callPackage ../development/libraries/gnu-config { }; 9645 9658 9646 - gnu-efi = if hostPlatform.isEfi 9659 + gnu-efi = if stdenv.hostPlatform.isEfi 9647 9660 then callPackage ../development/libraries/gnu-efi { } 9648 9661 else null; 9649 9662 ··· 10105 10118 libb2 = callPackage ../development/libraries/libb2 { }; 10106 10119 10107 10120 libbap = callPackage ../development/libraries/libbap { 10108 - inherit (ocamlPackages) bap ocaml findlib ctypes; 10121 + inherit (ocaml-ng.ocamlPackages_4_05) bap ocaml findlib ctypes; 10109 10122 }; 10110 10123 10111 10124 libbass = (callPackage ../development/libraries/audio/libbass { }).bass; ··· 10539 10552 10540 10553 libnfs = callPackage ../development/libraries/libnfs { }; 10541 10554 10542 - libnfsidmap = callPackage ../development/libraries/libnfsidmap { }; 10543 - 10544 10555 libnice = callPackage ../development/libraries/libnice { }; 10545 10556 10546 10557 libnsl = callPackage ../development/libraries/libnsl { }; ··· 10589 10600 # We also provide `libiconvReal`, which will always be a standalone libiconv, 10590 10601 # just in case you want it regardless of platform. 10591 10602 libiconv = 10592 - if (hostPlatform.libc == "glibc" || hostPlatform.libc == "musl") 10593 - then glibcIconv (if hostPlatform != buildPlatform 10603 + if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") 10604 + then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform 10594 10605 then libcCross 10595 10606 else stdenv.cc.libc) 10596 - else if hostPlatform.isDarwin 10607 + else if stdenv.hostPlatform.isDarwin 10597 10608 then darwin.libiconv 10598 10609 else libiconvReal; 10599 10610 ··· 10610 10621 }; 10611 10622 10612 10623 # On non-GNU systems we need GNU Gettext for libintl. 10613 - libintl = if hostPlatform.libc != "glibc" then gettext else null; 10624 + libintl = if stdenv.hostPlatform.libc != "glibc" then gettext else null; 10614 10625 10615 10626 libid3tag = callPackage ../development/libraries/libid3tag { 10616 10627 gperf = gperf_3_0; ··· 11139 11150 # Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need) 11140 11151 libGL_driver = libGLDarwinOr mesa_drivers; 11141 11152 11142 - libGLSupported = lib.elem system lib.platforms.mesaPlatforms; 11153 + libGLSupported = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; 11143 11154 11144 11155 libGLDarwin = callPackage ../development/libraries/mesa-darwin { 11145 11156 inherit (darwin.apple_sdk.frameworks) OpenGL; ··· 11253 11264 abiVersion = "6"; 11254 11265 }; 11255 11266 ncurses = 11256 - if hostPlatform.useiOSPrebuilt 11267 + if stdenv.hostPlatform.useiOSPrebuilt 11257 11268 then null 11258 11269 else callPackage ../development/libraries/ncurses { }; 11259 11270 ··· 12412 12423 12413 12424 wxGTK28 = callPackage ../development/libraries/wxwidgets/2.8 { 12414 12425 inherit (gnome2) GConf; 12415 - withMesa = lib.elem system lib.platforms.mesaPlatforms; 12426 + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; 12416 12427 }; 12417 12428 12418 12429 wxGTK29 = callPackage ../development/libraries/wxwidgets/2.9 { 12419 12430 inherit (gnome2) GConf; 12420 12431 inherit (darwin.stubs) setfile; 12421 12432 inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QuickTime; 12422 - withMesa = lib.elem system lib.platforms.mesaPlatforms; 12433 + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; 12423 12434 }; 12424 12435 12425 12436 wxGTK30 = callPackage ../development/libraries/wxwidgets/3.0 { 12426 12437 inherit (gnome2) GConf; 12427 12438 inherit (darwin.stubs) setfile; 12428 12439 inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; 12429 - withMesa = lib.elem system lib.platforms.mesaPlatforms; 12440 + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; 12430 12441 }; 12431 12442 12432 12443 wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 {}; ··· 14215 14226 linuxPackages_custom = { version, src, configfile, allowImportFromDerivation ? true }: 14216 14227 recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig { 14217 14228 inherit version src configfile stdenv allowImportFromDerivation; 14218 - inherit (stdenv) hostPlatform; 14219 14229 })); 14220 14230 14221 14231 # This serves as a test for linuxPackages_custom ··· 16866 16876 extra-packages = [ csound ]; 16867 16877 }; 16868 16878 16869 - jackline = callPackage ../applications/networking/instant-messengers/jackline { }; 16879 + jackline = callPackage ../applications/networking/instant-messengers/jackline { 16880 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 16881 + }; 16870 16882 16871 16883 slack = callPackage ../applications/networking/instant-messengers/slack { }; 16872 16884 ··· 17470 17482 17471 17483 mjpg-streamer = callPackage ../applications/video/mjpg-streamer { }; 17472 17484 17473 - mldonkey = callPackage ../applications/networking/p2p/mldonkey { }; 17485 + mldonkey = callPackage ../applications/networking/p2p/mldonkey { 17486 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 17487 + }; 17474 17488 17475 17489 MMA = callPackage ../applications/audio/MMA { }; 17476 17490 ··· 17650 17664 }) murmur_git; 17651 17665 17652 17666 mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix { 17653 - mumble_i686 = if system == "x86_64-linux" 17667 + mumble_i686 = if stdenv.hostPlatform.system == "x86_64-linux" 17654 17668 then pkgsi686Linux.mumble 17655 17669 else null; 17656 17670 }; ··· 18920 18934 18921 18935 unigine-valley = callPackage ../applications/graphics/unigine-valley { }; 18922 18936 18923 - inherit (ocamlPackages) unison; 18937 + inherit (ocaml-ng.ocamlPackages_4_05) unison; 18924 18938 18925 18939 unpaper = callPackage ../tools/graphics/unpaper { }; 18926 18940 ··· 19051 19065 }; 19052 19066 19053 19067 virtualgl = callPackage ../tools/X11/virtualgl { 19054 - virtualglLib_i686 = if system == "x86_64-linux" 19068 + virtualglLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux" 19055 19069 then pkgsi686Linux.virtualglLib 19056 19070 else null; 19057 19071 }; ··· 19064 19078 19065 19079 primus = callPackage ../tools/X11/primus { 19066 19080 stdenv_i686 = pkgsi686Linux.stdenv; 19067 - primusLib_i686 = if system == "x86_64-linux" 19081 + primusLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux" 19068 19082 then pkgsi686Linux.primusLib 19069 19083 else null; 19070 19084 }; 19071 19085 19072 19086 bumblebee = callPackage ../tools/X11/bumblebee { 19073 19087 nvidia_x11 = linuxPackages.nvidia_x11; 19074 - nvidia_x11_i686 = if system == "x86_64-linux" 19088 + nvidia_x11_i686 = if stdenv.hostPlatform.system == "x86_64-linux" 19075 19089 then pkgsi686Linux.linuxPackages.nvidia_x11.override { libsOnly = true; } 19076 19090 else null; 19077 - libglvnd_i686 = if system == "x86_64-linux" 19091 + libglvnd_i686 = if stdenv.hostPlatform.system == "x86_64-linux" 19078 19092 then pkgsi686Linux.libglvnd 19079 19093 else null; 19080 19094 }; ··· 20857 20871 20858 20872 abella = callPackage ../applications/science/logic/abella {}; 20859 20873 20860 - acgtk = callPackage ../applications/science/logic/acgtk { }; 20874 + acgtk = callPackage ../applications/science/logic/acgtk { 20875 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 20876 + }; 20861 20877 20862 - alt-ergo = callPackage ../applications/science/logic/alt-ergo { }; 20878 + alt-ergo = callPackage ../applications/science/logic/alt-ergo { 20879 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 20880 + }; 20863 20881 20864 20882 aspino = callPackage ../applications/science/logic/aspino {}; 20865 20883 ··· 20869 20887 20870 20888 inherit (callPackage ./coq-packages.nix { 20871 20889 inherit (ocaml-ng) ocamlPackages_3_12_1 20872 - ocamlPackages_4_02; 20890 + ocamlPackages_4_02 20891 + ocamlPackages_4_05 20892 + ; 20873 20893 }) mkCoqPackages 20874 20894 coq_8_3 coq_8_4 coq_8_5 coq_8_6 coq_8_7 coq_8_8 20875 20895 coqPackages_8_5 coqPackages_8_6 coqPackages_8_7 coqPackages_8_8 ··· 20884 20904 20885 20905 caprice32 = callPackage ../misc/emulators/caprice32 { }; 20886 20906 20887 - cubicle = callPackage ../applications/science/logic/cubicle { }; 20907 + cubicle = callPackage ../applications/science/logic/cubicle { 20908 + ocamlPackages = ocaml-ng.ocamlPackages_4_05; 20909 + }; 20888 20910 20889 20911 cvc3 = callPackage ../applications/science/logic/cvc3 { 20890 20912 gmp = lib.overrideDerivation gmp (a: { dontDisableStatic = true; }); ··· 20980 21002 20981 21003 proverif = callPackage ../applications/science/logic/proverif { }; 20982 21004 20983 - sapic = callPackage ../applications/science/logic/sapic { }; 21005 + sapic = callPackage ../applications/science/logic/sapic { 21006 + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; 21007 + }; 20984 21008 20985 21009 satallax = callPackage ../applications/science/logic/satallax { 20986 21010 ocaml = ocaml-ng.ocamlPackages_4_01_0.ocaml; ··· 20992 21016 stdenv = gccStdenv; 20993 21017 }; 20994 21018 20995 - statverif = callPackage ../applications/science/logic/statverif { }; 21019 + statverif = callPackage ../applications/science/logic/statverif { 21020 + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; 21021 + }; 20996 21022 20997 21023 tptp = callPackage ../applications/science/logic/tptp {}; 20998 21024 ··· 21023 21049 z3 = callPackage ../applications/science/logic/z3 { python = python2; }; 21024 21050 21025 21051 tlaplus = callPackage ../applications/science/logic/tlaplus {}; 21026 - tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix {}; 21052 + tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix { 21053 + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; 21054 + }; 21027 21055 tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix {gtk = gtk2;}; 21028 21056 21029 21057 aiger = callPackage ../applications/science/logic/aiger {}; ··· 21525 21553 21526 21554 idsk = callPackage ../tools/filesystems/idsk { }; 21527 21555 21556 + igraph = callPackage ../development/libraries/igraph { }; 21557 + 21528 21558 illum = callPackage ../tools/system/illum { }; 21529 21559 21530 21560 # using the new configuration style proposal which is unstable ··· 21631 21661 */ 21632 21662 nixos = configuration: 21633 21663 (import (self.path + "/nixos/lib/eval-config.nix") { 21634 - inherit (pkgs) system; 21664 + inherit (pkgs.stdenv.hostPlatform) system; 21635 21665 modules = [( 21636 21666 { lib, ... }: { 21637 21667 config.nixpkgs.pkgs = lib.mkDefault pkgs; ··· 21867 21897 21868 21898 sane-frontends = callPackage ../applications/graphics/sane/frontends.nix { }; 21869 21899 21870 - satysfi = callPackage ../tools/typesetting/satysfi { 21871 - ocamlPackages = ocaml-ng.ocamlPackages_4_06; 21872 - }; 21900 + satysfi = callPackage ../tools/typesetting/satysfi { }; 21873 21901 21874 21902 sc-controller = pythonPackages.callPackage ../misc/drivers/sc-controller { 21875 21903 inherit libusb1; # Shadow python.pkgs.libusb1. ··· 22303 22331 mount wall hostname more sysctl getconf 22304 22332 getent locale killall xxd watch; 22305 22333 22306 - fts = if hostPlatform.isMusl then netbsd.fts else null; 22334 + fts = if stdenv.hostPlatform.isMusl then netbsd.fts else null; 22307 22335 22308 22336 inherit (recurseIntoAttrs (callPackages ../os-specific/bsd { })) 22309 22337 netbsd;
+3
pkgs/top-level/coq-packages.nix
··· 2 2 , gnumake3 3 3 , ocamlPackages_3_12_1 4 4 , ocamlPackages_4_02 5 + , ocamlPackages_4_05 5 6 }: 6 7 7 8 let ··· 65 66 camlp5 = ocamlPackages_4_02.camlp5_transitional; 66 67 }; 67 68 coq_8_5 = callPackage ../applications/science/logic/coq { 69 + ocamlPackages = ocamlPackages_4_05; 68 70 version = "8.5pl3"; 69 71 }; 70 72 coq_8_6 = callPackage ../applications/science/logic/coq { 73 + ocamlPackages = ocamlPackages_4_05; 71 74 version = "8.6.1"; 72 75 }; 73 76 coq_8_7 = callPackage ../applications/science/logic/coq {
+1 -1
pkgs/top-level/darwin-packages.nix
··· 19 19 20 20 binutils = pkgs.wrapBintoolsWith { 21 21 libc = 22 - if pkgs.targetPlatform != pkgs.hostPlatform 22 + if stdenv.targetPlatform != stdenv.hostPlatform 23 23 then pkgs.libcCross 24 24 else pkgs.stdenv.cc.libc; 25 25 bintools = darwin.binutils-unwrapped;
-2
pkgs/top-level/haskell-packages.nix
··· 1 1 { buildPackages, pkgs 2 2 , newScope 3 - , buildPlatform, targetPlatform 4 3 }: 5 4 6 5 let ··· 61 60 ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix rec { 62 61 bootPkgs = packages.ghc821Binary; 63 62 inherit (bootPkgs) hscolour alex happy; 64 - inherit buildPlatform targetPlatform; 65 63 sphinx = pkgs.python3Packages.sphinx; 66 64 buildLlvmPackages = buildPackages.llvmPackages_39; 67 65 llvmPackages = pkgs.llvmPackages_39;
+4 -10
pkgs/top-level/ocaml-packages.nix
··· 1 - { lib, callPackage, newScope, pkgs, config, system }: 1 + { lib, callPackage, newScope, pkgs, config }: 2 2 3 3 let 4 + inherit (pkgs.stdenv.hostPlatform) system; 5 + 4 6 mkOcamlPackages = ocaml: overrides: 5 7 let 6 8 packageSet = self: ··· 610 612 else null; 611 613 612 614 ocaml_extlib = callPackage ../development/ocaml-modules/extlib { }; 613 - ocaml_extlib_maximal = callPackage ../development/ocaml-modules/extlib { 614 - minimal = false; 615 - }; 616 615 617 616 ocb-stubblr = callPackage ../development/ocaml-modules/ocb-stubblr { }; 618 617 ··· 1075 1074 1076 1075 ocamlPackages_latest = ocamlPackages_4_07; 1077 1076 1078 - ocamlPackages = 1079 - # OCaml 4.05 is broken on aarch64 1080 - if system == "aarch64-linux" then 1081 - ocamlPackages_4_06 1082 - else 1083 - ocamlPackages_4_05; 1077 + ocamlPackages = ocamlPackages_4_06; 1084 1078 }
+3 -1
pkgs/top-level/perl-packages.nix
··· 16588 16588 url = mirror://cpan/authors/id/L/LD/LDACHARY/Text-Unaccent-1.08.tar.gz; 16589 16589 sha256 = "0avk50kia78kxryh2whmaj5l18q2wvmkdyqyjsf6kwr4kgy6x3i7"; 16590 16590 }; 16591 + # https://rt.cpan.org/Public/Bug/Display.html?id=124815 16592 + NIX_CFLAGS_COMPILE = [ "-DHAS_VPRINTF" ]; 16591 16593 meta = { 16592 16594 maintainers = with maintainers; [ ]; 16593 - platforms = stdenv.lib.platforms.unix; 16595 + platforms = stdenv.lib.platforms.linux; 16594 16596 }; 16595 16597 }; 16596 16598
+16 -3
pkgs/top-level/python-packages.nix
··· 242 242 243 243 clustershell = callPackage ../development/python-modules/clustershell { }; 244 244 245 + cozy = callPackage ../development/python-modules/cozy { }; 246 + 245 247 dendropy = callPackage ../development/python-modules/dendropy { }; 246 248 247 249 dbf = callPackage ../development/python-modules/dbf { }; ··· 251 253 deap = callPackage ../development/python-modules/deap { }; 252 254 253 255 dkimpy = callPackage ../development/python-modules/dkimpy { }; 256 + 257 + dictionaries = callPackage ../development/python-modules/dictionaries { }; 254 258 255 259 diff_cover = callPackage ../development/python-modules/diff_cover { }; 256 260 ··· 310 314 311 315 habanero = callPackage ../development/python-modules/habanero { }; 312 316 317 + httpsig = callPackage ../development/python-modules/httpsig { }; 318 + 313 319 i3ipc = callPackage ../development/python-modules/i3ipc { }; 314 320 315 321 intelhex = callPackage ../development/python-modules/intelhex { }; ··· 353 359 ntlm-auth = callPackage ../development/python-modules/ntlm-auth { }; 354 360 355 361 oauthenticator = callPackage ../development/python-modules/oauthenticator { }; 362 + 363 + ordered-set = callPackage ../development/python-modules/ordered-set { }; 356 364 357 365 outcome = callPackage ../development/python-modules/outcome {}; 358 366 ··· 486 494 pytest-tornado = callPackage ../development/python-modules/pytest-tornado { }; 487 495 488 496 python-hosts = callPackage ../development/python-modules/python-hosts { }; 497 + 498 + python-igraph = callPackage ../development/python-modules/python-igraph { 499 + pkgconfig = pkgs.pkgconfig; 500 + igraph = pkgs.igraph; 501 + }; 489 502 490 503 python3-openid = callPackage ../development/python-modules/python3-openid { }; 491 504 ··· 2805 2818 }; 2806 2819 }; 2807 2820 2808 - gurobipy = if stdenv.system == "x86_64-darwin" 2821 + gurobipy = if stdenv.hostPlatform.system == "x86_64-darwin" 2809 2822 then callPackage ../development/python-modules/gurobipy/darwin.nix { 2810 2823 inherit (pkgs.darwin) cctools insert_dylib; 2811 2824 } 2812 - else if stdenv.system == "x86_64-linux" 2825 + else if stdenv.hostPlatform.system == "x86_64-linux" 2813 2826 then callPackage ../development/python-modules/gurobipy/linux.nix {} 2814 - else throw "gurobipy not yet supported on ${stdenv.system}"; 2827 + else throw "gurobipy not yet supported on ${stdenv.hostPlatform.system}"; 2815 2828 2816 2829 hbmqtt = callPackage ../development/python-modules/hbmqtt { }; 2817 2830
+4 -4
pkgs/top-level/splice.nix
··· 27 27 defaultBuildBuildScope = pkgs.buildPackages.buildPackages // pkgs.buildPackages.buildPackages.xorg; 28 28 defaultBuildHostScope = pkgs.buildPackages // pkgs.buildPackages.xorg; 29 29 defaultBuildTargetScope = 30 - if pkgs.targetPlatform == pkgs.hostPlatform 30 + if pkgs.stdenv.targetPlatform == pkgs.stdenv.hostPlatform 31 31 then defaultBuildHostScope 32 - else assert pkgs.hostPlatform == pkgs.buildPlatform; defaultHostTargetScope; 32 + else assert pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform; defaultHostTargetScope; 33 33 defaultHostHostScope = {}; # unimplemented 34 34 defaultHostTargetScope = pkgs // pkgs.xorg; 35 35 defaultTargetTargetScope = pkgs.targetPackages // pkgs.targetPackages.xorg or {}; ··· 114 114 pkgsTargetTarget = defaultTargetTargetScope; 115 115 } // { 116 116 # These should never be spliced under any circumstances 117 - inherit (pkgs) pkgs buildPackages targetPackages 118 - buildPlatform targetPlatform hostPlatform; 117 + inherit (pkgs) pkgs buildPackages targetPackages; 118 + inherit (pkgs.stdenv) buildPlatform targetPlatform hostPlatform; 119 119 }; 120 120 121 121 in
+4 -4
pkgs/top-level/unix-tools.nix
··· 1 - { pkgs, buildEnv, runCommand, hostPlatform, lib, stdenv }: 1 + { pkgs, buildEnv, runCommand, lib, stdenv }: 2 2 3 3 # These are some unix tools that are commonly included in the /usr/bin 4 4 # and /usr/sbin directory under more normal distributions. Along with ··· 16 16 version = "1003.1-2008"; 17 17 18 18 singleBinary = cmd: providers: let 19 - provider = providers.${hostPlatform.parsed.kernel.name}; 19 + provider = providers.${stdenv.hostPlatform.parsed.kernel.name}; 20 20 bin = "${getBin provider}/bin/${cmd}"; 21 21 manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz"; 22 22 in runCommand "${cmd}-${version}" { ··· 59 59 linux = pkgs.utillinux; 60 60 }; 61 61 getconf = { 62 - linux = if hostPlatform.libc == "glibc" then pkgs.glibc 62 + linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc 63 63 else pkgs.netbsd.getconf; 64 64 darwin = pkgs.darwin.system_cmds; 65 65 }; 66 66 getent = { 67 - linux = if hostPlatform.libc == "glibc" then pkgs.glibc 67 + linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc 68 68 else pkgs.netbsd.getent; 69 69 darwin = pkgs.netbsd.getent; 70 70 };