Changed flake to use flake-utils and build for all targets
This commit is contained in:
34
flake.lock
generated
34
flake.lock
generated
@@ -1,5 +1,23 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764950072,
|
"lastModified": 1764950072,
|
||||||
@@ -18,8 +36,24 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
12
flake.nix
12
flake.nix
@@ -2,24 +2,26 @@
|
|||||||
description = "a lisp interpreter/compiler in ocaml";
|
description = "a lisp interpreter/compiler in ocaml";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
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
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
devInputs = with pkgs.ocamlPackages; [merlin];
|
devInputs = with pkgs.ocamlPackages; [merlin];
|
||||||
ocamlPkgs = with pkgs.ocamlPackages; [menhir dune_3];
|
ocamlPkgs = with pkgs.ocamlPackages; [menhir dune_3];
|
||||||
nativeInputs = with pkgs; ocamlPkgs ++ [ocaml];
|
nativeInputs = with pkgs; ocamlPkgs ++ [ocaml];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.x86_64-linux.default = pkgs.ocamlPackages.buildDunePackage {
|
packages.default = pkgs.ocamlPackages.buildDunePackage {
|
||||||
pname = "ollisp";
|
pname = "ollisp";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
src = pkgs.lib.cleanSource ./.;
|
src = pkgs.lib.cleanSource ./.;
|
||||||
nativeBuildInputs = nativeInputs;
|
nativeBuildInputs = nativeInputs;
|
||||||
};
|
};
|
||||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = nativeInputs ++ devInputs;
|
nativeBuildInputs = nativeInputs ++ devInputs;
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user