Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 45 lines 1.2 kB view raw
1{ lib, rustPlatform, fetchFromGitHub, installShellFiles }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "jrsonnet"; 5 version = "0.4.2"; 6 7 src = fetchFromGitHub { 8 rev = "v${version}"; 9 owner = "CertainLach"; 10 repo = "jrsonnet"; 11 sha256 = "sha256-OX+iJJ3vdCsWWr8x31psV9Vne6xWDZnJc83NbJqMK1A="; 12 }; 13 14 cargoLock = { 15 lockFile = ./Cargo.lock; 16 outputHashes = { 17 "clap-3.0.0-beta.2" = "sha256-BaLzm2JZEicktfsCIXQipHtEKlEv2lBktfvHP58rjeM="; 18 }; 19 }; 20 21 nativeBuildInputs = [ installShellFiles ]; 22 23 # skip flaky tests 24 checkFlags = [ 25 "--skip=tests::native_ext" 26 ]; 27 28 postInstall = '' 29 ln -s $out/bin/jrsonnet $out/bin/jsonnet 30 31 for shell in bash zsh fish; do 32 installShellCompletion --cmd jrsonnet \ 33 --$shell <($out/bin/jrsonnet --generate $shell /dev/null) 34 installShellCompletion --cmd jsonnet \ 35 --$shell <($out/bin/jrsonnet --generate $shell /dev/null | sed s/jrsonnet/jsonnet/g) 36 done 37 ''; 38 39 meta = with lib; { 40 description = "Purely-functional configuration language that helps you define JSON data"; 41 homepage = "https://github.com/CertainLach/jrsonnet"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ figsoda lach ]; 44 }; 45}