Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions contents/index_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,23 @@ <h3 class="text-2xl md:text-3xl font-bold text-gray-800 mb-4">
<a href="https://github.com/ocaml-jp/ocaml-jp.github.io" class="btn-primary">
貢献に興味がある方はこちら
</a>
<div class="mt-10 pt-8 border-t border-gray-100">
<p class="text-sm font-bold uppercase tracking-wider text-gray-500 mb-4">
メンテナへの連絡先
</p>
<div class="flex flex-col sm:flex-row gap-4 sm:gap-8 justify-center items-center">
<a href="https://discord.gg/qQTbny8KF4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-2 text-gray-700 hover:text-orange-500 transition-colors font-semibold">
<img src="https://cdn.simpleicons.org/discord/5865F2" width="20" height="20" alt="">
OCaml 日本語 Discord
</a>
<a href="mailto:ocamljp@proof-ninja.co.jp" class="inline-flex items-center gap-2 text-gray-700 hover:text-orange-500 transition-colors font-semibold">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
<path d="m3 7 9 6 9-6"></path>
</svg>
ocamljp@proof-ninja.co.jp
</a>
</div>
</div>
</div>
</section>
183 changes: 4 additions & 179 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 26 additions & 45 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,37 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
opam-nix.url = "github:tweag/opam-nix";
};
outputs = { flake-utils, nixpkgs, opam-nix, ... }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{ flake-utils, nixpkgs, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
on = opam-nix.lib.${system};

src = ./.;
localNames = with builtins;
let
files = attrNames (readDir src);
opam_files = map (match "(.*)\.opam$") files;
non_nulls = filter (f: !isNull f);
in
map (f: elemAt f 0) (non_nulls opam_files);

localPackagesQuery = with builtins;
listToAttrs (map (p: { name = p; value = "*"; }) localNames);

devPackagesQuery = {
ocaml-base-compiler = "*";
ocaml-lsp-server = "*";
ocamlformat = "*";
};

query = devPackagesQuery // localPackagesQuery;

localPackages =
on.buildOpamProject'
{
inherit pkgs;
resolveArgs = { with-test = false; with-doc = false; };
pinDepends = true;
}
src
query;

devPackages = builtins.attrValues
(pkgs.lib.getAttrs (builtins.attrNames devPackagesQuery) localPackages);
dune = pkgs.dune_3.overrideAttrs (_: rec {
version = "3.22.0";
src = pkgs.fetchurl {
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
hash = "sha256-y4FrLmcspsbqaAEz8BKHvZWljKYRy0dqz/Z7itus9yI=";
};
});
in
{
legacyPackages = pkgs;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
dune
pkg-config
nil
nixpkgs-fmt
];

devShells.default =
pkgs.mkShell {
inputsFrom = builtins.map (p: localPackages.${p}) localNames;
buildInputs = with pkgs; [
nil nixpkgs-fmt
] ++ devPackages;
};
});
shellHook = ''
if [ -f dune-project ]; then
eval "$(dune tool env 2>/dev/null)" || true
fi
'';
};
}
);
}