Changed flake to use flake-utils and build for all targets
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -2,24 +2,26 @@
|
||||
description = "a lisp interpreter/compiler in ocaml";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {self, nixpkgs}:
|
||||
outputs = {self, nixpkgs, flake-utils}:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
devInputs = with pkgs.ocamlPackages; [merlin];
|
||||
ocamlPkgs = with pkgs.ocamlPackages; [menhir dune_3];
|
||||
nativeInputs = with pkgs; ocamlPkgs ++ [ocaml];
|
||||
in
|
||||
{
|
||||
packages.x86_64-linux.default = pkgs.ocamlPackages.buildDunePackage {
|
||||
packages.default = pkgs.ocamlPackages.buildDunePackage {
|
||||
pname = "ollisp";
|
||||
version = "0.0.1";
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
nativeBuildInputs = nativeInputs;
|
||||
};
|
||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = nativeInputs ++ devInputs;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user