Merge pull request #259398 from whonore/update-dafny-4.3.0

authored by Guillaume Maudoux and committed by GitHub 07215db4 173a07ff

+22 -14
+22 -14
pkgs/applications/science/logic/dafny/default.nix
··· 8 8 9 9 buildDotnetModule rec { 10 10 pname = "Dafny"; 11 - version = "4.2.0"; 11 + version = "4.3.0"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "dafny-lang"; 15 15 repo = "dafny"; 16 16 rev = "v${version}"; 17 - sha256 = "sha256-RSGaOgGf3m94t3SKnvSPqz0VHhWr6NmIMtGsmOynMaM="; 17 + hash = "sha256-bnKaaqh1/921SRwnwqgYb31SJ8vguEBtzywPTz79S6I="; 18 18 }; 19 19 20 - postPatch = '' 21 - cp ${writeScript "fake-gradlew-for-dafny" '' 22 - mkdir -p build/libs/ 23 - javac $(find -name "*.java" | grep "^./src/main") -d classes 24 - jar cf build/libs/DafnyRuntime-${version}.jar -C classes dafny 25 - ''} Source/DafnyRuntime/DafnyRuntimeJava/gradlew 20 + postPatch = 21 + # This version number seems to be hardcoded and didn't get updated with the 22 + # version bump from 4.2.0 to 4.3.0. 23 + let dafnyRuntimeJarVersion = "4.2.0"; 24 + in '' 25 + cp ${ 26 + writeScript "fake-gradlew-for-dafny" '' 27 + mkdir -p build/libs/ 28 + javac $(find -name "*.java" | grep "^./src/main") -d classes 29 + jar cf build/libs/DafnyRuntime-${dafnyRuntimeJarVersion}.jar -C classes dafny 30 + ''} Source/DafnyRuntime/DafnyRuntimeJava/gradlew 26 31 27 - # Needed to fix 28 - # "error NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application." 29 - substituteInPlace Source/DafnyRuntime/DafnyRuntime.csproj \ 30 - --replace TargetFrameworks TargetFramework \ 31 - --replace "netstandard2.0;net452" net6.0 32 - ''; 32 + # Needed to fix 33 + # "error NETSDK1129: The 'Publish' target is not supported without 34 + # specifying a target framework. The current project targets multiple 35 + # frameworks, you must specify the framework for the published 36 + # application." 37 + substituteInPlace Source/DafnyRuntime/DafnyRuntime.csproj \ 38 + --replace TargetFrameworks TargetFramework \ 39 + --replace "netstandard2.0;net452" net6.0 40 + ''; 33 41 34 42 buildInputs = [ jdk11 ]; 35 43 nugetDeps = ./deps.nix;