depot/third_party/nixpkgs/pkgs/development/tools/semantic-release/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

42 lines
1,005 B
Nix

{ cctools
, buildNpmPackage
, fetchFromGitHub
, lib
, python3
, stdenv
}:
buildNpmPackage rec {
pname = "semantic-release";
version = "24.1.2";
src = fetchFromGitHub {
owner = "semantic-release";
repo = "semantic-release";
rev = "v${version}";
hash = "sha256-YeTKW7Aq7VLCD8FabnqDTcgvSeHNa96ZT8KQ4KNrrw4=";
};
npmDepsHash = "sha256-pyTfdVdaHi8oABhI6GoHi6HusTUMEyngGAR2Tw5bF2c=";
dontNpmBuild = true;
nativeBuildInputs = [
python3
] ++ lib.optional stdenv.hostPlatform.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 ];
};
}