2015-05-22 13:25:02 +00:00
{ stdenv
2021-01-10 11:03:59 +00:00
, lib
2015-05-22 13:25:02 +00:00
, pkgs
, buildDotnetPackage
2022-07-30 18:39:22 +00:00
, buildDotnetModule
2015-05-22 13:25:02 +00:00
, fetchurl
, fetchFromGitHub
, fetchNuGet
2020-06-14 09:58:12 +00:00
, glib
2015-05-22 13:25:02 +00:00
, mono
, overrides ? { }
} :
let self = dotnetPackages // overrides ; dotnetPackages = with self ; {
2015-06-12 15:06:32 +00:00
# BINARY PACKAGES
2015-05-22 13:25:02 +00:00
2016-05-08 19:19:35 +00:00
NUnit3 = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " N U n i t " ;
2016-05-08 19:19:35 +00:00
version = " 3 . 0 . 1 " ;
sha256 = " 1 g 3 j 3 k v g 9 v r a p b 1 v j g q 6 5 n v n 1 v g 7 b z m 6 6 w 7 y j n a i p 1 i w w 1 y n 1 b 0 p " ;
outputFiles = [ " l i b / * " ] ;
} ;
NUnit2 = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " N U n i t " ;
2015-05-22 13:25:02 +00:00
version = " 2 . 6 . 4 " ;
sha256 = " 1 a c w s m 7 p 9 3 b 1 h z f b 8 3 i a 3 3 1 4 5 x 0 w 6 f v d s f j m 9 x f l s i s l j x p d x 3 5 y " ;
outputFiles = [ " l i b / * " ] ;
2016-04-29 16:23:36 +00:00
} ;
2016-05-08 19:19:35 +00:00
NUnit = NUnit2 ;
2016-05-08 20:21:11 +00:00
NUnitConsole = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " N U n i t . C o n s o l e " ;
2016-05-08 20:21:11 +00:00
version = " 3 . 0 . 1 " ;
sha256 = " 1 5 4 b q w m 2 n 9 5 s y v 8 n w d 6 7 q h 8 q s v 0 b 0 h 5 z a p 6 0 s k 6 4 z 3 k d 3 a 9 f f i 5 p " ;
outputFiles = [ " t o o l s / * " ] ;
} ;
2016-04-29 16:23:36 +00:00
MaxMindDb = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " M a x M i n d . D b " ;
2016-04-29 16:23:36 +00:00
version = " 1 . 1 . 0 . 0 " ;
sha256 = " 0 l i x l 7 6 f 7 k 3 l d i q z g 9 4 z h 1 3 g n 8 2 w 5 m m 5 d x 7 2 y 9 7 f c q v p 8 g 6 n j 3 d s " ;
outputFiles = [ " l i b / * " ] ;
2016-04-29 16:24:26 +00:00
} ;
MaxMindGeoIP2 = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " M a x M i n d . G e o I P 2 " ;
2016-04-29 16:24:26 +00:00
version = " 2 . 3 . 1 " ;
sha256 = " 1 s 4 4 d v j n m j 1 a i m b r g k m p j 6 h 5 d n 1 w 6 a c g q j c h 1 a x c 7 6 y z 6 h w k n q g f " ;
outputFiles = [ " l i b / * " ] ;
2016-04-29 16:24:51 +00:00
} ;
SharpZipLib = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " S h a r p Z i p L i b " ;
2022-05-15 13:12:02 +00:00
version = " 1 . 3 . 3 " ;
sha256 = " s h a 2 5 6 - H W E Q T K h 9 K t w g / z I l 0 7 9 d A i H + o b 2 S h W F A q L g G 6 X g I M r 4 = " ;
2016-04-29 16:24:51 +00:00
outputFiles = [ " l i b / * " ] ;
2016-04-29 16:25:12 +00:00
} ;
2016-04-29 17:38:32 +00:00
StyleCopMSBuild = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " S t y l e C o p . M S B u i l d " ;
2016-04-29 17:38:32 +00:00
version = " 4 . 7 . 4 9 . 0 " ;
sha256 = " 0 r p f y v c g g m 8 8 1 y n v g r 1 7 k b x 5 h v j 7 i v l m s 0 b m s k m b 2 z y j l p d d x 0 3 6 " ;
outputFiles = [ " t o o l s / * " ] ;
} ;
2016-04-29 18:34:35 +00:00
StyleCopPlusMSBuild = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " S t y l e C o p P l u s . M S B u i l d " ;
2016-04-29 18:34:35 +00:00
version = " 4 . 7 . 4 9 . 5 " ;
sha256 = " 1 h v 4 l f x w 7 2 a q l 8 s i y q c 4 n 9 5 4 v z d z 8 p 6 j x 9 f 2 w r g z z 0 j y 1 k 9 8 x 2 m r " ;
outputFiles = [ " t o o l s / * " ] ;
} ;
2016-04-29 18:34:54 +00:00
RestSharp = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " R e s t S h a r p " ;
2022-10-10 07:40:05 +00:00
version = " 1 0 6 . 1 2 . 0 " ;
sha256 = " s h a 2 5 6 - N G z v e B y J v C R t H l I 2 C 8 d / m L s 3 a k y M m 7 7 N E R 8 T U G 6 H i D 4 = " ;
2016-04-29 18:34:54 +00:00
outputFiles = [ " l i b / * " ] ;
} ;
2016-04-29 17:19:53 +00:00
SharpFont = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " S h a r p F o n t " ;
2018-10-31 20:04:31 +00:00
version = " 4 . 0 . 1 " ;
sha256 = " 1 y d 3 c m 4 w w 0 h w 2 k 3 a y m f 7 9 2 h p 6 s k y g 8 q n 4 9 1 m 2 a 3 f h k z v s l 8 z 7 v s 8 " ;
2016-04-29 17:19:53 +00:00
outputFiles = [ " l i b / * " " c o n f i g / * " ] ;
} ;
2016-04-29 16:25:12 +00:00
SmartIrc4net = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " S m a r t I r c 4 n e t " ;
2016-04-29 16:25:12 +00:00
version = " 0 . 4 . 5 . 1 " ;
2017-11-21 18:24:06 +00:00
sha256 = " 1 d 5 3 1 s j 3 9 f v w m j 2 w g p l q f i f y 3 0 1 y 3 c w p 7 k w r 9 a i 5 h g r q 8 1 j m j n 2 b " ;
2016-04-29 16:25:12 +00:00
outputFiles = [ " l i b / * " ] ;
2015-05-22 13:25:02 +00:00
} ;
2016-04-29 16:25:39 +00:00
FuzzyLogicLibrary = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " F u z z y L o g i c L i b r a r y " ;
2016-04-29 16:25:39 +00:00
version = " 1 . 2 . 0 " ;
sha256 = " 0 x 5 1 8 i 8 d 3 r w 9 n 5 1 x w a w a 4 s y w v q d 7 2 2 a d j 7 k p c g c m 6 3 r 6 6 s 9 5 0 r 5 l " ;
outputFiles = [ " b i n / * " ] ;
} ;
2016-10-29 05:20:17 +00:00
OpenNAT = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " O p e n . N A T " ;
2016-10-29 05:20:17 +00:00
version = " 2 . 1 . 0 " ;
sha256 = " 1 j y d 3 0 f w y c d w x 5 c k 9 6 z h p 2 x f 2 0 y z 0 s p 7 g 3 p j b q h m a y 4 k d 3 2 2 m f w k " ;
outputFiles = [ " l i b / * " ] ;
} ;
2016-04-29 16:26:00 +00:00
MonoNat = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " M o n o . N a t " ;
2016-05-08 19:24:48 +00:00
version = " 1 . 2 . 2 4 " ;
sha256 = " 0 v f k a c h 1 1 k k c d 9 r c q z 3 s 3 8 m 7 0 d 5 s p y b 2 1 g l 9 9 i q n k l j x j 5 5 5 5 w j s " ;
2016-04-29 16:26:00 +00:00
outputFiles = [ " l i b / * " ] ;
} ;
2015-05-22 13:25:02 +00:00
NUnitRunners = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " N U n i t . R u n n e r s " ;
2015-05-22 13:25:02 +00:00
version = " 2 . 6 . 4 " ;
sha256 = " 1 1 n m i 7 v i k n 9 i d z 8 q c a d 9 z 7 f 7 3 a r s h 5 r w 1 8 f c 1 s r i 9 y w z 7 7 m p m 1 s 4 " ;
outputFiles = [ " t o o l s / * " ] ;
preInstall = " m v - v t o o l s / l i b / * t o o l s & & r m d i r - v t o o l s / l i b " ;
} ;
2015-06-12 15:06:32 +00:00
# SOURCE PACKAGES
2022-07-30 18:39:22 +00:00
Boogie = buildDotnetModule rec {
2021-11-08 16:12:26 +00:00
pname = " B o o g i e " ;
2022-07-30 18:39:22 +00:00
version = " 2 . 1 5 . 7 " ;
2017-02-03 01:16:45 +00:00
2022-07-30 18:47:45 +00:00
src = fetchFromGitHub {
2017-02-03 01:16:45 +00:00
owner = " b o o g i e - o r g " ;
repo = " b o o g i e " ;
2020-03-03 10:50:13 +00:00
rev = " v ${ version } " ;
2022-07-30 18:39:22 +00:00
sha256 = " 1 6 k d v k b x 2 z w j 7 m 4 3 c r a 1 2 v h c z b p j 2 3 w y r d n j 0 y g x f 7 n p 7 c 2 a a s s p " ;
2017-02-03 01:16:45 +00:00
} ;
2022-07-30 18:39:22 +00:00
projectFile = [ " S o u r c e / B o o g i e . s l n " ] ;
nugetDeps = ../development/dotnet-modules/boogie-deps.nix ;
2017-02-03 01:16:45 +00:00
postInstall = ''
2021-11-08 16:12:26 +00:00
mkdir - pv " $ o u t / l i b / d o t n e t / ${ pname } "
ln - sv " ${ pkgs . z3 } / b i n / z 3 " " $ o u t / l i b / d o t n e t / ${ pname } / z 3 . e x e "
2018-05-03 11:52:41 +00:00
# so that this derivation can be used as a vim plugin to install syntax highlighting
vimdir = $ out/share/vim-plugins/boogie
install - Dt $ vimdir/syntax / Util/vim/syntax/boogie.vim
mkdir $ vimdir/ftdetect
echo ' au BufRead , BufNewFile * . bpl set filetype = boogie' > $ vimdir/ftdetect/bpl.vim
2023-03-05 17:01:43 +00:00
mkdir - p $ out/share/nvim
ln - s $ out/share/vim-plugins/boogie $ out/share/nvim/site
2017-02-03 01:16:45 +00:00
'' ;
2022-07-30 18:39:22 +00:00
postFixup = ''
ln - s " $ o u t / b i n / B o o g i e D r i v e r " " $ o u t / b i n / b o o g i e "
2022-08-08 19:33:30 +00:00
rm - f $ out/bin / { Microsoft , NUnit3 , System } . * " $ o u t / b i n " /* T e s t s
2022-07-30 18:39:22 +00:00
'' ;
2021-01-10 11:03:59 +00:00
meta = with lib ; {
2017-02-03 01:16:45 +00:00
description = " A n i n t e r m e d i a t e v e r i f i c a t i o n l a n g u a g e " ;
homepage = " h t t p s : / / g i t h u b . c o m / b o o g i e - o r g / b o o g i e " ;
2018-05-03 11:52:41 +00:00
longDescription = ''
Boogie is an intermediate verification language ( IVL ) , intended as a
layer on which to build program verifiers for other languages .
This derivation may be used as a vim plugin to provide syntax highlighting .
'' ;
2017-02-03 01:16:45 +00:00
license = licenses . mspl ;
maintainers = [ maintainers . taktoa ] ;
platforms = with platforms ; ( linux ++ darwin ) ;
} ;
} ;
2023-04-29 16:57:45 +00:00
Dafny = buildDotnetModule rec {
2021-11-08 16:12:26 +00:00
pname = " D a f n y " ;
2023-04-29 16:57:45 +00:00
version = " 4 . 0 . 0 " ;
2016-09-01 07:36:56 +00:00
2022-08-08 19:30:26 +00:00
src = fetchFromGitHub {
2023-04-29 16:57:45 +00:00
owner = " d a f n y - l a n g " ;
2022-08-08 19:30:26 +00:00
repo = " d a f n y " ;
rev = " v ${ version } " ;
2023-04-29 16:57:45 +00:00
sha256 = " s h a 2 5 6 - 7 m V F D O R b u 9 K s J 4 I H 8 P r r p X E 7 x F r W V T y B m R a L 8 K t / g h Y = " ;
2016-09-01 07:36:56 +00:00
} ;
2022-08-10 10:34:31 +00:00
postPatch = ''
cp $ { pkgs . writeScript " f a k e - g r a d l e w - f o r - d a f n y " ''
mkdir - p build/libs /
javac $ ( find - name " * . j a v a " | grep " ^ . / s r c / m a i n " ) - d classes
jar cf build/libs/DafnyRuntime.jar - C classes dafny
'' } S o u r c e / D a f n y R u n t i m e / D a f n y R u n t i m e J a v a / g r a d l e w
2023-04-29 16:57:45 +00:00
# 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 " n e t s t a n d a r d 2 . 0 ; n e t 4 5 2 " net6 .0
2016-09-01 07:36:56 +00:00
'' ;
2023-04-29 16:57:45 +00:00
buildInputs = [ pkgs . jdk11 ] ;
2022-08-05 23:09:10 +00:00
nugetDeps = ../development/dotnet-modules/dafny-deps.nix ;
2016-09-01 07:36:56 +00:00
2023-04-29 16:57:45 +00:00
# Build just these projects. Building Source/Dafny.sln includes a bunch of
# unnecessary components like tests.
projectFile = [
" S o u r c e / D a f n y / D a f n y . c s p r o j "
" S o u r c e / D a f n y R u n t i m e / D a f n y R u n t i m e . c s p r o j "
" S o u r c e / D a f n y L a n g u a g e S e r v e r / D a f n y L a n g u a g e S e r v e r . c s p r o j "
] ;
2016-09-01 07:36:56 +00:00
2023-04-29 16:57:45 +00:00
executables = [ " D a f n y " ] ;
2022-08-05 23:09:10 +00:00
2023-04-29 16:57:45 +00:00
# Help Dafny find z3
makeWrapperArgs = [ " - - p r e f i x P A T H : ${ lib . makeBinPath [ z3 ] } " ] ;
2022-08-05 23:09:10 +00:00
2023-04-29 16:57:45 +00:00
postFixup = ''
ln - s " $ o u t / b i n / D a f n y " " $ o u t / b i n / d a f n y " || true
2016-09-01 07:36:56 +00:00
'' ;
2021-01-10 11:03:59 +00:00
meta = with lib ; {
2016-09-01 07:36:56 +00:00
description = " A p r o g r a m m i n g l a n g u a g e w i t h b u i l t - i n s p e c i f i c a t i o n c o n s t r u c t s " ;
2019-04-22 08:14:28 +00:00
homepage = " h t t p s : / / r e s e a r c h . m i c r o s o f t . c o m / d a f n y " ;
2016-09-01 07:36:56 +00:00
maintainers = with maintainers ; [ layus ] ;
2017-02-07 09:30:36 +00:00
license = licenses . mit ;
2016-09-01 07:36:56 +00:00
platforms = with platforms ; ( linux ++ darwin ) ;
} ;
} ;
2015-10-29 02:48:08 +00:00
MonoAddins = buildDotnetPackage rec {
2021-11-08 16:12:26 +00:00
pname = " M o n o . A d d i n s " ;
2015-10-29 02:48:08 +00:00
version = " 1 . 2 " ;
xBuildFiles = [
" M o n o . A d d i n s / M o n o . A d d i n s . c s p r o j "
" M o n o . A d d i n s . S e t u p / M o n o . A d d i n s . S e t u p . c s p r o j "
" M o n o . A d d i n s . G u i / M o n o . A d d i n s . G u i . c s p r o j "
" M o n o . A d d i n s . C e c i l R e f l e c t o r / M o n o . A d d i n s . C e c i l R e f l e c t o r . c s p r o j "
] ;
outputFiles = [ " b i n / * " ] ;
src = fetchFromGitHub {
owner = " m o n o " ;
repo = " m o n o - a d d i n s " ;
rev = " m o n o - a d d i n s - ${ version } " ;
sha256 = " 1 h n n 0 a 2 q s j c j p r s x a s 4 2 4 b z v h s d w y 0 y c 2 j j 5 x b p 6 9 8 c 0 m 9 k f k 2 4 y " ;
} ;
2016-09-11 21:24:51 +00:00
buildInputs = [ pkgs . gtk-sharp-2_0 ] ;
2015-10-29 02:48:08 +00:00
meta = {
description = " A g e n e r i c f r a m e w o r k f o r c r e a t i n g e x t e n s i b l e a p p l i c a t i o n s " ;
2020-04-01 01:11:51 +00:00
homepage = " h t t p s : / / w w w . m o n o - p r o j e c t . c o m / M o n o . A d d i n s " ;
2015-10-29 02:48:08 +00:00
longDescription = ''
A generic framework for creating extensible applications ,
and for creating libraries which extend those applications .
'' ;
2021-01-10 11:03:59 +00:00
license = lib . licenses . mit ;
2015-10-29 02:48:08 +00:00
} ;
} ;
2018-09-14 23:49:57 +00:00
NewtonsoftJson = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " N e w t o n s o f t . J s o n " ;
2018-09-14 23:49:57 +00:00
version = " 1 1 . 0 . 2 " ;
sha256 = " 0 7 n a 2 7 n 4 m l w 7 7 f 3 h g 5 j p a y z x l l 7 f 4 g y n a 6 x 7 k 9 c y b m x p b s 6 l 7 7 k 7 " ;
outputFiles = [ " * " ] ;
2015-05-22 13:25:02 +00:00
} ;
2021-07-21 15:56:36 +00:00
Nuget = buildDotnetPackage rec {
2021-11-08 16:12:26 +00:00
pname = " N u g e t " ;
2023-02-27 11:12:01 +00:00
version = " 6 . 3 . 1 . 1 " ;
2015-05-22 13:25:02 +00:00
src = fetchFromGitHub {
owner = " m o n o " ;
2021-07-21 15:56:36 +00:00
repo = " l i n u x - p a c k a g i n g - n u g e t " ;
rev = " u p s t r e a m / ${ version } . b i n " ;
2023-02-27 11:12:01 +00:00
sha256 = " s h a 2 5 6 - D 7 F 4 B 2 3 H K 5 E l Y 6 8 P Y K V D s y i 8 O F 0 D L q q U q Q z j 5 C p M f k c = " ;
2015-05-22 13:25:02 +00:00
} ;
2021-07-20 18:30:08 +00:00
# configurePhase breaks the binary and results in
# `File does not contain a valid CIL image.`
dontConfigure = true ;
2021-07-20 09:53:09 +00:00
dontBuild = true ;
2021-07-21 15:56:36 +00:00
dontPlacateNuget = true ;
2015-05-22 13:25:02 +00:00
outputFiles = [ " * " ] ;
2018-03-08 21:08:23 +00:00
exeFiles = [ " n u g e t . e x e " ] ;
2015-05-22 13:25:02 +00:00
} ;
2018-09-15 14:02:55 +00:00
Paket = fetchNuGet {
2021-11-08 16:12:26 +00:00
pname = " P a k e t " ;
2018-09-15 14:02:55 +00:00
version = " 5 . 1 7 9 . 1 " ;
sha256 = " 1 1 r z n a 0 3 i 1 4 5 q j 0 8 h w r y n y a 5 4 8 f w k 8 x z x m g 6 5 s w y a f 1 9 j d 7 g z g 8 2 " ;
outputFiles = [ " * " ] ;
2015-05-22 13:25:02 +00:00
} ;
} ; in self