{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/79922772","id":79922772,"diff_hunk":"@@ -0,0 +1,66 @@\n+{ lib, buildGoPackage, fetchFromGitLab, fetchurl, go-bindata }:\n+\n+let\n+  version = \"1.5.3\";\n+  # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64\n+  docker_x86_64 = fetchurl {\n+    url = \"https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-x86_64.tar.xz\";\n+    sha256 = \"108cszdn9616q5ls86hfcjvgh6cp8jb3g4h94c9ag63f0z8zxzx2\";\n+  };\n+\n+  docker_arm = fetchurl {\n+    url = \"https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-arm.tar.xz\";\n+    sha256 = \"0axiq9yxkybrdg0h59wr6jm2xq3aw8dwv7mqfk1a6k2j8bxk9z08\";\n+  };\n+in\n+buildGoPackage rec {\n+  inherit version;\n+  name = \"gitlab-runner-${version}\";\n+  goPackagePath = \"gitlab.com/gitlab-org/gitlab-ci-multi-runner\";\n+  commonPackagePath = \"${goPackagePath}/common\";\n+  buildFlagsArray = ''\n+    -ldflags=\n+      -X ${commonPackagePath}.NAME=gitlab-runner\n+      -X ${commonPackagePath}.VERSION=${version}\n+      -X ${commonPackagePath}.REVISION=v${version}\n+  '';\n+\n+  src = fetchFromGitLab {\n+    owner = \"gitlab-org\";\n+    repo = \"gitlab-ci-multi-runner\";\n+    rev = \"v${version}\";\n+    sha256 = \"1rs70jcgi1x9vpfbx4fay0j025amvrj48wgfwk7vwzy9rbdizka4\";\n+  };\n+\n+  buildInputs = [ go-bindata ];\n+\n+  preBuild = ''\n+    (\n+    # go-bindata names the assets after the filename thus we create a symlink with the name we want\n+    cd go/src/${goPackagePath}\n+    ln -sf ${docker_x86_64} prebuilt-x86_64.tar.xz\n+    ln -sf ${docker_arm} prebuilt-arm.tar.xz\n+    go-bindata \\\n+        -pkg docker \\\n+        -nocompress \\\n+        -nomemcopy \\\n+        -o executors/docker/bindata.go \\\n+        prebuilt-x86_64.tar.xz \\\n+        prebuilt-arm.tar.xz\n+    )\n+  '';\n+\n+  postInstall = ''\n+    install -d $out/bin","path":"pkgs/development/tools/continuous-integration/gitlab-runner/default.nix","position":54,"original_position":54,"commit_id":"3c8b1c18d706d45af73691b3b82b409eec8359f1","original_commit_id":"3c8b1c18d706d45af73691b3b82b409eec8359f1","user":{"login":"globin","id":1447245,"avatar_url":"https://avatars.githubusercontent.com/u/1447245?v=3","gravatar_id":"","url":"https://api.github.com/users/globin","html_url":"https://github.com/globin","followers_url":"https://api.github.com/users/globin/followers","following_url":"https://api.github.com/users/globin/following{/other_user}","gists_url":"https://api.github.com/users/globin/gists{/gist_id}","starred_url":"https://api.github.com/users/globin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globin/subscriptions","organizations_url":"https://api.github.com/users/globin/orgs","repos_url":"https://api.github.com/users/globin/repos","events_url":"https://api.github.com/users/globin/events{/privacy}","received_events_url":"https://api.github.com/users/globin/received_events","type":"User","site_admin":false},"body":"No, has to be `$out`, it is only available in the build script of the derivation, not in scope of the nix code.","created_at":"2016-09-21T20:16:35Z","updated_at":"2016-09-21T20:16:35Z","html_url":"https://github.com/NixOS/nixpkgs/pull/18694#discussion_r79922772","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/79922772"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18694#discussion_r79922772"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694","id":85672048,"html_url":"https://github.com/NixOS/nixpkgs/pull/18694","diff_url":"https://github.com/NixOS/nixpkgs/pull/18694.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/18694.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18694","number":18694,"state":"open","locked":false,"title":"gitlab-runner: add package and service","user":{"login":"bachp","id":333807,"avatar_url":"https://avatars.githubusercontent.com/u/333807?v=3","gravatar_id":"","url":"https://api.github.com/users/bachp","html_url":"https://github.com/bachp","followers_url":"https://api.github.com/users/bachp/followers","following_url":"https://api.github.com/users/bachp/following{/other_user}","gists_url":"https://api.github.com/users/bachp/gists{/gist_id}","starred_url":"https://api.github.com/users/bachp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bachp/subscriptions","organizations_url":"https://api.github.com/users/bachp/orgs","repos_url":"https://api.github.com/users/bachp/repos","events_url":"https://api.github.com/users/bachp/events{/privacy}","received_events_url":"https://api.github.com/users/bachp/received_events","type":"User","site_admin":false},"body":"###### Motivation for this change\r\n\r\nGitlab runner allows execution of [Gitlab CI](https://about.gitlab.com/gitlab-ci/) on a NixOS Machine.\r\nMaintaining runner using a declarative approach is very advantageous. So running a gitlab-runner with docker on a NixOS machine allows to maintain a large number of runners\r\n\r\n###### Things done\r\n\r\n- [ ] Tested using sandboxing\r\n  ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,\r\n    or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file)\r\n    on non-NixOS) ==> **This link seems broken I can't find any information how to do this.**\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] OS X\r\n   - [ ] Linux\r\n- [x] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [x] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\n","created_at":"2016-09-17T11:34:48Z","updated_at":"2016-09-21T20:16:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96c0c8ec7270639ba8e1b1ca6bc6624f22944f51","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18694/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/3c8b1c18d706d45af73691b3b82b409eec8359f1","head":{"label":"bachp:runner-master","ref":"runner-master","sha":"3c8b1c18d706d45af73691b3b82b409eec8359f1","user":{"login":"bachp","id":333807,"avatar_url":"https://avatars.githubusercontent.com/u/333807?v=3","gravatar_id":"","url":"https://api.github.com/users/bachp","html_url":"https://github.com/bachp","followers_url":"https://api.github.com/users/bachp/followers","following_url":"https://api.github.com/users/bachp/following{/other_user}","gists_url":"https://api.github.com/users/bachp/gists{/gist_id}","starred_url":"https://api.github.com/users/bachp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bachp/subscriptions","organizations_url":"https://api.github.com/users/bachp/orgs","repos_url":"https://api.github.com/users/bachp/repos","events_url":"https://api.github.com/users/bachp/events{/privacy}","received_events_url":"https://api.github.com/users/bachp/received_events","type":"User","site_admin":false},"repo":{"id":68442977,"name":"nixpkgs","full_name":"bachp/nixpkgs","owner":{"login":"bachp","id":333807,"avatar_url":"https://avatars.githubusercontent.com/u/333807?v=3","gravatar_id":"","url":"https://api.github.com/users/bachp","html_url":"https://github.com/bachp","followers_url":"https://api.github.com/users/bachp/followers","following_url":"https://api.github.com/users/bachp/following{/other_user}","gists_url":"https://api.github.com/users/bachp/gists{/gist_id}","starred_url":"https://api.github.com/users/bachp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bachp/subscriptions","organizations_url":"https://api.github.com/users/bachp/orgs","repos_url":"https://api.github.com/users/bachp/repos","events_url":"https://api.github.com/users/bachp/events{/privacy}","received_events_url":"https://api.github.com/users/bachp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bachp/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/bachp/nixpkgs","forks_url":"https://api.github.com/repos/bachp/nixpkgs/forks","keys_url":"https://api.github.com/repos/bachp/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bachp/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bachp/nixpkgs/teams","hooks_url":"https://api.github.com/repos/bachp/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/bachp/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/bachp/nixpkgs/events","assignees_url":"https://api.github.com/repos/bachp/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/bachp/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/bachp/nixpkgs/tags","blobs_url":"https://api.github.com/repos/bachp/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bachp/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bachp/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bachp/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bachp/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/bachp/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/bachp/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/bachp/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/bachp/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/bachp/nixpkgs/subscription","commits_url":"https://api.github.com/repos/bachp/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bachp/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bachp/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bachp/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bachp/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/bachp/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bachp/nixpkgs/merges","archive_url":"https://api.github.com/repos/bachp/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bachp/nixpkgs/downloads","issues_url":"https://api.github.com/repos/bachp/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/bachp/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/bachp/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/bachp/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bachp/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/bachp/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/bachp/nixpkgs/deployments","created_at":"2016-09-17T09:17:09Z","updated_at":"2016-09-17T09:17:31Z","pushed_at":"2016-09-21T19:29:55Z","git_url":"git://github.com/bachp/nixpkgs.git","ssh_url":"git@github.com:bachp/nixpkgs.git","clone_url":"https://github.com/bachp/nixpkgs.git","svn_url":"https://github.com/bachp/nixpkgs","homepage":null,"size":354140,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"3b19fcb2dc7e18a24f29ef073637e920de952898","user":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"repo":{"id":4542716,"name":"nixpkgs","full_name":"NixOS/nixpkgs","owner":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NixOS/nixpkgs","description":"Nix Packages collection","fork":false,"url":"https://api.github.com/repos/NixOS/nixpkgs","forks_url":"https://api.github.com/repos/NixOS/nixpkgs/forks","keys_url":"https://api.github.com/repos/NixOS/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NixOS/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NixOS/nixpkgs/teams","hooks_url":"https://api.github.com/repos/NixOS/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/NixOS/nixpkgs/events","assignees_url":"https://api.github.com/repos/NixOS/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/NixOS/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/NixOS/nixpkgs/tags","blobs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NixOS/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NixOS/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/NixOS/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/NixOS/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/NixOS/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/NixOS/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/NixOS/nixpkgs/subscription","commits_url":"https://api.github.com/repos/NixOS/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NixOS/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NixOS/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/NixOS/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NixOS/nixpkgs/merges","archive_url":"https://api.github.com/repos/NixOS/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NixOS/nixpkgs/downloads","issues_url":"https://api.github.com/repos/NixOS/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/NixOS/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/NixOS/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/NixOS/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/NixOS/nixpkgs/deployments","created_at":"2012-06-04T02:49:46Z","updated_at":"2016-09-21T18:39:51Z","pushed_at":"2016-09-21T20:01:45Z","git_url":"git://github.com/NixOS/nixpkgs.git","ssh_url":"git@github.com:NixOS/nixpkgs.git","clone_url":"https://github.com/NixOS/nixpkgs.git","svn_url":"https://github.com/NixOS/nixpkgs","homepage":null,"size":597073,"stargazers_count":1300,"watchers_count":1300,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1625,"mirror_url":null,"open_issues_count":1549,"forks":1625,"open_issues":1549,"watchers":1300,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18694"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18694"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18694/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18694/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/3c8b1c18d706d45af73691b3b82b409eec8359f1"}}}}
{"actor":{"display_login":"globin"}}