This commit is contained in:
Alejandro Cabeza Romero 2026-01-28 16:51:29 +01:00
parent b71a648643
commit df057aa15a
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD
2 changed files with 17 additions and 9 deletions

View File

@ -12,18 +12,16 @@
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux"
"aarch64-darwin" "aarch64-darwin"
"x86_64-windows" "x86_64-windows"
]; ];
forAll = lib.genAttrs systems; forAll = lib.genAttrs systems;
circuitsVersion = "0.3.2"; circuitsVersion = "0.4.1";
versions = import ./versions.nix;
circuitsHashes = { circuitsHashes = versions.${circuitsVersion};
x86_64-linux = "sha256-80+GrB3kBhwLHvNemme5Vig6tPDRRZC7xHps0DNonzM=";
aarch64-darwin = "sha256-FbLgrHaa8djFEaA69WpZMB3uozkLT/abQiCWKrkzcsk=";
x86_64-windows = "sha256-VOBUXlXNHTY0l91G+B1vybDfES0Y0HXhUytJIfFEiBA=";
};
githubBase = "https://github.com/logos-blockchain/logos-blockchain-circuits/releases/download"; githubBase = "https://github.com/logos-blockchain/logos-blockchain-circuits/releases/download";
@ -49,6 +47,12 @@
"aarch64" "aarch64"
else else
throw "Unsupported architecture."; throw "Unsupported architecture.";
sha256 =
if circuitsHashes ? ${system} then
circuitsHashes.${system}
else
throw "logos-blockchain-circuits ${circuitsVersion} does not support ${system}.";
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
pname = "logos-blockchain-circuits"; pname = "logos-blockchain-circuits";
@ -59,7 +63,7 @@
url = url =
"${githubBase}/v${circuitsVersion}" "${githubBase}/v${circuitsVersion}"
+ "/logos-blockchain-circuits-v${circuitsVersion}-${os}-${arch}.tar.gz"; + "/logos-blockchain-circuits-v${circuitsVersion}-${os}-${arch}.tar.gz";
sha256 = circuitsHashes.${system}; inherit sha256;
}; };
installPhase = '' installPhase = ''
@ -70,6 +74,10 @@
meta = { meta = {
platforms = [ system ]; platforms = [ system ];
}; };
passthru = {
version = circuitsVersion;
};
}; };
in in
{ {

View File

@ -4,7 +4,7 @@
aarch64-darwin = "sha256-FbLgrHaa8djFEaA69WpZMB3uozkLT/abQiCWKrkzcsk="; aarch64-darwin = "sha256-FbLgrHaa8djFEaA69WpZMB3uozkLT/abQiCWKrkzcsk=";
x86_64-windows = "sha256-VOBUXlXNHTY0l91G+B1vybDfES0Y0HXhUytJIfFEiBA="; x86_64-windows = "sha256-VOBUXlXNHTY0l91G+B1vybDfES0Y0HXhUytJIfFEiBA=";
}; };
"0.4.0" = { "0.4.1" = {
x86_64-linux = "sha256-Oi3xhqm5Sd4PaCSHWMvsJm2YPtSlm11BBG99xG30tiM="; x86_64-linux = "sha256-Oi3xhqm5Sd4PaCSHWMvsJm2YPtSlm11BBG99xG30tiM=";
aarch64-linux = "sha256-8lsgqflHXPP6mnxILpUCNhetpVeDNOXiQlWKoZLHa7I="; aarch64-linux = "sha256-8lsgqflHXPP6mnxILpUCNhetpVeDNOXiQlWKoZLHa7I=";
aarch64-darwin = "sha256-E+yMjJPMy08jbiHLlDmDvlKnGJ4UiIRKB9GGZ0JGBB8="; aarch64-darwin = "sha256-E+yMjJPMy08jbiHLlDmDvlKnGJ4UiIRKB9GGZ0JGBB8=";