{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/1078","repository_url":"https://api.github.com/repos/NixOS/nix","labels_url":"https://api.github.com/repos/NixOS/nix/issues/1078/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/1078/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/1078/events","html_url":"https://github.com/NixOS/nix/issues/1078","id":180467321,"number":1078,"title":"nix-copy-closure: support non-NixOS machines","user":{"login":"mboes","id":51356,"avatar_url":"https://avatars.githubusercontent.com/u/51356?v=3","gravatar_id":"","url":"https://api.github.com/users/mboes","html_url":"https://github.com/mboes","followers_url":"https://api.github.com/users/mboes/followers","following_url":"https://api.github.com/users/mboes/following{/other_user}","gists_url":"https://api.github.com/users/mboes/gists{/gist_id}","starred_url":"https://api.github.com/users/mboes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboes/subscriptions","organizations_url":"https://api.github.com/users/mboes/orgs","repos_url":"https://api.github.com/users/mboes/repos","events_url":"https://api.github.com/users/mboes/events{/privacy}","received_events_url":"https://api.github.com/users/mboes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-01T16:57:46Z","updated_at":"2016-10-03T21:37:16Z","closed_at":null,"body":"Simple use case: say I have a remote non-NixOS machine on which I built a derivation. Now I'd like to use `nix-copy-closure` to copy it locally. But it won't work, because on non-NixOS machines Nix is installed in the user's dir and the way the Nix binaries are found is through sourcing `./.bash_profile` or the like. That file isn't sourced by non-login shells, so `nix-copy-closure` will yield:\r\n\r\n```\r\n$ nix-copy-closure --from <remote-machine> <path>\r\nbash: nix-store: command not found\r\n```\r\n\r\nI think the simple fix here is simply to get nix-copy-closure to use a login shell when ssh'ing in, rather than a non-interactive non-login shell."},"comment":{"url":"https://api.github.com/repos/NixOS/nix/issues/comments/251234759","html_url":"https://github.com/NixOS/nix/issues/1078#issuecomment-251234759","issue_url":"https://api.github.com/repos/NixOS/nix/issues/1078","id":251234759,"user":{"login":"veprbl","id":245573,"avatar_url":"https://avatars.githubusercontent.com/u/245573?v=3","gravatar_id":"","url":"https://api.github.com/users/veprbl","html_url":"https://github.com/veprbl","followers_url":"https://api.github.com/users/veprbl/followers","following_url":"https://api.github.com/users/veprbl/following{/other_user}","gists_url":"https://api.github.com/users/veprbl/gists{/gist_id}","starred_url":"https://api.github.com/users/veprbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veprbl/subscriptions","organizations_url":"https://api.github.com/users/veprbl/orgs","repos_url":"https://api.github.com/users/veprbl/repos","events_url":"https://api.github.com/users/veprbl/events{/privacy}","received_events_url":"https://api.github.com/users/veprbl/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T21:37:16Z","updated_at":"2016-10-03T21:37:16Z","body":"@mboes You also can come across the exact same problem when using scp, rsync and git. Using an interactive shell is a bad idea IMO. Do you know of a portable way to ssh into a non-interactive login shell? And even if we could do so, the user's .profile can contain virtually anything that can break things and PATH might be only set in .bashrc which, I guess, is not executed in non-interactive shell.\r\n\r\n@edolstra Sometimes that is not easy to arrange if you don't have root and use bash. It would be nice to have something like ```--rsync-path``` option in the ```nix copy```."}}
{"actor":{"display_login":"veprbl"}}