{"action":"opened","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/3000","labels_url":"https://api.github.com/repos/haskell/cabal/issues/3000/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/3000/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/3000/events","html_url":"https://github.com/haskell/cabal/issues/3000","id":123970034,"number":3000,"title":"How to manage post-build-hook phase with the current stable Cabal version?","user":{"login":"danfran","id":4922302,"avatar_url":"https://avatars.githubusercontent.com/u/4922302?v=3","gravatar_id":"","url":"https://api.github.com/users/danfran","html_url":"https://github.com/danfran","followers_url":"https://api.github.com/users/danfran/followers","following_url":"https://api.github.com/users/danfran/following{/other_user}","gists_url":"https://api.github.com/users/danfran/gists{/gist_id}","starred_url":"https://api.github.com/users/danfran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danfran/subscriptions","organizations_url":"https://api.github.com/users/danfran/orgs","repos_url":"https://api.github.com/users/danfran/repos","events_url":"https://api.github.com/users/danfran/events{/privacy}","received_events_url":"https://api.github.com/users/danfran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-27T09:43:12Z","updated_at":"2015-12-27T09:43:12Z","closed_at":null,"body":"Hi,\r\n\r\nbased on #2978 (that looks fixed now on the master version of Cabal), I am still looking for a solution with the current stable version 1.22.4.0 (and older versions) to manage a post-build-hook inside a sandbox.\r\n\r\nOne assumption first:\r\nThe sandbox-hash looks built in `Distribution.Client.Sandbox` via `sandboxBuildDir` (Jenkins hash algorithm). AFAIK it uses the current Cabal instance (/path/to/.cabal) as input, so every single project that uses the same Cabal instance will end up for being built in the same (relative) directory name. \r\n\r\nExample: `dist/dist-sandbox-8121acba` \r\n\r\nIf the assumption is correct:\r\n\r\n1) Do I have to implement the same algortihm in every post-build-hook to \"infer\" the current sandbox-path?\r\n\r\n2) How a post-build-hook can be aware that the building is running in a  sandbox?\r\n\r\nThanks\r\nDaniele"}}