1{ cctools
2, buildNpmPackage
3, fetchFromGitHub
4, lib
5, python3
6, stdenv
7}:
8
9buildNpmPackage rec {
10 pname = "semantic-release";
11 version = "24.0.0";
12
13 src = fetchFromGitHub {
14 owner = "semantic-release";
15 repo = "semantic-release";
16 rev = "v${version}";
17 hash = "sha256-UoxsuCGWgHL7tYrBKS83VUkvGTUMBtpdO8ByKv5Dbrk=";
18 };
19
20 npmDepsHash = "sha256-MmdgUa3j3MD/SCqtMtAGvocHTgv5OIu8RdT27JgNvcg=";
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 mainProgram = "semantic-release";
38 homepage = "https://semantic-release.gitbook.io/semantic-release/";
39 license = lib.licenses.mit;
40 maintainers = [ lib.maintainers.sestrella ];
41 };
42}