NixOS-Config/pkgs/phanpy/default.nix

41 lines
988 B
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "phanpy";
version = "2024.04.04.65d51b0";
shellHook = ''
export PHANPY_DEFAULT_INSTANCE="social.gladtherescake.eu"
export PHANPY_CLIENT_NAME="Phanpy on gladtherescake.eu"
export PHANPY_WEBSITE="phanpy.gladtherescake.eu"
'';
src = fetchFromGitHub {
owner = "cheeaun";
repo = pname;
rev = "${version}";
hash = "sha256-sp7ihOgPYpP78M+IQ/QNjne0nw+PdcYJdEJ1m/ozZkE=";
};
npmDepsHash = "sha256-I4rZuk0Hn5R6rMu/QZvSuaGrCtG8Z61R7gjbhLnje2E=";
# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = ["--ignore-scripts"];
installPhase = ''
mkdir $out
npm run build
cp -r dist/* $out
'';
meta = with lib; {
description = "Minimalistic opinionated Mastodon web client.";
homepage = "https://phanpy.social/";
license = licenses.mit;
maintainers = with maintainers; [Lillian-Violet];
};
}