nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 gfortran,
6 buildType ? "meson",
7 meson,
8 ninja,
9 cmake,
10 pkg-config,
11 test-drive,
12 toml-f,
13}:
14
15assert (
16 builtins.elem buildType [
17 "meson"
18 "cmake"
19 ]
20);
21
22stdenv.mkDerivation (finalAttrs: {
23 pname = "jonquil";
24 version = "0.3.0";
25
26 src = fetchFromGitHub {
27 owner = "toml-f";
28 repo = "jonquil";
29 rev = "v${finalAttrs.version}";
30 hash = "sha256-2JCTHA0nyA7xE0IA+LNrEAulHU2eIbNRvFGQ7YSQMRE=";
31 };
32
33 patches = [
34 # Fix wrong generation of package config include paths
35 ./cmake.patch
36 ];
37
38 nativeBuildInputs = [
39 gfortran
40 pkg-config
41 ]
42 ++ lib.optionals (buildType == "meson") [
43 meson
44 ninja
45 ]
46 ++ lib.optional (buildType == "cmake") cmake;
47
48 buildInputs = [
49 test-drive
50 ];
51
52 propagatedBuildInputs = [
53 toml-f
54 ];
55
56 outputs = [
57 "out"
58 "dev"
59 ];
60
61 meta = {
62 description = "JSON parser on top of TOML implementation";
63 license = with lib.licenses; [
64 asl20
65 mit
66 ];
67 homepage = "https://github.com/toml-f/jonquil";
68 platforms = lib.platforms.linux;
69 maintainers = [ lib.maintainers.sheepforce ];
70 };
71})