summary refs log tree commit diff
path: root/pkgs/tools/networking/maphosts
diff options
context:
space:
mode:
authorMarc Scholten <marc@pedigital.de>2016-07-03 15:53:53 +0200
committerMarc Scholten <marc@pedigital.de>2016-07-03 17:59:23 +0200
commita11f7802746c2ce442a8eae907292195507575f1 (patch)
tree8ca9c476cb276c84456850a5e90ef207a144c48b /pkgs/tools/networking/maphosts
parent479c08750add89f546db85b75747e4aae0ac95d9 (diff)
downloadnixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar.gz
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar.bz2
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar.lz
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar.xz
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.tar.zst
nixpkgs-a11f7802746c2ce442a8eae907292195507575f1.zip
maphosts: Don't provide bundler anymore
Diffstat (limited to 'pkgs/tools/networking/maphosts')
-rw-r--r--pkgs/tools/networking/maphosts/default.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/tools/networking/maphosts/default.nix b/pkgs/tools/networking/maphosts/default.nix
index 7e722fee400..08c56574dcf 100644
--- a/pkgs/tools/networking/maphosts/default.nix
+++ b/pkgs/tools/networking/maphosts/default.nix
@@ -1,12 +1,22 @@
 { stdenv, lib, bundlerEnv, ruby }:
 
-bundlerEnv {
-  name = "maphosts-1.1.1";
+stdenv.mkDerivation rec {
+  name = "maphosts-${env.gems.maphosts.version}";
 
-  inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+  env = bundlerEnv {
+    name = "maphosts-gems";
+    inherit ruby;
+    gemfile = ./Gemfile;
+    lockfile = ./Gemfile.lock;
+    gemset = ./gemset.nix;
+  };
+
+  phases = ["installPhase"];
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    ln -s "${env}/bin/maphosts" "$out/bin/maphosts"
+  '';
 
   meta = with lib; {
     description = "Small command line application for keeping your project hostnames in sync with /etc/hosts";