{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/cabal2nix/issues/184","labels_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/184/comments","events_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/184/events","html_url":"https://github.com/NixOS/cabal2nix/issues/184","id":95946262,"number":184,"title":"Expose hackage2nix as a library","user":{"login":"Fuuzetsu","id":893115,"avatar_url":"https://avatars.githubusercontent.com/u/893115?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuuzetsu","html_url":"https://github.com/Fuuzetsu","followers_url":"https://api.github.com/users/Fuuzetsu/followers","following_url":"https://api.github.com/users/Fuuzetsu/following{/other_user}","gists_url":"https://api.github.com/users/Fuuzetsu/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuuzetsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuuzetsu/subscriptions","organizations_url":"https://api.github.com/users/Fuuzetsu/orgs","repos_url":"https://api.github.com/users/Fuuzetsu/repos","events_url":"https://api.github.com/users/Fuuzetsu/events{/privacy}","received_events_url":"https://api.github.com/users/Fuuzetsu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/cabal2nix/labels/enhancement","name":"enhancement","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"peti","id":28323,"avatar_url":"https://avatars.githubusercontent.com/u/28323?v=3","gravatar_id":"","url":"https://api.github.com/users/peti","html_url":"https://github.com/peti","followers_url":"https://api.github.com/users/peti/followers","following_url":"https://api.github.com/users/peti/following{/other_user}","gists_url":"https://api.github.com/users/peti/gists{/gist_id}","starred_url":"https://api.github.com/users/peti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peti/subscriptions","organizations_url":"https://api.github.com/users/peti/orgs","repos_url":"https://api.github.com/users/peti/repos","events_url":"https://api.github.com/users/peti/events{/privacy}","received_events_url":"https://api.github.com/users/peti/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-07-19T20:28:24Z","updated_at":"2015-08-19T14:09:53Z","closed_at":null,"body":"Use case: overriding the default configuration to be able to generate a more fine-grained package sets with the cabal-provided versions on per-project basis."},"comment":{"url":"https://api.github.com/repos/NixOS/cabal2nix/issues/comments/132611398","html_url":"https://github.com/NixOS/cabal2nix/issues/184#issuecomment-132611398","issue_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/184","id":132611398,"user":{"login":"bennofs","id":3192959,"avatar_url":"https://avatars.githubusercontent.com/u/3192959?v=3","gravatar_id":"","url":"https://api.github.com/users/bennofs","html_url":"https://github.com/bennofs","followers_url":"https://api.github.com/users/bennofs/followers","following_url":"https://api.github.com/users/bennofs/following{/other_user}","gists_url":"https://api.github.com/users/bennofs/gists{/gist_id}","starred_url":"https://api.github.com/users/bennofs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennofs/subscriptions","organizations_url":"https://api.github.com/users/bennofs/orgs","repos_url":"https://api.github.com/users/bennofs/repos","events_url":"https://api.github.com/users/bennofs/events{/privacy}","received_events_url":"https://api.github.com/users/bennofs/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T14:09:53Z","updated_at":"2015-08-19T14:09:53Z","body":"> I'm not sure I can follow. Would you mind giving an example of what a user might want to do that's not possible with hackage-packages.nix + configuration-*.nix overrides? \r\n\r\nThere are lots of different stackage snapshots, and I think we won't want to include packages for all different snapshots in hackage-packages.nix. As I understand stackage, most applications using stackage will depend on a very specific stackage snapshot (for example, nightly-08-07. Ok, some might also use LTS, but it's perfectly ok to pick some nightly snapshot and stick with it). If all packages have to be contained in hackage-packages.nix, then it's not easy to use a custom stackage snapshot, since you have to include the packages that are not in hackage-packages.nix too somehow. For example, nightly-08-07 might have vector-0.10, but perhaps the stackage snapshot that we include in nixpkgs has only vector-0.11. Then, if I want to use nightly-08-07, I can't just use a generated `configuration-*.nix`: I'll also have to figure out how to add the vector-0.10 package. I know that you can also add custom packages via overriding, but generating the needed custom entries will be a mess. \r\n\r\n> Won't those two files contain a lot of duplicate entries? \r\n\r\nYes, the two files will neccessarily contain some duplicate entries. However, flag selection for example may be different (because of different dependencies). I'm not sure how often that'll actually happen in practice, but it just feels cleaner to me to avoid such problems fully. \r\n\r\nI'm not sure if it makes sense to include a recent stackage nightly snapshot in nixpkgs itself anyway, since nightly will be updated daily so it'll very often be out of date. We could at the LTS snapshots though, they don't change as often as far as I know. "}}