nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 bundlerEnv,
5 ruby,
6 bundlerUpdateScript,
7}:
8
9let
10 env = bundlerEnv {
11 name = "maphosts-gems";
12 inherit ruby;
13 gemdir = ./.;
14 };
15in
16stdenv.mkDerivation (finalAttrs: {
17 pname = "maphosts";
18 version = env.gems.maphosts.version;
19
20 dontUnpack = true;
21
22 installPhase = ''
23 mkdir -p "$out/bin"
24 ln -s "${env}/bin/maphosts" "$out/bin/maphosts"
25 '';
26
27 passthru.updateScript = bundlerUpdateScript "maphosts";
28
29 meta = {
30 description = "Small command line application for keeping your project hostnames in sync with /etc/hosts";
31 homepage = "https://github.com/mpscholten/maphosts";
32 changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${finalAttrs.version}";
33 license = lib.licenses.mit;
34 maintainers = with lib.maintainers; [
35 mpscholten
36 nicknovitski
37 ];
38 platforms = lib.platforms.all;
39 mainProgram = "maphosts";
40 };
41})