mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-03 04:54:26 +00:00
Extensions read YAPF 2; Nix package
- KDE thumbnailer: texture loader, decodes only the mip it needs; GPU blocks, 16-bit and float via the new yapf_tex_to_rgba8. Tested through KDE's plugin loader with KF6 from nixpkgs. - Photoshop: shows the tool's error message; HDR textures open as 32-bit (.hdr), 16-bit stays 16-bit; 16-bit documents save as 16-bit. - CLI: 16-bit PNG export, readable conversion errors. - default.nix: yapf tool, library, header, MIME type and thumbnailer (absolute store path); runs the test suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVrVthWN8GsmgHGUhhsCYm
This commit is contained in:
parent
83588d8e2a
commit
a6c032d824
13 changed files with 336 additions and 48 deletions
39
default.nix
Normal file
39
default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# YAPF for Nix / NixOS: the `yapf` tool, libyapf (static + shared) and
|
||||
# yapf.h, plus the image/x-yapf MIME type and a freedesktop thumbnailer.
|
||||
#
|
||||
# nix-build build ./result
|
||||
# nix-env -if . install for your user
|
||||
# NixOS: environment.systemPackages = [ (pkgs.callPackage /path/to/YAPF { }) ];
|
||||
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.lib, stdenv ? pkgs.stdenv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "yapf";
|
||||
version = "2.0";
|
||||
|
||||
src = lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter = path: type:
|
||||
let base = baseNameOf path; in
|
||||
!(lib.elem base [ "build" "dist" "result" ".git" "node_modules" ]);
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 extensions/linux/yapf-mime.xml $out/share/mime/packages/yapf.xml
|
||||
install -Dm644 extensions/linux/yapf.thumbnailer $out/share/thumbnailers/yapf.thumbnailer
|
||||
substituteInPlace $out/share/thumbnailers/yapf.thumbnailer \
|
||||
--replace-fail "TryExec=yapf" "TryExec=$out/bin/yapf" \
|
||||
--replace-fail "Exec=yapf " "Exec=$out/bin/yapf "
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "YAPF: fast lossless images and GPU-ready textures";
|
||||
homepage = "https://github.com/Nexoniarz/YAPF";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "yapf";
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue