Skip to content

Commit

Permalink
dist: builds with nix now
Browse files Browse the repository at this point in the history
  • Loading branch information
np committed Dec 16, 2014
1 parent a542a75 commit 96e39cf
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 1 deletion.
4 changes: 4 additions & 0 deletions c2n-regen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
cabal2nix ./. > default.nix
#cabal2nix cabal://RFC1751 > nix/RFC1751.nix
cabal2nix --rev=cb6b960262ce1a7f598a3d08d00a2c348dfed91e git://github.com/np/RFC1751.git > nix/RFC1751.nix
24 changes: 24 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file was auto-generated by cabal2nix. Please do NOT edit manually!

{ cabal, aeson, attoparsec, base16Bytestring, binary, cryptohash
, either, hashable, haskoin, RFC1751, scientific, text
, unorderedContainers
}:

cabal.mkDerivation (self: {
pname = "hx";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
buildDepends = [
aeson attoparsec base16Bytestring binary cryptohash either hashable
haskoin RFC1751 scientific text unorderedContainers
];
meta = {
homepage = "https://github.com/np/hx";
description = "Bitcoin CLI tools: Haskell port of Sx using Haskoin";
license = self.stdenv.lib.licenses.gpl3;
platforms = self.ghc.meta.platforms;
};
})
6 changes: 5 additions & 1 deletion hx.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ executable hx
ghc-options: -Wall
build-depends: base >=4.6, haskoin, bytestring, base16-bytestring,
scientific, binary, RFC1751 >= 0.3, containers,
aeson, cryptohash
aeson, cryptohash,
-- required by aeson
attoparsec, hashable, unordered-containers, text,
-- required by haskoin
either
default-language: Haskell2010
-- other-modules:
-- other-extensions:
26 changes: 26 additions & 0 deletions nix/RFC1751.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was auto-generated by cabal2nix. Please do NOT edit manually!

{ cabal, binary, fetchgit, HUnit, QuickCheck, testFramework
, testFrameworkHunit, testFrameworkQuickcheck2
}:

cabal.mkDerivation (self: {
pname = "RFC1751";
version = "0.3.0.0";
src = fetchgit {
url = "git://github.com/np/RFC1751.git";
sha256 = "bca0caaa073d1a0d828b08632838f414d3358db90e7f4d43045a028540f25327";
rev = "cb6b960262ce1a7f598a3d08d00a2c348dfed91e";
};
buildDepends = [ binary ];
testDepends = [
binary HUnit QuickCheck testFramework testFrameworkHunit
testFrameworkQuickcheck2
];
meta = {
homepage = "https://github.com/xenog/RFC1751";
description = "RFC-1751 library for Haskell";
license = self.stdenv.lib.licenses.publicDomain;
platforms = self.ghc.meta.platforms;
};
})
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
let pkgs = (import <nixpkgs> {});
haskellPackages = pkgs.recurseIntoAttrs (pkgs.haskellPackages.override {
extension = self : super :
let callPackage = self.callPackage;
in {
RFC1751 = callPackage ./nix/RFC1751.nix {};
thisPackage = haskellPackages.callPackage (import ./default.nix) {};
};});
in pkgs.lib.overrideDerivation haskellPackages.thisPackage (old: {
buildInputs = old.buildInputs ++ [
haskellPackages.cabalInstall
# (2)
];})

0 comments on commit 96e39cf

Please sign in to comment.