depot/third_party/nixpkgs/pkgs/development/tools/semantic-release/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

42 lines
1,005 B
Nix

{ cctools
, buildNpmPackage
, fetchFromGitHub
, lib
, python3
, stdenv
}:
buildNpmPackage rec {
pname = "semantic-release";
version = "24.1.1";
src = fetchFromGitHub {
owner = "semantic-release";
repo = "semantic-release";
rev = "v${version}";
hash = "sha256-BGSe05I1NconPkPCzGOOLPbH/JSlwXvAWbViJVYMU/c=";
};
npmDepsHash = "sha256-DsBklxeY9RbvFsEA56vkmvVms+W9mr9qA/JVgAgs81k=";
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 ];
};
}