{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36976","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36976/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36976/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36976/events","html_url":"https://github.com/NixOS/nixpkgs/issues/36976","id":305087868,"number":36976,"title":"\"With-packages\" wrapper for GHC does not wrap Haddock","user":{"login":"mrkkrp","id":8165792,"avatar_url":"https://avatars0.githubusercontent.com/u/8165792?v=4","gravatar_id":"","url":"https://api.github.com/users/mrkkrp","html_url":"https://github.com/mrkkrp","followers_url":"https://api.github.com/users/mrkkrp/followers","following_url":"https://api.github.com/users/mrkkrp/following{/other_user}","gists_url":"https://api.github.com/users/mrkkrp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkkrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkkrp/subscriptions","organizations_url":"https://api.github.com/users/mrkkrp/orgs","repos_url":"https://api.github.com/users/mrkkrp/repos","events_url":"https://api.github.com/users/mrkkrp/events{/privacy}","received_events_url":"https://api.github.com/users/mrkkrp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-14T09:50:07Z","updated_at":"2018-03-15T03:51:10Z","closed_at":null,"author_association":"NONE","body":"## Issue description\r\n\r\nWe use `haskell.packages.ghc822.ghcWithPackages` which allows to add some packages to GHC installation so they are always visible. This works with `ghc`, `ghci`, `ghc-pkg`, but does not work for `haddock` because it's not wrapped, and so non-built-in packages are not visible to it.\r\n\r\n### Steps to reproduce\r\n\r\nPut the following in a file called `haddock-not-wrapped.nix`:\r\n\r\n```nix\r\nlet nixpkgs = import <nixpkgs> {};\r\nin\r\n\r\nnixpkgs.buildEnv {\r\n  name = \"my-thing\";\r\n  paths = with nixpkgs; [\r\n    (haskell.packages.ghc822.ghcWithPackages (p: with p; [\r\n      base\r\n      binary\r\n      binary-orphans\r\n    ]))\r\n    bash\r\n  ];\r\n}\r\n```\r\n\r\nThen execute:\r\n\r\n```\r\n$ nix-env -if haddock-not-wrapped.nix\r\n$ which haddock\r\n/root/.nix-profile/bin/haddock\r\n$ haddock --optghc -package --optghc base\r\n$ echo $?\r\n0\r\n$ haddock --optghc -package --optghc binary-orphans\r\n<command line>: cannot satisfy -package binary-orphans\r\n    (use -v for more information)\r\n$ echo $?\r\n1\r\n```\r\n\r\n## Technical details\r\n\r\nPlease run `nix-shell -p nix-info --run \"nix-info -m\"` and paste the\r\nresults.\r\n\r\n```\r\n - system: `\"x86_64-linux\"`\r\n - host os: `Linux 4.15.8-1-ARCH, Alpine Linux, noversion`\r\n - multi-user?: `yes`\r\n - sandbox: `no`\r\n - version: `nix-env (Nix) 1.11.14`\r\n - channels(root): `\"nixpkgs-18.03pre128481.1098c071e59\"`\r\n - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/373252405","html_url":"https://github.com/NixOS/nixpkgs/issues/36976#issuecomment-373252405","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36976","id":373252405,"user":{"login":"mrkkrp","id":8165792,"avatar_url":"https://avatars0.githubusercontent.com/u/8165792?v=4","gravatar_id":"","url":"https://api.github.com/users/mrkkrp","html_url":"https://github.com/mrkkrp","followers_url":"https://api.github.com/users/mrkkrp/followers","following_url":"https://api.github.com/users/mrkkrp/following{/other_user}","gists_url":"https://api.github.com/users/mrkkrp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkkrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkkrp/subscriptions","organizations_url":"https://api.github.com/users/mrkkrp/orgs","repos_url":"https://api.github.com/users/mrkkrp/repos","events_url":"https://api.github.com/users/mrkkrp/events{/privacy}","received_events_url":"https://api.github.com/users/mrkkrp/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T03:51:10Z","updated_at":"2018-03-15T03:51:10Z","author_association":"NONE","body":"Well, haddock should be able to see these packages like other tools (ghc, ghc-pkg) do."}}
{"actor":{"display_login":"mrkkrp"}}