Open locallycompact opened 3 years ago
There isn't really a right way, yet. I'm working on it here (warning: unstable), but I'm holding off on adding it to nixpkgs until we get the next release. It requires some path changes that were made after v0.3.0.
Thank you very much. How do I call it?
# flake.nix
{
inputs.userpkgs.url = github:claymager/nixpkgs/idris2;
inputs.flake-utils.url = github:numtide/flake-utils;
outputs = { self, userpkgs, flake-utils } :
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let pkgs = import userpkgs {inherit system; };
in {
devShell = pkgs.mkShell {
buildInputs = [
(pkgs.idris2.withPkgs (ps: [ ps.comonad ]) )
];
};
}
);
}
I use something like that. As I said, unstable. and there's a few local paths in the branch atm for testing, but nix develop
with that flake will grant you a shell with idris2-comonad.
You'll still need to explicitly call idris2 -p comonad
in order to import Control.Comonad
, if you're not using an ipkg file.
Thanks, claymager, for your work on this nix-related stuff! I'm really looking forward to the day when we can use nix as a fully operating development environment for Idris2.
Is there any change in Nix support for Idris2 yet?
Hi. I've asked this on nixpkgs (https://github.com/NixOS/nixpkgs/issues/119175) but I imagine I'd find more answers here. I'm looking to get the
idris.with-packages
behaviour that I'm used to in nix.I was able to build the
pkg
flake in this repository by instantiating it as a template, but not thepkgWithDep
flake. I wanted to modify thepkgWithDep
flake to just accept dependencies viafetchFromGitHub
, but I don't see a mechanism to build those and install them to the correct directory, since everything on nixpkgs seems still specific to idris 1.What is the right way to do this?