Skip to content

Commit 00630d6

Browse files
committed
Add cardano-node-1.35.4-aarch64-linux.tar.gz for E2E tests
1 parent fd09123 commit 00630d6

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index 00647cc94..e35ef9ac7 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -373,6 +373,8 @@
6+
internal.roots.project = windowsProject.roots;
7+
});
8+
};
9+
+ } // optionalAttrs (system == "aarch64-linux") {
10+
+ linux-arm64.projectExes = (mkPackages project).projectExes;
11+
} // optionalAttrs (system == "x86_64-darwin") {
12+
macos = lib.filterAttrs
13+
(n: _:

native-arm/flake.lock

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native-arm/flake.nix

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
inputs = {
33
flake-compat = { url = "github:input-output-hk/flake-compat"; flake = false; };
44
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
5+
nix-bundle-exe = { url = "github:3noch/nix-bundle-exe"; flake = false; };
56

7+
cardano-node-1-35-4 = { url = "github:IntersectMBO/cardano-node/1.35.4"; flake = false; };
68
cardano-node-1-35-5 = { url = "github:IntersectMBO/cardano-node/1.35.5"; flake = false; };
79
cardano-node-1-35-7 = { url = "github:IntersectMBO/cardano-node/1.35.7"; flake = false; };
810
cardano-node-8-8-0-pre = { url = "github:IntersectMBO/cardano-node/8.8.0-pre"; flake = false; };
@@ -402,6 +404,57 @@
402404

403405
# —————————————————— cardano-node —————————————————— #
404406

407+
(let
408+
input = "cardano-node-1-35-4";
409+
version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref;
410+
theFlake = (import inputs.flake-compat {
411+
src = enableAArch64 {
412+
original = inputs.${input};
413+
supportedSystemsPath = "nix/supported-systems.nix";
414+
extraPatch = ''
415+
(
416+
cd $out
417+
patch -p1 -i ${./cardano-node-1.35.4--expose-projectExes.patch}
418+
)
419+
sed -r '
420+
s/"-fexternal-interpreter"//g
421+
' -i $out/nix/haskell.nix
422+
'';
423+
};
424+
}).defaultNix;
425+
in [
426+
{ name = "${input}--flake"; value = theFlake; }
427+
# { name = "${input}--cardano-node"; value = theFlake.packages.${system}.cardano-node; }
428+
# { name = "${input}--cardano-submit-api"; value = theFlake.packages.${system}.cardano-submit-api; }
429+
{ name = "${input}--oci"; value = retagOCI "cardano-node" version theFlake.legacyPackages.${system}.dockerImage; }
430+
{ name = "${input}--oci-submit-api"; value = retagOCI "cardano-submit-api" version theFlake.legacyPackages.${system}.submitApiDockerImage; }
431+
{
432+
name = "${input}--tar";
433+
value = let
434+
pkgs = theFlake.inputs.nixpkgs.legacyPackages.${system};
435+
nix-bundle-exe-with-symlinks = pkgs.runCommand "nix-bundle-exe-with-symlinks" {} ''
436+
cp -r ${inputs.nix-bundle-exe} $out
437+
chmod -R +w $out
438+
sed -r "s/find '/find -L '/g" -i $out/default.nix
439+
'';
440+
nix-bundle-exe = import nix-bundle-exe-with-symlinks { pkgs = pkgs; };
441+
allExes = pkgs.buildEnv {
442+
name = "cardano-tools";
443+
paths = builtins.attrValues (removeAttrs theFlake.hydraJobs.linux-arm64.projectExes [
444+
"plutus-example" # we don’t use it in Lace, and gitignore-nix breaks pure evaluation
445+
]);
446+
pathsToLink = ["/bin"];
447+
};
448+
bundle = nix-bundle-exe allExes;
449+
in pkgs.runCommand "${bundle.name}-tar" {} ''
450+
mkdir -p $out
451+
tar -czvf $out/cardano-node-${version}-${system}.tar.gz -C ${bundle} .
452+
'';
453+
}
454+
])
455+
456+
++
457+
405458
(let
406459
input = "cardano-node-1-35-5";
407460
version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref;

0 commit comments

Comments
 (0)