|
2 | 2 | inputs = { |
3 | 3 | flake-compat = { url = "github:input-output-hk/flake-compat"; flake = false; }; |
4 | 4 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; |
| 5 | + nix-bundle-exe = { url = "github:3noch/nix-bundle-exe"; flake = false; }; |
5 | 6 |
|
| 7 | + cardano-node-1-35-4 = { url = "github:IntersectMBO/cardano-node/1.35.4"; flake = false; }; |
6 | 8 | cardano-node-1-35-5 = { url = "github:IntersectMBO/cardano-node/1.35.5"; flake = false; }; |
7 | 9 | cardano-node-1-35-7 = { url = "github:IntersectMBO/cardano-node/1.35.7"; flake = false; }; |
8 | 10 | cardano-node-8-8-0-pre = { url = "github:IntersectMBO/cardano-node/8.8.0-pre"; flake = false; }; |
|
402 | 404 |
|
403 | 405 | # —————————————————— cardano-node —————————————————— # |
404 | 406 |
|
| 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 | + |
405 | 458 | (let |
406 | 459 | input = "cardano-node-1-35-5"; |
407 | 460 | version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref; |
|
0 commit comments