about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/toml-f
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/toml-f')
-rw-r--r--nixpkgs/pkgs/development/libraries/toml-f/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/toml-f/default.nix b/nixpkgs/pkgs/development/libraries/toml-f/default.nix
new file mode 100644
index 000000000000..696e41ac71cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/toml-f/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gfortran
+, cmake
+, test-drive
+}:
+
+stdenv.mkDerivation rec {
+  pname = "toml-f";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-sCU0uMdcXIA5O964hlK37cOrLTlk1CJeTcWD9FhevOs=";
+  };
+
+  nativeBuildInputs = [ gfortran cmake ];
+
+  buildInputs = [ test-drive ];
+
+  postInstall = ''
+    substituteInPlace $out/lib/pkgconfig/${pname}.pc \
+      --replace "''${prefix}/" ""
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "TOML parser implementation for data serialization and deserialization in Fortran";
+    license = with licenses; [ asl20 mit ];
+    homepage = "https://github.com/toml-f/toml-f";
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.sheepforce ];
+  };
+}