lol
1{ cctools
2, buildNpmPackage
3, fetchFromGitHub
4, lib
5, python3
6, stdenv
7}:
8
9buildNpmPackage rec {
10 pname = "semantic-release";
11 version = "21.0.5";
12
13 src = fetchFromGitHub {
14 owner = "semantic-release";
15 repo = "semantic-release";
16 rev = "v${version}";
17 hash = "sha256-QFBYIoOd1htSNj3xKl0HvmD1T068Jv+L/EqCbMrn0lw=";
18 };
19
20 npmDepsHash = "sha256-0GhDXGyVoMwz+vVFdplv7ObTiTRTvQDd9r9e6616iTI=";
21
22 dontNpmBuild = true;
23
24 nativeBuildInputs = [
25 python3
26 ] ++ lib.optional stdenv.isDarwin cctools;
27
28 # Fixes `semantic-release --version` output
29 postPatch = ''
30 substituteInPlace package.json --replace \
31 '"version": "0.0.0-development"' \
32 '"version": "${version}"'
33 '';
34
35 meta = {
36 description = "Fully automated version management and package publishing";
37 homepage = "https://semantic-release.gitbook.io/semantic-release/";
38 license = lib.licenses.mit;
39 maintainers = [ lib.maintainers.sestrella ];
40 };
41}