btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / sh / shelldap / package.nix
blob1b3fd5c5806d5fb83a765f879dc3b91b7519545b
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , perlPackages
5 , shortenPerlShebang
6 }:
8 perlPackages.buildPerlPackage rec {
9   pname = "shelldap";
10   version = "1.5.1";
12   src = fetchFromGitHub {
13     owner = "mahlonsmith";
14     repo = "shelldap";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-67ttAXzu9pfeqjfhMfLMb9vWCXTrE+iUDCbamqswaLg=";
17   };
19   buildInputs = with perlPackages; [
20     AlgorithmDiff
21     AuthenSASL
22     IOSocketSSL
23     perl
24     perlldap
25     TermReadLineGnu
26     TermShell
27     TieIxHash
28     YAMLSyck
29   ];
31   nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
33   prePatch = ''
34     touch Makefile.PL
35   '';
37   installPhase = ''
38     runHook preInstall
39     install -Dm555 -t $out/bin shelldap
40     runHook postInstall
41   '';
43   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
44     shortenPerlShebang $out/bin/shelldap
45   '';
47   # no make target 'test', not tests provided by source
48   doCheck = false;
50   outputs = [ "out" ];
52   meta = with lib; {
53     homepage = "https://github.com/mahlonsmith/shelldap/";
54     description = "Handy shell-like interface for browsing LDAP servers and editing their content";
55     changelog = "https://github.com/mahlonsmith/shelldap/blob/v${version}/CHANGELOG";
56     license = with licenses; [ bsd3 ];
57     maintainers = with maintainers; [ clerie tobiasBora ];
58     platforms = platforms.unix;
59     mainProgram = "shelldap";
60   };