treewide: replace uses of ghc.name to find packages' datadir

main
sternenseemann 2 years ago
parent 456faf71e5
commit 6016ed5076
  1. 2
      nixos/modules/services/misc/gitit.nix
  2. 6
      pkgs/development/haskell-modules/configuration-common.nix

@ -10,7 +10,7 @@ let
toYesNo = b: if b then "yes" else "no";
gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
gititShared = with cfg.haskellPackages; gitit + "/share/" + ghc.targetPrefix + ghc.haskellCompilerName + "/" + gitit.pname + "-" + gitit.version;
gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self));

@ -613,7 +613,7 @@ self: super: {
doCheck = false; # https://github.com/kazu-yamamoto/ghc-mod/issues/335
executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.buildPackages.emacs];
postInstall = ''
local lispdir=( "$data/share/${self.ghc.name}/*/${drv.pname}-${drv.version}/elisp" )
local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/*/${drv.pname}-${drv.version}/elisp" )
make -C $lispdir
mkdir -p $data/share/emacs/site-lisp
ln -s "$lispdir/"*.el{,c} $data/share/emacs/site-lisp/
@ -648,7 +648,7 @@ self: super: {
# cannot easily byte-compile these files, unfortunately, because they
# depend on a new version of haskell-mode that we don't have yet.
postInstall = ''
local lispdir=( "$data/share/${self.ghc.name}/"*"/${drv.pname}-"*"/elisp" )
local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
mkdir -p $data/share/emacs
ln -s $lispdir $data/share/emacs/site-lisp
'';
@ -659,7 +659,7 @@ self: super: {
# We cannot easily byte-compile these files, unfortunately, because they
# depend on a new version of haskell-mode that we don't have yet.
postInstall = ''
local lispdir=( "$data/share/${self.ghc.name}/"*"/${drv.pname}-"*"/elisp" )
local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
mkdir -p $data/share/emacs
ln -s $lispdir $data/share/emacs/site-lisp
'';

Loading…
Cancel
Save