aboutsummaryrefslogblamecommitdiff
path: root/pkgs/crypto/cardano/default.nix
blob: 879fddb090d29593d4794c608c9a167cec4a7b36 (plain) (tree)
1
2
3
4
5
6
7
                   
   

                                                           

                                    
                                                   











                                                                                                         
                                     








                                                                                                                           
{ stdenv, mylibs }:
let
  daedalusSrc = (mylibs.fetchedGithub ./daedalus.json).src;
  daedalusOrig = (import daedalusSrc {}).daedalus;
  cfg = stdenv.mkDerivation rec {
    name = "launcher-config-custom";
    buildInputs = [ daedalusSrc daedalusOrig.cfg ];
    src = daedalusOrig.cfg;
    installPhase = ''
      cp -a $src $out
      chmod -R u+w $out
      cd $out/etc
      sed -e "/^walletPath/d" -e "/^walletArgs/d" launcher-config.yaml > launcher-config-server-only.yaml
      '';
  };
in
stdenv.mkDerivation rec {
  name = "daedalus-custom";
  src = daedalusOrig;
  buildInputs = [ cfg daedalusOrig ];
  installPhase = ''
    cp -a $src $out
    chmod -R u+w $out
    cd $out/bin
    sed -i -e "s@${builtins.storeDir}/[0-9a-z]*-daedalus-config@${cfg}/etc@" daedalus
    sed -e "s@${cfg}/etc/launcher-config.yaml@${cfg}/etc/launcher-config-server-only.yaml@" daedalus > daedalus-server-only
    chmod a+x daedalus-server-only
    '';
}