From df057aa15ab3e0429fd8564ec2c474b74f56197d Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Wed, 28 Jan 2026 16:51:29 +0100 Subject: [PATCH] wip --- flake.nix | 24 ++++++++++++++++-------- versions.nix | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index e8e71e2..476a4bc 100644 --- a/flake.nix +++ b/flake.nix @@ -12,18 +12,16 @@ systems = [ "x86_64-linux" + "aarch64-linux" "aarch64-darwin" "x86_64-windows" ]; + forAll = lib.genAttrs systems; - circuitsVersion = "0.3.2"; - - circuitsHashes = { - x86_64-linux = "sha256-80+GrB3kBhwLHvNemme5Vig6tPDRRZC7xHps0DNonzM="; - aarch64-darwin = "sha256-FbLgrHaa8djFEaA69WpZMB3uozkLT/abQiCWKrkzcsk="; - x86_64-windows = "sha256-VOBUXlXNHTY0l91G+B1vybDfES0Y0HXhUytJIfFEiBA="; - }; + circuitsVersion = "0.4.1"; + versions = import ./versions.nix; + circuitsHashes = versions.${circuitsVersion}; githubBase = "https://github.com/logos-blockchain/logos-blockchain-circuits/releases/download"; @@ -49,6 +47,12 @@ "aarch64" else throw "Unsupported architecture."; + + sha256 = + if circuitsHashes ? ${system} then + circuitsHashes.${system} + else + throw "logos-blockchain-circuits ${circuitsVersion} does not support ${system}."; in pkgs.stdenv.mkDerivation { pname = "logos-blockchain-circuits"; @@ -59,7 +63,7 @@ url = "${githubBase}/v${circuitsVersion}" + "/logos-blockchain-circuits-v${circuitsVersion}-${os}-${arch}.tar.gz"; - sha256 = circuitsHashes.${system}; + inherit sha256; }; installPhase = '' @@ -70,6 +74,10 @@ meta = { platforms = [ system ]; }; + + passthru = { + version = circuitsVersion; + }; }; in { diff --git a/versions.nix b/versions.nix index 93941ef..32ce77a 100644 --- a/versions.nix +++ b/versions.nix @@ -4,7 +4,7 @@ aarch64-darwin = "sha256-FbLgrHaa8djFEaA69WpZMB3uozkLT/abQiCWKrkzcsk="; x86_64-windows = "sha256-VOBUXlXNHTY0l91G+B1vybDfES0Y0HXhUytJIfFEiBA="; }; - "0.4.0" = { + "0.4.1" = { x86_64-linux = "sha256-Oi3xhqm5Sd4PaCSHWMvsJm2YPtSlm11BBG99xG30tiM="; aarch64-linux = "sha256-8lsgqflHXPP6mnxILpUCNhetpVeDNOXiQlWKoZLHa7I="; aarch64-darwin = "sha256-E+yMjJPMy08jbiHLlDmDvlKnGJ4UiIRKB9GGZ0JGBB8=";