{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14907","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14907/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14907/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14907/events","html_url":"https://github.com/NixOS/nixpkgs/pull/14907","id":150495911,"number":14907,"title":"setup.sh: substitute uses only valid bash names","user":{"login":"Profpatsch","id":3153638,"avatar_url":"https://avatars.githubusercontent.com/u/3153638?v=3","gravatar_id":"","url":"https://api.github.com/users/Profpatsch","html_url":"https://github.com/Profpatsch","followers_url":"https://api.github.com/users/Profpatsch/followers","following_url":"https://api.github.com/users/Profpatsch/following{/other_user}","gists_url":"https://api.github.com/users/Profpatsch/gists{/gist_id}","starred_url":"https://api.github.com/users/Profpatsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Profpatsch/subscriptions","organizations_url":"https://api.github.com/users/Profpatsch/orgs","repos_url":"https://api.github.com/users/Profpatsch/repos","events_url":"https://api.github.com/users/Profpatsch/events{/privacy}","received_events_url":"https://api.github.com/users/Profpatsch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/0.kind:%20enhancement","name":"0.kind: enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/1.severity:%20mass-rebuild","name":"1.severity: mass-rebuild","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2016-04-22T23:45:40Z","updated_at":"2016-04-28T19:41:00Z","closed_at":"2016-04-25T15:05:53Z","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14907","html_url":"https://github.com/NixOS/nixpkgs/pull/14907","diff_url":"https://github.com/NixOS/nixpkgs/pull/14907.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/14907.patch"},"body":"bash variable names may only contain alphanumeric ASCII-symbols and _,\r\nand must not start with a number. Nix expression attribute names however\r\nmight contain nearly every character (in particular spaces and dashes).\r\n\r\nPreviously, a substitution that was not a valid bash name would be\r\nexpanded to an empty string. This commit introduce a check that throws\r\na (hopefully) helpful error when a wrong name is used in a substitution.\r\nThat was discovered by chexxor when it happened to me in a substitution.\r\n\r\nAdditionally, substituteAll previously filtered out all environment\r\nvariables starting with an uppercase letter. That increased the number\r\nof silently(!) ignored envvars (and nix attributes) even further.\r\nBecause it was quite arbitrary, it is removed.\r\n\r\n\r\nThis will trigger a mass rebuild."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/215539736","html_url":"https://github.com/NixOS/nixpkgs/pull/14907#issuecomment-215539736","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14907","id":215539736,"user":{"login":"aszlig","id":192147,"avatar_url":"https://avatars.githubusercontent.com/u/192147?v=3","gravatar_id":"","url":"https://api.github.com/users/aszlig","html_url":"https://github.com/aszlig","followers_url":"https://api.github.com/users/aszlig/followers","following_url":"https://api.github.com/users/aszlig/following{/other_user}","gists_url":"https://api.github.com/users/aszlig/gists{/gist_id}","starred_url":"https://api.github.com/users/aszlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszlig/subscriptions","organizations_url":"https://api.github.com/users/aszlig/orgs","repos_url":"https://api.github.com/users/aszlig/repos","events_url":"https://api.github.com/users/aszlig/events{/privacy}","received_events_url":"https://api.github.com/users/aszlig/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T19:41:00Z","updated_at":"2016-04-28T19:41:00Z","body":"The problem with `set -o posix` is that it still contains internal variables (but no functions) and they're still printed in bash syntax rather than the raw contents, which `env -0` provides."}}