diff --git a/pkgs/development/libraries/mitama-cpp-result/default.nix b/pkgs/development/libraries/mitama-cpp-result/default.nix new file mode 100644 index 000000000000..9ae718de4db5 --- /dev/null +++ b/pkgs/development/libraries/mitama-cpp-result/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "mitama-cpp-result"; + version = "9.3.0"; + + src = fetchFromGitHub { + owner = "LoliGothick"; + repo = "mitama-cpp-result"; + rev = "v${finalAttrs.version}"; + hash = "sha256-CWYVPpmPIZZTsqXKh+Ft3SlQ4C9yjUof1mJ8Acn5kmM="; + }; + + nativeBuildInputs = [ + cmake + ]; + + meta = with lib; { + homepage = "https://github.com/LoliGothick/mitama-cpp-result"; + description = "A Library that provides `result` and `maybe` and monadic functions for them"; + longDescription = '' + mitama-cpp-result is the C++17 libraries for error handling without exceptions. + + mitama-cpp-result provides `result`, `maybe`, and associated monadic functions + (like Result and Option in Programming Language Rust). + ''; + license = licenses.mit; + maintainers = with maintainers; [ ken-matsui ]; + platforms = platforms.unix; + }; +}) +# TODO [ ken-matsui ]: tests diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2381736a3c08..f091c3496efe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14961,6 +14961,8 @@ with pkgs; mint = callPackage ../development/compilers/mint { }; + mitama-cpp-result = callPackage ../development/libraries/mitama-cpp-result { }; + mitscheme = callPackage ../development/compilers/mit-scheme { stdenv = gcc10StdenvCompat; texLive = texlive.combine { inherit (texlive) scheme-small epsf texinfo; }; };