depot/third_party/nixpkgs/pkgs/tools/networking/maphosts/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

31 lines
866 B
Nix

{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript }:
let
env = bundlerEnv {
name = "maphosts-gems";
inherit ruby;
gemdir = ./.;
};
in stdenv.mkDerivation {
pname = "maphosts";
version = env.gems.maphosts.version;
dontUnpack = true;
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";
changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ mpscholten nicknovitski ];
platforms = platforms.all;
mainProgram = "maphosts";
};
}