2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, darwin
|
2024-07-01 15:47:52 +00:00
|
|
|
, cmake
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
|
|
|
|
in
|
2023-07-15 17:15:38 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lune";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.8.6";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "filiptibell";
|
|
|
|
repo = "lune";
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-03ckR2FpSlaAZlhjyX3ob+7W5Pq8OLri7jT+XIM7oeQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
cargoHash = "sha256-xEUq3Cc15bUAXpUoZw8tNQo6tW3/VXeuOtjIW4zrh1Q=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-07-01 15:47:52 +00:00
|
|
|
cmake # required for libz-ng-sys
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2024-01-25 14:12:00 +00:00
|
|
|
Security
|
|
|
|
SystemConfiguration
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# error: linker `aarch64-linux-gnu-gcc` not found
|
|
|
|
postPatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
checkFlags = [
|
2024-01-25 14:12:00 +00:00
|
|
|
# require internet access
|
2024-07-01 15:47:52 +00:00
|
|
|
"--skip=tests::net_socket_basic"
|
2023-11-16 04:20:00 +00:00
|
|
|
"--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"
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# uses root as the CWD
|
2023-11-16 04:20:00 +00:00
|
|
|
"--skip=tests::process_spawn_cwd"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Standalone Luau script runtime";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "lune";
|
2024-01-25 14:12:00 +00:00
|
|
|
homepage = "https://github.com/lune-org/lune";
|
|
|
|
changelog = "https://github.com/lune-org/lune/blob/${src.rev}/CHANGELOG.md";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ lammermann ];
|
2024-01-25 14:12:00 +00:00
|
|
|
# note: Undefined symbols for architecture x86_64
|
|
|
|
broken = stdenv.isDarwin;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|