snabbswitch: 2015.12 -> 2016.04, rename to snabb

This commit is contained in:
Domen Kožar 2016-04-07 12:48:39 +01:00
parent 1d421f477f
commit 009a9ceb88
2 changed files with 12 additions and 8 deletions

View File

@ -1,12 +1,14 @@
{ stdenv, lib, fetchurl, bash, makeWrapper, git, mariadb, diffutils }:
{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, git, mariadb, diffutils, which, coreutils, procps, nettools }:
stdenv.mkDerivation rec {
name = "snabb-${version}";
version = "2015.12";
version = "2016.04";
src = fetchurl {
url = "https://github.com/SnabbCo/snabbswitch/archive/v${version}.tar.gz";
sha256 = "1949a6d3hqdr2hdfmrr1na9gvjdwdahadbhmvz2pg7azmpq6ssmr";
src = fetchFromGitHub {
owner = "snabbco";
repo = "snabb";
rev = "v${version}";
sha256 = "1b5g477zy6cr5d9171xf8zrhhq6wxshg4cn78i5bki572q86kwlx";
};
buildInputs = [ makeWrapper ];
@ -18,13 +20,15 @@ stdenv.mkDerivation rec {
for f in $(find src/program/snabbnfv/ -type f); do
substituteInPlace $f --replace "/bin/bash" "${bash}/bin/bash"
done
# We need a way to pass $PATH to the scripts
sed -i '2iexport PATH=${git}/bin:${mariadb}/bin:${which}/bin:${procps}/bin:${coreutils}/bin' src/program/snabbnfv/neutron_sync_master/neutron_sync_master.sh.inc
sed -i '2iexport PATH=${git}/bin:${coreutils}/bin:${diffutils}/bin:${nettools}/bin' src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh.inc
'';
installPhase = ''
mkdir -p $out/bin
cp src/snabb $out/bin
wrapProgram $out/bin/snabb --prefix PATH : "${ lib.makeBinPath [ git mariadb diffutils ]}"
'';
meta = with stdenv.lib; {

View File

@ -3202,7 +3202,7 @@ in
smbnetfs = callPackage ../tools/filesystems/smbnetfs {};
snabbswitch = callPackage ../tools/networking/snabbswitch { } ;
snabb = callPackage ../tools/networking/snabb { } ;
sng = callPackage ../tools/graphics/sng {
libpng = libpng12;