nixpkgs/pkgs/by-name/po/powercap/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

36 lines
966 B
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
stdenv.mkDerivation rec {
pname = "powercap";
version = "0.6.0";
src = fetchFromGitHub {
owner = "powercap";
repo = "powercap";
rev = "v${version}";
sha256 = "sha256-l+IpFqBnCYUU825++sUPySD/Ku0TEIX2kt+S0Wml6iA=";
};
# in master post 0.6.0, see https://github.com/powercap/powercap/issues/8
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/powercap/powercap/commit/278dceb51635686e343edfc357b6020533fff299.patch";
sha256 = "0h62j63xdn0iqyx4xbia6hlmdjn45camb82z4vv6sb37x9sph7rg";
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=On"
];
meta = with lib; {
description = "Tools and library to read/write to the Linux power capping framework (sysfs interface)";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ rowanG077 ];
};
}