depot/third_party/nixpkgs/pkgs/development/interpreters/lune/default.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

69 lines
1.7 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, darwin
, cmake
}:
let
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
in
rustPlatform.buildRustPackage rec {
pname = "lune";
version = "0.8.9";
src = fetchFromGitHub {
owner = "filiptibell";
repo = "lune";
rev = "v${version}";
hash = "sha256-KZt3w+nhJjz3ZLtLzJz0zpFTwQ28OmFWnCsLbo36Ryc=";
fetchSubmodules = true;
};
cargoHash = "sha256-yTpklksOV+AFuW3Bc0L6sbAiJsQ+mseF1yz37FcWt1k=";
nativeBuildInputs = [
pkg-config
cmake # required for libz-ng-sys
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Security
SystemConfiguration
];
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
checkFlags = [
# require internet access
"--skip=tests::net_socket_basic"
"--skip=tests::net_request_codes"
"--skip=tests::net_request_compression"
"--skip=tests::net_request_methods"
"--skip=tests::net_request_query"
"--skip=tests::net_request_redirect"
"--skip=tests::net_socket_wss"
"--skip=tests::net_socket_wss_rw"
"--skip=tests::roblox_instance_custom_async"
"--skip=tests::serde_json_decode"
# uses root as the CWD
"--skip=tests::process_spawn_cwd"
];
meta = with lib; {
description = "Standalone Luau script runtime";
mainProgram = "lune";
homepage = "https://github.com/lune-org/lune";
changelog = "https://github.com/lune-org/lune/blob/${src.rev}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ lammermann ];
# note: Undefined symbols for architecture x86_64
broken = stdenv.hostPlatform.isDarwin;
};
}