nixpkgs/pkgs/development/tools/build-managers/moon/default.nix
2024-01-07 17:25:05 +00:00

45 lines
1.0 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, darwin
, stdenv
, openssl
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "moon";
version = "1.19.0";
src = fetchFromGitHub {
owner = "moonrepo";
repo = pname;
rev = "v${version}";
hash = "sha256-BjSe5N9rFsVL5EueCbBTcnIJM4TYd5q/1wrsANCyniU=";
};
cargoHash = "sha256-tMqk0aI+ObxlgAOa1inL8mba9ti9Gxhg9mckmyNsuv8=";
env = {
RUSTFLAGS = "-C strip=symbols";
OPENSSL_NO_VENDOR = 1;
};
buildInputs = [ openssl ] ++
lib.optionals stdenv.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 = "A task runner and repo management tool for the web ecosystem, written in Rust";
homepage = "https://github.com/moonrepo/moon";
license = licenses.mit;
maintainers = with maintainers; [ flemzord ];
};
}