From 5c065f60f392de0e1d2c54c03ced72da62ea01ee Mon Sep 17 00:00:00 2001 From: Leon Mergen Date: Sat, 11 Jul 2015 17:19:31 +0700 Subject: [PATCH] Adds nix support --- default.nix | 2 ++ hexstring.nix | 15 +++++++++++++++ shell.nix | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 default.nix create mode 100644 hexstring.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..9bcb885 --- /dev/null +++ b/default.nix @@ -0,0 +1,2 @@ +{ nixpkgs ? import {}, compiler ? "ghc7101" }: +nixpkgs.haskellPackages.callPackage ./hexstring.nix { } diff --git a/hexstring.nix b/hexstring.nix new file mode 100644 index 0000000..b694fd7 --- /dev/null +++ b/hexstring.nix @@ -0,0 +1,15 @@ +{ mkDerivation, aeson, base, base16-bytestring, binary, bytestring +, hspec, stdenv, text +}: +mkDerivation { + pname = "hexstring"; + version = "0.11.1"; + src = ./.; + buildDepends = [ + aeson base base16-bytestring binary bytestring text + ]; + testDepends = [ base binary bytestring hspec text ]; + homepage = "http://www.leonmergen.com/opensource.html"; + description = "Fast and safe representation of a hex string"; + license = stdenv.lib.licenses.mit; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..8f5b30a --- /dev/null +++ b/shell.nix @@ -0,0 +1,2 @@ +{ nixpkgs ? import {}, compiler ? "ghc7101" }: +(import ./default.nix { inherit nixpkgs compiler; }).env