|
31 | 31 | }; |
32 | 32 | }; |
33 | 33 | pkgs = import sources.nixpkgs { inherit system config; }; |
34 | | - pkgsNative = localLib.iohkNix.getPkgsDefault {}; |
35 | 34 | sources = localLib.sources; |
| 35 | + haskellNix = import sources."haskell.nix" {}; |
| 36 | + inherit (import haskellNix.sources.nixpkgs-unstable haskellNix.nixpkgsArgs) haskell-nix; |
| 37 | + flake-compat = import sources.flake-compat; |
| 38 | + walletFlake = flake-compat { src = sources.cardano-wallet; }; |
| 39 | + walletPackages = with walletFlake.defaultNix.hydraJobs; { |
| 40 | + x86_64-windows = linux.windows; |
| 41 | + x86_64-linux = linux.native; |
| 42 | + x86_64-darwin = macos.intel; |
| 43 | + aarch64-darwin = macos.silicon; |
| 44 | + }.${target}; |
36 | 45 | walletPkgs = import "${sources.cardano-wallet}/nix" {}; |
37 | 46 | # only used for CLI, to be removed when upgraded to next node version |
38 | 47 | nodePkgs = import "${sources.cardano-node}/nix" {}; |
|
49 | 58 | ostable.x86_64-windows = "windows"; |
50 | 59 | ostable.x86_64-linux = "linux"; |
51 | 60 | ostable.x86_64-darwin = "macos64"; |
| 61 | + ostable.aarch64-darwin = "macos64-arm"; |
| 62 | + |
52 | 63 | packages = self: { |
53 | 64 | inherit cluster pkgs version target nodeImplementation; |
54 | | - inherit (pkgs) hello cabal2nix; |
55 | 65 | cardanoLib = localLib.iohkNix.cardanoLib; |
56 | 66 | daedalus-bridge = self.bridgeTable.${nodeImplementation}; |
57 | 67 |
|
58 | | - nodejs = pkgs.nodejs-14_x; |
| 68 | + nodejs = pkgs.nodejs-16_x; |
59 | 69 | nodePackages = pkgs.nodePackages.override { nodejs = self.nodejs; }; |
60 | 70 | yarnInfo = { |
61 | 71 | version = "1.22.4"; |
|
73 | 83 |
|
74 | 84 | sources = localLib.sources; |
75 | 85 | bridgeTable = { |
76 | | - cardano = self.callPackage ./nix/cardano-bridge.nix { |
77 | | - cardano-wallet = self.cardano-wallet.cardano-wallet; |
78 | | - cardanoWalletPkgs = self.cardano-wallet.pkgs; |
79 | | - }; |
| 86 | + cardano = self.callPackage ./nix/cardano-bridge.nix {}; |
80 | 87 | }; |
81 | | - cardano-wallet = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }; |
82 | | - cardano-wallet-native = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; }; |
83 | | - cardano-address = (import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }).cardano-address; |
84 | | - mock-token-metadata-server = (import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }).mock-token-metadata-server; |
| 88 | + inherit (walletPackages) cardano-wallet; |
| 89 | + inherit (walletPackages) cardano-address; |
| 90 | + inherit (walletPackages) mock-token-metadata-server; |
85 | 91 | cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; }; |
86 | | - local-cluster = if cluster == "selfnode" then (import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }).local-cluster else null; |
| 92 | + local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null; |
87 | 93 | cardano-node-cluster = let |
88 | 94 | # Test wallets with known mnemonics |
89 | 95 | walletTestGenesisYaml = (self.sources.cardano-wallet + "/lib/shelley/test/data/cardano-node-shelley/genesis.yaml"); |
|
99 | 105 | in (import self.sources.cardano-node { inherit system customConfig; crossSystem = crossSystem nodePkgs.lib; }).cluster; |
100 | 106 | cardano-node = if useLocalNode |
101 | 107 | then (import self.sources.cardano-node { inherit system; crossSystem = crossSystem nodePkgs.lib; }).cardano-node |
102 | | - else self.cardano-wallet.cardano-node; |
| 108 | + else walletPackages.cardano-node; |
103 | 109 | cardano-cli = if useLocalNode |
104 | 110 | then (import self.sources.cardano-node { inherit system; crossSystem = crossSystem nodePkgs.lib; }).haskellPackages.cardano-cli |
105 | | - else self.cardano-wallet.cardano-cli; |
| 111 | + else walletPackages.cardano-cli; |
106 | 112 | darwin-launcher = self.callPackage ./nix/darwin-launcher.nix {}; |
107 | 113 |
|
108 | 114 | # a cross-compiled fastlist for the ps-list package |
|
123 | 129 | network = cluster; |
124 | 130 | os = ostable.${target}; |
125 | 131 | backend = nodeImplementation; |
126 | | - runCommandNative = pkgsNative.runCommand; |
127 | 132 | }; |
128 | 133 |
|
129 | 134 | unsignedUnpackedCardano = self.daedalus-bridge; # TODO |
|
264 | 269 | pushd dlls |
265 | 270 | ${if dummyInstaller then "touch foo" else "unzip ${self.dlls}"} |
266 | 271 | popd |
267 | | - cp -v ${self.unpackedCardano}/bin/* . |
| 272 | + cp -vr ${self.unpackedCardano}/bin/* . |
268 | 273 | cp -v ${self.nsisFiles}/{*.yaml,*.json,daedalus.nsi,*.key,*.cert} . |
269 | 274 | cp ${self.uninstaller}/uninstall.exe ../uninstall.exe |
270 | 275 | if [ -f ${self.nsisFiles}/block-0.bin ]; then |
|
314 | 319 | }; |
315 | 320 | rawapp-win64 = self.rawapp.override { win64 = true; }; |
316 | 321 | source = builtins.filterSource localLib.cleanSourceFilter ./.; |
317 | | - yaml2json = pkgs.haskell.lib.addExtraLibrary (pkgs.haskell.lib.disableCabalFlag pkgs.haskellPackages.yaml "no-exe") pkgs.haskellPackages.optparse-applicative; |
| 322 | + inherit ((haskell-nix.hackage-package { name = "yaml"; compiler-nix-name = "ghc8107"; cabalProject = '' |
| 323 | + packages: . |
| 324 | + package yaml |
| 325 | + flags: -no-exe |
| 326 | + ''; }).components.exes) yaml2json; |
318 | 327 |
|
319 | 328 | electron = pkgs.callPackage ./installers/nix/electron.nix {}; |
320 | 329 |
|
|
0 commit comments