csecp256k1

secp256k1 bindings.
Log | Files | Refs | README | LICENSE

commit 6a0d132506819631d3d1d7711d8c3882f9fa4108
parent d6eaf8e9cf830ef92df2c195e13a7f6cdd005d0a
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri,  9 Feb 2024 16:51:49 +0400

Add package skeleton.

Diffstat:
ALICENSE | 20++++++++++++++++++++
Mflake.nix | 16+++++++++-------
Ahaskell-secp256k1.cabal | 23+++++++++++++++++++++++
3 files changed, 52 insertions(+), 7 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2024 Jared Tobin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/flake.nix b/flake.nix @@ -9,20 +9,22 @@ outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = nixpkgs.legacyPackages.${system}; + ghc = pkgs.haskell.compiler.ghc964; + cabal = pkgs.haskell.packages.ghc964.cabal-install; in { devShells.default = pkgs.mkShell { buildInputs = [ - pkgs.secp256k1 - pkgs.haskell.compiler.ghc964 - pkgs.haskell.packages.ghc964.cabal-install + ghc + cabal ]; shellHook = '' - echo "entering shell.." - PS1="\e[1;34m[nix] \w$ \e[0m" - echo "$(${pkgs.haskell.compiler.ghc964}/bin/ghc --version)" + PS1="[nix] \w$ " + echo "entering shell, using" + echo "ghc: $(${ghc}/bin/ghc --version)" + echo "cabal: $(${cabal}/bin/cabal --version)" ''; }; } diff --git a/haskell-secp256k1.cabal b/haskell-secp256k1.cabal @@ -0,0 +1,23 @@ +cabal-version: 3.0 +name: haskell-secp256k1 +version: 0.1.0 +synopsis: secp256k1 bindings +description: secp256k1 bindings. +license: MIT +license-file: LICENSE +author: Jared Tobin +maintainer: jared@jtobin.io +category: Cryptography +build-type: Simple + +common warnings + ghc-options: -Wall + +library + import: warnings + default-language: Haskell2010 + hs-source-dirs: lib + exposed-modules: + build-depends: + base ^>= 4.18.2.0 +