summary refs log tree commit diff
path: root/pkgs/tools/networking/maphosts/default.nix
blob: dd9886a65eee4d2163f0e58f045c91282bc719f4 (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
{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript }:

let
  env = bundlerEnv {
    name = "maphosts-gems";
    inherit ruby;
    gemdir = ./.;
  };
in stdenv.mkDerivation {
  name = "maphosts-${env.gems.maphosts.version}";

  phases = ["installPhase"];

  installPhase = ''
    mkdir -p "$out/bin"
    ln -s "${env}/bin/maphosts" "$out/bin/maphosts"
  '';

  passthru.updateScript = bundlerUpdateScript "maphosts";

  meta = with lib; {
    description = "Small command line application for keeping your project hostnames in sync with /etc/hosts";
    homepage    = https://github.com/mpscholten/maphosts;
    license     = licenses.mit;
    maintainers = with maintainers; [ mpscholten nicknovitski ];
    platforms   = platforms.all;
  };
}