Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
udev,
|
|
udevCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "asdbctl";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "juliuszint";
|
|
repo = "asdbctl";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-S5m1iQlchGKc0PODQNDHpNzaNXRepmk5zfK5aXdiMiM=";
|
|
};
|
|
|
|
cargoHash = "sha256-OPmnGh6xN6XeREeIgyYB2aeHUpdQ5hFS5MivcTeY29E=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
udevCheckHook
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
|
udev
|
|
];
|
|
|
|
postInstall = ''
|
|
install -Dm444 \
|
|
rules.d/20-asd-backlight.rules \
|
|
$out/lib/udev/rules.d/20-asd-backlight.rules
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
meta = {
|
|
description = "Apple Studio Display brightness controll";
|
|
mainProgram = "asdbctl";
|
|
homepage = "https://github.com/juliuszint/asdbctl";
|
|
changelog = "https://github.com/juliuszint/asdbctl/releases/tag/${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [
|
|
lib.maintainers.danieldk
|
|
];
|
|
};
|
|
})
|