544c6ffc61
The overlay was pinning a specific commit via fetchFromGitea, requiring manual hash updates every time the fork changed. Now uses self.outPath which points to the flake's own source — the consuming repo's flake.lock tracks the rev and hash automatically.
57 lines
1.6 KiB
Nix
57 lines
1.6 KiB
Nix
{
|
|
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: {
|
|
# Use the flake's own source — rev and hash are tracked
|
|
# by flake.lock in the consuming repo, no manual updates needed
|
|
src = self.outPath;
|
|
|
|
# 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;
|
|
}
|
|
);
|
|
};
|
|
} |