mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 10:41:59 +03:00
33 lines
936 B
Nix
33 lines
936 B
Nix
{
|
|
description = "My Idris 2 package";
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
inputs.idris = {
|
|
url = "github:idris-lang/Idris2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, idris, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
npkgs = import nixpkgs { inherit system; };
|
|
idrisPkgs = idris.packages.${system};
|
|
buildIdris = idris.buildIdris.${system};
|
|
pkgs = buildIdris {
|
|
projectName = "mypkg";
|
|
src = ./.;
|
|
idrisLibraries = [ ];
|
|
};
|
|
in rec {
|
|
packages = pkgs // idrisPkgs;
|
|
defaultPackage = pkgs.build;
|
|
devShell = npkgs.mkShell {
|
|
buildInputs = [ idrisPkgs.idris2 npkgs.rlwrap ];
|
|
shellHook = ''
|
|
alias idris2="rlwrap -s 1000 idris2 --no-banner"
|
|
'';
|
|
};
|
|
});
|
|
}
|