diff options
author | Guillaume Maudoux <layus.on@gmail.com> | 2016-09-01 09:36:56 +0200 |
---|---|---|
committer | Guillaume Maudoux <layus.on@gmail.com> | 2017-02-07 10:13:42 +0100 |
commit | aeaf893e5733cb333256cb46f3925d69be103e38 (patch) | |
tree | 7f40fe65073a3dcc3b9403d7fd87e42b5421f9a2 | |
parent | ccb2d83980f3a871cf603ff00234020dd1d38add (diff) | |
download | nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar.gz nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar.bz2 nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar.lz nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar.xz nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.tar.zst nixlib-aeaf893e5733cb333256cb46f3925d69be103e38.zip |
dafny: init at v1.9.8
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/dotnet-packages.nix | 45 |
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 299e4d1b8461..e1cad0b78107 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16993,6 +16993,8 @@ with pkgs; ### SCIENCE/PROGRAMMING + dafny = dotnetPackages.Dafny; + plm = callPackage ../applications/science/programming/plm { }; ### SCIENCE/LOGIC diff --git a/pkgs/top-level/dotnet-packages.nix b/pkgs/top-level/dotnet-packages.nix index 0e53e820a39d..30267a5ad968 100644 --- a/pkgs/top-level/dotnet-packages.nix +++ b/pkgs/top-level/dotnet-packages.nix @@ -252,6 +252,51 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { }; }; + Dafny = buildDotnetPackage rec { + baseName = "Dafny"; + version = "1.9.8"; + + src = fetchurl { + url = "https://github.com/Microsoft/dafny/archive/v${version}.tar.gz"; + sha256 = "0n4pk4cv7d2zsn4xmyjlxvpfl9avq79r06c7kzmrng24p3k4qj6s"; + }; + + preBuild = '' + ln -s ${pkgs.z3} Binaries/z3 + ''; + + buildInputs = [ Boogie ]; + + xBuildFiles = [ "Source/Dafny.sln" ]; + xBuildFlags = [ ]; + + outputFiles = [ "Binaries/*" ]; + + # Do not wrap the z3 executable, only dafny-related ones. + exeFiles = [ "Dafny*.exe" ]; + + # Dafny needs mono in its path. + makeWrapperArgs = "--set PATH ${mono}/bin"; + + # Boogie as an input is not enough. Boogie libraries need to be at the same + # place as Dafny ones. Same for "*.dll.mdb". No idea why or how to fix. + postFixup = '' + for lib in ${Boogie}/lib/dotnet/${Boogie.baseName}/*.dll{,.mdb}; do + ln -s $lib $out/lib/dotnet/${baseName}/ + done + # We generate our own executable scripts + rm -f $out/lib/dotnet/${baseName}/dafny{,-server} + ''; + + meta = { + description = "A programming language with built-in specification constructs"; + homepage = "http://research.microsoft.com/dafny"; + maintainers = with maintainers; [ layus ]; + license = licenses.MIT; + platforms = with platforms; (linux ++ darwin); + }; + }; + Deedle = buildDotnetPackage rec { baseName = "Deedle"; version = "1.2.0"; |