{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/cabal2nix/issues/166","labels_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/166/comments","events_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/166/events","html_url":"https://github.com/NixOS/cabal2nix/issues/166","id":72818387,"number":166,"title":"Can't find utf8-string v1, but can find v0.3.8","user":{"login":"chexxor","id":843161,"avatar_url":"https://avatars.githubusercontent.com/u/843161?v=3","gravatar_id":"","url":"https://api.github.com/users/chexxor","html_url":"https://github.com/chexxor","followers_url":"https://api.github.com/users/chexxor/followers","following_url":"https://api.github.com/users/chexxor/following{/other_user}","gists_url":"https://api.github.com/users/chexxor/gists{/gist_id}","starred_url":"https://api.github.com/users/chexxor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chexxor/subscriptions","organizations_url":"https://api.github.com/users/chexxor/orgs","repos_url":"https://api.github.com/users/chexxor/repos","events_url":"https://api.github.com/users/chexxor/events{/privacy}","received_events_url":"https://api.github.com/users/chexxor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-03T15:13:13Z","updated_at":"2015-05-04T13:17:56Z","closed_at":"2015-05-04T13:17:56Z","body":"I am trying to use cabal2nix to generate a Nix expression I can use to manage PureScript's dependencies while I develop on it.\r\n\r\nHere's their cabal file - https://github.com/purescript/purescript/blob/master/purescript.cabal\r\n\r\nI believe I used these commands in the cloned PureScript directory:\r\n\r\n    $ cabal2nix --shell ./. > shell.nix\r\n    $ cabal2nix ./. > project.nix\r\n\r\nAnd added a default.nix file containing this:\r\n    # default.nix\r\n    { pkgs ? import <nixpkgs> {} }:\r\n    pkgs.haskellngPackages.callPackage ./project.nix {}\r\n\r\nWhen I tried to `nix-shell` or `nix-build` that, I got an error:\r\n\r\n    Setup: At least the following dependencies are missing:\r\n    utf8-string ==1.*\r\n\r\nSo, I added `jailbreak = true;` to the project.nix file, which fixed the build by finding and using utf8-string version 0.3.8 instead of version 1. Why can't it find version 1? Is it because it isn't formatted as 1.0.0?\r\nThe Hackage URLs shows for these indicate this possibility:\r\n\r\n    http://hackage.haskell.org/package/utf8-string-1\r\n    http://hackage.haskell.org/package/utf8-string-0.3.8\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/NixOS/cabal2nix/issues/comments/98702605","html_url":"https://github.com/NixOS/cabal2nix/issues/166#issuecomment-98702605","issue_url":"https://api.github.com/repos/NixOS/cabal2nix/issues/166","id":98702605,"user":{"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},"created_at":"2015-05-04T13:17:56Z","updated_at":"2015-05-04T13:17:56Z","body":"@chexxor, the easiest solution is to edit your generated `shell.nix` to expect `utf8-string_1` as an argument instead of the version-less `utf8-string` -- which is 0.3.8 by default. When 1.x came out, the vast majority of packages would not compile against the new version, so we had to stick to the old one by default. I'm not sure whether the situation has changed much recently, but I suppose it's a good time to try whether using version 1.x by default is sustainable solution at the time being.\r\n\r\nAnyway, cabal2nix has nothing to do with this subject. Version resolution takes place in the Nixpkgs package set. In this particular case, the version choice is made in the `*.nix` files that you generated locally."}}