Unverified Commit be406552 authored by Lin Jian's avatar Lin Jian
Browse files

emacsPackages.cask: improve patch substitution

- use --replace-fail to fail fast
- use shell variable melpaVersion to avoid a string interperation
- use shell variable ename to be consistent with other code and to
  avoid hardcoding
parent 6d735180
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -74,10 +74,10 @@ melpaBuild (
      shut-up
    ];

    # use melpaVersion so that it works for unstable releases too
    postPatch = ''
      lispdir=$out/share/emacs/site-lisp/elpa/cask-${finalAttrs.melpaVersion} \
        substituteAllInPlace bin/cask
      # use melpaVersion so that it works for unstable releases too
      substituteInPlace bin/cask \
        --replace-fail @lispdir@ $out/share/emacs/site-lisp/elpa/$ename-$melpaVersion
    '';

    postInstall = ''