lol

lib.replaceChars: warn about being a deprecated alias

replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

https://github.com/nixos/nix/commit/d6d5885c1567454754a0d260521bafa0bd5e7fdb

Artturin 05a2dfd6 084fd690

+64 -75
+6 -17
lib/strings.nix
··· 328 328 escape ["(" ")"] "(foo)" 329 329 => "\\(foo\\)" 330 330 */ 331 - escape = list: replaceChars list (map (c: "\\${c}") list); 331 + escape = list: replaceStrings list (map (c: "\\${c}") list); 332 332 333 333 /* Escape occurence of the element of `list` in `string` by 334 334 converting to its ASCII value and prefixing it with \\x. ··· 341 341 => "foo\\x20bar" 342 342 343 343 */ 344 - escapeC = list: replaceChars list (map (c: "\\x${ toLower (lib.toHexString (charToInt c))}") list); 344 + escapeC = list: replaceStrings list (map (c: "\\x${ toLower (lib.toHexString (charToInt c))}") list); 345 345 346 346 /* Quote string to be used safely within the Bourne shell. 347 347 ··· 471 471 ["\"" "'" "<" ">" "&"] 472 472 ["&quot;" "&apos;" "&lt;" "&gt;" "&amp;"]; 473 473 474 - # Obsolete - use replaceStrings instead. 475 - replaceChars = builtins.replaceStrings or ( 476 - del: new: s: 477 - let 478 - substList = lib.zipLists del new; 479 - subst = c: 480 - let found = lib.findFirst (sub: sub.fst == c) null substList; in 481 - if found == null then 482 - c 483 - else 484 - found.snd; 485 - in 486 - stringAsChars subst s); 474 + # warning added 12-12-2022 475 + replaceChars = lib.warn "replaceChars is a deprecated alias of replaceStrings, replace usages of it with replaceStrings." builtins.replaceStrings; 487 476 488 477 # Case conversion utilities. 489 478 lowerChars = stringToCharacters "abcdefghijklmnopqrstuvwxyz"; ··· 497 486 toLower "HOME" 498 487 => "home" 499 488 */ 500 - toLower = replaceChars upperChars lowerChars; 489 + toLower = replaceStrings upperChars lowerChars; 501 490 502 491 /* Converts an ASCII string to upper-case. 503 492 ··· 507 496 toUpper "home" 508 497 => "HOME" 509 498 */ 510 - toUpper = replaceChars lowerChars upperChars; 499 + toUpper = replaceStrings lowerChars upperChars; 511 500 512 501 /* Appends string context from another string. This is an implementation 513 502 detail of Nix and should be used carefully.
+3 -3
nixos/lib/systemd-lib.nix
··· 8 8 systemd = cfg.package; 9 9 in rec { 10 10 11 - shellEscape = s: (replaceChars [ "\\" ] [ "\\\\" ] s); 11 + shellEscape = s: (replaceStrings [ "\\" ] [ "\\\\" ] s); 12 12 13 - mkPathSafeName = lib.replaceChars ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""]; 13 + mkPathSafeName = lib.replaceStrings ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""]; 14 14 15 15 # a type for options that take a unit name 16 16 unitNameType = types.strMatching "[a-zA-Z0-9@%:_.\\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)"; ··· 258 258 259 259 makeJobScript = name: text: 260 260 let 261 - scriptName = replaceChars [ "\\" "@" ] [ "-" "_" ] (shellEscape name); 261 + scriptName = replaceStrings [ "\\" "@" ] [ "-" "_" ] (shellEscape name); 262 262 out = (pkgs.writeShellScriptBin scriptName '' 263 263 set -e 264 264 ${text}
+3 -3
nixos/lib/utils.nix
··· 48 48 trim = s: removeSuffix "/" (removePrefix "/" s); 49 49 normalizedPath = strings.normalizePath s; 50 50 in 51 - replaceChars ["/"] ["-"] 51 + replaceStrings ["/"] ["-"] 52 52 (replacePrefix "." (strings.escapeC ["."] ".") 53 53 (strings.escapeC (stringToCharacters " !\"#$%&'()*+,;<=>=@[\\]^`{|}~-") 54 54 (if normalizedPath == "/" then normalizedPath else trim normalizedPath))); ··· 67 67 else if builtins.isInt arg || builtins.isFloat arg then toString arg 68 68 else throw "escapeSystemdExecArg only allows strings, paths and numbers"; 69 69 in 70 - replaceChars [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s); 70 + replaceStrings [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s); 71 71 72 72 # Quotes a list of arguments into a single string for use in a Exec* 73 73 # line. ··· 112 112 else if isAttrs item then 113 113 map (name: 114 114 let 115 - escapedName = ''"${replaceChars [''"'' "\\"] [''\"'' "\\\\"] name}"''; 115 + escapedName = ''"${replaceStrings [''"'' "\\"] [''\"'' "\\\\"] name}"''; 116 116 in 117 117 recurse (prefix + "." + escapedName) item.${name}) (attrNames item) 118 118 else if isList item then
+1 -1
nixos/modules/config/swap.nix
··· 160 160 config = rec { 161 161 device = mkIf options.label.isDefined 162 162 "/dev/disk/by-label/${config.label}"; 163 - deviceName = lib.replaceChars ["\\"] [""] (escapeSystemdPath config.device); 163 + deviceName = lib.replaceStrings ["\\"] [""] (escapeSystemdPath config.device); 164 164 realDevice = if config.randomEncryption.enable then "/dev/mapper/${deviceName}" else config.device; 165 165 }; 166 166
+1 -1
nixos/modules/programs/xfs_quota.nix
··· 94 94 ''; 95 95 96 96 wantedBy = [ "multi-user.target" ]; 97 - after = [ ((replaceChars [ "/" ] [ "-" ] opts.fileSystem) + ".mount") ]; 97 + after = [ ((replaceStrings [ "/" ] [ "-" ] opts.fileSystem) + ".mount") ]; 98 98 99 99 restartTriggers = [ config.environment.etc.projects.source ]; 100 100
+1 -1
nixos/modules/services/mail/listmonk.nix
··· 8 8 # Escaping is done according to https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS 9 9 setDatabaseOption = key: value: 10 10 "UPDATE settings SET value = '${ 11 - lib.replaceChars [ "'" ] [ "''" ] (builtins.toJSON value) 11 + lib.replaceStrings [ "'" ] [ "''" ] (builtins.toJSON value) 12 12 }' WHERE key = '${key}';"; 13 13 updateDatabaseConfigSQL = pkgs.writeText "update-database-config.sql" 14 14 (concatStringsSep "\n" (mapAttrsToList setDatabaseOption
+3 -3
nixos/modules/services/networking/supplicant.nix
··· 13 13 serviceName = iface: "supplicant-${if (iface=="WLAN") then "wlan@" else ( 14 14 if (iface=="LAN") then "lan@" else ( 15 15 if (iface=="DBUS") then "dbus" 16 - else (replaceChars [" "] ["-"] iface)))}"; 16 + else (replaceStrings [" "] ["-"] iface)))}"; 17 17 18 18 # TODO: Use proper privilege separation for wpa_supplicant 19 19 supplicantService = iface: suppl: ··· 27 27 driverArg = optionalString (suppl.driver != null) "-D${suppl.driver}"; 28 28 bridgeArg = optionalString (suppl.bridge!="") "-b${suppl.bridge}"; 29 29 confFileArg = optionalString (suppl.configFile.path!=null) "-c${suppl.configFile.path}"; 30 - extraConfFile = pkgs.writeText "supplicant-extra-conf-${replaceChars [" "] ["-"] iface}" '' 30 + extraConfFile = pkgs.writeText "supplicant-extra-conf-${replaceStrings [" "] ["-"] iface}" '' 31 31 ${optionalString suppl.userControlled.enable "ctrl_interface=DIR=${suppl.userControlled.socketDir} GROUP=${suppl.userControlled.group}"} 32 32 ${optionalString suppl.configFile.writable "update_config=1"} 33 33 ${suppl.extraConf} ··· 223 223 text = '' 224 224 ${flip (concatMapStringsSep "\n") (filter (n: n!="WLAN" && n!="LAN" && n!="DBUS") (attrNames cfg)) (iface: 225 225 flip (concatMapStringsSep "\n") (splitString " " iface) (i: '' 226 - ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="${i}", TAG+="systemd", ENV{SYSTEMD_WANTS}+="supplicant-${replaceChars [" "] ["-"] iface}.service", TAG+="SUPPLICANT_ASSIGNED"''))} 226 + ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="${i}", TAG+="systemd", ENV{SYSTEMD_WANTS}+="supplicant-${replaceStrings [" "] ["-"] iface}.service", TAG+="SUPPLICANT_ASSIGNED"''))} 227 227 228 228 ${optionalString (hasAttr "WLAN" cfg) '' 229 229 ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="/run/current-system/systemd/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-wlan@$result.service"
+1 -1
nixos/modules/services/networking/wireguard.nix
··· 315 315 316 316 peerUnitServiceName = interfaceName: publicKey: dynamicRefreshEnabled: 317 317 let 318 - keyToUnitName = replaceChars 318 + keyToUnitName = replaceStrings 319 319 [ "/" "-" " " "+" "=" ] 320 320 [ "-" "\\x2d" "\\x20" "\\x2b" "\\x3d" ]; 321 321 unitName = keyToUnitName publicKey;
+1 -1
nixos/modules/system/boot/loader/grub/grub.nix
··· 38 38 grubConfig = args: 39 39 let 40 40 efiSysMountPoint = if args.efiSysMountPoint == null then args.path else args.efiSysMountPoint; 41 - efiSysMountPoint' = replaceChars [ "/" ] [ "-" ] efiSysMountPoint; 41 + efiSysMountPoint' = replaceStrings [ "/" ] [ "-" ] efiSysMountPoint; 42 42 in 43 43 pkgs.writeText "grub-config.xml" (builtins.toXML 44 44 { splashImage = f cfg.splashImage;
+3 -3
nixos/modules/tasks/network-interfaces.nix
··· 1377 1377 # networkmanager falls back to "/proc/sys/net/ipv6/conf/default/use_tempaddr" 1378 1378 "net.ipv6.conf.default.use_tempaddr" = tempaddrValues.${cfg.tempAddresses}.sysctl; 1379 1379 } // listToAttrs (forEach interfaces 1380 - (i: nameValuePair "net.ipv4.conf.${replaceChars ["."] ["/"] i.name}.proxy_arp" i.proxyARP)) 1380 + (i: nameValuePair "net.ipv4.conf.${replaceStrings ["."] ["/"] i.name}.proxy_arp" i.proxyARP)) 1381 1381 // listToAttrs (forEach interfaces 1382 1382 (i: let 1383 1383 opt = i.tempAddress; 1384 1384 val = tempaddrValues.${opt}.sysctl; 1385 - in nameValuePair "net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr" val)); 1385 + in nameValuePair "net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr" val)); 1386 1386 1387 1387 security.wrappers = { 1388 1388 ping = { ··· 1495 1495 in 1496 1496 '' 1497 1497 # override to ${msg} for ${i.name} 1498 - ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr=${val}" 1498 + ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr=${val}" 1499 1499 '') (filter (i: i.tempAddress != cfg.tempAddresses) interfaces); 1500 1500 }) 1501 1501 ] ++ lib.optional (cfg.wlanInterfaces != {})
+1 -1
nixos/tests/installer.nix
··· 57 57 58 58 hardware.enableAllFirmware = lib.mkForce false; 59 59 60 - ${replaceChars ["\n"] ["\n "] extraConfig} 60 + ${replaceStrings ["\n"] ["\n "] extraConfig} 61 61 } 62 62 ''; 63 63
+2 -2
nixos/tests/prometheus-exporters.nix
··· 6 6 let 7 7 inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; 8 8 inherit (pkgs.lib) concatStringsSep maintainers mapAttrs mkMerge 9 - removeSuffix replaceChars singleton splitString; 9 + removeSuffix replaceStrings singleton splitString; 10 10 11 11 /* 12 12 * The attrset `exporterTests` contains one attribute ··· 182 182 enable = true; 183 183 extraFlags = [ "--web.collectd-push-path /collectd" ]; 184 184 }; 185 - exporterTest = let postData = replaceChars [ "\n" ] [ "" ] '' 185 + exporterTest = let postData = replaceStrings [ "\n" ] [ "" ] '' 186 186 [{ 187 187 "values":[23], 188 188 "dstypes":["gauge"],
+1 -1
pkgs/applications/audio/munt/libmt32emu.nix
··· 11 11 src = fetchFromGitHub { 12 12 owner = "munt"; 13 13 repo = "munt"; 14 - rev = "${pname}_${lib.replaceChars [ "." ] [ "_" ] version}"; 14 + rev = "${pname}_${lib.replaceStrings [ "." ] [ "_" ] version}"; 15 15 sha256 = "sha256-XGds9lDfSiY0D8RhYG4TGyjYEVvVYuAfNSv9+VxiJEs="; 16 16 }; 17 17
+1 -1
pkgs/applications/audio/munt/mt32emu-qt.nix
··· 14 14 }: 15 15 16 16 let 17 - char2underscore = char: str: lib.replaceChars [ char ] [ "_" ] str; 17 + char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str; 18 18 in 19 19 mkDerivation rec { 20 20 pname = "mt32emu-qt";
+1 -1
pkgs/applications/audio/munt/mt32emu-smf2wav.nix
··· 8 8 }: 9 9 10 10 let 11 - char2underscore = char: str: lib.replaceChars [ char ] [ "_" ] str; 11 + char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str; 12 12 in 13 13 stdenv.mkDerivation rec { 14 14 pname = "mt32emu-smf2wav";
+1 -1
pkgs/applications/audio/qjackctl/default.nix
··· 13 13 src = fetchFromGitHub { 14 14 owner = "rncbc"; 15 15 repo = "qjackctl"; 16 - rev = "${pname}_${lib.replaceChars ["."] ["_"] version}"; 16 + rev = "${pname}_${lib.replaceStrings ["."] ["_"] version}"; 17 17 sha256 = "sha256-PchW9cM5qEP51G9RXUZ3j/AvKqTkgNiw3esqSQqsy0M="; 18 18 }; 19 19
+1 -1
pkgs/applications/audio/roomeqwizard/default.nix
··· 17 17 version = "5.20.5"; 18 18 19 19 src = fetchurl { 20 - url = "https://www.roomeqwizard.com/installers/REW_linux_${lib.replaceChars [ "." ] [ "_" ] version}.sh"; 20 + url = "https://www.roomeqwizard.com/installers/REW_linux_${lib.replaceStrings [ "." ] [ "_" ] version}.sh"; 21 21 sha256 = "NYTRiOZmwkni4k+jI2SV84z5umO7+l+eKpwPCdlDD3U="; 22 22 }; 23 23
+1 -1
pkgs/applications/editors/jetbrains/linux.nix
··· 21 21 desktopItem = makeDesktopItem { 22 22 name = pname; 23 23 exec = pname; 24 - comment = lib.replaceChars ["\n"] [" "] meta.longDescription; 24 + comment = lib.replaceStrings ["\n"] [" "] meta.longDescription; 25 25 desktopName = product; 26 26 genericName = meta.description; 27 27 categories = [ "Development" ];
+1 -1
pkgs/applications/emulators/atari800/default.nix
··· 9 9 src = fetchFromGitHub { 10 10 owner = "atari800"; 11 11 repo = "atari800"; 12 - rev = "ATARI800_${replaceChars ["."] ["_"] version}"; 12 + rev = "ATARI800_${replaceStrings ["."] ["_"] version}"; 13 13 sha256 = "sha256-+eJXhqPyU0GhmzF7DbteTXzEnn5klCor9Io/UgXQfQg="; 14 14 }; 15 15
+1 -1
pkgs/applications/emulators/desmume/default.nix
··· 29 29 src = fetchFromGitHub { 30 30 owner = "TASVideos"; 31 31 repo = "desmume"; 32 - rev = "release_${lib.replaceChars ["."] ["_"] finalAttrs.version}"; 32 + rev = "release_${lib.replaceStrings ["."] ["_"] finalAttrs.version}"; 33 33 hash = "sha256-vmjKXa/iXLTwtqnG+ZUvOnOQPZROeMpfM5J3Jh/Ynfo="; 34 34 }; 35 35
+1 -1
pkgs/applications/emulators/retroarch/mkLibretroCore.nix
··· 16 16 }@args: 17 17 18 18 let 19 - d2u = if normalizeCore then (lib.replaceChars [ "-" ] [ "_" ]) else (x: x); 19 + d2u = if normalizeCore then (lib.replaceStrings [ "-" ] [ "_" ]) else (x: x); 20 20 coreDir = placeholder "out" + libretroCore; 21 21 coreFilename = "${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary}"; 22 22 mainProgram = "retroarch-${core}";
+1 -1
pkgs/applications/misc/sweethome3d/default.nix
··· 105 105 }; 106 106 }; 107 107 108 - d2u = lib.replaceChars ["."] ["_"]; 108 + d2u = lib.replaceStrings ["."] ["_"]; 109 109 110 110 in { 111 111
+1 -1
pkgs/applications/misc/sweethome3d/editors.nix
··· 81 81 82 82 }; 83 83 84 - d2u = lib.replaceChars ["."] ["_"]; 84 + d2u = lib.replaceStrings ["."] ["_"]; 85 85 86 86 in { 87 87
+1 -1
pkgs/applications/science/math/weka/default.nix
··· 5 5 version = "3.9.6"; 6 6 7 7 src = fetchurl { 8 - url = "mirror://sourceforge/weka/${lib.replaceChars ["."]["-"] "${pname}-${version}"}.zip"; 8 + url = "mirror://sourceforge/weka/${lib.replaceStrings ["."]["-"] "${pname}-${version}"}.zip"; 9 9 sha256 = "sha256-8fVN4MXYqXNEmyVtXh1IrauHTBZWgWG8AvsGI5Y9Aj0="; 10 10 }; 11 11
+1 -1
pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
··· 13 13 14 14 hashname = r: 15 15 let 16 - rpl = lib.replaceChars [ ":" "/" ] [ "_" "_" ]; 16 + rpl = lib.replaceStrings [ ":" "/" ] [ "_" "_" ]; 17 17 in 18 18 (rpl r.url) + "-" + (rpl r.rev); 19 19
+3 -3
pkgs/build-support/fetchmavenartifact/default.nix
··· 39 39 let 40 40 name_ = 41 41 lib.concatStrings [ 42 - (lib.replaceChars ["."] ["_"] groupId) "_" 43 - (lib.replaceChars ["."] ["_"] artifactId) "-" 42 + (lib.replaceStrings ["."] ["_"] groupId) "_" 43 + (lib.replaceStrings ["."] ["_"] artifactId) "-" 44 44 version 45 45 ]; 46 46 mkJarUrl = repoUrl: 47 47 lib.concatStringsSep "/" [ 48 48 (lib.removeSuffix "/" repoUrl) 49 - (lib.replaceChars ["."] ["/"] groupId) 49 + (lib.replaceStrings ["."] ["/"] groupId) 50 50 artifactId 51 51 version 52 52 "${artifactId}-${version}${lib.optionalString (!isNull classifier) "-${classifier}"}.jar"
+1 -1
pkgs/build-support/rust/build-rust-crate/configure-crate.nix
··· 32 32 completeDepsDir = lib.concatStringsSep " " completeDeps; 33 33 completeBuildDepsDir = lib.concatStringsSep " " completeBuildDeps; 34 34 envFeatures = lib.concatStringsSep " " ( 35 - map (f: lib.replaceChars ["-"] ["_"] (lib.toUpper f)) crateFeatures 35 + map (f: lib.replaceStrings ["-"] ["_"] (lib.toUpper f)) crateFeatures 36 36 ); 37 37 in '' 38 38 ${echo_colored colors}
+1 -1
pkgs/development/compilers/elm/makeDotElm.nix
··· 3 3 ver: deps: 4 4 let cmds = lib.mapAttrsToList (name: info: let 5 5 pkg = stdenv.mkDerivation { 6 - name = lib.replaceChars ["/"] ["-"] name + "-${info.version}"; 6 + name = lib.replaceStrings ["/"] ["-"] name + "-${info.version}"; 7 7 8 8 src = fetchurl { 9 9 url = "https://github.com/${name}/archive/${info.version}.tar.gz";
+1 -1
pkgs/development/interpreters/gauche/default.nix
··· 8 8 src = fetchFromGitHub { 9 9 owner = "shirok"; 10 10 repo = pname; 11 - rev = "release${lib.replaceChars [ "." ] [ "_" ] version}"; 11 + rev = "release${lib.replaceStrings [ "." ] [ "_" ] version}"; 12 12 sha256 = "0ki1w7sa10ivmg51sqjskby0gsznb0d3738nz80x589033km5hmb"; 13 13 }; 14 14
+1 -1
pkgs/development/libraries/icu/base.nix
··· 9 9 10 10 baseAttrs = { 11 11 src = fetchurl { 12 - url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceChars [ "." ] [ "-" ] version}/icu4c-${lib.replaceChars [ "." ] [ "_" ] version}-src.tgz"; 12 + url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceStrings [ "." ] [ "-" ] version}/icu4c-${lib.replaceStrings [ "." ] [ "_" ] version}-src.tgz"; 13 13 inherit sha256; 14 14 }; 15 15
+1 -1
pkgs/development/libraries/java/hsqldb/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 pname = "hsqldb"; 5 5 version = "2.7.1"; 6 - underscoreMajMin = lib.strings.replaceChars ["."] ["_"] (lib.versions.majorMinor version); 6 + underscoreMajMin = lib.replaceStrings ["."] ["_"] (lib.versions.majorMinor version); 7 7 8 8 src = fetchurl { 9 9 url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
+1 -1
pkgs/development/libraries/muparser/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 pname = "muparser"; 5 5 version = "2.2.3"; 6 - url-version = lib.replaceChars ["."] ["_"] version; 6 + url-version = lib.replaceStrings ["."] ["_"] version; 7 7 8 8 src = fetchurl { 9 9 url = "mirror://sourceforge/muparser/muparser_v${url-version}.zip";
+1 -1
pkgs/development/libraries/opendkim/default.nix
··· 8 8 src = fetchFromGitHub { 9 9 owner = "trusteddomainproject"; 10 10 repo = "OpenDKIM"; 11 - rev = "rel-opendkim-${lib.replaceChars ["."] ["-"] version}"; 11 + rev = "rel-opendkim-${lib.replaceStrings ["."] ["-"] version}"; 12 12 sha256 = "0nx3in8sa6xna4vfacj8g60hfzk61jpj2ldag80xzxip9c3rd2pw"; 13 13 }; 14 14
+1 -1
pkgs/development/libraries/opensubdiv/default.nix
··· 15 15 src = fetchFromGitHub { 16 16 owner = "PixarAnimationStudios"; 17 17 repo = "OpenSubdiv"; 18 - rev = "v${lib.replaceChars ["."] ["_"] version}"; 18 + rev = "v${lib.replaceStrings ["."] ["_"] version}"; 19 19 sha256 = "sha256-ejxQ5mGIIrEa/rAfkTrRbIRerrAvEPoWn7e0lIqS1JQ="; 20 20 }; 21 21
+1 -1
pkgs/development/mobile/androidenv/build-app.nix
··· 16 16 extraArgs = removeAttrs args ([ "name" ] ++ builtins.attrNames androidSdkFormalArgs); 17 17 in 18 18 stdenv.mkDerivation ({ 19 - name = lib.replaceChars [" "] [""] name; # Android APKs may contain white spaces in their names, but Nix store paths cannot 19 + name = lib.replaceStrings [" "] [""] name; # Android APKs may contain white spaces in their names, but Nix store paths cannot 20 20 ANDROID_HOME = "${androidsdk}/libexec/android-sdk"; 21 21 buildInputs = [ jdk ant ]; 22 22 buildPhase = ''
+1 -1
pkgs/development/mobile/titaniumenv/build-app.nix
··· 34 34 extraArgs = removeAttrs args [ "name" "preRebuild" "androidsdkArgs" "xcodewrapperArgs" ]; 35 35 in 36 36 stdenv.mkDerivation ({ 37 - name = lib.replaceChars [" "] [""] name; 37 + name = lib.replaceStrings [" "] [""] name; 38 38 39 39 buildInputs = [ nodejs titanium alloy python which file jdk ]; 40 40
+1 -1
pkgs/development/mobile/xcodeenv/build-app.nix
··· 53 53 extraArgs = removeAttrs args ([ "name" "scheme" "xcodeFlags" "release" "certificateFile" "certificatePassword" "provisioningProfile" "signMethod" "generateIPA" "generateXCArchive" "enableWirelessDistribution" "installURL" "bundleId" "version" ] ++ builtins.attrNames xcodewrapperFormalArgs); 54 54 in 55 55 stdenv.mkDerivation ({ 56 - name = lib.replaceChars [" "] [""] name; # iOS app names can contain spaces, but in the Nix store this is not allowed 56 + name = lib.replaceStrings [" "] [""] name; # iOS app names can contain spaces, but in the Nix store this is not allowed 57 57 buildPhase = '' 58 58 # Be sure that the Xcode wrapper has priority over everything else. 59 59 # When using buildInputs this does not seem to be the case.
+1 -1
pkgs/development/mobile/xcodeenv/simulate-app.nix
··· 9 9 xcodewrapper = composeXcodeWrapper xcodewrapperArgs; 10 10 in 11 11 stdenv.mkDerivation { 12 - name = lib.replaceChars [" "] [""] name; 12 + name = lib.replaceStrings [" "] [""] name; 13 13 buildCommand = '' 14 14 mkdir -p $out/bin 15 15 cat > $out/bin/run-test-simulator << "EOF"
+1 -1
pkgs/development/python-modules/scikit-learn/default.nix
··· 95 95 changelog = let 96 96 major = versions.major version; 97 97 minor = versions.minor version; 98 - dashVer = replaceChars ["."] ["-"] version; 98 + dashVer = replaceStrings ["."] ["-"] version; 99 99 in 100 100 "https://scikit-learn.org/stable/whats_new/v${major}.${minor}.html#version-${dashVer}"; 101 101 homepage = "https://scikit-learn.org";
+2 -2
pkgs/development/tools/haskell/lambdabot/default.nix
··· 20 20 ++ lib.optional withDjinn haskellPackages.djinn 21 21 ++ lib.optional (aspell != null) aspell 22 22 ); 23 - modulesStr = lib.replaceChars ["\n"] [" "] modules; 24 - configStr = lib.replaceChars ["\n"] [" "] configuration; 23 + modulesStr = lib.replaceStrings ["\n"] [" "] modules; 24 + configStr = lib.replaceStrings ["\n"] [" "] configuration; 25 25 26 26 in haskellLib.overrideCabal (self: { 27 27 patches = (self.patches or []) ++ [ ./custom-config.patch ];
+1 -1
pkgs/development/tools/misc/segger-ozone/default.nix
··· 19 19 version = "3.22a"; 20 20 21 21 src = fetchurl { 22 - url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${(lib.replaceChars ["."] [""] version)}_x86_64.tgz"; 22 + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${(lib.replaceStrings ["."] [""] version)}_x86_64.tgz"; 23 23 sha256 = "0v1r8qvp1w2f3yip9fys004pa0smlmq69p7w77lfvghs1rmg1649"; 24 24 }; 25 25
+1 -1
pkgs/development/web/kcgi/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 pname = "kcgi"; 5 5 version = "0.10.8"; 6 - underscoreVersion = lib.replaceChars ["."] ["_"] version; 6 + underscoreVersion = lib.replaceStrings ["."] ["_"] version; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "kristapsdz";
+1 -1
pkgs/games/nexuiz/default.nix
··· 11 11 let 12 12 version = "2.5.2"; 13 13 14 - version_short = lib.replaceChars [ "." ] [ "" ] version; 14 + version_short = lib.replaceStrings [ "." ] [ "" ] version; 15 15 in stdenv.mkDerivation { 16 16 pname = "nexuiz"; 17 17 inherit version;
+1 -1
pkgs/games/terraria-server/default.nix
··· 3 3 stdenv.mkDerivation rec { 4 4 pname = "terraria-server"; 5 5 version = "1.4.4.9"; 6 - urlVersion = lib.replaceChars [ "." ] [ "" ] version; 6 + urlVersion = lib.replaceStrings [ "." ] [ "" ] version; 7 7 8 8 src = fetchurl { 9 9 url = "https://terraria.org/api/download/pc-dedicated-server/terraria-server-${urlVersion}.zip";
+1 -1
pkgs/servers/invidious/default.nix
··· 44 44 substituteInPlace src/invidious.cr \ 45 45 --replace ${lib.escapeShellArg branchTemplate} '"master"' \ 46 46 --replace ${lib.escapeShellArg commitTemplate} '"${lib.substring 0 7 versions.invidious.rev}"' \ 47 - --replace ${lib.escapeShellArg versionTemplate} '"${lib.replaceChars ["-"] ["."] (lib.substring 9 10 version)}"' \ 47 + --replace ${lib.escapeShellArg versionTemplate} '"${lib.replaceStrings ["-"] ["."] (lib.substring 9 10 version)}"' \ 48 48 --replace ${lib.escapeShellArg assetCommitTemplate} '"${lib.substring 0 7 versions.invidious.rev}"' 49 49 50 50 # Patch the assets and locales paths to be absolute
+1 -1
pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix
··· 10 10 src = fetchFromGitHub { 11 11 owner = "pgf-tikz"; 12 12 repo = "pgf"; 13 - rev = "refs/tags/version-${lib.replaceChars ["."] ["-"] finalAttrs.version}"; 13 + rev = "refs/tags/version-${lib.replaceStrings ["."] ["-"] finalAttrs.version}"; 14 14 hash = "sha256-WZ/191iEDd5VK1bnV9JZx2BZfACUeAUhAqrlyx+ZvA4="; 15 15 }; 16 16
+1 -1
pkgs/top-level/haxe-packages.nix
··· 4 4 self = haxePackages; 5 5 haxePackages = with self; { 6 6 7 - withCommas = lib.replaceChars ["."] [","]; 7 + withCommas = lib.replaceStrings ["."] [","]; 8 8 9 9 # simulate "haxelib dev $libname ." 10 10 simulateHaxelibDev = libname: ''