Skip to content

Commit 8cd737c

Browse files
committed
make package a revision instead. fixes #2
1 parent 84c1ff6 commit 8cd737c

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

8.6.1/ghc/tools/chocolateyInstall.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$version = '8.6.1'
1+
$version = 'ghc-8.6.1'
22
$packageName = 'ghc'
33
$url = 'https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-i386-unknown-mingw32.tar.xz'
44
$url64 = 'https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-x86_64-unknown-mingw32.tar.xz'

8.6.1a/ghc/ghc.nuspec

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Do not remove this test for UTF-8: if ??? doesn?t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
3+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<metadata>
5+
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
6+
<id>ghc</id>
7+
<title>GHC</title>
8+
<version>8.6.1.1</version>
9+
<authors>GHC Team</authors>
10+
<owners>Tamar Christina</owners>
11+
<summary>GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell.</summary>
12+
<description>Highlights:
13+
• GHC supports the entire Haskell 2010 language plus a wide variety of extensions.
14+
• GHC has particularly good support for concurrency and parallelism, including support for Software Transactional Memory (STM).
15+
• GHC generates fast code, particularly for concurrent programs. Take a look at GHC's performance on The Computer Language Benchmarks Game.
16+
• GHC works on several platforms including Windows, Mac, Linux, most varieties of Unix, and several different processor architectures. There are detailed instructions for porting GHC to a new platform.
17+
• GHC has extensive optimisation capabilities, including inter-module optimisation.
18+
• GHC compiles Haskell code either directly to native code or using LLVM as a back-end. GHC can also generate C code as an intermediate target for porting to new platforms. The interactive environment compiles Haskell to bytecode, and supports execution of mixed bytecode/compiled programs.
19+
• Profiling is supported, both by time/allocation and various kinds of heap profiling.
20+
• GHC comes with several libraries, and thousands more are available on Hackage.
21+
22+
There's an important change to path handling for Windows on 8.6.1.
23+
These changes mean that Haskell programs are no longer constraint to `MAX_PATH`. So passing a long path to `openFile` will just work.
24+
There are a few caveats to this such as you can't access `COM` devices via `COM1` etc anymore and instead need to use the full path `\\.\COM1` etc.
25+
This is all documented https://downloads.haskell.org/~ghc/8.6.1/docs/html/users_guide/win32-dlls.html#windows-file-paths
26+
</description>
27+
<projectUrl>https://www.haskell.org/ghc/</projectUrl>
28+
<tags>ghc haskell</tags>
29+
<copyright>Copyright 2017, The University Court of the University of Glasgow.</copyright>
30+
<licenseUrl>https://www.haskell.org/ghc/license</licenseUrl>
31+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
32+
<!-- Important note about https://cdn.rawgit.com: Files are cached permanently after the first request. Use commit URLs when updating the icon. -->
33+
<iconUrl>http://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Haskell-Logo.svg/2000px-Haskell-Logo.svg.png</iconUrl>
34+
<dependencies>
35+
<dependency id="cabal" version="2.4.0.0" />
36+
</dependencies>
37+
<releaseNotes>https://github.com/ghc/ghc/blob/ghc-8.6/docs/users_guide/8.6.1-notes.rst</releaseNotes>
38+
<docsUrl>https://downloads.haskell.org/~ghc/8.6.1/docs/html/</docsUrl>
39+
<mailingListUrl>https://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</mailingListUrl>
40+
<bugTrackerUrl>https://ghc.haskell.org/trac/ghc/</bugTrackerUrl>
41+
<projectSourceUrl>https://www.haskell.org/ghc/</projectSourceUrl>
42+
</metadata>
43+
<files>
44+
<file src="tools\**" target="tools" />
45+
</files>
46+
</package>
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
$version = '8.6.1'
2+
$packageName = 'ghc'
3+
$url = 'https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-i386-unknown-mingw32.tar.xz'
4+
$url64 = 'https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-x86_64-unknown-mingw32.tar.xz'
5+
6+
$binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
7+
$packageFullName = Join-Path $binRoot ($packageName + '-' + $version)
8+
$binPackageDir = Join-Path $packageFullName "bin"
9+
10+
$tmpPath = Join-Path $env:chocolateyPackageFolder tmp
11+
$tarFile = $packageName + "Install"
12+
$tarPath = Join-Path $tmpPath $tarFile
13+
$tmpFile = Join-Path $binRoot ($tarFile + "~")
14+
15+
Get-ChocolateyWebFile -PackageName $packageName -FileFullPath $tarPath `
16+
-Url $url -ChecksumType sha256 -Checksum 64e4ded48bd03ddd93401c3ff8a2016bc32c584ce27461d4028d6fddd56eea06 `
17+
-Url64bit $url64 -ChecksumType64 sha256 -Checksum64 7316d9cb5e486460476754f872c7bac30ee2082e42f46da4342f872d10b88099
18+
Get-ChocolateyUnzip -fileFullPath $tarPath -destination $binRoot
19+
Get-ChocolateyUnzip -fileFullPath $tmpFile -destination $binRoot
20+
rm $tmpFile # Clean up temporary file
21+
22+
Install-ChocolateyPath "$binPackageDir"
23+
24+
Write-Host "Hiding shims for `'$binRoot`'."
25+
$files = get-childitem $binRoot -include *.exe -recurse
26+
27+
foreach ($file in $files) {
28+
#generate an ignore file
29+
New-Item "$file.ignore" -type file -force | Out-Null
30+
}

0 commit comments

Comments
 (0)