nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 58 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 gfortran, 6 buildType ? "meson", 7 meson, 8 ninja, 9 cmake, 10 mesonEmulatorHook, 11}: 12 13assert ( 14 builtins.elem buildType [ 15 "meson" 16 "cmake" 17 ] 18); 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "test-drive"; 22 version = "0.5.0"; 23 24 src = fetchFromGitHub { 25 owner = "fortran-lang"; 26 repo = "test-drive"; 27 rev = "v${finalAttrs.version}"; 28 hash = "sha256-xRx8ErIN9xjxZt/nEsdIQkIGFRltuELdlI8lXA+M030="; 29 }; 30 31 patches = [ 32 # Fix wrong generation of package config include paths 33 ./cmake.patch 34 ]; 35 36 nativeBuildInputs = [ 37 gfortran 38 ] 39 ++ lib.optionals (buildType == "meson") [ 40 meson 41 ninja 42 ] 43 ++ lib.optional (buildType == "cmake") cmake 44 ++ lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) mesonEmulatorHook; 45 46 mesonAutoFeatures = "auto"; 47 48 meta = { 49 description = "Procedural Fortran testing framework"; 50 homepage = "https://github.com/fortran-lang/test-drive"; 51 license = with lib.licenses; [ 52 asl20 53 mit 54 ]; 55 platforms = lib.platforms.linux; 56 maintainers = [ lib.maintainers.sheepforce ]; 57 }; 58})