diff --git a/Elixir/Elixir.nuspec b/Elixir/Elixir.nuspec new file mode 100644 index 0000000..aaab287 --- /dev/null +++ b/Elixir/Elixir.nuspec @@ -0,0 +1,31 @@ + + + + Elixir + Elixir + 0.10.0 + Jose Valim + Ethan J Brown + Elixir is a functional meta-programming aware language built on top of the Erlang VM. + Elixir is a functional meta-programming aware language built on top of the Erlang VM. It is a dynamic language with flexible syntax with macros support that leverages Erlang's abilities to build concurrent, distributed, fault-tolerant applications with hot code upgrades. + +Elixir also provides first-class support for pattern matching, polymorphism via protocols (similar to Clojure's), aliases and associative data structures (usually known as dicts or hashes in other programming languages). + +Finally, Elixir and Erlang share the same bytecode and data types. This means you can invoke Erlang code from Elixir (and vice-versa) without any conversion or performance hit. This allows a developer to mix the expressiveness of Elixir with the robustness and performance of Erlang. + https://github.com/elixir-lang/elixir/releases/ + http://elixir-lang.org/ + erlang concurrent programming language sdk otp elixir ruby + https://github.com/elixir-lang/elixir/blob/master/LICENSE + false + https://secure.gravatar.com/avatar/4c5c2c297ed9f4664cfbe7733a011fb2?s=400&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png + + + + + + + + + + + diff --git a/Elixir/tools/chocolateyInstall.ps1 b/Elixir/tools/chocolateyInstall.ps1 new file mode 100644 index 0000000..b5f56ef --- /dev/null +++ b/Elixir/tools/chocolateyInstall.ps1 @@ -0,0 +1,36 @@ +$package = 'Elixir' +$version = '0.10.0' + +try { + $params = @{ + PackageName = $package; + FileType = 'zip'; + Url = "https://github.com/elixir-lang/elixir/releases/download/v$version/v$version.zip"; + UnzipLocation = Join-Path $Env:SystemDrive 'tools'; + } + + $binRoot = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root + if (Test-Path $binRoot) + { + $params.UnzipLocation = $binRoot + } + + $params.UnzipLocation = Join-Path $params.UnzipLocation 'Elixir' + + if (!(Test-Path($params.UnzipLocation))) + { + New-Item $params.UnzipLocation -Type Directory | Out-Null + } + + Install-ChocolateyZipPackage @params + + $elixirBin = Join-Path $params.UnzipLocation 'bin' + + Install-ChocolateyPath $elixirBin + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +} + diff --git a/Elixir/tools/chocolateyUninstall.ps1 b/Elixir/tools/chocolateyUninstall.ps1 new file mode 100644 index 0000000..391b10d --- /dev/null +++ b/Elixir/tools/chocolateyUninstall.ps1 @@ -0,0 +1,35 @@ +$package = 'Elixir' + +try { + $location = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root + if (!(Test-Path $location)) + { + $location = Join-Path $Env:SystemDrive 'tools' + } + $location = Join-Path $location $package + + if (Test-Path $location) + { + Remove-Item $location -Recurse -Force + } + + $binLocation = (Join-Path $location 'bin') -replace '\\', '\\' + + $userPaths = [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' | + ? { ($_ -notmatch $binLocation) -and (![String]::IsNullOrEmpty($_)) } | + Select-Object -Unique + + [Environment]::SetEnvironmentVariable('Path', ($userPaths -join ';'), 'User') + + Write-Host @'Please restart your current shell session to access Elixir commands: + elixir + elixirc + mix + iex.bat (use batch file within Powershell due to name collision) + '@ + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +}