Skip to content

Commit 9e60ec7

Browse files
committed
Mochi from overlay
1 parent 297aeb2 commit 9e60ec7

5 files changed

Lines changed: 41 additions & 1 deletion

File tree

home/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
iina
7171
m-cli
7272
mas
73+
mochi
7374
slack
7475
soundsource
7576
the-unarchiver

modules/base.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"copilot-language-server"
1717
"cursor"
1818
"daisydisk"
19+
"mochi"
1920
"plexmediaserver"
2021
"roon-server"
2122
"slack"

modules/darwin/default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"craft" # auto_updates
3838
# "fastscripts" # TODO: Use pre-v3
3939
"legcord"
40-
#"mochi"
4140
"qlcolorcode"
4241
"qlstephen"
4342
"quicklook-json"

overlays/repo-packages.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
self: super: {
22
github-desktop = super.callPackage ./../packages/github-desktop/package.nix {};
3+
mochi = super.callPackage ./../packages/mochi/package.nix {};
34
transmissionic = super.callPackage ./../packages/transmissionic/package.nix {};
45
ungoogled-chromium = super.callPackage ./../packages/ungoogled-chromium/package.nix {};
56
}

packages/mochi/package.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# TODO: Upstream
2+
{
3+
lib,
4+
stdenvNoCC,
5+
fetchurl,
6+
_7zz,
7+
}:
8+
stdenvNoCC.mkDerivation (finalAttrs: {
9+
pname = "mochi";
10+
version = "1.18.11";
11+
12+
src = fetchurl {
13+
url = "https://mochi.cards/releases/Mochi-${finalAttrs.version}-arm64.dmg";
14+
hash = "sha256-IzJx8IMuX/zK3GRIkwnqW7OCcmPLUSld3pVD6sCLAxA=";
15+
};
16+
17+
# Use 7zz to work around APFS: https://discourse.nixos.org/t/help-with-error-only-hfs-file-systems-are-supported-on-ventura/25873/9
18+
nativeBuildInputs = [_7zz];
19+
20+
sourceRoot = ".";
21+
22+
installPhase = ''
23+
runHook preInstall
24+
25+
mkdir -p "$out/Applications"
26+
cp -r *.app "$out/Applications"
27+
28+
runHook postInstall
29+
'';
30+
31+
meta = with lib; {
32+
description = "Study notes and flashcards using spaced repetition";
33+
homepage = "https://mochi.cards/";
34+
license = lib.licenses.unfree;
35+
platforms = platforms.darwin;
36+
sourceProvenance = with sourceTypes; [binaryNativeCode];
37+
};
38+
})

0 commit comments

Comments
 (0)