|
1 | 1 | { target ? builtins.currentSystem |
| 2 | +, localLibSystem ? builtins.currentSystem |
2 | 3 | , nodeImplementation ? "cardano" |
3 | | -, localLib ? import ./lib.nix { inherit nodeImplementation; } |
| 4 | +, localLib ? import ./lib.nix { inherit nodeImplementation; system = localLibSystem; } |
4 | 5 | , cluster ? "mainnet" |
5 | 6 | , version ? "versionNotSet" |
6 | 7 | , buildNum ? null |
|
17 | 18 |
|
18 | 19 | let |
19 | 20 | systemTable = { |
20 | | - x86_64-windows = builtins.currentSystem; |
| 21 | + x86_64-windows = "x86_64-linux"; # Windows can only be cross-built from Linux now |
21 | 22 | }; |
22 | 23 | crossSystemTable = lib: { |
23 | 24 | x86_64-windows = lib.systems.examples.mingwW64; |
|
42 | 43 | patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} |
43 | 44 | ''; |
44 | 45 | }; |
45 | | - haskellNix = import sources."haskell.nix" {}; |
46 | | - inherit (import haskellNix.sources.nixpkgs-unstable haskellNix.nixpkgsArgs) haskell-nix; |
| 46 | + haskell-nix = walletFlake.inputs.haskellNix.legacyPackages.${system}.haskell-nix; |
47 | 47 | flake-compat = import sources.flake-compat; |
48 | | - walletFlake = flake-compat { src = sources.cardano-wallet; }; |
49 | | - walletPackages = with walletFlake.defaultNix.hydraJobs; { |
| 48 | + walletFlake = (flake-compat { src = sources.cardano-wallet; }).defaultNix; |
| 49 | + walletPackages = with walletFlake.hydraJobs; { |
50 | 50 | x86_64-windows = linux.windows; |
51 | 51 | x86_64-linux = linux.native; |
52 | 52 | x86_64-darwin = macos.intel; |
53 | 53 | aarch64-darwin = macos.silicon; |
54 | 54 | }.${target}; |
55 | | - walletPkgs = import "${sources.cardano-wallet}/nix" {}; |
| 55 | + walletPkgs = walletFlake.legacyPackages.${system}.pkgs; |
56 | 56 | cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs; |
57 | 57 | # only used for CLI, to be removed when upgraded to next node version |
58 | 58 | nodePkgs = import "${sources.cardano-node}/nix" {}; |
59 | | - shellPkgs = (import "${sources.cardano-shell}/nix") {}; |
60 | | - inherit (pkgs.lib) optionalString optional concatStringsSep; |
61 | | - inherit (pkgs) writeTextFile; |
| 59 | + shellPkgs = (import "${sources.cardano-shell}/nix") { inherit system; }; |
| 60 | + inherit (pkgs.lib) optionalString; |
62 | 61 | crossSystem = lib: (crossSystemTable lib).${target} or null; |
63 | 62 | # TODO, nsis can't cross-compile with the nixpkgs daedalus currently uses |
64 | 63 | nsisNixPkgs = import localLib.sources.nixpkgs-nsis {}; |
|
73 | 72 |
|
74 | 73 | packages = self: { |
75 | 74 | inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation; |
76 | | - cardanoLib = localLib.iohkNix.cardanoLib; |
| 75 | + cardanoLib = walletPkgs.cardanoLib; |
77 | 76 | daedalus-bridge = self.bridgeTable.${nodeImplementation}; |
78 | 77 |
|
79 | 78 | nodejs = let |
|
296 | 295 |
|
297 | 296 | mkdir -p $out/{nix-support,cfg-files} |
298 | 297 | mkdir installers |
299 | | - cp -vir ${./installers/dhall} installers/dhall |
300 | 298 | cp -vir ${self.windowsIcons} installers/icons |
301 | 299 | cp -vir ${./package.json} package.json |
302 | 300 | chmod -R +w installers |
|
452 | 450 | }).installerBundle; |
453 | 451 | wrappedBundle = let |
454 | 452 | version = (builtins.fromJSON (builtins.readFile ./package.json)).version; |
455 | | - backend = "cardano-wallet-${nodeImplementation}"; |
456 | 453 | suffix = if buildNum == null then "" else "-${toString buildNum}"; |
457 | 454 | fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}-x86_64-linux.bin"; |
458 | 455 | in pkgs.runCommand fn {} '' |
|
0 commit comments