Skip to content

Commit

Permalink
Fixed nix build and updated the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
saj122 committed Sep 15, 2023
1 parent 6a20e3b commit 249057b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ To build the command line interpreter, run the following commands from Src/Comma

```bash
$ dotnet build CommandLine.sln /p:Configuration=Debug|Release /p:Platform=x64|ARM64
$ dotnet ./bin/<Configuration>/<OS>/<PLATFORM>/net6.0/CommandLine.dll

For Windows x64
$ dotnet ./bin/<Configuration>/Windows/x64/net6.0/VUISIS.Formula.x64.dll

For Linux x64
$ dotnet ./bin/<Configuration>/Linux/x64/net6.0/VUISIS.Formula.x64.dll

For MacOS x64
$ dotnet ./bin/<Configuration>/MacOS/x64/net6.0/VUISIS.Formula.x64.dll

For MacOS ARM64
$ dotnet ./bin/<Configuration>/MacOS/ARM64/net6.0/VUISIS.Formula.ARM64.dll
```

To run unit tests with Formula, run the following command from
Expand Down
10 changes: 10 additions & 0 deletions Src/CommandLine/CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
<IsPackable>True</IsPackable>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::IsOSPlatform('Windows')) and '$(Platform)' == 'x64'">
<PropertyGroup>
<AssemblyName>VUISIS.Formula.x64</AssemblyName>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::IsOSPlatform('OSX')) and '$(Platform)' == 'x64'">
<PropertyGroup>
<AssemblyName>VUISIS.Formula.x64</AssemblyName>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::IsOSPlatform('OSX')) and '$(Platform)' == 'ARM64'">
<ItemGroup>
<None Include="bin\Release\MacOS\ARM64\net6.0\runtimes\osx-arm64\native\*" Pack="true" PackagePath="runtimes\osx-arm64\native"/>
Expand Down
4 changes: 2 additions & 2 deletions formula.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ buildDotnetModule rec {
dotnet-runtime = dotnetCorePackages.runtime_6_0;
dotnet-sdk = dotnetCorePackages.sdk_6_0;
postFixup = if stdenv.isLinux then ''
mv $out/bin/CommandLine $out/bin/formula
mv $out/bin/VUISIS.Formula.x64 $out/bin/formula
'' else lib.optionalString stdenv.isDarwin ''
makeWrapper ${dotnetCorePackages.runtime_6_0}/bin/dotnet $out/bin/formula \
--add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
--add-flags "$out/lib/formula-dotnet/VUISIS.Formula.x64.dll" \
--prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native
'';

Expand Down

0 comments on commit 249057b

Please sign in to comment.