diff options
Diffstat (limited to 'pkgs/applications/science/logic/dafny/default.nix')
-rw-r--r-- | pkgs/applications/science/logic/dafny/default.nix | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/pkgs/applications/science/logic/dafny/default.nix b/pkgs/applications/science/logic/dafny/default.nix index f85e6cf22879d..93ae5c92b32fe 100644 --- a/pkgs/applications/science/logic/dafny/default.nix +++ b/pkgs/applications/science/logic/dafny/default.nix @@ -8,32 +8,37 @@ buildDotnetModule rec { pname = "Dafny"; - version = "4.6.0"; + version = "4.7.0"; src = fetchFromGitHub { owner = "dafny-lang"; repo = "dafny"; rev = "v${version}"; - hash = "sha256-3t0drxM7PZzrLbxBKYa6Gja2u6GK6Pc+ejoswag3P3k="; + hash = "sha256-XoSk08TVv17YyuTsRJ25e6bwSwKIF2+HjF5nFaul8+M="; }; - postPatch = '' - cp ${ - writeScript "fake-gradlew-for-dafny" '' - mkdir -p build/libs/ - javac $(find -name "*.java" | grep "^./src/main") -d classes - jar cf build/libs/DafnyRuntime-${version}.jar -C classes dafny - ''} Source/DafnyRuntime/DafnyRuntimeJava/gradlew + postPatch = + let + # This file wasn't updated between 4.6.0 and 4.7.0. + runtimeJarVersion = "4.6.0"; + in + '' + cp ${ + writeScript "fake-gradlew-for-dafny" '' + mkdir -p build/libs/ + javac $(find -name "*.java" | grep "^./src/main") -d classes + jar cf build/libs/DafnyRuntime-${runtimeJarVersion}.jar -C classes dafny + ''} Source/DafnyRuntime/DafnyRuntimeJava/gradlew - # Needed to fix - # "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." - substituteInPlace Source/DafnyRuntime/DafnyRuntime.csproj \ - --replace TargetFrameworks TargetFramework \ - --replace "netstandard2.0;net452" net6.0 - ''; + # Needed to fix + # "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." + substituteInPlace Source/DafnyRuntime/DafnyRuntime.csproj \ + --replace-warn TargetFrameworks TargetFramework \ + --replace-warn "netstandard2.0;net452" net6.0 + ''; buildInputs = [ jdk11 ]; nugetDeps = ./deps.nix; |