{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12284","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12284/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12284/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12284/events","html_url":"https://github.com/NixOS/nixpkgs/pull/12284","id":125799811,"number":12284,"title":"bundlerEnv: add wrapper","user":{"login":"abbradar","id":1174810,"avatar_url":"https://avatars.githubusercontent.com/u/1174810?v=3","gravatar_id":"","url":"https://api.github.com/users/abbradar","html_url":"https://github.com/abbradar","followers_url":"https://api.github.com/users/abbradar/followers","following_url":"https://api.github.com/users/abbradar/following{/other_user}","gists_url":"https://api.github.com/users/abbradar/gists{/gist_id}","starred_url":"https://api.github.com/users/abbradar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbradar/subscriptions","organizations_url":"https://api.github.com/users/abbradar/orgs","repos_url":"https://api.github.com/users/abbradar/repos","events_url":"https://api.github.com/users/abbradar/events{/privacy}","received_events_url":"https://api.github.com/users/abbradar/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/9.needs:%20documentation","name":"9.needs: documentation","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-10T04:37:36Z","updated_at":"2016-01-21T10:09:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/12284","html_url":"https://github.com/NixOS/nixpkgs/pull/12284","diff_url":"https://github.com/NixOS/nixpkgs/pull/12284.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/12284.patch"},"body":"This adds a `.wrapper` attribute to the `bundlerEnv` derivation. Its main purpose is to enable easy packaging of simple Ruby scripts with Gemfiles. For example:\r\n\r\n```\r\nlet env = bundlerEnv {\r\n  name = \"my-script-env\";\r\n\r\n  inherit ruby;\r\n  gemfile = ./Gemfile;\r\n  lockfile = ./Gemfile.lock;\r\n  gemset = ./gemset.nix;\r\n};\r\n\r\nin stdenv.mkDerivation {\r\n  name = \"my-script\";\r\n\r\n  buildInputs = [ env.wrapper ];\r\n\r\n  script = ./my-script.rb;\r\n\r\n  buildCommand = ''\r\n    mkdir -p $out/bin\r\n    install -D -m755 $script $out/bin/my-script\r\n    patchShebangs $out/bin/my-script\r\n  '';\r\n}\r\n```\r\n\r\ncc @cstrahan "},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/173524044","html_url":"https://github.com/NixOS/nixpkgs/pull/12284#issuecomment-173524044","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12284","id":173524044,"user":{"login":"abbradar","id":1174810,"avatar_url":"https://avatars.githubusercontent.com/u/1174810?v=3","gravatar_id":"","url":"https://api.github.com/users/abbradar","html_url":"https://github.com/abbradar","followers_url":"https://api.github.com/users/abbradar/followers","following_url":"https://api.github.com/users/abbradar/following{/other_user}","gists_url":"https://api.github.com/users/abbradar/gists{/gist_id}","starred_url":"https://api.github.com/users/abbradar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbradar/subscriptions","organizations_url":"https://api.github.com/users/abbradar/orgs","repos_url":"https://api.github.com/users/abbradar/repos","events_url":"https://api.github.com/users/abbradar/events{/privacy}","received_events_url":"https://api.github.com/users/abbradar/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T10:09:11Z","updated_at":"2016-01-21T10:09:11Z","body":"@domenkozar Added documentation. Thank you very much for pointing out documentation issues, it really needs more love from all of us!"}}