about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/semver-tool/default.nix
blob: 0cfbd0680ba669a0065c189dd3b7fbcf2e73da32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, lib, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "semver-tool";
  version = "3.2.0";

  src = fetchFromGitHub {
    owner = "fsaintjacques";
    repo = pname;
    rev = version;
    sha256 = "sha256-coy/g4nEvSN+0/aqK2r3EEIaoUcnsZhzX66H1qsK9ac=";
  };

  dontBuild = true; # otherwise we try to 'make' which fails.

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    install src/semver $out/bin

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://github.com/fsaintjacques/semver-tool";
    description = "semver bash implementation";
    license = licenses.gpl3Plus;
    platforms = platforms.unix;
    maintainers = [ maintainers.qyliss ];
  };
}