2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
2023-10-09 19:29:22 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "darklua";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.11.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "seaofvoices";
|
|
|
|
repo = "darklua";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-9ukhKAhN4dD36Em90Eox8o+7W1eXboG2xAE8+oPlhaI=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-hi9kzCwsw8c1tcvSsFV0do/jQ/KyDz3TcTEfOqHNxyw=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
# error: linker `aarch64-linux-gnu-gcc` not found
|
|
|
|
postPatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A command line tool that transforms Lua code";
|
|
|
|
homepage = "https://darklua.com";
|
|
|
|
changelog = "https://github.com/seaofvoices/darklua/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tomodachi94 ];
|
|
|
|
};
|
|
|
|
}
|