fbcat: small refactor, fix fbgrab dependencies

This commit is contained in:
OPNA2608 2021-12-13 14:55:50 +01:00
parent a400948064
commit fa5eb09a66

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitHub } : { lib
, stdenv
, fetchFromGitHub
, netpbm
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fbcat"; pname = "fbcat";
@ -11,17 +15,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ORzcd8XGy2BfwuPK5UX+K5Z+FYkb+tdg/gHl3zHjvbk="; sha256 = "sha256-ORzcd8XGy2BfwuPK5UX+K5Z+FYkb+tdg/gHl3zHjvbk=";
}; };
# hardcoded because makefile target "install" depends on libxslt dependencies from network postPatch = ''
# that are just too hard to monkeypatch here substituteInPlace fbgrab \
# so this is the simple fix. --replace 'pnmtopng' '${netpbm}/bin/pnmtopng' \
installPhase = '' --replace 'fbcat' "$out/bin/fbcat"
mkdir -p $out
install -d $out/bin
install -m755 fbcat $out/bin/
install -m755 fbgrab $out/bin/
install -d $out/share/man/man1
''; '';
installFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; { meta = with lib; {
homepage = "http://jwilk.net/software/fbcat"; homepage = "http://jwilk.net/software/fbcat";
description = "Framebuffer screenshot tool"; description = "Framebuffer screenshot tool";