|
1 | 1 | { target |
2 | | -, nodeImplementation ? "cardano" |
3 | | -, cluster ? "mainnet" |
4 | | -, version ? "versionNotSet" |
5 | | -, devShell ? false |
6 | | -, useLocalNode ? false |
7 | | -, topologyOverride ? null |
8 | | -, configOverride ? null |
9 | | -, genesisOverride ? null |
10 | | -, sourceLib |
11 | 2 | , inputs |
| 3 | +, cluster |
| 4 | +, devShell |
12 | 5 | }: |
13 | 6 |
|
14 | 7 | let |
15 | 8 | system = { |
16 | 9 | x86_64-windows = "x86_64-linux"; # Windows can only be cross-built from Linux now |
17 | 10 | }.${target} or target; |
18 | 11 | pkgs = inputs.nixpkgs.legacyPackages.${system}; |
19 | | - localLib = import ./old-lib.nix { inherit inputs system nodeImplementation; }; |
20 | | - sources = localLib.sources; |
21 | 12 | flake-compat = import inputs.cardano-wallet-unpatched.inputs.flake-compat; |
22 | 13 | walletFlake = |
23 | 14 | if target != "aarch64-darwin" |
|
39 | 30 | x86_64-darwin = macos.intel; |
40 | 31 | aarch64-darwin = macos.silicon; |
41 | 32 | }.${target}; |
42 | | - walletPkgs = walletFlake.legacyPackages.${system}.pkgs; |
43 | | - cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs; |
44 | | - shellPkgs = (import "${sources.cardano-shell}/nix") { inherit system; }; |
45 | | - inherit (pkgs.lib) optionalString; |
46 | | - crossSystem = lib: { |
47 | | - x86_64-windows = lib.systems.examples.mingwW64; |
| 33 | + cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs; |
| 34 | + crossSystem = { |
| 35 | + x86_64-windows = pkgs.lib.systems.examples.mingwW64; |
48 | 36 | }.${target} or null; |
49 | 37 | ostable.x86_64-windows = "windows"; |
50 | 38 | ostable.x86_64-linux = "linux"; |
51 | 39 | ostable.x86_64-darwin = "macos64"; |
52 | 40 | ostable.aarch64-darwin = "macos64-arm"; |
53 | 41 |
|
54 | 42 | packages = self: { |
55 | | - inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation; |
56 | | - cardanoLib = walletPkgs.cardanoLib; |
57 | | - daedalus-bridge = self.bridgeTable.${nodeImplementation}; |
| 43 | + inherit walletFlake cardanoWorldFlake cluster pkgs target; |
| 44 | + inherit (walletFlake.legacyPackages.${system}.pkgs) cardanoLib; |
| 45 | + daedalus-bridge = self.callPackage ./cardano-bridge.nix {}; |
58 | 46 |
|
59 | | - sources = localLib.sources; |
60 | | - bridgeTable = { |
61 | | - cardano = self.callPackage ./cardano-bridge.nix {}; |
62 | | - }; |
63 | 47 | inherit (walletPackages) cardano-wallet; |
64 | 48 | inherit (walletPackages) cardano-address; |
65 | 49 | inherit (walletPackages) mock-token-metadata-server; |
66 | | - cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; }; |
| 50 | + cardano-shell = import inputs.cardano-shell { inherit system crossSystem; }; |
67 | 51 | local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null; |
68 | 52 | cardano-node = walletPackages.cardano-node; |
69 | 53 | cardanoNodeVersion = self.cardano-node.version + "-" + builtins.substring 0 9 self.cardano-node.src.rev; |
70 | 54 | cardanoWalletVersion = self.daedalus-bridge.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev; |
71 | 55 | cardano-cli = walletPackages.cardano-cli; |
72 | 56 |
|
73 | 57 | launcherConfigs = self.callPackage ./launcher-config.nix { |
74 | | - inherit devShell topologyOverride configOverride genesisOverride system; |
| 58 | + inherit devShell system; |
75 | 59 | network = cluster; |
76 | 60 | os = ostable.${target}; |
77 | | - backend = nodeImplementation; |
78 | 61 | }; |
79 | 62 |
|
80 | 63 | ## TODO: move to installers/nix |
81 | 64 | hsDaedalusPkgs = self.callPackage ../installers { |
82 | 65 | inherit (self) daedalus-bridge; |
83 | | - inherit localLib system; |
| 66 | + inherit system; |
84 | 67 | }; |
85 | 68 | daedalus-installer = pkgs.haskell.lib.justStaticExecutables self.hsDaedalusPkgs.daedalus-installer; |
86 | | - source = builtins.filterSource localLib.cleanSourceFilter ../.; |
87 | 69 |
|
88 | 70 | tests = { |
89 | 71 | runShellcheck = self.callPackage ../tests/shellcheck.nix { src = ../.;}; |
|
0 commit comments