{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7769","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7769/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7769/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7769/events","html_url":"https://github.com/NixOS/nixpkgs/pull/7769","id":74571139,"number":7769,"title":"[WIP] Agda build support","user":{"login":"Ericson2314","id":1055245,"avatar_url":"https://avatars.githubusercontent.com/u/1055245?v=3","gravatar_id":"","url":"https://api.github.com/users/Ericson2314","html_url":"https://github.com/Ericson2314","followers_url":"https://api.github.com/users/Ericson2314/followers","following_url":"https://api.github.com/users/Ericson2314/following{/other_user}","gists_url":"https://api.github.com/users/Ericson2314/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericson2314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericson2314/subscriptions","organizations_url":"https://api.github.com/users/Ericson2314/orgs","repos_url":"https://api.github.com/users/Ericson2314/repos","events_url":"https://api.github.com/users/Ericson2314/events{/privacy}","received_events_url":"https://api.github.com/users/Ericson2314/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-09T03:22:02Z","updated_at":"2015-05-09T04:39:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/7769","html_url":"https://github.com/NixOS/nixpkgs/pull/7769","diff_url":"https://github.com/NixOS/nixpkgs/pull/7769.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/7769.patch"},"body":"The first two commits should be pretty uncontroversial.\r\n\r\nThe third removes a wrapper shell script intended for \"public use\". But the generated shell scripts were not used elsewhere in nixpkgs, nor are they terribly useful for Emacs integration (as was the intention IIUC) as that was broken for other reasons.\r\n\r\nI replaced the script with a simple environment variable that has the (resolved) agda binary \"curried\" with the build flags generated by the build support.\r\n\r\nWith https://github.com/NixOS/nix/issues/534 we can have tools shell out to\r\n```sh\r\nnix-shell --command \\$wrappedAgda -- <args...>\r\n```\r\nAs a proof of concept I ran\r\n```sh\r\nnix-shell --command '$wrappedAgda --interactive'\r\n```\r\nby hand and everything worked correctly.\r\n\r\nFinally, making a script accessible to emacs like:\r\n```sh\r\n#/bin/sh\r\nnix-shell --command '$wrappedAgda '\"$@\"\r\n```\r\nand having it call that also might work today. agda-mode got as far as checking and accepting the version of the binary, but then the process died for some reason.\r\n\r\n--------------------\r\n\r\nI'll rebase if this looks good--I've done it locally but just wanted to push what I actually tested. The only \"conflict\" is `haskell-ng` -> `haskell` on the line below in `all-packages.nix`"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/100426495","html_url":"https://github.com/NixOS/nixpkgs/pull/7769#issuecomment-100426495","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7769","id":100426495,"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},"created_at":"2015-05-09T04:39:26Z","updated_at":"2015-05-09T04:39:26Z","body":"First 2 commits OK.\r\n\r\nThe last commit I'm not sure about. For example, I used `agda --latex` manually many times (after running `eval \"$configurePhase\"` and that's what my `Makefile`s end up calling. Is there a good reason to not use a wrapper? Most tools expect that they are able to call `agda`.\r\n\r\n The reason for wrapper it being in `configurePhase` is so we can still get at the underlying Agda binary if we want to."}}