Skip to content

Commit 158cf43

Browse files
committed
fork bitcoin-script
1 parent ccedf0a commit 158cf43

File tree

15 files changed

+780
-0
lines changed

15 files changed

+780
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
dist
2+
cabal-dev
3+
*.o
4+
*.hi
5+
*.chi
6+
*.chs.h
7+
*.tix
8+
.virtualenv
9+
.hsenv
10+
.cabal-sandbox/
11+
cabal.sandbox.config
12+
cabal.config
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
language: c
2+
env:
3+
- CABALVER=1.22 GHCVER=7.8.4
4+
- CABALVER=1.22 GHCVER=7.10.1
5+
- CABALVER=1.22 GHCVER=head
6+
7+
matrix:
8+
allow_failures:
9+
- env: CABALVER=1.22 GHCVER=7.10.1
10+
- env: CABALVER=1.22 GHCVER=head
11+
12+
before_install:
13+
# Installing cabal and ghc
14+
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
15+
- travis_retry sudo apt-get update
16+
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
17+
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
18+
- travis_retry cabal update
19+
20+
- |
21+
if [ $GHCVER = "head" ] || [ ${GHCVER%.*} = "7.8" ] || [ ${GHCVER%.*} = "7.10" ]; then
22+
travis_retry sudo apt-get install happy-1.19.4 alex-3.1.3
23+
export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
24+
else
25+
travis_retry sudo apt-get install happy alex
26+
fi
27+
28+
- cabal install hlint
29+
30+
# Install hpc-coveralls
31+
- travis_retry cabal sandbox init
32+
- cabal install hpc-coveralls -j --bindir=$HOME/.cabal/bin/ --constraint='aeson >= 0.7'
33+
- cabal sandbox delete
34+
35+
install:
36+
- cabal --version
37+
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
38+
- travis_retry cabal install --only-dependencies --enable-tests --enable-benchmarks -j
39+
40+
script:
41+
- hlint src --ignore="Parse error"
42+
- cabal configure --enable-tests --enable-benchmarks --enable-library-coverage
43+
- cabal build -j
44+
- run-cabal-test --cabal-name=cabal --show-details=always
45+
- cabal check
46+
- cabal sdist
47+
48+
# The following scriptlet checks that the resulting source distribution can be built & installed
49+
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
50+
cd dist/;
51+
if [ -f "$SRC_TGZ" ]; then
52+
cabal install --force-reinstalls "$SRC_TGZ";
53+
else
54+
echo "expected '$SRC_TGZ' not found";
55+
exit 1;
56+
fi ;
57+
cd ../
58+
59+
after_script:
60+
- hpc-coveralls test-suite --exclude-dir=test --display-report

pub/haskell-bitcoin-script/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Leon Mergen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
haskell-bitcoin-script
2+
==================
3+
4+
[![Build Status](https://travis-ci.org/solatis/haskell-bitcoin-script.png?branch=master)](https://travis-ci.org/solatis/haskell-bitcoin-script)
5+
[![Coverage Status](https://coveralls.io/repos/solatis/haskell-bitcoin-script/badge.svg?branch=master)](https://coveralls.io/r/solatis/haskell-bitcoin-script?branch=master)
6+
[![MIT](http://b.repl.ca/v1/license-MIT-blue.png)](http://en.wikipedia.org/wiki/MIT_License)
7+
[![Haskell](http://b.repl.ca/v1/language-haskell-lightgrey.png)](http://haskell.org)
8+
9+
This library provides utilities for compiling, manipulation and decompiling of
10+
Bitcoin scripts.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Distribution.Simple
2+
3+
main = defaultMain
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: bitcoin-script
2+
category: Network, Finance
3+
version: 0.11.2
4+
license: MIT
5+
license-file: LICENSE
6+
copyright: (c) 2015 Leon Mergen
7+
author: Leon Mergen
8+
maintainer: [email protected]
9+
homepage: http://www.leonmergen.com/opensource.html
10+
bug-reports: http://github.com/solatis/haskell-bitcoin-script/issues
11+
stability: experimental
12+
synopsis: Compilation, manipulation and decompilation of Bitcoin scripts
13+
description:
14+
Provides pure functions to compile, decompile and manipulate Bitcoin scripts.
15+
This project relies heavily on the Haskoin project for the compiling and
16+
decompiling of the script assembly, and continuously merges changes downstream.
17+
18+
The advantage this library has over Haskoin is that it uses very few
19+
dependencies and doesn't rely on external libraries such as LevelDB and snappy.
20+
21+
build-type: Simple
22+
data-files: LICENSE, README.md
23+
cabal-version: >= 1.10
24+
tested-with: GHC == 7.6, GHC == 7.8, GHC == 7.10, GHC == 8.6, GHC == 8.8
25+
GHC == 8.10, GHCJS == 8.6
26+
27+
library
28+
hs-source-dirs: src
29+
ghc-options: -Wall -ferror-spans
30+
default-language: Haskell2010
31+
32+
exposed-modules: Data.Bitcoin.Script
33+
34+
other-modules: Data.Bitcoin.Script.Types
35+
36+
build-depends: base >= 4.3 && < 5
37+
, text
38+
, bytestring
39+
, base16-bytestring
40+
, binary
41+
42+
test-suite test-suite
43+
type: exitcode-stdio-1.0
44+
ghc-options: -Wall -ferror-spans -threaded -auto-all -caf-all -fno-warn-type-defaults
45+
default-language: Haskell2010
46+
hs-source-dirs: test
47+
main-is: Main.hs
48+
49+
other-modules: Data.Bitcoin.ScriptSpec
50+
Spec
51+
Main
52+
53+
build-depends: base >= 4.3 && < 5
54+
, hspec
55+
56+
, bytestring
57+
, bitcoin-script
58+
59+
source-repository head
60+
type: git
61+
location: git://github.com/solatis/haskell-bitcoin-script.git
62+
branch: master
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ mkDerivation, base, base16-bytestring, binary, bytestring, hspec
2+
, stdenv, text
3+
}:
4+
mkDerivation {
5+
pname = "bitcoin-script";
6+
version = "0.11.2";
7+
src = ./.;
8+
buildDepends = [ base base16-bytestring binary bytestring text ];
9+
testDepends = [ base bytestring hspec ];
10+
homepage = "http://www.leonmergen.com/opensource.html";
11+
description = "Compilation, manipulation and decompilation of Bitcoin scripts";
12+
license = stdenv.lib.licenses.mit;
13+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ pkgs ? import (import ./nixpkgs.nix) { }, compiler ? "ghc865" }:
2+
pkgs.haskell.packages.${compiler}.callPackage ./bitcoin-script.nix { }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
builtins.fetchTarball {
2+
url = "https://github.com/NixOS/nixpkgs-channels/archive/b0e3df2f8437767667bd041bb336e9d62a97ee81.tar.gz";
3+
sha256 = "0d34k96l0gzsdpv14vnxdfslgk66gb0nsjz7qcqz1ykb0i7n3n07";
4+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ pkgs ? import (import ./nixpkgs.nix) { }, compiler ? "ghc865" }:
2+
(import ./default.nix { inherit pkgs compiler; }).env

0 commit comments

Comments
 (0)