summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ifenslave/default.nix
blob: d8985003b41a90715e6f320dfacf951010482064 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "ifenslave-${version}";
  version = "1.1.0";

  src = fetchurl {
    url = "mirror://debian/pool/main/i/ifenslave-2.6/ifenslave-2.6_${version}.orig.tar.gz";
    sha256 = "0h9hrmy19zdksl7ys250r158b943ihbgkb95n8p4k8l0vqsby5vr";
  };

  buildPhase = ''
    gcc -o ifenslave ifenslave.c
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp -a ifenslave $out/bin
  '';

  meta = {
    description = "Utility for enslaving networking interfaces under a bond";
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.linux;
  };
}