Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 48 lines 1.3 kB view raw
1{ cargo, fetchFromGitHub, makeWrapper, pkg-config, rustPlatform, lib, stdenv 2, gcc, cmake, libiconv, CoreServices, Security }: 3 4rustPlatform.buildRustPackage rec { 5 pname = "evcxr"; 6 version = "0.14.2"; 7 8 src = fetchFromGitHub { 9 owner = "google"; 10 repo = "evcxr"; 11 rev = "v${version}"; 12 sha256 = "sha256-gREAtCh4jerqxhwNslXIXRMLkoj0RlhbIwQXbb8LVws="; 13 }; 14 15 cargoSha256 = "sha256-xuxWOVSUJVQvSDA5xhFBjdO/ODLA4fzEnzG9p0DRF2Q="; 16 17 RUST_SRC_PATH = "${rustPlatform.rustLibSrc}"; 18 19 nativeBuildInputs = [ pkg-config makeWrapper cmake ]; 20 buildInputs = lib.optionals stdenv.isDarwin 21 [ libiconv CoreServices Security ]; 22 23 # test broken with rust 1.69: 24 # * https://github.com/evcxr/evcxr/issues/294 25 # * https://github.com/NixOS/nixpkgs/issues/229524 26 checkFlags = [ 27 "--skip=check_for_errors" 28 ]; 29 30 postInstall = let 31 wrap = exe: '' 32 wrapProgram $out/bin/${exe} \ 33 --prefix PATH : ${lib.makeBinPath [ cargo gcc ]} \ 34 --set-default RUST_SRC_PATH "$RUST_SRC_PATH" 35 ''; 36 in '' 37 ${wrap "evcxr"} 38 ${wrap "evcxr_jupyter"} 39 rm $out/bin/testing_runtime 40 ''; 41 42 meta = with lib; { 43 description = "An evaluation context for Rust"; 44 homepage = "https://github.com/google/evcxr"; 45 license = licenses.asl20; 46 maintainers = with maintainers; [ protoben ma27 ]; 47 }; 48}