{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/1041","repository_url":"https://api.github.com/repos/NixOS/nix","labels_url":"https://api.github.com/repos/NixOS/nix/issues/1041/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/1041/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/1041/events","html_url":"https://github.com/NixOS/nix/issues/1041","id":173479856,"number":1041,"title":"nix-shell lock file","user":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-26T15:27:05Z","updated_at":"2016-08-26T16:32:49Z","closed_at":null,"body":"Currently when distributing some code with a `shell.nix` for having an easy to use and reproducable development environment \"works on my machine\" can still happen. Usually this is caused by having different nixpkgs versions.\r\n\r\nTo fix this one would have to lock the nixpkgs version to a specific release, `NIX_PATH=\"nixpkgs=https://nixos.org/releases/nixpkgs/some_release\" nix-shell`. As that's a bit long to type it would be very cool to have some kind of file which is read by default to specify this. \r\n\r\nE.g. having a file `nix_path` inside the project directory with the content `nixpkgs=https://nixos.org/releases/nixpkgs/some_release\"` and then running `nix-shell` inside the project could be equivalent to `NIX_PATH=\"nixpkgs=https://nixos.org/releases/nixpkgs/some_release\" nix-shell`.\r\n\r\nThen projects can be distributed with a `shell.nix` and a `nix_path` file to avoid \"works on my machine\".\r\n\r\nLet me know what you think about this idea :)"},"comment":{"url":"https://api.github.com/repos/NixOS/nix/issues/comments/242784565","html_url":"https://github.com/NixOS/nix/issues/1041#issuecomment-242784565","issue_url":"https://api.github.com/repos/NixOS/nix/issues/1041","id":242784565,"user":{"login":"edolstra","id":1148549,"avatar_url":"https://avatars.githubusercontent.com/u/1148549?v=3","gravatar_id":"","url":"https://api.github.com/users/edolstra","html_url":"https://github.com/edolstra","followers_url":"https://api.github.com/users/edolstra/followers","following_url":"https://api.github.com/users/edolstra/following{/other_user}","gists_url":"https://api.github.com/users/edolstra/gists{/gist_id}","starred_url":"https://api.github.com/users/edolstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolstra/subscriptions","organizations_url":"https://api.github.com/users/edolstra/orgs","repos_url":"https://api.github.com/users/edolstra/repos","events_url":"https://api.github.com/users/edolstra/events{/privacy}","received_events_url":"https://api.github.com/users/edolstra/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T16:32:48Z","updated_at":"2016-08-26T16:32:48Z","body":"This is already possible using just `shell.nix`:\r\n```\r\nwith import (fetchTarball https://github.com/NixOS/nixpkgs/archive/8a3eea054838b55aca962c3fbde9c83c102b8bf2.tar.gz) {};\r\n\r\nstdenv.mkDerivation {\r\n  name = \"my-package\";\r\n  buildInputs = [ hello ];\r\n}\r\n```"}}
{"actor":{"display_login":"edolstra"}}