View on GitHub
File Changes
+
{ target, pkgs, haskellPackages, system, crossSystem, jormungandr }:
+

                      
+
let
+
  commonLib = import ./nix/iohk-common.nix {};
+
  pkgsCross = commonLib.getPkgs { crossSystem = pkgs.lib.systems.examples.mingwW64; };
+
  cardano-shell-src = pkgs.fetchFromGitHub {
+
    owner = "input-output-hk";
+
    repo = "cardano-shell";
+
    rev = "efba204c14a83b9e1af9bb138c2d551fe3d7a43e";
+
    sha256 = "0cr260b1drj4yal91fxcai9007jgbi2i2mh3mjnkq2rzjz6rvh8s";
+
  };
+
  cardano-shell = import cardano-shell-src { inherit system crossSystem; }; # todo, shell should accept target
+
in pkgs.runCommandCC "daedalus-bridge" {} ''
+
  mkdir -pv $out
+
  cd $out
+
  cp ${haskellPackages.cardano-wallet-jormungandr.components.exes.cardano-wallet-jormungandr}/bin/cardano-wallet-jormungandr* .
+
  cp ${cardano-shell.nix-tools.cexes.cardano-launcher.cardano-launcher}/bin/cardano-launcher* .
+
  #cp {nix-tools.cexes.cardano-node.cardano-node}/bin/cardano-node* .
+
  ${pkgs.lib.optionalString (target == "x86_64-windows") ''
+
    echo ${jormungandr}
+
    cp ${pkgsCross.libffi}/bin/libffi-6.dll .
+
    cp ${pkgsCross.openssl.out}/lib/libeay32.dll .
+
  ''}
+
  ${pkgs.lib.optionalString (target == "x86_64-linux") ''
+
    chmod +w -R .
+
    for bin in cardano-launcher; do
+
      strip $bin
+
      patchelf --shrink-rpath $bin
+
    done
+
  ''}
+
''
m
+21/-8
-
{ system ? builtins.currentSystem
-
, crossSystem ? null
-
, config ? {}
-
# Import IOHK common nix lib
-
, iohkLib ? import ./nix/iohk-common.nix { inherit system crossSystem config; }
-
# Use nixpkgs pin from iohkLib
-
, pkgs ? iohkLib.pkgs
+
{ config ? {}
+
, target ? builtins.currentSystem
}:

                      
-
with import ./nix/util.nix { inherit pkgs; };

                      
+
let
+
  commonLib = import ./nix/iohk-common.nix {};
+
  lib = commonLib.pkgs.lib;
+
  systemTable = {
+
    x86_64-windows = builtins.currentSystem;
+
  };
+
  crossSystemTable = {
+
    x86_64-windows = lib.systems.examples.mingwW64;
+
  };
+
  system = systemTable.${target} or target;
+
  crossSystem = crossSystemTable.${target} or null;
+
  # Import IOHK common nix lib
+
  iohkLib = import ./nix/iohk-common.nix { inherit system crossSystem config; };
+
  # Use nixpkgs pin from iohkLib
+
  pkgs = iohkLib.pkgs;
+
in
+
with import ./nix/util.nix { inherit pkgs; };
let
  haskell = iohkLib.nix-tools.haskell { inherit pkgs; };
  src = iohkLib.cleanSourceHaskell ./.;
  tests = collectComponents "tests" isCardanoWallet haskellPackages;
  benchmarks = collectComponents "benchmarks" isCardanoWallet haskellPackages;

                      
+
  daedalus-bridge = import ./daedalus-bridge.nix { inherit target pkgs haskellPackages system crossSystem jormungandr; };
+

                      
  shell = haskellPackages.shellFor {
    name = "cardano-wallet-shell";
    packages = ps: with ps; [