about summary refs log tree commit diff
path: root/pkgs/development/libraries/toml-f
diff options
context:
space:
mode:
authorPhillip Seeber <phillip.seeber@uni-jena.de>2023-03-16 16:49:34 +0100
committerPhillip Seeber <phillip.seeber@uni-jena.de>2023-03-16 16:49:50 +0100
commit6b89d3c5694a4ce7197cbe1da0acb3dae70a7dbe (patch)
treec905db8272ea6383e4a723435ac1ba29510c3eea /pkgs/development/libraries/toml-f
parent6e16f9d8253504bda2f9c912ff0b735796b89ee0 (diff)
toml-f: init at 0.3.1
toml-f: restrict evaluation to x86_64-linux

Diffstat (limited to 'pkgs/development/libraries/toml-f')
-rw-r--r--pkgs/development/libraries/toml-f/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/libraries/toml-f/default.nix b/pkgs/development/libraries/toml-f/default.nix
new file mode 100644
index 0000000000000..d28447c400467
--- /dev/null
+++ b/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.3.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-8FbnUkeJUP4fiuJCroAVDo6U2M7ZkFLpG2OYrapMYtU=";
+  };
+
+  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 ];
+  };
+}