summary refs log tree commit diff
path: root/pkgs/development/perl-modules/ham/default.nix
blob: 4f6dc5d9ddb786ab30f10891500877dedabaaa26 (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
33
34
35
36
37
38
39
40
41
42
{ lib, buildPerlPackage, fetchFromGitHub, makeWrapper, openssh, GitRepository, URI, XMLMini }:

buildPerlPackage {
  pname = "ham-unstable";
  version = "2020-09-09";

  src = fetchFromGitHub {
    owner = "kernkonzept";
    repo = "ham";
    rev = "ae2a326f2efcdae0fa7c5bf0ba205b580fc91ecc";
    sha256 = "0m65pav2830y0ivwsy60dc4w457qlc0nqg43lji1kj2g96hmy2bw";
  };

  outputs = [ "out" ];

  buildInputs = [ makeWrapper ];
  propagatedBuildInputs = [ openssh GitRepository URI XMLMini ];

  preConfigure = ''
    patchShebangs .
    touch Makefile.PL
    rm -f Makefile
  '';

  installPhase = ''
    mkdir -p $out/lib $out/bin
    cp -r . $out/lib/ham

    makeWrapper $out/lib/ham/ham $out/bin/ham --argv0 ham \
      --prefix PATH : ${openssh}/bin
  '';

  doCheck = false;

  meta = {
    description = "A tool to manage big projects consisting of multiple loosely-coupled git repositories";
    homepage = "https://github.com/kernkonzept/ham";
    license = "unknown"; # should be gpl2, but not quite sure
    maintainers = with lib.maintainers; [ aw ];
    platforms = lib.platforms.unix;
  };
}