Skip to content

Instantly share code, notes, and snippets.

@SamirTalwar
Created June 19, 2026 20:50
Show Gist options
  • Select an option

  • Save SamirTalwar/f0aceb4d083a0cbd15cf37901cd2942f to your computer and use it in GitHub Desktop.

Select an option

Save SamirTalwar/f0aceb4d083a0cbd15cf37901cd2942f to your computer and use it in GitHub Desktop.
Nix derivation for Phanpy
{
lib,
fetchFromGitHub,
buildNpmPackage,
importNpmLock,
env ? { },
}:
buildNpmPackage (finalAttrs: rec {
pname = "phanpy";
version = "2026.05.21.387a188";
src = fetchFromGitHub {
owner = "cheeaun";
repo = "phanpy";
rev = finalAttrs.version;
hash = "sha256-MahLYnIQYaiTIPaZZt6McJSQr1uPMiQ3uit6lHpTGcA=";
};
# Pass any environment variables through to the build.
inherit env;
# This makes Vite behave in a sealed environment.
CI = true;
npmDeps = importNpmLock { npmRoot = src; };
npmConfigHook = importNpmLock.npmConfigHook;
npmRebuildFlagsArray = [ "--ignore-scripts" ];
buildPhase = ''
runHook preBuild
# Run the post-install scripts, which generate icons.
npm run postinstall
# Build with Vite.
NODE_ENV=production npm run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv ./dist $out
runHook postInstall
'';
meta = {
description = "A minimalistic opinionated Mastodon web client";
homepage = "https://phanpy.social";
license = lib.licenses.mit;
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment