about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/test-drive
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/test-drive')
-rw-r--r--nixpkgs/pkgs/development/libraries/test-drive/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/test-drive/default.nix b/nixpkgs/pkgs/development/libraries/test-drive/default.nix
new file mode 100644
index 000000000000..b858f39498c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/test-drive/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "test-drive";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "fortran-lang";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-ObAnHFP1Hp0knf/jtGHynVF0CCqK47eqetePx4NLmlM=";
+  };
+
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' "libdir=@CMAKE_INSTALL_LIBDIR@" \
+      --replace 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
+  '';
+
+  nativeBuildInputs = [
+    gfortran
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Procedural Fortran testing framework";
+    homepage = "https://github.com/fortran-lang/test-drive";
+    license = with licenses; [ asl20 mit ] ;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}