Skip to content

Commit 70b191e

Browse files
bluesnooze: init at 1.2 (#402594)
2 parents 6033cb0 + 52d385c commit 70b191e

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
fetchurl,
3+
lib,
4+
stdenv,
5+
unzip,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "bluesnooze";
9+
version = "1.2";
10+
src = fetchurl {
11+
url = "https://github.com/odlp/bluesnooze/releases/download/v${finalAttrs.version}/Bluesnooze.zip";
12+
hash = "sha256-B1qLfPj2bU9AAsYqGYWl0/sEPj3wnn/UBeiM4kqW/rA=";
13+
};
14+
15+
# Needed to avoid the binary becoming corrupted and mac refusing to open it. I
16+
# don't know why.
17+
dontFixup = true;
18+
19+
# "unpack" phase does the unzipping automatically
20+
nativeBuildInputs = [ unzip ];
21+
sourceRoot = "."; # squash "unpacker produced multiple directories" error
22+
23+
installPhase = ''
24+
runHook preInstall
25+
26+
mkdir -p "$out/Applications"
27+
cp -r Bluesnooze.app $out/Applications/
28+
29+
runHook postInstall
30+
'';
31+
32+
meta = {
33+
description = "Bluesnooze prevents your sleeping Mac from connecting to Bluetooth accessories";
34+
homepage = "https://github.com/odlp/bluesnooze";
35+
changelog = "https://github.com/odlp/bluesnooze/releases/tag/v${finalAttrs.version}";
36+
license = lib.licenses.mit;
37+
maintainers = with lib.maintainers; [ craigf ];
38+
platforms = lib.platforms.darwin;
39+
};
40+
})

0 commit comments

Comments
 (0)