advent-of-code-2024/flake.nix

31 lines
886 B
Nix
Raw Normal View History

2024-12-02 06:06:11 -05:00
{
description = "Advent of Code 2024 in Idris2";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.idris = {
url = "github:idris-lang/Idris2";
inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, idris, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
npkgs = import idris.inputs.nixpkgs { inherit system; };
idrisPkgs = idris.packages.${system};
buildIdris = idris.buildIdris.${system};
pkgs = buildIdris {
ipkgName = "advent-of-code-2024";
src = ./.;
idrisLibraries = [];
};
in {
packages.default = pkgs.executable;
devShell = npkgs.mkShell {
buildInputs = [ idrisPkgs.idris2 npkgs.rlwrap ];
shellHook = ''
alias idris2="rlwrap -s 1000 idris2 --no-banner"
'';
};
});
}