Created
May 26, 2020 10:49
-
-
Save freeman42x/c6b5f6477a5d91e81a6b5f0035040b21 to your computer and use it in GitHub Desktop.
How can I update the following so that `nix-shell` will provide `cabal-install` and `ghc` in path when run?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
ghcVersion = "ghc865"; | |
misoPkgs = import (builtins.fetchTarball { | |
url = "https://github.com/dmjio/miso/archive/561ffad.tar.gz"; | |
sha256 = "1wwzckz2qxb873wdkwqmx9gmh0wshcdxi7gjwkba0q51jnkfdi41"; | |
}) {}; | |
in | |
with misoPkgs.pkgs; | |
with haskell.packages."${ghcVersion}"; | |
let runtimeDeps = [ nwjs ]; | |
app = callCabal2nix "haskell-editor-setup" ./. { miso = miso-jsaddle; }; | |
in | |
app.overrideAttrs (old: { | |
miso = miso-jsaddle; | |
# needs nw in RPATH in order to use propagatedBuildInputs -> useless for runtime | |
buildInputs = old.buildInputs ++ [ binutils makeWrapper ]; | |
postFixup = '' | |
mv $out/bin/haskell-editor-setup $out/bin/.haskell-editor-setup-wrapped | |
makeWrapper $out/bin/.haskell-editor-setup-wrapped $out/bin/haskell-editor-setup \ | |
--prefix PATH : ${lib.makeBinPath runtimeDeps} | |
''; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import ./default.nix).env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment