{"action":"opened","number":64,"pull_request":{"url":"https://api.github.com/repos/zalora/microgram/pulls/64","id":55625292,"html_url":"https://github.com/zalora/microgram/pull/64","diff_url":"https://github.com/zalora/microgram/pull/64.diff","patch_url":"https://github.com/zalora/microgram/pull/64.patch","issue_url":"https://api.github.com/repos/zalora/microgram/issues/64","number":64,"state":"open","locked":false,"title":"upcast{,-ng}: use overrideDerivation","user":{"login":"4z3","id":427872,"avatar_url":"https://avatars.githubusercontent.com/u/427872?v=3","gravatar_id":"","url":"https://api.github.com/users/4z3","html_url":"https://github.com/4z3","followers_url":"https://api.github.com/users/4z3/followers","following_url":"https://api.github.com/users/4z3/following{/other_user}","gists_url":"https://api.github.com/users/4z3/gists{/gist_id}","starred_url":"https://api.github.com/users/4z3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4z3/subscriptions","organizations_url":"https://api.github.com/users/4z3/orgs","repos_url":"https://api.github.com/users/4z3/repos","events_url":"https://api.github.com/users/4z3/events{/privacy}","received_events_url":"https://api.github.com/users/4z3/received_events","type":"User","site_admin":false},"body":"This PR causes the `postFixup` overrides for `upcast` and `upcast-ng` to become effective. I'm not 100% certain this is the best way to do it, but the current use of `overrideCabal` doesn't do the right thing, which can be illustrated with following patch:\r\n\r\n```diff\r\ndiff --git a/pkgs/default.nix b/pkgs/default.nix\r\nindex 8151f18..23879d3 100644\r\n--- a/pkgs/default.nix\r\n+++ b/pkgs/default.nix\r\n@@ -348,11 +348,20 @@ in rec {\r\n \r\n   unicron = fns.staticHaskellCallPackage ./unicron {};\r\n \r\n-  upcast = pkgs.haskell.lib.overrideCabal (fns.staticHaskellCallPackage ./upcast {\r\n-    inherit (amazonka_1_1_0) amazonka amazonka-core amazonka-ec2 amazonka-elb amazonka-route53;\r\n-  }) (drv: {\r\n-    postFixup = \"rm -rf $out/lib $out/nix-support\";\r\n-  });\r\n+  upcast = let\r\n+    pkg0 = fns.staticHaskellCallPackage ./upcast {\r\n+      inherit (amazonka_1_1_0) amazonka amazonka-core amazonka-ec2 amazonka-elb amazonka-route53;\r\n+    };\r\n+    pkg1 = with builtins; trace ''\r\n+      ----- pkg1: ${pkg0.postFixup}\r\n+    '' pkg0;\r\n+    pkg2 = pkgs.haskell.lib.overrideCabal pkg1 (drv: {\r\n+      postFixup = \"rm -rf $out/lib $out/nix-support\";\r\n+    });\r\n+    pkg3 = with builtins; trace ''\r\n+      ----- pkg3: ${pkg2.postFixup}\r\n+    '' pkg2;\r\n+  in pkg3;\r\n \r\n   upcast-ng = let\r\n     ng = pkgs.haskell.lib.overrideCabal (fns.staticHaskellCallPackage ./upcast/ng.nix {\r\n```\r\n\r\nwhich produces this output:\r\n```console\r\n$ nix-env -f pkgs -iA upcast\r\ntrace: ----- pkg1: rm -rf $out/lib $out/nix-support $out/share\r\n\r\ntrace: ----- pkg3: rm -rf $out/lib $out/nix-support $out/share\r\n\r\nreplacing old 'upcast-0.1.1.0'\r\ninstalling 'upcast-0.1.1.0'\r\n```\r\n\r\n\r\nWith this PR, upcast and upcast-ng retain the `/share` directory, which is essential for them to work.\r\n\r\nRefs https://github.com/zalora/microgram/commit/d2b3d3ed810f230735b14df226d90cb24f1a3559#commitcomment-15369590","created_at":"2016-01-11T14:04:05Z","updated_at":"2016-01-11T14:04:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zalora/microgram/pulls/64/commits","review_comments_url":"https://api.github.com/repos/zalora/microgram/pulls/64/comments","review_comment_url":"https://api.github.com/repos/zalora/microgram/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalora/microgram/issues/64/comments","statuses_url":"https://api.github.com/repos/zalora/microgram/statuses/2eef817a2c81aedbd5a9197c0daf49798e401c28","head":{"label":"4z3:lol-overrideCabal","ref":"lol-overrideCabal","sha":"2eef817a2c81aedbd5a9197c0daf49798e401c28","user":{"login":"4z3","id":427872,"avatar_url":"https://avatars.githubusercontent.com/u/427872?v=3","gravatar_id":"","url":"https://api.github.com/users/4z3","html_url":"https://github.com/4z3","followers_url":"https://api.github.com/users/4z3/followers","following_url":"https://api.github.com/users/4z3/following{/other_user}","gists_url":"https://api.github.com/users/4z3/gists{/gist_id}","starred_url":"https://api.github.com/users/4z3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4z3/subscriptions","organizations_url":"https://api.github.com/users/4z3/orgs","repos_url":"https://api.github.com/users/4z3/repos","events_url":"https://api.github.com/users/4z3/events{/privacy}","received_events_url":"https://api.github.com/users/4z3/received_events","type":"User","site_admin":false},"repo":{"id":39157452,"name":"microgram","full_name":"4z3/microgram","owner":{"login":"4z3","id":427872,"avatar_url":"https://avatars.githubusercontent.com/u/427872?v=3","gravatar_id":"","url":"https://api.github.com/users/4z3","html_url":"https://github.com/4z3","followers_url":"https://api.github.com/users/4z3/followers","following_url":"https://api.github.com/users/4z3/following{/other_user}","gists_url":"https://api.github.com/users/4z3/gists{/gist_id}","starred_url":"https://api.github.com/users/4z3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4z3/subscriptions","organizations_url":"https://api.github.com/users/4z3/orgs","repos_url":"https://api.github.com/users/4z3/repos","events_url":"https://api.github.com/users/4z3/events{/privacy}","received_events_url":"https://api.github.com/users/4z3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/4z3/microgram","description":"It's like Instagram, but for microservices.","fork":true,"url":"https://api.github.com/repos/4z3/microgram","forks_url":"https://api.github.com/repos/4z3/microgram/forks","keys_url":"https://api.github.com/repos/4z3/microgram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4z3/microgram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4z3/microgram/teams","hooks_url":"https://api.github.com/repos/4z3/microgram/hooks","issue_events_url":"https://api.github.com/repos/4z3/microgram/issues/events{/number}","events_url":"https://api.github.com/repos/4z3/microgram/events","assignees_url":"https://api.github.com/repos/4z3/microgram/assignees{/user}","branches_url":"https://api.github.com/repos/4z3/microgram/branches{/branch}","tags_url":"https://api.github.com/repos/4z3/microgram/tags","blobs_url":"https://api.github.com/repos/4z3/microgram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4z3/microgram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4z3/microgram/git/refs{/sha}","trees_url":"https://api.github.com/repos/4z3/microgram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4z3/microgram/statuses/{sha}","languages_url":"https://api.github.com/repos/4z3/microgram/languages","stargazers_url":"https://api.github.com/repos/4z3/microgram/stargazers","contributors_url":"https://api.github.com/repos/4z3/microgram/contributors","subscribers_url":"https://api.github.com/repos/4z3/microgram/subscribers","subscription_url":"https://api.github.com/repos/4z3/microgram/subscription","commits_url":"https://api.github.com/repos/4z3/microgram/commits{/sha}","git_commits_url":"https://api.github.com/repos/4z3/microgram/git/commits{/sha}","comments_url":"https://api.github.com/repos/4z3/microgram/comments{/number}","issue_comment_url":"https://api.github.com/repos/4z3/microgram/issues/comments{/number}","contents_url":"https://api.github.com/repos/4z3/microgram/contents/{+path}","compare_url":"https://api.github.com/repos/4z3/microgram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4z3/microgram/merges","archive_url":"https://api.github.com/repos/4z3/microgram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4z3/microgram/downloads","issues_url":"https://api.github.com/repos/4z3/microgram/issues{/number}","pulls_url":"https://api.github.com/repos/4z3/microgram/pulls{/number}","milestones_url":"https://api.github.com/repos/4z3/microgram/milestones{/number}","notifications_url":"https://api.github.com/repos/4z3/microgram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4z3/microgram/labels{/name}","releases_url":"https://api.github.com/repos/4z3/microgram/releases{/id}","created_at":"2015-07-15T19:42:53Z","updated_at":"2015-07-15T19:42:53Z","pushed_at":"2016-01-11T13:56:19Z","git_url":"git://github.com/4z3/microgram.git","ssh_url":"git@github.com:4z3/microgram.git","clone_url":"https://github.com/4z3/microgram.git","svn_url":"https://github.com/4z3/microgram","homepage":"","size":1482,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"zalora:master","ref":"master","sha":"dc5adff60602b2e97d20ae942f4c4198655c0395","user":{"login":"zalora","id":3175092,"avatar_url":"https://avatars.githubusercontent.com/u/3175092?v=3","gravatar_id":"","url":"https://api.github.com/users/zalora","html_url":"https://github.com/zalora","followers_url":"https://api.github.com/users/zalora/followers","following_url":"https://api.github.com/users/zalora/following{/other_user}","gists_url":"https://api.github.com/users/zalora/gists{/gist_id}","starred_url":"https://api.github.com/users/zalora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalora/subscriptions","organizations_url":"https://api.github.com/users/zalora/orgs","repos_url":"https://api.github.com/users/zalora/repos","events_url":"https://api.github.com/users/zalora/events{/privacy}","received_events_url":"https://api.github.com/users/zalora/received_events","type":"Organization","site_admin":false},"repo":{"id":30487200,"name":"microgram","full_name":"zalora/microgram","owner":{"login":"zalora","id":3175092,"avatar_url":"https://avatars.githubusercontent.com/u/3175092?v=3","gravatar_id":"","url":"https://api.github.com/users/zalora","html_url":"https://github.com/zalora","followers_url":"https://api.github.com/users/zalora/followers","following_url":"https://api.github.com/users/zalora/following{/other_user}","gists_url":"https://api.github.com/users/zalora/gists{/gist_id}","starred_url":"https://api.github.com/users/zalora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalora/subscriptions","organizations_url":"https://api.github.com/users/zalora/orgs","repos_url":"https://api.github.com/users/zalora/repos","events_url":"https://api.github.com/users/zalora/events{/privacy}","received_events_url":"https://api.github.com/users/zalora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalora/microgram","description":"\"It's like Instagram, but for microservices.\"","fork":false,"url":"https://api.github.com/repos/zalora/microgram","forks_url":"https://api.github.com/repos/zalora/microgram/forks","keys_url":"https://api.github.com/repos/zalora/microgram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalora/microgram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalora/microgram/teams","hooks_url":"https://api.github.com/repos/zalora/microgram/hooks","issue_events_url":"https://api.github.com/repos/zalora/microgram/issues/events{/number}","events_url":"https://api.github.com/repos/zalora/microgram/events","assignees_url":"https://api.github.com/repos/zalora/microgram/assignees{/user}","branches_url":"https://api.github.com/repos/zalora/microgram/branches{/branch}","tags_url":"https://api.github.com/repos/zalora/microgram/tags","blobs_url":"https://api.github.com/repos/zalora/microgram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalora/microgram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalora/microgram/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalora/microgram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalora/microgram/statuses/{sha}","languages_url":"https://api.github.com/repos/zalora/microgram/languages","stargazers_url":"https://api.github.com/repos/zalora/microgram/stargazers","contributors_url":"https://api.github.com/repos/zalora/microgram/contributors","subscribers_url":"https://api.github.com/repos/zalora/microgram/subscribers","subscription_url":"https://api.github.com/repos/zalora/microgram/subscription","commits_url":"https://api.github.com/repos/zalora/microgram/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalora/microgram/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalora/microgram/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalora/microgram/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalora/microgram/contents/{+path}","compare_url":"https://api.github.com/repos/zalora/microgram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalora/microgram/merges","archive_url":"https://api.github.com/repos/zalora/microgram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalora/microgram/downloads","issues_url":"https://api.github.com/repos/zalora/microgram/issues{/number}","pulls_url":"https://api.github.com/repos/zalora/microgram/pulls{/number}","milestones_url":"https://api.github.com/repos/zalora/microgram/milestones{/number}","notifications_url":"https://api.github.com/repos/zalora/microgram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalora/microgram/labels{/name}","releases_url":"https://api.github.com/repos/zalora/microgram/releases{/id}","created_at":"2015-02-08T09:58:07Z","updated_at":"2016-01-04T06:27:23Z","pushed_at":"2016-01-05T03:32:24Z","git_url":"git://github.com/zalora/microgram.git","ssh_url":"git@github.com:zalora/microgram.git","clone_url":"https://github.com/zalora/microgram.git","svn_url":"https://github.com/zalora/microgram","homepage":"","size":1513,"stargazers_count":37,"watchers_count":37,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalora/microgram/pulls/64"},"html":{"href":"https://github.com/zalora/microgram/pull/64"},"issue":{"href":"https://api.github.com/repos/zalora/microgram/issues/64"},"comments":{"href":"https://api.github.com/repos/zalora/microgram/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/zalora/microgram/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/zalora/microgram/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalora/microgram/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/zalora/microgram/statuses/2eef817a2c81aedbd5a9197c0daf49798e401c28"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}