|
21 | 21 | }); |
22 | 22 | }; |
23 | 23 | }; |
24 | | - walletFlake = (import inputs.flake-compat { |
25 | | - # FIXME: add patches in `flake.nix` after <https://github.com/NixOS/nix/issues/3920> |
26 | | - src = pkgs.runCommand "cardano-wallet" {} '' |
27 | | - cp -r ${inputs.cardano-wallet-unpatched} $out |
28 | | - chmod -R +w $out |
29 | | - cd $out |
30 | | - patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch} |
31 | | - patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch} |
32 | | - patch -p1 -i ${./cardano-wallet--proper-runtimeNodePkgs.patch} |
33 | | - ''; |
34 | | - }).defaultNix // { |
35 | | - inherit (inputs.cardano-wallet-unpatched) rev shortRev sourceInfo; |
36 | | - }; |
| 24 | + flake-compat = import inputs.flake-compat; |
| 25 | + |
| 26 | + walletFlake = let |
| 27 | + unpatched = inputs.cardano-wallet-unpatched; |
| 28 | + in (flake-compat { |
| 29 | + src = { |
| 30 | + outPath = toString (pkgs.runCommand "source" {} '' |
| 31 | + cp -r ${unpatched} $out |
| 32 | + chmod -R +w $out |
| 33 | + cd $out |
| 34 | + patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch} |
| 35 | + patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch} |
| 36 | + ''); |
| 37 | + inherit (unpatched) rev shortRev lastModified lastModifiedDate; |
| 38 | + }; |
| 39 | + }).defaultNix; |
| 40 | + |
| 41 | + nodeFlake = let |
| 42 | + unpatched = walletFlake.inputs.cardano-node-runtime; |
| 43 | + in (flake-compat { |
| 44 | + src = { |
| 45 | + outPath = toString (pkgs.runCommand "source" {} '' |
| 46 | + cp -r ${unpatched} $out |
| 47 | + chmod -R +w $out |
| 48 | + cd $out |
| 49 | + cp ${walletFlake}/nix/supported-systems.nix $out/nix/supported-systems.nix |
| 50 | + ''); |
| 51 | + inherit (unpatched.sourceInfo) rev shortRev lastModified lastModifiedDate; |
| 52 | + }; |
| 53 | + }).defaultNix; |
| 54 | + |
37 | 55 | walletPackages = { |
38 | 56 | x86_64-windows = walletFlake.packages.x86_64-linux.windowsPackages; |
39 | 57 | x86_64-linux = walletFlake.packages.x86_64-linux; |
40 | 58 | x86_64-darwin = walletFlake.packages.x86_64-darwin; |
41 | 59 | aarch64-darwin = walletFlake.packages.aarch64-darwin; |
42 | 60 | }.${target}; |
43 | | - cardanoWorldFlake = (import inputs.flake-compat { src = inputs.cardano-world; }).defaultNix.outputs; |
| 61 | + |
| 62 | + nodePackages = { |
| 63 | + x86_64-windows = nodeFlake.legacyPackages.x86_64-linux.hydraJobs.windows; # a bug in ${cardano-node}/flake.nix |
| 64 | + x86_64-linux = nodeFlake.packages.x86_64-linux; |
| 65 | + x86_64-darwin = nodeFlake.packages.x86_64-darwin; |
| 66 | + aarch64-darwin = nodeFlake.packages.aarch64-darwin; |
| 67 | + }.${target}; |
| 68 | + |
| 69 | + cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs; |
44 | 70 | crossSystem = { |
45 | 71 | x86_64-windows = pkgs.lib.systems.examples.mingwW64; |
46 | 72 | }.${target} or null; |
|
50 | 76 | ostable.aarch64-darwin = "macos64-arm"; |
51 | 77 |
|
52 | 78 | packages = self: { |
53 | | - inherit walletFlake cardanoWorldFlake cluster pkgs target; |
| 79 | + inherit walletFlake nodeFlake cardanoWorldFlake cluster pkgs target; |
54 | 80 | inherit (walletFlake.legacyPackages.${system}.pkgs) cardanoLib; |
55 | 81 | daedalus-bridge = self.callPackage ./cardano-bridge.nix {}; |
56 | 82 |
|
|
59 | 85 | inherit (walletPackages) mock-token-metadata-server; |
60 | 86 | cardano-shell = import inputs.cardano-shell { inherit system crossSystem; }; |
61 | 87 | local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null; |
62 | | - cardano-node = walletPackages.cardano-node; |
63 | | - cardanoNodeVersion = self.cardano-node.version + "-" + builtins.substring 0 9 walletFlake.inputs.cardano-node-1_35_4.rev; |
| 88 | + cardano-node = nodePackages.cardano-node; |
| 89 | + cardanoNodeVersion = self.cardano-node.identifier.version + "-" + builtins.substring 0 9 nodeFlake.rev; |
64 | 90 | cardanoWalletVersion = self.daedalus-bridge.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev; |
65 | | - cardano-cli = walletPackages.cardano-cli; |
| 91 | + cardano-cli = nodePackages.cardano-cli; |
66 | 92 |
|
67 | 93 | launcherConfigs = self.callPackage ./launcher-config.nix { |
68 | 94 | inherit devShell system; |
|
0 commit comments