{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7327","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7327/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7327/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7327/events","html_url":"https://github.com/NixOS/nixpkgs/issues/7327","id":67840142,"number":7327,"title":"Symbolic links should be checked for validity","user":{"login":"bb010g","id":340132,"avatar_url":"https://avatars.githubusercontent.com/u/340132?v=3","gravatar_id":"","url":"https://api.github.com/users/bb010g","html_url":"https://github.com/bb010g","followers_url":"https://api.github.com/users/bb010g/followers","following_url":"https://api.github.com/users/bb010g/following{/other_user}","gists_url":"https://api.github.com/users/bb010g/gists{/gist_id}","starred_url":"https://api.github.com/users/bb010g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bb010g/subscriptions","organizations_url":"https://api.github.com/users/bb010g/orgs","repos_url":"https://api.github.com/users/bb010g/repos","events_url":"https://api.github.com/users/bb010g/events{/privacy}","received_events_url":"https://api.github.com/users/bb010g/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/mass-rebuild","name":"mass-rebuild","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-11T22:28:48Z","updated_at":"2015-04-13T19:14:40Z","closed_at":null,"body":"When fixing `firefoxWrapper`'s (lack of an) icon, I found that the problem was a broken symlink generated by the package ([line](https://github.com/NixOS/nixpkgs/blob/6a6470b79386c6c8710380fbbe7a665b5f1beee3/pkgs/applications/networking/browsers/firefox/wrapper.nix#L62), should be `${browserName}${nameSuffix}` in the source). @ttuegel suggested on IRC that a check be put in for such problems, \"something like `if [[ ! -f $(readlink -f $symlink) ]]; then echo \"Icon symlink missing!\"; exit 1; fi` in the postInstall phase\". I figured such a check would be useful for all packages, as it's rare that we want to make a broken symlink. I don't know enough to know if it would be plausible to do such a check on all the symlinks generated by packages, or just the ones the Nixexpr makes on its own, but this is mainly to get the idea flowing around."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/92466819","html_url":"https://github.com/NixOS/nixpkgs/issues/7327#issuecomment-92466819","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7327","id":92466819,"user":{"login":"ttuegel","id":563054,"avatar_url":"https://avatars.githubusercontent.com/u/563054?v=3","gravatar_id":"","url":"https://api.github.com/users/ttuegel","html_url":"https://github.com/ttuegel","followers_url":"https://api.github.com/users/ttuegel/followers","following_url":"https://api.github.com/users/ttuegel/following{/other_user}","gists_url":"https://api.github.com/users/ttuegel/gists{/gist_id}","starred_url":"https://api.github.com/users/ttuegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttuegel/subscriptions","organizations_url":"https://api.github.com/users/ttuegel/orgs","repos_url":"https://api.github.com/users/ttuegel/repos","events_url":"https://api.github.com/users/ttuegel/events{/privacy}","received_events_url":"https://api.github.com/users/ttuegel/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T19:14:40Z","updated_at":"2015-04-13T19:14:40Z","body":"> Maybe we should use cp -s instead of ln to create symlinks.\r\nThat would be a good start, but we don't have control over what `make`, etc. are doing."}}