{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/79181208","id":79181208,"diff_hunk":"@@ -0,0 +1,56 @@\n+{ fetchurl, linuxPackages, makeWrapper, runCommand, fetchgit\n+, elfutils, pkgconfig, gettext, stow, gnumake }:\n+let\n+  ## fetchgit info\n+  url = git://sourceware.org/git/systemtap.git;\n+  rev = \"51b7cae3023adf137081059c7cc44a13f652ba4c\";\n+  sha256 = \"18m3lf11r99f4yr1m172548lghc0i22zqbys1fwlwakbczz0a2lz\";\n+\n+  inherit (linuxPackages) kernel;\n+  version = kernel.stdenv.lib.substring 0 6 rev;\n+\n+  ## stap binaries\n+  stapBuild = kernel.stdenv.mkDerivation {\n+    name = \"systemtap-${version}\";\n+    src = fetchgit { inherit url rev sha256; };\n+    buildInputs = [ elfutils pkgconfig gettext ];\n+    enableParallelBuilding = true;\n+  };\n+\n+  ## a kernel build dir as expected by systemtap\n+  kernelBuildDir = runCommand \"kbuild-${kernel.version}-merged\" {\n+    buildInputs = [ stow ];\n+  } ''\n+    mkdir -p $out\n+    stowFrom () {\n+      D=\"$(dirname $1)\"\n+      P=\"$(basename $1)\"\n+      shift\n+      stow -d $D -t $out -v \"$@\" -S $P\n+    }\n+    stowFrom ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build --ignore=source\n+    ln -s ${kernel.dev}/vmlinux $out/vmlinux\n+    ln -s ${kernel}/System.map $out/System.map\n+    ln -s ${kernel.dev}/lib/modules/${kernel.modDirVersion}/source $out/source\n+  '';\n+\n+in runCommand \"systemtap-${kernel.version}-${version}\" {\n+  inherit stapBuild kernelBuildDir;\n+  buildInputs = [ makeWrapper ];\n+  meta = with kernel.stdenv.lib; {\n+    homepage = https://sourceware.org/systemtap/;\n+    repositories.git = git://sourceware.org/git/systemtap.git;\n+    description = \"SystemTap provides a simple command line interface and scripting language for writing instrumentation for a live running kernel plus user-space applications.\";\n+    license = licenses.gpl2;\n+    platforms = platforms.linux;\n+  };\n+} ''\n+  mkdir -p $out/bin\n+  for bin in $stapBuild/bin/*; do # hello emacs */\n+    ln -s $bin $out/bin/$(basename $bin)\n+  done\n+  rm $out/bin/stap\n+  makeWrapper $stapBuild/bin/stap $out/bin/stap \\\n+    --add-flags \"-r $kernelBuildDir\" \\\n+    --prefix PATH : ${kernel.stdenv.cc.cc}/bin:${elfutils}/bin:${gnumake}/bin","path":"pkgs/development/tools/profiling/systemtap/default.nix","position":55,"original_position":55,"commit_id":"b019424e5da3eb499d0f910e6bf677a53ba37846","original_commit_id":"b019424e5da3eb499d0f910e6bf677a53ba37846","user":{"login":"dezgeg","id":579369,"avatar_url":"https://avatars.githubusercontent.com/u/579369?v=3","gravatar_id":"","url":"https://api.github.com/users/dezgeg","html_url":"https://github.com/dezgeg","followers_url":"https://api.github.com/users/dezgeg/followers","following_url":"https://api.github.com/users/dezgeg/following{/other_user}","gists_url":"https://api.github.com/users/dezgeg/gists{/gist_id}","starred_url":"https://api.github.com/users/dezgeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dezgeg/subscriptions","organizations_url":"https://api.github.com/users/dezgeg/orgs","repos_url":"https://api.github.com/users/dezgeg/repos","events_url":"https://api.github.com/users/dezgeg/events{/privacy}","received_events_url":"https://api.github.com/users/dezgeg/received_events","type":"User","site_admin":false},"body":"This could use `lib.makeBinPath`","created_at":"2016-09-16T14:31:47Z","updated_at":"2016-09-16T14:31:47Z","html_url":"https://github.com/NixOS/nixpkgs/pull/18658#discussion_r79181208","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/79181208"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18658#discussion_r79181208"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658","id":85550454,"html_url":"https://github.com/NixOS/nixpkgs/pull/18658","diff_url":"https://github.com/NixOS/nixpkgs/pull/18658.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/18658.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18658","number":18658,"state":"open","locked":false,"title":"systemtap: init at 51b7ca","user":{"login":"bendlas","id":214787,"avatar_url":"https://avatars.githubusercontent.com/u/214787?v=3","gravatar_id":"","url":"https://api.github.com/users/bendlas","html_url":"https://github.com/bendlas","followers_url":"https://api.github.com/users/bendlas/followers","following_url":"https://api.github.com/users/bendlas/following{/other_user}","gists_url":"https://api.github.com/users/bendlas/gists{/gist_id}","starred_url":"https://api.github.com/users/bendlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendlas/subscriptions","organizations_url":"https://api.github.com/users/bendlas/orgs","repos_url":"https://api.github.com/users/bendlas/repos","events_url":"https://api.github.com/users/bendlas/events{/privacy}","received_events_url":"https://api.github.com/users/bendlas/received_events","type":"User","site_admin":false},"body":"###### Motivation for this change\r\n\r\nSystemtap is very useful in monitoring kernel and userspace execution. Apparently it got removed in january: https://www.mail-archive.com/nix-commits-bounces@lists.science.uu.nl/msg00047.html\r\n\r\nI got this version working on kernel 4.7.3, though.\r\n\r\n###### Things done\r\n- Built on platform(s)\r\n   - [x] NixOS\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- [ ] Provide debug info for kernel and userland, in a way accessible to systemtap\r\n\r\n---\r\n\r\nmaster needs to be tracked in order to support recent kernels","created_at":"2016-09-16T10:27:33Z","updated_at":"2016-09-16T14:31:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bab5746676d37e46fb9a4cdb5f75e85fb1a7b9c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18658/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/b019424e5da3eb499d0f910e6bf677a53ba37846","head":{"label":"bendlas:init-systemtap","ref":"init-systemtap","sha":"b019424e5da3eb499d0f910e6bf677a53ba37846","user":{"login":"bendlas","id":214787,"avatar_url":"https://avatars.githubusercontent.com/u/214787?v=3","gravatar_id":"","url":"https://api.github.com/users/bendlas","html_url":"https://github.com/bendlas","followers_url":"https://api.github.com/users/bendlas/followers","following_url":"https://api.github.com/users/bendlas/following{/other_user}","gists_url":"https://api.github.com/users/bendlas/gists{/gist_id}","starred_url":"https://api.github.com/users/bendlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendlas/subscriptions","organizations_url":"https://api.github.com/users/bendlas/orgs","repos_url":"https://api.github.com/users/bendlas/repos","events_url":"https://api.github.com/users/bendlas/events{/privacy}","received_events_url":"https://api.github.com/users/bendlas/received_events","type":"User","site_admin":false},"repo":{"id":29099913,"name":"nixpkgs","full_name":"bendlas/nixpkgs","owner":{"login":"bendlas","id":214787,"avatar_url":"https://avatars.githubusercontent.com/u/214787?v=3","gravatar_id":"","url":"https://api.github.com/users/bendlas","html_url":"https://github.com/bendlas","followers_url":"https://api.github.com/users/bendlas/followers","following_url":"https://api.github.com/users/bendlas/following{/other_user}","gists_url":"https://api.github.com/users/bendlas/gists{/gist_id}","starred_url":"https://api.github.com/users/bendlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendlas/subscriptions","organizations_url":"https://api.github.com/users/bendlas/orgs","repos_url":"https://api.github.com/users/bendlas/repos","events_url":"https://api.github.com/users/bendlas/events{/privacy}","received_events_url":"https://api.github.com/users/bendlas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bendlas/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/bendlas/nixpkgs","forks_url":"https://api.github.com/repos/bendlas/nixpkgs/forks","keys_url":"https://api.github.com/repos/bendlas/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bendlas/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bendlas/nixpkgs/teams","hooks_url":"https://api.github.com/repos/bendlas/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/bendlas/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/bendlas/nixpkgs/events","assignees_url":"https://api.github.com/repos/bendlas/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/bendlas/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/bendlas/nixpkgs/tags","blobs_url":"https://api.github.com/repos/bendlas/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bendlas/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bendlas/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bendlas/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bendlas/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/bendlas/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/bendlas/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/bendlas/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/bendlas/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/bendlas/nixpkgs/subscription","commits_url":"https://api.github.com/repos/bendlas/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bendlas/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bendlas/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bendlas/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bendlas/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/bendlas/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bendlas/nixpkgs/merges","archive_url":"https://api.github.com/repos/bendlas/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bendlas/nixpkgs/downloads","issues_url":"https://api.github.com/repos/bendlas/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/bendlas/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/bendlas/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/bendlas/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bendlas/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/bendlas/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/bendlas/nixpkgs/deployments","created_at":"2015-01-11T17:41:26Z","updated_at":"2016-02-15T11:53:46Z","pushed_at":"2016-09-16T10:20:20Z","git_url":"git://github.com/bendlas/nixpkgs.git","ssh_url":"git@github.com:bendlas/nixpkgs.git","clone_url":"https://github.com/bendlas/nixpkgs.git","svn_url":"https://github.com/bendlas/nixpkgs","homepage":null,"size":342318,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"build-pixie"}},"base":{"label":"NixOS:master","ref":"master","sha":"0ffdb89d956c9daef80858c57040ffe2862164c6","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-16T05:27:47Z","pushed_at":"2016-09-16T14:29:01Z","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":592571,"stargazers_count":1289,"watchers_count":1289,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1613,"mirror_url":null,"open_issues_count":1543,"forks":1613,"open_issues":1543,"watchers":1289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18658"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18658"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18658/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18658/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/b019424e5da3eb499d0f910e6bf677a53ba37846"}}}}
{"actor":{"display_login":"dezgeg"}}