Skip to content

Commit

Permalink
Add cardano-node-1.35.4-aarch64-linux.tar.gz for E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrus committed Apr 3, 2024
1 parent fd09123 commit 00630d6
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
13 changes: 13 additions & 0 deletions native-arm/cardano-node-1.35.4--expose-projectExes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/flake.nix b/flake.nix
index 00647cc94..e35ef9ac7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -373,6 +373,8 @@
internal.roots.project = windowsProject.roots;
});
};
+ } // optionalAttrs (system == "aarch64-linux") {
+ linux-arm64.projectExes = (mkPackages project).projectExes;
} // optionalAttrs (system == "x86_64-darwin") {
macos = lib.filterAttrs
(n: _:
35 changes: 35 additions & 0 deletions native-arm/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions native-arm/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
inputs = {
flake-compat = { url = "github:input-output-hk/flake-compat"; flake = false; };
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nix-bundle-exe = { url = "github:3noch/nix-bundle-exe"; flake = false; };

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

# —————————————————— cardano-node —————————————————— #

(let
input = "cardano-node-1-35-4";
version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref;
theFlake = (import inputs.flake-compat {
src = enableAArch64 {
original = inputs.${input};
supportedSystemsPath = "nix/supported-systems.nix";
extraPatch = ''
(
cd $out
patch -p1 -i ${./cardano-node-1.35.4--expose-projectExes.patch}
)
sed -r '
s/"-fexternal-interpreter"//g
' -i $out/nix/haskell.nix
'';
};
}).defaultNix;
in [
{ name = "${input}--flake"; value = theFlake; }
# { name = "${input}--cardano-node"; value = theFlake.packages.${system}.cardano-node; }
# { name = "${input}--cardano-submit-api"; value = theFlake.packages.${system}.cardano-submit-api; }
{ name = "${input}--oci"; value = retagOCI "cardano-node" version theFlake.legacyPackages.${system}.dockerImage; }
{ name = "${input}--oci-submit-api"; value = retagOCI "cardano-submit-api" version theFlake.legacyPackages.${system}.submitApiDockerImage; }
{
name = "${input}--tar";
value = let
pkgs = theFlake.inputs.nixpkgs.legacyPackages.${system};
nix-bundle-exe-with-symlinks = pkgs.runCommand "nix-bundle-exe-with-symlinks" {} ''
cp -r ${inputs.nix-bundle-exe} $out
chmod -R +w $out
sed -r "s/find '/find -L '/g" -i $out/default.nix
'';
nix-bundle-exe = import nix-bundle-exe-with-symlinks { pkgs = pkgs; };
allExes = pkgs.buildEnv {
name = "cardano-tools";
paths = builtins.attrValues (removeAttrs theFlake.hydraJobs.linux-arm64.projectExes [
"plutus-example" # we don’t use it in Lace, and gitignore-nix breaks pure evaluation
]);
pathsToLink = ["/bin"];
};
bundle = nix-bundle-exe allExes;
in pkgs.runCommand "${bundle.name}-tar" {} ''
mkdir -p $out
tar -czvf $out/cardano-node-${version}-${system}.tar.gz -C ${bundle} .
'';
}
])

++

(let
input = "cardano-node-1-35-5";
version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref;
Expand Down

0 comments on commit 00630d6

Please sign in to comment.