Skip to content

Commit fc3cb28

Browse files
committed
setup transcripted
1 parent 60992fc commit fc3cb28

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

hosts/macbook/default.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212
system.primaryUser = "nikita";
1313
system.stateVersion = 6;
1414

15-
# nix-darwin needs mas on PATH to install masApps
16-
environment.systemPackages = [ pkgs.mas ];
15+
environment.systemPackages = [
16+
# nix-darwin needs mas on PATH to install masApps
17+
pkgs.mas
18+
# Transcripted has no cask/MAS listing; packaged from its release DMG and
19+
# linked into /Applications/Nix Apps.
20+
(import ../../packages/transcripted { inherit pkgs; })
21+
];
1722

1823
users.users."nikita".home = "/Users/nikita";
1924
home-manager = {

packages/transcripted/default.nix

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{ pkgs }:
2+
3+
# No Homebrew cask or Mac App Store listing exists, so the .app is unpacked
4+
# straight from the developer's release DMG. nix-darwin links it into
5+
# /Applications/Nix Apps on switch. The app's own Sparkle auto-update can't
6+
# write to the read-only store; bump `version`/`hash` here to update.
7+
pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
8+
pname = "transcripted";
9+
version = "1.1.56";
10+
11+
src = pkgs.fetchurl {
12+
url = "https://github.com/r3dbars/transcripted/releases/download/v${finalAttrs.version}/Transcripted-${finalAttrs.version}.dmg";
13+
hash = "sha256-XVTopG9CcCzYKqEJ/twm7m3fl9jACDPhuByfZx22In4=";
14+
};
15+
16+
nativeBuildInputs = [ pkgs.undmg ];
17+
sourceRoot = ".";
18+
19+
installPhase = ''
20+
runHook preInstall
21+
mkdir -p "$out/Applications"
22+
cp -R "Transcripted.app" "$out/Applications/"
23+
runHook postInstall
24+
'';
25+
26+
meta = {
27+
description = "Transcripted macOS app (github.com/r3dbars/transcripted)";
28+
platforms = pkgs.lib.platforms.darwin;
29+
};
30+
})

0 commit comments

Comments
 (0)