depot/third_party/nixpkgs/pkgs/development/tools/build-managers/moon/default.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, darwin
, stdenv
, openssl
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "moon";
version = "1.28.3";
src = fetchFromGitHub {
owner = "moonrepo";
repo = pname;
rev = "v${version}";
hash = "sha256-X7O5F/gIkj0EOTMat6koKmCba2V/UiIUq0O46gNiCp8=";
};
cargoHash = "sha256-I4QLlvN1F4Ptq43A0KpRCnSIxavsvLGnkbJzbiTxjm4=";
env = {
RUSTFLAGS = "-C strip=symbols";
OPENSSL_NO_VENDOR = 1;
};
buildInputs = [ openssl ] ++
lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
nativeBuildInputs = [ pkg-config ];
# Some tests fail, because test using internet connection and install NodeJS by example
doCheck = false;
meta = with lib; {
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 ];
};
}