about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mitama-cpp-result
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mitama-cpp-result')
-rw-r--r--nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix b/nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix
new file mode 100644
index 000000000000..9ae718de4db5
--- /dev/null
+++ b/nixpkgs/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<T, E>` and `maybe<T>` and monadic functions for them";
+    longDescription = ''
+      mitama-cpp-result is the C++17 libraries for error handling without exceptions.
+
+      mitama-cpp-result provides `result<T, E>`, `maybe<T>`, 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