iota/flake.nix
Alois e71d9c3118
Some checks failed
Validate authentication / Validate authentication (push) Failing after 1s
Move builds to prod-pins and add explicit update channels
2026-10-04 19:27:02 +02:00

34 lines
1.3 KiB
Nix

{
description = "Iota development and verification";
inputs.prod-pins.url = "git+ssh://git@methanium.net/tensamin/prod-pins?ref=main";
outputs = { self, prod-pins, ... }:
let
forSystems = prod-pins.inputs.nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
project = system: prod-pins.lib.mkPackages {
inherit system;
sources.iota = self;
};
in {
checks = forSystems (system: { inherit ((project system).packages) iota; });
devShells = forSystems (system: {
default = (project system).devShells.iota.overrideAttrs (old: {
TENSAMIN_SOURCE = (project system).packages.iota.transformedSource;
shellHook = (old.shellHook or "") + ''
# Stage authoritative dependencies without changing the checkout.
export TENSAMIN_CHECKOUT="$PWD"
workRoot="/tmp/tensamin-dev-$UID/$(basename "$TENSAMIN_SOURCE")"
if [ ! -d "$workRoot" ]; then
mkdir -p "$(dirname "$workRoot")"
stage="$(mktemp -d "$workRoot.XXXXXX")"
cp -R "$TENSAMIN_SOURCE/." "$stage/" &&
chmod -R u+w "$stage" &&
mv -T "$stage" "$workRoot" || exit 1
fi
cd "$workRoot"
'';
});
});
};
}