git.iko.soy/typeable/nixpkgs
on master help sign in
tamarin-prover: 1.4.0 -> 1.4.1, bundled sapic

With this, we can drop the old 1.4.0 patches for 8.4 support, since those are now upstream. Furthermore, SAPIC Is now bundled inside Tamarin, so we can drop the external dependency. (This includes a patch that compiles SAPIC to native code, much like the original, to reduce closure size.) Signed-off-by: Austin Seipp <aseipp@pobox.com>

commitfc159594a768143812be50e73a95a610cdb97a47 authorAustin Seipp <aseipp@pobox.com> dateFri 18 Jan 2019, 13:22 (8 years ago) parent531bba6
6 files changed+92−389
pkgs/applications/science/logic/tamarin-prover/default.nix+14−9 pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-term.patch−109 pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-theory.patch−130 pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-utils.patch−140 pkgs/applications/science/logic/tamarin-prover/sapic-native.patch+77 pkgs/top-level/all-packages.nix+1−1
pkgs/applications/science/logic/tamarin-prover/default.nix+14−9
@@ -1,15 +1,15 @@
11{ haskellPackages, mkDerivation, fetchFromGitHub, lib
22# the following are non-haskell dependencies
3−, makeWrapper, which, maude, graphviz, sapic
3+, makeWrapper, which, maude, graphviz, ocaml
44}:
55
66let
7− version = "1.4.0";
7+ version = "1.4.1";
88 src = fetchFromGitHub {
99 owner = "tamarin-prover";
1010 repo = "tamarin-prover";
11− rev = "7ced07a69f8e93178f9a95797479277a736ae572";
12− sha256 = "02pyw22h90228g6qybjpdvpcm9d5lh96f5qwmy2hv2bylz05z3nn";
11+ rev = "d2e1c57311ce4ed0ef46d0372c4995b8fdc25323";
12+ sha256 = "1bf2qvb646jg3qxd6jgp9ja3wlr888wchxi9mfr3kg7hfn63vxbq";
1313 };
1414
1515 # tamarin has its own dependencies, but they're kept inside the repo,
@@ -32,7 +32,6 @@ let
3232
3333 tamarin-prover-utils = mkDerivation (common "tamarin-prover-utils" (src + "/lib/utils") // {
3434 postPatch = replaceSymlinks;
35− patches = [ ./ghc-8.4-support-utils.patch ];
3635 libraryHaskellDepends = with haskellPackages; [
3736 base base64-bytestring binary blaze-builder bytestring containers
3837 deepseq dlist fclabels mtl pretty safe SHA syb time transformers
@@ -41,7 +40,6 @@ let
4140
4241 tamarin-prover-term = mkDerivation (common "tamarin-prover-term" (src + "/lib/term") // {
4342 postPatch = replaceSymlinks;
44− patches = [ ./ghc-8.4-support-term.patch ];
4543 libraryHaskellDepends = (with haskellPackages; [
4644 attoparsec base binary bytestring containers deepseq dlist HUnit
4745 mtl process safe
@@ -50,7 +48,6 @@ let
5048
5149 tamarin-prover-theory = mkDerivation (common "tamarin-prover-theory" (src + "/lib/theory") // {
5250 postPatch = replaceSymlinks;
53− patches = [ ./ghc-8.4-support-theory.patch ];
5451 doHaddock = false; # broken
5552 libraryHaskellDepends = (with haskellPackages; [
5653 aeson aeson-pretty base binary bytestring containers deepseq dlist
@@ -75,20 +72,28 @@ mkDerivation (common "tamarin-prover" src // {
7572
7673 sed -ie 's~\( *, \)mtl~&\
7774 \1monad-control~' tamarin-prover.cabal
75+
76+ patch -p1 < ${./sapic-native.patch}
77+ '';
78+
79+ postBuild = ''
80+ cd plugins/sapic && make sapic && cd ../..
7881 '';
7982
8083 # wrap the prover to be sure it can find maude, sapic, etc
81− executableToolDepends = [ makeWrapper which maude graphviz sapic ];
84+ executableToolDepends = [ makeWrapper which maude graphviz ];
8285 postInstall = ''
8386 wrapProgram $out/bin/tamarin-prover \
84− --prefix PATH : ${lib.makeBinPath [ which maude graphviz sapic ]}
87+ --prefix PATH : ${lib.makeBinPath [ which maude graphviz ]}
8588 # so that the package can be used as a vim plugin to install syntax coloration
8689 install -Dt $out/share/vim-plugins/tamarin-prover/syntax/ etc/{spthy,sapic}.vim
8790 install etc/filetype.vim -D $out/share/vim-plugins/tamarin-prover/ftdetect/tamarin.vim
91+ install -m0755 ./plugins/sapic/sapic $out/bin/sapic
8892 '';
8993
9094 checkPhase = "./dist/build/tamarin-prover/tamarin-prover test";
9195
96+ executableSystemDepends = [ ocaml ];
9297 executableHaskellDepends = (with haskellPackages; [
9398 base binary binary-orphans blaze-builder blaze-html bytestring
9499 cmdargs conduit containers monad-control deepseq directory fclabels file-embed
pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-term.patchdeleted−109
@@ -1,109 +0,0 @@
1−From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001
2−From: Felix Yan <felixonmars@archlinux.org>
3−Date: Fri, 18 May 2018 16:24:41 +0800
4−Subject: [PATCH] GHC 8.4 support
5−
6−---
7− src/Term/Maude/Signature.hs | 8 ++--
8− src/Term/Rewriting/Definitions.hs | 23 ++++++----
9− src/Term/Unification.hs | 4 +-
10− 11 files changed, 79 insertions(+), 48 deletions(-)
11−
12−diff --git a/src/Term/Maude/Signature.hs b/src/Term/Maude/Signature.hs
13−index 98c25d9f..1a4ce82f 100644
14−--- a/src/Term/Maude/Signature.hs
15−+++ b/src/Term/Maude/Signature.hs
16−@@ -104,9 +104,9 @@ maudeSig msig@(MaudeSig {enableDH,enableBP,enableMSet,enableXor,enableDiff=_,stF
17− `S.union` dhReducibleFunSig `S.union` bpReducibleFunSig `S.union` xorReducibleFunSig
18−
19− -- | A monoid instance to combine maude signatures.
20−-instance Monoid MaudeSig where
21−- (MaudeSig dh1 bp1 mset1 xor1 diff1 stFunSyms1 stRules1 _ _) `mappend`
22−- (MaudeSig dh2 bp2 mset2 xor2 diff2 stFunSyms2 stRules2 _ _) =
23−+instance Semigroup MaudeSig where
24−+ MaudeSig dh1 bp1 mset1 xor1 diff1 stFunSyms1 stRules1 _ _ <>
25−+ MaudeSig dh2 bp2 mset2 xor2 diff2 stFunSyms2 stRules2 _ _ =
26− maudeSig (mempty {enableDH=dh1||dh2
27− ,enableBP=bp1||bp2
28− ,enableMSet=mset1||mset2
29−@@ -114,6 +114,8 @@ instance Monoid MaudeSig where
30− ,enableDiff=diff1||diff2
31− ,stFunSyms=S.union stFunSyms1 stFunSyms2
32− ,stRules=S.union stRules1 stRules2})
33−+
34−+instance Monoid MaudeSig where
35− mempty = MaudeSig False False False False False S.empty S.empty S.empty S.empty
36−
37− -- | Non-AC function symbols.
38−diff --git a/src/Term/Rewriting/Definitions.hs b/src/Term/Rewriting/Definitions.hs
39−index bd942b6a..18562e4e 100644
40−--- a/src/Term/Rewriting/Definitions.hs
41−+++ b/src/Term/Rewriting/Definitions.hs
42−@@ -44,10 +44,12 @@ evalEqual (Equal l r) = l == r
43− instance Functor Equal where
44− fmap f (Equal lhs rhs) = Equal (f lhs) (f rhs)
45−
46−+instance Semigroup a => Semigroup (Equal a) where
47−+ (Equal l1 r1) <> (Equal l2 r2) =
48−+ Equal (l1 <> l2) (r1 <> r2)
49−+
50− instance Monoid a => Monoid (Equal a) where
51− mempty = Equal mempty mempty
52−- (Equal l1 r1) `mappend` (Equal l2 r2) =
53−- Equal (l1 `mappend` l2) (r1 `mappend` r2)
54−
55− instance Foldable Equal where
56− foldMap f (Equal l r) = f l `mappend` f r
57−@@ -104,14 +106,15 @@ instance Functor Match where
58− fmap _ NoMatch = NoMatch
59− fmap f (DelayedMatches ms) = DelayedMatches (fmap (f *** f) ms)
60−
61−+instance Semigroup (Match a) where
62−+ NoMatch <> _ = NoMatch
63−+ _ <> NoMatch = NoMatch
64−+ DelayedMatches ms1 <> DelayedMatches ms2 =
65−+ DelayedMatches (ms1 <> ms2)
66−+
67− instance Monoid (Match a) where
68− mempty = DelayedMatches []
69−
70−- NoMatch `mappend` _ = NoMatch
71−- _ `mappend` NoMatch = NoMatch
72−- DelayedMatches ms1 `mappend` DelayedMatches ms2 =
73−- DelayedMatches (ms1 `mappend` ms2)
74−-
75−
76− instance Foldable Match where
77− foldMap _ NoMatch = mempty
78−@@ -136,10 +139,12 @@ data RRule a = RRule a a
79− instance Functor RRule where
80− fmap f (RRule lhs rhs) = RRule (f lhs) (f rhs)
81−
82−+instance Monoid a => Semigroup (RRule a) where
83−+ (RRule l1 r1) <> (RRule l2 r2) =
84−+ RRule (l1 <> l2) (r1 <> r2)
85−+
86− instance Monoid a => Monoid (RRule a) where
87− mempty = RRule mempty mempty
88−- (RRule l1 r1) `mappend` (RRule l2 r2) =
89−- RRule (l1 `mappend` l2) (r1 `mappend` r2)
90−
91− instance Foldable RRule where
92− foldMap f (RRule l r) = f l `mappend` f r
93−diff --git a/src/Term/Unification.hs b/src/Term/Unification.hs
94−index e1de0163..7ce6bb41 100644
95−--- a/src/Term/Unification.hs
96−+++ b/src/Term/Unification.hs
97−@@ -265,9 +265,11 @@ unifyRaw l0 r0 = do
98−
99− data MatchFailure = NoMatcher | ACProblem
100−
101−+instance Semigroup MatchFailure where
102−+ _ <> _ = NoMatcher
103−+
104− instance Monoid MatchFailure where
105− mempty = NoMatcher
106−- mappend _ _ = NoMatcher
107−
108− -- | Ensure that the computed substitution @sigma@ satisfies
109− -- @t ==_AC apply sigma p@ after the delayed equations are solved.
pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-theory.patchdeleted−130
@@ -1,130 +0,0 @@
1−From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001
2−From: Felix Yan <felixonmars@archlinux.org>
3−Date: Fri, 18 May 2018 16:24:41 +0800
4−Subject: [PATCH] GHC 8.4 support
5−
6−---
7− src/Theory/Proof.hs | 43 +++++++++++--------
8− 11 files changed, 79 insertions(+), 48 deletions(-)
9−
10−diff --git a/src/Theory/Constraint/Solver/Reduction.hs b/src/Theory/Constraint/Solver/Reduction.hs
11−index ddbc965a..6daadd0d 100644
12−--- a/src/Theory/Constraint/Solver/Reduction.hs
13−+++ b/src/Theory/Constraint/Solver/Reduction.hs
14−@@ -139,13 +139,14 @@ execReduction m ctxt se fs =
15− data ChangeIndicator = Unchanged | Changed
16− deriving( Eq, Ord, Show )
17−
18−+instance Semigroup ChangeIndicator where
19−+ Changed <> _ = Changed
20−+ _ <> Changed = Changed
21−+ Unchanged <> Unchanged = Unchanged
22−+
23− instance Monoid ChangeIndicator where
24− mempty = Unchanged
25−
26−- Changed `mappend` _ = Changed
27−- _ `mappend` Changed = Changed
28−- Unchanged `mappend` Unchanged = Unchanged
29−-
30− -- | Return 'True' iff there was a change.
31− wasChanged :: ChangeIndicator -> Bool
32− wasChanged Changed = True
33−diff --git a/src/Theory/Constraint/System/Guarded.hs b/src/Theory/Constraint/System/Guarded.hs
34−index f98fc7c2..2aac8ce2 100644
35−--- a/src/Theory/Constraint/System/Guarded.hs
36−+++ b/src/Theory/Constraint/System/Guarded.hs
37−@@ -435,7 +435,7 @@ gall ss atos gf = GGuarded All ss atos gf
38−
39− -- | Local newtype to avoid orphan instance.
40− newtype ErrorDoc d = ErrorDoc { unErrorDoc :: d }
41−- deriving( Monoid, NFData, Document, HighlightDocument )
42−+ deriving( Monoid, Semigroup, NFData, Document, HighlightDocument )
43−
44− -- | @formulaToGuarded fm@ returns a guarded formula @gf@ that is
45− -- equivalent to @fm@ under the assumption that this is possible.
46−diff --git a/src/Theory/Proof.hs b/src/Theory/Proof.hs
47−index 74fb77b1..7971b9fc 100644
48−--- a/src/Theory/Proof.hs
49−+++ b/src/Theory/Proof.hs
50−@@ -388,17 +388,19 @@ data ProofStatus =
51− | TraceFound -- ^ There is an annotated solved step
52− deriving ( Show, Generic, NFData, Binary )
53−
54−+instance Semigroup ProofStatus where
55−+ TraceFound <> _ = TraceFound
56−+ _ <> TraceFound = TraceFound
57−+ IncompleteProof <> _ = IncompleteProof
58−+ _ <> IncompleteProof = IncompleteProof
59−+ _ <> CompleteProof = CompleteProof
60−+ CompleteProof <> _ = CompleteProof
61−+ UndeterminedProof <> UndeterminedProof = UndeterminedProof
62−+
63−+
64− instance Monoid ProofStatus where
65− mempty = CompleteProof
66−
67−- mappend TraceFound _ = TraceFound
68−- mappend _ TraceFound = TraceFound
69−- mappend IncompleteProof _ = IncompleteProof
70−- mappend _ IncompleteProof = IncompleteProof
71−- mappend _ CompleteProof = CompleteProof
72−- mappend CompleteProof _ = CompleteProof
73−- mappend UndeterminedProof UndeterminedProof = UndeterminedProof
74−-
75− -- | The status of a 'ProofStep'.
76− proofStepStatus :: ProofStep (Maybe a) -> ProofStatus
77− proofStepStatus (ProofStep _ Nothing ) = UndeterminedProof
78−@@ -560,10 +562,12 @@ newtype Prover = Prover
79− -> Maybe IncrementalProof -- resulting proof
80− }
81−
82−+instance Semigroup Prover where
83−+ p1 <> p2 = Prover $ \ctxt d se ->
84−+ runProver p1 ctxt d se >=> runProver p2 ctxt d se
85−+
86− instance Monoid Prover where
87− mempty = Prover $ \_ _ _ -> Just
88−- p1 `mappend` p2 = Prover $ \ctxt d se ->
89−- runProver p1 ctxt d se >=> runProver p2 ctxt d se
90−
91− -- | Provers whose sequencing is handled via the 'Monoid' instance.
92− --
93−@@ -579,10 +583,12 @@ newtype DiffProver = DiffProver
94− -> Maybe IncrementalDiffProof -- resulting proof
95− }
96−
97−+instance Semigroup DiffProver where
98−+ p1 <> p2 = DiffProver $ \ctxt d se ->
99−+ runDiffProver p1 ctxt d se >=> runDiffProver p2 ctxt d se
100−+
101− instance Monoid DiffProver where
102− mempty = DiffProver $ \_ _ _ -> Just
103−- p1 `mappend` p2 = DiffProver $ \ctxt d se ->
104−- runDiffProver p1 ctxt d se >=> runDiffProver p2 ctxt d se
105−
106− -- | Map the proof generated by the prover.
107− mapProverProof :: (IncrementalProof -> IncrementalProof) -> Prover -> Prover
108−@@ -784,15 +790,16 @@ runAutoDiffProver (AutoProver heuristic bound cut) =
109− -- | The result of one pass of iterative deepening.
110− data IterDeepRes = NoSolution | MaybeNoSolution | Solution ProofPath
111−
112−+instance Semigroup IterDeepRes where
113−+ x@(Solution _) <> _ = x
114−+ _ <> y@(Solution _) = y
115−+ MaybeNoSolution <> _ = MaybeNoSolution
116−+ _ <> MaybeNoSolution = MaybeNoSolution
117−+ NoSolution <> NoSolution = NoSolution
118−+
119− instance Monoid IterDeepRes where
120− mempty = NoSolution
121−
122−- x@(Solution _) `mappend` _ = x
123−- _ `mappend` y@(Solution _) = y
124−- MaybeNoSolution `mappend` _ = MaybeNoSolution
125−- _ `mappend` MaybeNoSolution = MaybeNoSolution
126−- NoSolution `mappend` NoSolution = NoSolution
127−-
128− -- | @cutOnSolvedDFS prf@ removes all other cases if an attack is found. The
129− -- attack search is performed using a parallel DFS traversal with iterative
130− -- deepening.
pkgs/applications/science/logic/tamarin-prover/ghc-8.4-support-utils.patchdeleted−140
@@ -1,140 +0,0 @@
1−From a08f6e400772899b9b0fc16befc50391cd70696b Mon Sep 17 00:00:00 2001
2−From: Felix Yan <felixonmars@archlinux.org>
3−Date: Fri, 18 May 2018 16:24:41 +0800
4−Subject: [PATCH] GHC 8.4 support
5−
6−---
7− src/Extension/Data/Bounded.hs | 10 ++++-
8− src/Extension/Data/Monoid.hs | 14 +++---
9− src/Logic/Connectives.hs | 4 +-
10− src/Text/PrettyPrint/Class.hs | 4 +-
11− src/Text/PrettyPrint/Html.hs | 6 ++-
12− 11 files changed, 79 insertions(+), 48 deletions(-)
13−
14−
15−diff --git a/src/Extension/Data/Bounded.hs b/src/Extension/Data/Bounded.hs
16−index 5f166006..f416a44c 100644
17−--- a/src/Extension/Data/Bounded.hs
18−+++ b/src/Extension/Data/Bounded.hs
19−@@ -11,19 +11,25 @@ module Extension.Data.Bounded (
20− ) where
21−
22− -- import Data.Monoid
23−+import Data.Semigroup
24−
25− -- | A newtype wrapper for a monoid of the maximum of a bounded type.
26− newtype BoundedMax a = BoundedMax {getBoundedMax :: a}
27− deriving( Eq, Ord, Show )
28−
29−+instance (Ord a, Bounded a) => Semigroup (BoundedMax a) where
30−+ BoundedMax x <> BoundedMax y = BoundedMax (max x y)
31−+
32− instance (Ord a, Bounded a) => Monoid (BoundedMax a) where
33− mempty = BoundedMax minBound
34−- (BoundedMax x) `mappend` (BoundedMax y) = BoundedMax (max x y)
35−+ mappend = (<>)
36−
37− -- | A newtype wrapper for a monoid of the minimum of a bounded type.
38− newtype BoundedMin a = BoundedMin {getBoundedMin :: a}
39− deriving( Eq, Ord, Show )
40−
41−+instance (Ord a, Bounded a) => Semigroup (BoundedMin a) where
42−+ BoundedMin x <> BoundedMin y = BoundedMin (min x y)
43−+
44− instance (Ord a, Bounded a) => Monoid (BoundedMin a) where
45− mempty = BoundedMin maxBound
46−- (BoundedMin x) `mappend` (BoundedMin y) = BoundedMin (min x y)
47−\ No newline at end of file
48−diff --git a/src/Extension/Data/Monoid.hs b/src/Extension/Data/Monoid.hs
49−index 83655c34..9ce2f91b 100644
50−--- a/src/Extension/Data/Monoid.hs
51−+++ b/src/Extension/Data/Monoid.hs
52−@@ -18,6 +18,7 @@ module Extension.Data.Monoid (
53− ) where
54−
55− import Data.Monoid
56−+import Data.Semigroup
57−
58− #if __GLASGOW_HASKELL__ < 704
59−
60−@@ -38,10 +39,13 @@ newtype MinMax a = MinMax { getMinMax :: Maybe (a, a) }
61− minMaxSingleton :: a -> MinMax a
62− minMaxSingleton x = MinMax (Just (x, x))
63−
64−+instance Ord a => Semigroup (MinMax a) where
65−+ MinMax Nothing <> y = y
66−+ x <> MinMax Nothing = x
67−+ MinMax (Just (xMin, xMax)) <> MinMax (Just (yMin, yMax)) =
68−+ MinMax (Just (min xMin yMin, max xMax yMax))
69−+
70−+
71− instance Ord a => Monoid (MinMax a) where
72− mempty = MinMax Nothing
73−-
74−- MinMax Nothing `mappend` y = y
75−- x `mappend` MinMax Nothing = x
76−- MinMax (Just (xMin, xMax)) `mappend` MinMax (Just (yMin, yMax)) =
77−- MinMax (Just (min xMin yMin, max xMax yMax))
78−+ mappend = (<>)
79−diff --git a/src/Logic/Connectives.hs b/src/Logic/Connectives.hs
80−index 2e441172..7206cc2c 100644
81−--- a/src/Logic/Connectives.hs
82−+++ b/src/Logic/Connectives.hs
83−@@ -23,12 +23,12 @@ import Control.DeepSeq
84−
85− -- | A conjunction of atoms of type a.
86− newtype Conj a = Conj { getConj :: [a] }
87−- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary,
88−+ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary,
89− Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData)
90−
91− -- | A disjunction of atoms of type a.
92− newtype Disj a = Disj { getDisj :: [a] }
93−- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary,
94−+ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary,
95− Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData)
96−
97− instance MonadDisj Disj where
98−diff --git a/src/Text/PrettyPrint/Class.hs b/src/Text/PrettyPrint/Class.hs
99−index f5eb42fe..13be6515 100644
100−--- a/src/Text/PrettyPrint/Class.hs
101−+++ b/src/Text/PrettyPrint/Class.hs
102−@@ -187,9 +187,11 @@ instance Document Doc where
103− nest i (Doc d) = Doc $ P.nest i d
104− caseEmptyDoc yes no (Doc d) = if P.isEmpty d then yes else no
105−
106−+instance Semigroup Doc where
107−+ Doc d1 <> Doc d2 = Doc $ (P.<>) d1 d2
108−+
109− instance Monoid Doc where
110− mempty = Doc $ P.empty
111−- mappend (Doc d1) (Doc d2) = Doc $ (P.<>) d1 d2
112−
113− ------------------------------------------------------------------------------
114− -- Additional combinators
115−diff --git a/src/Text/PrettyPrint/Html.hs b/src/Text/PrettyPrint/Html.hs
116−index 3de5e307..10103eb7 100644
117−--- a/src/Text/PrettyPrint/Html.hs
118−+++ b/src/Text/PrettyPrint/Html.hs
119−@@ -90,7 +90,7 @@ attribute (key,value) = " " ++ key ++ "=\"" ++ escapeHtmlEntities value ++ "\""
120−
121− -- | A 'Document' transformer that adds proper HTML escaping.
122− newtype HtmlDoc d = HtmlDoc { getHtmlDoc :: d }
123−- deriving( Monoid )
124−+ deriving( Monoid, Semigroup )
125−
126− -- | Wrap a document such that HTML markup can be added without disturbing the
127− -- layout.
128−@@ -182,9 +182,11 @@ getNoHtmlDoc = runIdentity . unNoHtmlDoc
129− instance NFData d => NFData (NoHtmlDoc d) where
130− rnf = rnf . getNoHtmlDoc
131−
132−+instance Semigroup d => Semigroup (NoHtmlDoc d) where
133−+ (<>) = liftA2 (<>)
134−+
135− instance Monoid d => Monoid (NoHtmlDoc d) where
136− mempty = pure mempty
137−- mappend = liftA2 mappend
138−
139− instance Document d => Document (NoHtmlDoc d) where
140− char = pure . char
pkgs/applications/science/logic/tamarin-prover/sapic-native.patchnew file+77
@@ -0,0 +1,77 @@
1+diff --git a/plugins/sapic/Makefile b/plugins/sapic/Makefile
2+index 8f1b1866..678accbe 100644
3+--- a/plugins/sapic/Makefile
4++++ b/plugins/sapic/Makefile
5+@@ -1,18 +1,18 @@
6+ TARGET = sapic
7+-OBJS= color.cmo exceptions.cmo btree.cmo position.cmo positionplusinit.cmo var.cmo term.cmo fact.cmo atomformulaaction.cmo action.cmo atom.cmo formula.cmo tamarin.cmo sapicterm.cmo sapicvar.cmo sapicaction.cmo lexer.cmo sapic.cmo annotatedsapicaction.cmo annotatedsapictree.cmo progressfunction.cmo restrictions.cmo annotatedrule.cmo translationhelper.cmo basetranslation.cmo firsttranslation.cmo main.cmo
8++OBJS= color.cmx exceptions.cmx btree.cmx position.cmx positionplusinit.cmx var.cmx term.cmx fact.cmx atomformulaaction.cmx action.cmx atom.cmx formula.cmx tamarin.cmx sapicterm.cmx sapicvar.cmx sapicaction.cmx lexer.cmx sapic.cmx annotatedsapicaction.cmx annotatedsapictree.cmx progressfunction.cmx restrictions.cmx annotatedrule.cmx translationhelper.cmx basetranslation.cmx firsttranslation.cmx main.cmx
9+ FLAGS=-g
10+
11+-OCAMLC := $(shell command -v ocamlc 2> /dev/null)
12++OCAMLOPT := $(shell command -v ocamlopt 2> /dev/null)
13+ OCAMLLEX := $(shell command -v ocamllex 2> /dev/null)
14+ OCAMLYACC := $(shell command -v ocamlyacc 2> /dev/null)
15+ OCAMLDEP := $(shell command -v ocamldep 2> /dev/null)
16+-OCAMLC_GTEQ_402 := $(shell expr `ocamlc -version | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40200)
17++OCAMLC_GTEQ_402 := $(shell expr `ocamlopt -version | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40200)
18+
19+ default: sapic
20+
21+ sapic:
22+-ifdef OCAMLC
23+- @echo "Found ocamlc."
24++ifdef OCAMLOPT
25++ @echo "Found ocamlopt."
26+ ifdef OCAMLLEX
27+ @echo "Found ocamllex."
28+ ifdef OCAMLYACC
29+@@ -22,9 +22,9 @@ ifdef OCAMLDEP
30+ ifeq "$(OCAMLC_GTEQ_402)" "1"
31+ @echo "Building SAPIC."
32+ $(MAKE) $(OBJS)
33+- ocamlc $(FLAGS) -o $@ str.cma $(OBJS)
34+- @echo "Installing SAPIC into ~/.local/bin/"
35+- cp sapic ~/.local/bin
36++ ocamlopt $(FLAGS) -o $@ str.cmxa $(OBJS)
37++# @echo "Installing SAPIC into ~/.local/bin/"
38++# cp sapic ~/.local/bin
39+ else
40+ @echo "Found OCAML version < 4.02. SAPIC will not be installed."
41+ endif
42+@@ -38,7 +38,7 @@ else
43+ @echo "ocamllex not found. SAPIC will not be installed."
44+ endif
45+ else
46+- @echo "ocamlc not found. SAPIC will not be installed."
47++ @echo "ocamlopt not found. SAPIC will not be installed."
48+ endif
49+
50+ depend:
51+@@ -48,20 +48,20 @@ lexer.ml: sapic.cmi
52+
53+ .PHONY: clean
54+ clean:
55+- rm -rf *.cmi *.cmo $(TARGET)
56++ rm -rf *.cmi **.cmx $(TARGET)
57+ rm -rf sapic.ml sapic.mli lexer.ml lexer.mli
58+
59+-.SUFFIXES: .ml .mli .mll .mly .cmo .cmi
60++.SUFFIXES: .ml .mli .mll .mly .cmx .cmi
61+
62+-.ml.cmo:
63+- ocamlc $(FLAGS) -c $<
64++.ml.cmx:
65++ ocamlopt $(FLAGS) -c $<
66+ .mli.cmi:
67+- ocamlc $(FLAGS) -c $<
68++ ocamlopt $(FLAGS) -c $<
69+ .mll.ml:
70+ ocamllex $<
71+ .mly.ml:
72+ ocamlyacc $<
73+ .ml.mli:
74+- ocamlc -i $< > $@
75++ ocamlopt -i $< > $@
76+
77+ -include .depend
pkgs/top-level/all-packages.nix+1−1
@@ -7081,7 +7081,7 @@ in
70817081 tamarin-prover =
70827082 (haskellPackages.callPackage ../applications/science/logic/tamarin-prover {
70837083 # NOTE: do not use the haskell packages 'graphviz' and 'maude'
7084− inherit maude which sapic;
7084+ inherit maude which;
70857085 graphviz = graphviz-nox;
70867086 });
70877087