1{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript }:
2
3let
4 env = bundlerEnv {
5 name = "maphosts-gems";
6 inherit ruby;
7 gemdir = ./.;
8 };
9in stdenv.mkDerivation {
10 pname = "maphosts";
11 version = env.gems.maphosts.version;
12
13 dontUnpack = true;
14
15 installPhase = ''
16 mkdir -p "$out/bin"
17 ln -s "${env}/bin/maphosts" "$out/bin/maphosts"
18 '';
19
20 passthru.updateScript = bundlerUpdateScript "maphosts";
21
22 meta = with lib; {
23 description = "Small command line application for keeping your project hostnames in sync with /etc/hosts";
24 homepage = "https://github.com/mpscholten/maphosts";
25 license = licenses.mit;
26 maintainers = with maintainers; [ mpscholten nicknovitski ];
27 platforms = platforms.all;
28 };
29}