uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
69
pkgs/tools/networking/dhcpcd/default.nix
Normal file
69
pkgs/tools/networking/dhcpcd/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, udev
|
||||
, runtimeShellPackage
|
||||
, runtimeShell
|
||||
, nixosTests
|
||||
, enablePrivSep ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dhcpcd";
|
||||
version = "9.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://roy/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-gZNXY07+0epc9E7AGyTT0/iFL+yLQkmSXcxWZ8VON2w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
udev
|
||||
runtimeShellPackage # So patchShebangs finds a bash suitable for the installed scripts
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace hooks/dhcpcd-run-hooks.in --replace /bin/sh ${runtimeShell}
|
||||
'';
|
||||
|
||||
preConfigure = "patchShebangs ./configure";
|
||||
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
]
|
||||
++ (
|
||||
if ! enablePrivSep
|
||||
then [ "--disable-privsep" ]
|
||||
else [
|
||||
"--enable-privsep"
|
||||
# dhcpcd disables privsep if it can't find the default user,
|
||||
# so we explicitly specify a user.
|
||||
"--privsepuser=dhcpcd"
|
||||
]
|
||||
);
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
# Hack to make installation succeed. dhcpcd will still use /var/db
|
||||
# at runtime.
|
||||
installFlags = [ "DBDIR=$(TMPDIR)/db" "SYSCONFDIR=${placeholder "out"}/etc" ];
|
||||
|
||||
# Check that the udev plugin got built.
|
||||
postInstall = lib.optionalString (udev != null) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]";
|
||||
|
||||
passthru = {
|
||||
inherit enablePrivSep;
|
||||
tests = { inherit (nixosTests.networking.scripted) macvlan dhcpSimple dhcpOneIf; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A client for the Dynamic Host Configuration Protocol (DHCP)";
|
||||
homepage = "https://roy.marples.name/projects/dhcpcd";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ eelco fpletz ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue