Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,54 @@ | ||
{ stdenv, fetchurl, flex, bison, readline | ||
, enableIPv6 ? false }: | ||
{ lib, stdenv, fetchurl, flex, bison, readline }: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "bird-1.6.3"; | ||
with lib; | ||
|
||
src = fetchurl { | ||
url = "ftp://bird.network.cz/pub/bird/${name}.tar.gz"; | ||
sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r"; | ||
}; | ||
let | ||
|
||
generic = { version, sha256, enableIPv6 ? false }: | ||
stdenv.mkDerivation rec { | ||
name = "bird-${version}"; | ||
|
||
src = fetchurl { | ||
inherit sha256; | ||
url = "ftp://bird.network.cz/pub/bird/${name}.tar.gz"; | ||
}; | ||
|
||
nativeBuildInputs = [ flex bison ]; | ||
buildInputs = [ readline ]; | ||
|
||
patches = [ | ||
(./. + (builtins.toPath "/dont-create-sysconfdir-${builtins.substring 0 1 version}.patch")) | ||
]; | ||
|
||
buildInputs = [ flex bison readline ]; | ||
configureFlags = [ | ||
"--localstatedir=/var" | ||
] ++ optional enableIPv6 "--enable-ipv6"; | ||
|
||
patches = [ | ||
./dont-create-sysconfdir.patch | ||
]; | ||
meta = { | ||
description = "BIRD Internet Routing Daemon"; | ||
homepage = http://bird.network.cz; | ||
license = licenses.gpl2Plus; | ||
maintainers = with maintainers; [ viric fpletz ]; | ||
platforms = platforms.linux; | ||
}; | ||
}; | ||
|
||
configureFlags = [ | ||
"--localstatedir /var" | ||
] ++ stdenv.lib.optional enableIPv6 "--enable-ipv6"; | ||
in | ||
|
||
{ | ||
bird = generic { | ||
version = "1.6.3"; | ||
sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r"; | ||
}; | ||
|
||
bird6 = generic { | ||
version = "1.6.3"; | ||
sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r"; | ||
enableIPv6 = true; | ||
}; | ||
|
||
meta = { | ||
description = "BIRD Internet Routing Daemon"; | ||
homepage = http://bird.network.cz; | ||
license = stdenv.lib.licenses.gpl2Plus; | ||
maintainers = with stdenv.lib.maintainers; [ viric fpletz ]; | ||
platforms = stdenv.lib.platforms.linux; | ||
bird2 = generic { | ||
version = "2.0.1"; | ||
sha256 = "0qyh2cxj7hfz90x3fnczjdm3i9g7vr0nc4l4wjkj9qm0646vc52n"; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/Makefile.in b/Makefile.in | ||
index fdd5e6c..45f81a1 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -165,7 +165,7 @@ tags: | ||
# Install | ||
|
||
install: all | ||
- $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@ | ||
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) | ||
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird | ||
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl | ||
if test -n "@CLIENT@" ; then \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters