forked from mirrors/nixpkgs
NM purity patch: substitute before build, fix typos
svn path=/nixpkgs/trunk/; revision=32978
This commit is contained in:
parent
251b9b6472
commit
1fef26d8f7
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl, intltool, wirelesstools, pkgconfig, dbus_glib, xz
|
||||
, udev, libnl1, libuuid, polkit, gnutls, ppp, dhcp, dhcpcd, iptables
|
||||
, libgcrypt, dnsmasq, avahi }:
|
||||
, libgcrypt, dnsmasq, avahi, substituteAll }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "network-manager-${version}";
|
||||
|
@ -33,26 +33,19 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildNativeInputs = [ intltool pkgconfig ];
|
||||
|
||||
patches = [ ./nixos-purity.patch ];
|
||||
patches =
|
||||
[ ( substituteAll {
|
||||
src = ./nixos-purity.patch;
|
||||
inherit avahi dnsmasq ppp;
|
||||
glibc = stdenv.gcc.libc;
|
||||
})
|
||||
];
|
||||
|
||||
preInstall =
|
||||
''
|
||||
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
|
||||
'';
|
||||
|
||||
inherit avahi dnsmasq ppp;
|
||||
glibc = stdenv.gcc.libc;
|
||||
|
||||
# Substitute full paths, check if there any not substituted path
|
||||
postPatch =
|
||||
''
|
||||
for i in src/backends/NetworkManagerExherbo.c src/dns-manager/nm-dns-dnsmasq.c \
|
||||
src/dnsmasq-manager/nm-dnsmasq-manager.c src/nm-device.c src/ppp-manager/nm-ppp-manager.c; do
|
||||
substituteAll "$i" "$i"
|
||||
done
|
||||
find . -name \*.c | xargs grep '@[a-zA-Z]*@' && exit 1 || true
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://projects.gnome.org/NetworkManager/;
|
||||
description = "Network configuration and management in an easy way. Desktop environment independent.";
|
||||
|
|
|
@ -55,7 +55,7 @@ index 2767208..6562015 100644
|
|||
- "/usr/local/sbin/dnsmasq",
|
||||
- "/usr/sbin/dnsmasq",
|
||||
- "/sbin/dnsmasq",
|
||||
+ "@dnsmasq@/sbin/dnsmasq",
|
||||
+ "@dnsmasq@/bin/dnsmasq",
|
||||
NULL
|
||||
};
|
||||
const char **binary = paths;
|
||||
|
@ -70,7 +70,7 @@ index ca2f9dc..7afb118 100644
|
|||
- "/usr/local/sbin/dnsmasq",
|
||||
- "/usr/sbin/dnsmasq",
|
||||
- "/sbin/dnsmasq",
|
||||
+ "@dnsmasq@/sbin/dnsmasq",
|
||||
+ "@dnsmasq@/bin/dnsmasq",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,7 @@ index 3522ea4..75b2db3 100644
|
|||
static const char *aipd_paths[] = {
|
||||
- "/usr/sbin/avahi-autoipd",
|
||||
- "/usr/local/sbin/avahi-autoipd",
|
||||
+ "@avahi@/sbin/autoipd",
|
||||
+ "@avahi@/sbin/avahi-autoipd",
|
||||
NULL
|
||||
};
|
||||
int i = 0;
|
||||
|
|
Loading…
Reference in a new issue