depot/third_party/nixpkgs/pkgs/development/tools/semantic-release/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

42 lines
992 B
Nix

{ cctools
, buildNpmPackage
, fetchFromGitHub
, lib
, python3
, stdenv
}:
buildNpmPackage rec {
pname = "semantic-release";
version = "23.0.8";
src = fetchFromGitHub {
owner = "semantic-release";
repo = "semantic-release";
rev = "v${version}";
hash = "sha256-9dnBrwvV0by2EFIpXd++I8JEzdotWSFcK7wbY/1Rpx0=";
};
npmDepsHash = "sha256-GwrrjL8egqoE2ATK5wOWuMF/xzCLYAe9wzZ0ff5H82E=";
dontNpmBuild = true;
nativeBuildInputs = [
python3
] ++ lib.optional stdenv.isDarwin cctools;
# Fixes `semantic-release --version` output
postPatch = ''
substituteInPlace package.json --replace \
'"version": "0.0.0-development"' \
'"version": "${version}"'
'';
meta = {
description = "Fully automated version management and package publishing";
mainProgram = "semantic-release";
homepage = "https://semantic-release.gitbook.io/semantic-release/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.sestrella ];
};
}