Files
nixpkgs/pkgs/by-name/bl/bluesnooze/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

41 lines
1.1 KiB
Nix

{
fetchurl,
lib,
stdenv,
unzip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluesnooze";
version = "1.2";
src = fetchurl {
url = "https://github.com/odlp/bluesnooze/releases/download/v${finalAttrs.version}/Bluesnooze.zip";
hash = "sha256-B1qLfPj2bU9AAsYqGYWl0/sEPj3wnn/UBeiM4kqW/rA=";
};
# Needed to avoid the binary becoming corrupted and mac refusing to open it. I
# don't know why.
dontFixup = true;
# "unpack" phase does the unzipping automatically
nativeBuildInputs = [ unzip ];
sourceRoot = "."; # squash "unpacker produced multiple directories" error
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -r Bluesnooze.app $out/Applications/
runHook postInstall
'';
meta = {
description = "Prevents your sleeping Mac from connecting to Bluetooth accessories";
homepage = "https://github.com/odlp/bluesnooze";
changelog = "https://github.com/odlp/bluesnooze/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ craigf ];
platforms = lib.platforms.darwin;
};
})