about summary refs log tree commit diff
path: root/pkgs/development/tools/wp4nix/default.nix
blob: 6a829b4ae26727d2c10ca8a1c0852e3dc8f0ef2a (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
{ lib
, buildGoModule
, fetchFromGitLab
, nix
, subversion
, makeWrapper
}:

buildGoModule rec {
  pname = "wp4nix";
  version = "1.0.0";

  src = fetchFromGitLab {
    domain = "git.helsinki.tools";
    owner = "helsinki-systems";
    repo = "wp4nix";
    rev = "v${version}";
    sha256 = "sha256-WJteeFUMr684yZEtUP13MqRjJ1UAeo48AzOPdLEE65w=";
  };

  vendorHash = null;

  nativeBuildInputs = [
    makeWrapper
  ];

  postInstall = ''
    wrapProgram $out/bin/wp4nix \
      --prefix PATH : ${lib.makeBinPath [ nix subversion ]}
  '';

  meta = with lib; {
    description = "Packaging helper for Wordpress themes and plugins";
    mainProgram = "wp4nix";
    homepage = "https://git.helsinki.tools/helsinki-systems/wp4nix";
    license = licenses.mit;
    maintainers = with maintainers; [ onny ];
    platforms = platforms.unix;
  };
}