From 254b71274710de2fd19de58648c1d9b38cad1de0 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 4 Jul 2026 10:54:44 +0000 Subject: [PATCH] Add flake.nix exporting overlay for custom pinchflat package The overlay overrides pkgs.pinchflat to build from this fork (with REST API) instead of upstream kieraneglin/pinchflat. Consumed by config-nixos as a flake input: pinchflat.overlays.default --- flake.nix | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0095fa8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,61 @@ +{ + description = "Pinchflat fork with JSON REST API for MCP integration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = + { self, nixpkgs, ... }: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + in + { + overlays = { + default = final: prev: { + pinchflat = prev.pinchflat.overrideAttrs ( + old: { + src = prev.fetchFromGitea { + domain = "gitea.bueso.eu"; + owner = "hermes-agent"; + repo = "pinchflat"; + rev = "8e0ec4b8b9bdc43060cf2d98e6ebafaf693fc944"; + hash = "sha256-BEAvsaMQFFj2YyGeYdYGSavFoWl46TQaLGCb5RlPlQU="; + }; + + # Deps hashes are identical to upstream — mix.lock and yarn.lock + # are unchanged in this fork. If they drift, nix build will + # print the correct hash to use. + mixFodDeps = old.mixFodDeps.overrideAttrs (_: { + hash = "sha256-7zLlOzBJcvookYX/4SNC0O1Yr62LIKH9R8rONl3diSs="; + }); + + yarnOfflineCache = old.yarnOfflineCache.overrideAttrs (_: { + sha256 = "sha256-xJL+qcohtu+OmZ31E1QU9uqBWAFGejKIO3XRd+R6z/4="; + }); + } + ); + }; + }; + + packages = forAllSystems ( + system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + }; + in + { + default = pkgs.pinchflat; + pinchflat = pkgs.pinchflat; + } + ); + }; +} \ No newline at end of file