Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 44 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 meson, 6 ninja, 7}: 8 9stdenv.mkDerivation { 10 pname = "frozen"; 11 # pin to a newer release if frozen releases again, see cesanta/frozen#72 12 version = "unstable-2021-02-23"; 13 14 src = fetchFromGitHub { 15 owner = "cesanta"; 16 repo = "frozen"; 17 rev = "21f051e3abc2240d9a25b2add6629b38e963e102"; 18 hash = "sha256-BpuYK9fbWSpeF8iPT8ImrV3CKKaA5RQ2W0ZQ03TciR0="; 19 }; 20 21 nativeBuildInputs = [ 22 meson 23 ninja 24 ]; 25 26 # frozen has a simple Makefile and a GN BUILD file as building scripts. 27 # Since it has only two source files, the best course of action to support 28 # cross compilation is to create a small meson.build file. 29 # Relevant upstream issue: https://github.com/cesanta/frozen/pull/71 30 # We also remove the GN BUILD file to prevent conflicts on case-insensitive 31 # file systems. 32 preConfigure = '' 33 rm BUILD 34 cp ${./meson.build} meson.build 35 ''; 36 37 meta = { 38 homepage = "https://github.com/cesanta/frozen"; 39 description = "Minimal JSON parser for C, targeted for embedded systems"; 40 license = lib.licenses.asl20; 41 maintainers = with lib.maintainers; [ thillux ]; 42 platforms = lib.platforms.unix; 43 }; 44}