mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
571c71e6f7
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.
44 lines
976 B
Nix
44 lines
976 B
Nix
{ lib, stdenv, fetchFromSourcehut, meson, ninja, pkg-config, scdoc, systemd }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "poweralertd";
|
|
version = "0.3.0";
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~kennylevinsen";
|
|
repo = "poweralertd";
|
|
rev = version;
|
|
hash = "sha256-WzqThv3Vu8R+g6Bn8EfesRk18rchCvw/UMPwbn9YC80=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace meson.build --replace-fail "systemd.get_pkgconfig_variable('systemduserunitdir')" "'${placeholder "out"}/lib/systemd/user'"
|
|
'';
|
|
|
|
buildInputs = [
|
|
systemd
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
depsBuildBuild = [
|
|
scdoc
|
|
pkg-config
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "UPower-powered power alerter";
|
|
homepage = "https://git.sr.ht/~kennylevinsen/poweralertd";
|
|
license = licenses.gpl3Only;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ thibautmarty ];
|
|
mainProgram = "poweralertd";
|
|
};
|
|
}
|