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/admin/netplan/default.nix
Normal file
69
pkgs/tools/admin/netplan/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, glib
|
||||
, pandoc
|
||||
, systemd
|
||||
, libyaml
|
||||
, python3
|
||||
, libuuid
|
||||
, bash-completion
|
||||
, lib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "netplan";
|
||||
version = "0.103";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "netplan";
|
||||
rev = version;
|
||||
hash = "sha256-d8Ze8S/w2nyJkATzLfizMqmr7ad2wrK1mjADClee6WE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
glib
|
||||
pandoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
systemd
|
||||
glib
|
||||
libyaml
|
||||
(python3.withPackages (p: with p; [ pyyaml netifaces ]))
|
||||
libuuid
|
||||
bash-completion
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace netplan/cli/utils.py \
|
||||
--replace "/lib/netplan/generate" "$out/lib/netplan/generate" \
|
||||
--replace "ctypes.util.find_library('netplan')" "\"$out/lib/libnetplan.so\""
|
||||
|
||||
substituteInPlace Makefile \
|
||||
--replace 'SYSTEMD_GENERATOR_DIR=' 'SYSTEMD_GENERATOR_DIR ?= ' \
|
||||
--replace 'SYSTEMD_UNIT_DIR=' 'SYSTEMD_UNIT_DIR ?= ' \
|
||||
--replace 'BASH_COMPLETIONS_DIR=' 'BASH_COMPLETIONS_DIR ?= '
|
||||
|
||||
# from upstream https://github.com/canonical/netplan/blob/ee0d5df7b1dfbc3197865f02c724204b955e0e58/rpm/netplan.spec#L81
|
||||
sed -e "s/-Werror//g" -i Makefile
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX="
|
||||
"DESTDIR=$(out)"
|
||||
"SYSTEMD_GENERATOR_DIR=lib/systemd/system-generators/"
|
||||
"SYSTEMD_UNIT_DIR=lib/systemd/units/"
|
||||
"BASH_COMPLETIONS_DIR=share/bash-completion/completions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Backend-agnostic network configuration in YAML";
|
||||
homepage = "https://netplan.io";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue