remove ocaml overlay
This commit is contained in:
parent
5a164045f5
commit
40feebba44
2 changed files with 66 additions and 84 deletions
121
flake.nix
121
flake.nix
|
@ -1,10 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
ocaml-overlay = {
|
||||
url = "github:nix-ocaml/nix-overlays";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
|
@ -13,23 +9,23 @@
|
|||
extra-trusted-public-keys = "ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
ocaml-overlay,
|
||||
flake-utils,
|
||||
}: let
|
||||
version = builtins.toString self.lastModified;
|
||||
in
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
let
|
||||
version = builtins.toString self.lastModified;
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ocaml-overlay.overlays.default];
|
||||
};
|
||||
inherit (pkgs) mkShell ocamlPackages;
|
||||
inherit
|
||||
(ocamlPackages)
|
||||
inherit (ocamlPackages)
|
||||
dune_3
|
||||
ocaml
|
||||
utop
|
||||
|
@ -54,34 +50,37 @@
|
|||
ocamlformat-rpc-lib
|
||||
pkgs.just
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
devShells.default = mkShell {
|
||||
buildInputs = minimal ++ dev;
|
||||
shellHook = let
|
||||
justFile = ''
|
||||
default:
|
||||
@just --list
|
||||
shellHook =
|
||||
let
|
||||
justFile = ''
|
||||
default:
|
||||
@just --list
|
||||
|
||||
@build:
|
||||
nix build .#debug --offline
|
||||
@build:
|
||||
nix build .#debug --offline
|
||||
|
||||
@release:
|
||||
nix build --offline
|
||||
@release:
|
||||
nix build --offline
|
||||
|
||||
@test:
|
||||
printf "\\n\\n\\t************ running nix+dune tests ************\\n\\n\\n"
|
||||
nix flake check --offline
|
||||
nix build .#tests --offline
|
||||
printf "\\n\\n\\t************ running visual test ************\\n\\n\\n"
|
||||
echo one two three four | CULRS="(255,0,0);(0,0,255);#00FF00" CULR_ORDER="1;0;2" result/bin/culr
|
||||
@test:
|
||||
printf "\\n\\n\\t************ running nix+dune tests ************\\n\\n\\n"
|
||||
nix flake check --offline
|
||||
nix build .#tests --offline
|
||||
printf "\\n\\n\\t************ running visual test ************\\n\\n\\n"
|
||||
echo one two three four | CULRS="(255,0,0);(0,0,255);#00FF00" CULR_ORDER="1;0;2" result/bin/culr
|
||||
|
||||
@push:
|
||||
git commit -a
|
||||
git push
|
||||
@push:
|
||||
git commit -a
|
||||
git push
|
||||
'';
|
||||
in
|
||||
''
|
||||
printf '${justFile}' > justfile
|
||||
'';
|
||||
in ''
|
||||
printf '${justFile}' > justfile
|
||||
'';
|
||||
};
|
||||
|
||||
checks.default = pkgs.callPackage ./nix/test.nix {
|
||||
|
@ -109,29 +108,33 @@
|
|||
}
|
||||
)
|
||||
// {
|
||||
nixosModules.culr = import ./nix/module.nix {overlays = [ocaml-overlay.overlays.default self.overlays.culr];};
|
||||
nixosModules.culr = import ./nix/module.nix { overlays = [ self.overlays.culr ]; };
|
||||
|
||||
overlays.culr = final: prev: let
|
||||
ocaml-deps = let
|
||||
inherit
|
||||
(final.ocamlPackages)
|
||||
dune_3
|
||||
ocaml
|
||||
angstrom
|
||||
angstrom-unix
|
||||
ppx_inline_test
|
||||
;
|
||||
in [
|
||||
dune_3
|
||||
ocaml
|
||||
angstrom
|
||||
angstrom-unix
|
||||
ppx_inline_test
|
||||
];
|
||||
in {
|
||||
culr = final.callPackage ./nix/default.nix {
|
||||
inherit ocaml-deps version;
|
||||
overlays.culr =
|
||||
final: prev:
|
||||
let
|
||||
ocaml-deps =
|
||||
let
|
||||
inherit (prev.ocamlPackages)
|
||||
dune_3
|
||||
ocaml
|
||||
angstrom
|
||||
angstrom-unix
|
||||
ppx_inline_test
|
||||
;
|
||||
in
|
||||
[
|
||||
dune_3
|
||||
ocaml
|
||||
angstrom
|
||||
angstrom-unix
|
||||
ppx_inline_test
|
||||
];
|
||||
in
|
||||
{
|
||||
culr = final.callPackage ./nix/default.nix {
|
||||
inherit ocaml-deps version;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue