diff --git a/pkgs/top-level/dotnet-packages.nix b/pkgs/top-level/dotnet-packages.nix index 1a37d58c70d1..43182b3f2aaa 100644 --- a/pkgs/top-level/dotnet-packages.nix +++ b/pkgs/top-level/dotnet-packages.nix @@ -331,13 +331,20 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { Dafny = buildDotnetPackage rec { baseName = "Dafny"; - version = "1.9.8"; + version = "2.1.0"; src = fetchurl { url = "https://github.com/Microsoft/dafny/archive/v${version}.tar.gz"; - sha256 = "0n4pk4cv7d2zsn4xmyjlxvpfl9avq79r06c7kzmrng24p3k4qj6s"; + sha256 = "1iyhy0zpi6wvqif7826anzgdipgsy5bk775ds9qqwfw27j7x6fy5"; }; + postPatch = '' + sed -i \ + -e 's/ Visible="False"//' \ + -e "s/Exists(\$(CodeContractsInstallDir))/Exists('\$(CodeContractsInstallDir)')/" \ + Source/*/*.csproj + ''; + preBuild = '' ln -s ${pkgs.z3} Binaries/z3 ''; @@ -345,7 +352,7 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { buildInputs = [ Boogie ]; xBuildFiles = [ "Source/Dafny.sln" ]; - xBuildFlags = [ ]; + xBuildFlags = [ "/p:Configuration=Checked" "/p:Platform=Any CPU" "/t:Rebuild" ]; outputFiles = [ "Binaries/*" ];