Skip to content

Commit

Permalink
Install Maccy in macOS with forked Nix package (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Oct 21, 2024
1 parent 87dca0c commit 5bc8fb6
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
zsh -c 'irb --version'
zsh -c 'ssh -V'
zsh -c 'hx --health'
- name: Make sure macos dependencies
if: runner.os == 'macOS'
run: |
zsh -c 'command -v maccy'
- name: Run homemade commands
run: |
zsh -c 'la ~; lat ~/.config'
Expand Down
2 changes: 2 additions & 0 deletions home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
# edge-pkgs.zed-editor

edge-pkgs.signal-desktop # Useable since https://github.com/NixOS/nixpkgs/pull/348165

homemade-pkgs.maccy
])
)
++ (with homemade-pkgs; [
Expand Down
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

beedii = pkgs.callPackage ./beedii { };
cozette = pkgs.callPackage ./cozette { };
maccy = pkgs.callPackage ./maccy { };

posix_shared_functions = pkgs.callPackage ./posix_shared_functions { };

Expand Down
47 changes: 47 additions & 0 deletions pkgs/maccy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
makeWrapper,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "maccy";
version = "2.1.0";

src = fetchurl {
url = "https://github.com/p0deje/Maccy/releases/download/${finalAttrs.version}/Maccy.app.zip";
hash = "sha256-yFlq2A5NAryBU2UnVk1VuS7MBsov/Fm15VwkX+OTLBM=";
};

dontUnpack = true;

nativeBuildInputs = [
unzip
makeWrapper
];

installPhase = ''
runHook preInstall
mkdir -p $out/Applications
unzip -d $out/Applications $src
makeWrapper "$out/Applications/Maccy.app/Contents/MacOS/Maccy" "$out/bin/maccy"
runHook postInstall
'';

meta = with lib; {
description = "Simple clipboard manager for macOS";
homepage = "https://maccy.app";
license = licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [
emilytrau
kachick
];
platforms = platforms.darwin;
mainProgram = "maccy";
};
})

0 comments on commit 5bc8fb6

Please sign in to comment.