Re: [Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

On Thu, Jun 16, 2011 at 6:18 PM, Ryan Yates
There is a nice table in the cabal docs that explains how prefix gets used:
http://www.haskell.org/ghc/docs/7.0.4/html/Cabal/builders.html#simple-paths
For Vista and above C:\Documents and settings\myusername\ is C:\Users\myusername. The equivalent to $HOME on Windows would be $USERPROFILE but the syntax of expanding an environment variable is going to depend on the shell you are using:
cmd window: cabal install --prefix=%USERPROFILE% --user PowerShell: cabal install --prefix=${env:USERPROFILE} --user msys window: cabal install --prefix=$USERPROFILE --user
Note that msys does define $HOME and it is a different physical path than $USERPROFILE.
Ryan, thanks! This win32 $HOME story is clear now. And why not just use: "cabal install" instead of: "cabal install --prefix=%USERPROFILE% --user" for win32 platform? Where in this case "cabal install" root will be?

I never set the prefix manually and just use the default. The default
for Windows is $APPDATA/Cabal. Where that ends up depends on your
version of Windows. On Windows "--user" is also the default.
On Thu, Jun 16, 2011 at 10:47 AM, Dmitri O.Kondratiev
On Thu, Jun 16, 2011 at 6:18 PM, Ryan Yates
wrote: There is a nice table in the cabal docs that explains how prefix gets used:
http://www.haskell.org/ghc/docs/7.0.4/html/Cabal/builders.html#simple-paths
For Vista and above C:\Documents and settings\myusername\ is C:\Users\myusername. The equivalent to $HOME on Windows would be $USERPROFILE but the syntax of expanding an environment variable is going to depend on the shell you are using:
cmd window: cabal install --prefix=%USERPROFILE% --user PowerShell: cabal install --prefix=${env:USERPROFILE} --user msys window: cabal install --prefix=$USERPROFILE --user
Note that msys does define $HOME and it is a different physical path than $USERPROFILE.
Ryan, thanks! This win32 $HOME story is clear now. And why not just use: "cabal install" instead of: "cabal install --prefix=%USERPROFILE% --user" for win32 platform? Where in this case "cabal install" root will be?
participants (2)
-
Dmitri O.Kondratiev
-
Ryan Yates