mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
ca0175017d
The agent has not been updated for a very long time. In addition to
updating to the newest tagged version the change creates a package for
it.
The existing version has issues with the new python2.7 package not
containing crypt.so file. And the commit
6910a4eea0
I believe introduced
regression that caused the shebang to not be updated.
68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
{ fetchFromGitHub,
|
|
findutils,
|
|
gnugrep,
|
|
gnused,
|
|
iproute2,
|
|
iptables,
|
|
lib,
|
|
nettools, # for hostname
|
|
openssh,
|
|
openssl,
|
|
parted,
|
|
procps, # for pidof,
|
|
python3,
|
|
shadow, # for useradd, usermod
|
|
util-linux, # for (u)mount, fdisk, sfdisk, mkswap
|
|
}:
|
|
|
|
let
|
|
inherit (lib) makeBinPath;
|
|
|
|
in
|
|
python3.pkgs.buildPythonPackage rec {
|
|
pname = "waagent";
|
|
version = "2.8.0.11";
|
|
src = fetchFromGitHub {
|
|
owner = "Azure";
|
|
repo = "WALinuxAgent";
|
|
rev = "04ded9f0b708cfaf4f9b68eead1aef4cc4f32eeb";
|
|
sha256 = "0fvjanvsz1zyzhbjr2alq5fnld43mdd776r2qid5jy5glzv0xbhf";
|
|
};
|
|
doCheck = false;
|
|
|
|
buildInputs = with python3.pkgs; [ distro ];
|
|
runtimeDeps = [
|
|
findutils
|
|
gnugrep
|
|
gnused
|
|
iproute2
|
|
iptables
|
|
nettools # for hostname
|
|
openssh
|
|
openssl
|
|
parted
|
|
procps # for pidof
|
|
shadow # for useradd, usermod
|
|
util-linux # for (u)mount, fdisk, sfdisk, mkswap
|
|
];
|
|
|
|
fixupPhase = ''
|
|
mkdir -p $out/bin/
|
|
WAAGENT=$(find $out -name waagent | grep sbin)
|
|
cp $WAAGENT $out/bin/waagent
|
|
wrapProgram "$out/bin/waagent" \
|
|
--prefix PYTHONPATH : $PYTHONPATH \
|
|
--prefix PATH : "${makeBinPath runtimeDeps}"
|
|
patchShebangs --build "$out/bin/"
|
|
'';
|
|
|
|
meta = {
|
|
description = "The Microsoft Azure Linux Agent (waagent)
|
|
manages Linux provisioning and VM interaction with the Azure
|
|
Fabric Controller";
|
|
homepage = "https://github.com/Azure/WALinuxAgent";
|
|
license = with lib.licenses; [ asl20 ];
|
|
};
|
|
|
|
}
|