moon: modernize

This commit is contained in:
awwpotato
2025-04-22 18:28:09 -07:00
parent d639b16e52
commit fe87136b52
@@ -2,24 +2,23 @@
lib,
rustPlatform,
fetchFromGitHub,
darwin,
stdenv,
openssl,
pkg-config,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "moon";
version = "1.34.3";
src = fetchFromGitHub {
owner = "moonrepo";
repo = pname;
rev = "v${version}";
repo = "moon";
tag = "v${finalAttrs.version}";
hash = "sha256-LLKHRybTSUhz5YfaV7scVASa6TJqkHDbpVfzL2bANtQ=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-Rx6g+J7Sh1G8ZrUP55oxrUwCyBp0WV67yG6+ql9J5QI=";
env = {
@@ -27,22 +26,23 @@ rustPlatform.buildRustPackage rec {
OPENSSL_NO_VENDOR = 1;
};
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
# Some tests fail, because test using internet connection and install NodeJS by example
doCheck = false;
meta = with lib; {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Task runner and repo management tool for the web ecosystem, written in Rust";
mainProgram = "moon";
homepage = "https://github.com/moonrepo/moon";
license = licenses.mit;
maintainers = with maintainers; [ flemzord ];
changelog = "https://github.com/moonrepo/moon/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ flemzord ];
};
}
})