nixpkgs/pkgs/by-name/ip/ipmitool/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

39 lines
1.2 KiB
Nix

{ stdenv, lib, fetchFromGitHub, autoreconfHook, openssl, readline, fetchurl }:
let
iana-enterprise-numbers = fetchurl {
url = "https://web.archive.org/web/20230312103209id_/https://www.iana.org/assignments/enterprise-numbers.txt";
sha256 = "sha256-huFWygMEylBKBMLV16UE6xLWP6Aw1FGYk5h1q5CErUs=";
};
in stdenv.mkDerivation rec {
pname = "ipmitool";
version = "1.8.19";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "IPMITOOL_${lib.replaceStrings ["."] ["_"] version}";
hash = "sha256-VVYvuldRIHhaIUibed9cLX8Avfy760fdBLNO8MoUKCk=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ openssl readline ];
postPatch = ''
substituteInPlace configure.ac \
--replace 'AC_MSG_WARN([** Neither wget nor curl could be found.])' 'AM_CONDITIONAL([DOWNLOAD], [true])'
cp ${iana-enterprise-numbers} enterprise-numbers
'';
meta = with lib; {
description = "Command-line interface to IPMI-enabled devices";
mainProgram = "ipmitool";
license = licenses.bsd3;
homepage = "https://github.com/ipmitool/ipmitool";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
};
}