about summary refs log tree commit diff
path: root/pkgs/development/libraries/test-drive/default.nix
blob: b858f39498c2afe77a4aadd32719c77184e71a32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 ];
  };
}