From 9fb8020e4ec2e74e39a8f28dfb3ef18a70bd1eef Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Jan 2016 20:31:44 +0100 Subject: Add version attribute where maintainers |= nckx This will probably be mandatory soon, and is a step in the right direction. Removes the deprecated meta.version, and move some meta sections to the end of the file where I should have put them in the first place. --- pkgs/tools/networking/hans/default.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'pkgs/tools/networking/hans/default.nix') diff --git a/pkgs/tools/networking/hans/default.nix b/pkgs/tools/networking/hans/default.nix index aecc0bb63fa3..0e838a896cb2 100644 --- a/pkgs/tools/networking/hans/default.nix +++ b/pkgs/tools/networking/hans/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchFromGitHub, nettools }: -let version = "0.4.4"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "hans-${version}"; + version = "0.4.4"; src = fetchFromGitHub { sha256 = "1xskffmmdmg1whlrl5wpkv9z29vh0igrbmsz0b45s9v0761a7kis"; @@ -11,8 +11,19 @@ stdenv.mkDerivation { owner = "friedrich"; }; + buildInputs = [ nettools ]; + + postPatch = '' + substituteInPlace src/tun.cpp --replace "/sbin/" "${nettools}/bin/" + ''; + + enableParallelBuilding = true; + + installPhase = '' + install -D -m0755 hans $out/bin/hans + ''; + meta = with stdenv.lib; { - inherit version; description = "Tunnel IPv4 over ICMP"; longDescription = '' Hans makes it possible to tunnel IPv4 through ICMP echo packets, so you @@ -25,16 +36,4 @@ stdenv.mkDerivation { platforms = platforms.linux; maintainers = with maintainers; [ nckx ]; }; - - buildInputs = [ nettools ]; - - postPatch = '' - substituteInPlace src/tun.cpp --replace "/sbin/" "${nettools}/bin/" - ''; - - enableParallelBuilding = true; - - installPhase = '' - install -D -m0755 hans $out/bin/hans - ''; } -- cgit 1.4.1