Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

[DEVOPS-1120] nix-tools based build #11

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .stack-to-nix.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
https://github.com/input-output-hk/cardano-prelude 2d6624af423d0a5c7ced6f3ae465eaaeb4ec739e . 0kimfl3k60jz7cglk24ls5lhvm8xh0hfjs8azhhymzckvyn3y0wn cardano-prelude .stack.nix/cardano-prelude.nix
https://github.com/input-output-hk/cardano-prelude 2d6624af423d0a5c7ced6f3ae465eaaeb4ec739e test 0kimfl3k60jz7cglk24ls5lhvm8xh0hfjs8azhhymzckvyn3y0wn cardano-prelude-test .stack.nix/cardano-prelude-test.nix
https://github.com/input-output-hk/iohk-monitoring-framework 4dc4d541a645b84a281faa8950a7fd4e61708963 . 1qk5zin92bfn635nyi31b8w2nrw8zdcc8p0x2s2xcq9mzc3zdybf iohk-monitoring .stack.nix/iohk-monitoring.nix
https://github.com/well-typed/cborg 80fbe0ee5e67a5622e2cb9eaa9d8594a2214322d cborg 1khd1v9yh6jdkcvzvknvhxpc1qvxvww0pp7c43w4hbvdyhs1q8wh cborg .stack.nix/cborg.nix
https://github.com/nc6/cardano-crypto d46e8a44d85a71f5da03fb6b176e9427c684144b . 0g8ln8k8wx4csdv92bz09pr7v9dp4lcyv1334b09c9rgwdwhqg1b cardano-crypto .stack.nix/cardano-crypto.nix
https://github.com/avieth/plutus-prototype d094be301195fcd8ab864d793f114970426a4478 . 1s932rghn4zn441waansp408b5bwk20rc1wsa5693a2nwnp4dijw plutus-prototype .stack.nix/plutus-prototype.nix
https://github.com/input-output-hk/haskell-hedgehog.git 2e741bb53afb085741807018948ae17d956c53af hedgehog 0l0d1n2b68m0628j4yi214q5fy6pz777qfj1bc1lrra8scs5gcxh hedgehog .stack.nix/hedgehog.nix
http://github.com/nc6/canonical-json a9dc9b893649bc2e2a770ab22d278a780f7e3a3c . 0alwbi9xqaj6fmwzs6lr2drqrnhlnp13d9k2qkl5ga7h4grz9zcr canonical-json .stack.nix/canonical-json.nix
https://github.com/input-output-hk/cardano-crypto 3c707936ba0a665375acf5bd240dc4b6eaa6c0bc . 0g8ln8k8wx4csdv92bz09pr7v9dp4lcyv1334b09c9rgwdwhqg1b cardano-crypto .stack.nix/cardano-crypto.nix
https://github.com/input-output-hk/cardano-prelude 7f8544ae9e162b6664f07093227edb148f1c8a5b . 0yywq1m77k2f95pi59pdsk7rq7zlq140d1lsk6gl5qsjrxvyzkb5 cardano-prelude .stack.nix/cardano-prelude.nix
https://github.com/input-output-hk/cardano-prelude 7f8544ae9e162b6664f07093227edb148f1c8a5b test 0yywq1m77k2f95pi59pdsk7rq7zlq140d1lsk6gl5qsjrxvyzkb5 cardano-prelude-test .stack.nix/cardano-prelude-test.nix
https://github.com/input-output-hk/cardano-prelude 2256fd727c5f92e6218afdcf8cddf6e01c4a9dcd . 0fdwlhkpc7inkqflcdzinx9qr5g3i34clzhl6iiagj851c3jcgsn cardano-prelude cardano-prelude.nix
https://github.com/input-output-hk/cardano-prelude 2256fd727c5f92e6218afdcf8cddf6e01c4a9dcd test 0fdwlhkpc7inkqflcdzinx9qr5g3i34clzhl6iiagj851c3jcgsn cardano-prelude-test cardano-prelude-test.nix
https://github.com/input-output-hk/iohk-monitoring-framework 8fb87e83468831289820ef9edb3d5ef912b0db0f contra-tracer 16sxwx8y2wg8kws15ybhk9vkq6crs5bp7ky37x1vrvpvb3ilc5x0 contra-tracer contra-tracer.nix
https://github.com/input-output-hk/iohk-monitoring-framework 8fb87e83468831289820ef9edb3d5ef912b0db0f iohk-monitoring 16sxwx8y2wg8kws15ybhk9vkq6crs5bp7ky37x1vrvpvb3ilc5x0 iohk-monitoring iohk-monitoring.nix
https://github.com/input-output-hk/cardano-sl-x509 71115d199368f1cc969a4936a856808539063253 . 16npjbnwiwvslc6fxamg84q31f0wsl01g9yr3nkmymvnk4lff2g3 cardano-sl-x509 cardano-sl-x509.nix
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ There is an option of using just Cabal + Nix as well - use a small utility scrip

Adding new dependencies can be easy with, for example:
```
cabal2nix https://github.com/input-output-hk/cardano-prelude --revision "2d6624af423d0a5c7ced6f3ae465eaaeb4ec739e" > cardano-prelude.nix
./nix/regenerate.sh
```

## Tools
Expand Down
30 changes: 0 additions & 30 deletions cardano-shell.nix

This file was deleted.

25 changes: 25 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ config ? {}
, system ? builtins.currentSystem
, iohkLib ? import ./nix/iohk-common.nix { inherit config system; application = "cardano-sl"; }
, pkgs ? iohkLib.pkgs
, gitrev ? iohkLib.commitIdFromGitRepo ./.
}:

let
haskell = iohkLib.nix-tools.haskell { inherit pkgs; };

pkgSet = haskell.mkStackPkgSet {
stack-pkgs = import ./nix/pkgs.nix;
pkg-def-extras = [];
modules = [ {
packages.cardano-shell.src = iohkLib.cleanSourceHaskell ./.;
} ];
};
haskellPackages = pkgSet.config.hsPkgs;

in {
inherit haskellPackages iohkLib;

inherit (haskellPackages.cardano-shell.components)
all benchmarks exes library tests;
}
40 changes: 0 additions & 40 deletions iohk-monitoring.nix

This file was deleted.

30 changes: 30 additions & 0 deletions nix/.stack-pkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
overlay = hackage:
{
packages = {
"base58-bytestring" = (((hackage.base58-bytestring)."0.1.0").revisions).default;
"half" = (((hackage.half)."0.2.2.3").revisions).default;
"micro-recursion-schemes" = (((hackage.micro-recursion-schemes)."5.0.2.2").revisions).default;
"streaming-binary" = (((hackage.streaming-binary)."0.3.0.1").revisions).default;
"pretty-show" = (((hackage.pretty-show)."1.8.2").revisions).default;
"katip" = (((hackage.katip)."0.7.0.0").revisions)."4b30d0643e18d01a3fd264d3d75921b49b2f464336a52fa46fa049107ebbfe04";
"time-units" = (((hackage.time-units)."1.0.0").revisions)."27cf54091c4a0ca73d504fc11d5c31ab4041d17404fe3499945e2055697746c1";
"ekg" = (((hackage.ekg)."0.4.0.15").revisions)."f52d7c00654d72d2ab988255f30adba95a52484ac310bab9c136c64732e69f4b";
"ekg-json" = (((hackage.ekg-json)."0.1.0.6").revisions)."4ff2e9cac213a5868ae8b4a7c72a16a9a76fac14d944ae819b3d838a9725569b";
} // {
cardano-shell = ./.stack.nix/cardano-shell.nix;
cardano-prelude = ./.stack.nix/cardano-prelude.nix;
cardano-prelude-test = ./.stack.nix/cardano-prelude-test.nix;
iohk-monitoring = ./.stack.nix/iohk-monitoring.nix;
cborg = ./.stack.nix/cborg.nix;
cardano-crypto = ./.stack.nix/cardano-crypto.nix;
plutus-prototype = ./.stack.nix/plutus-prototype.nix;
hedgehog = ./.stack.nix/hedgehog.nix;
canonical-json = ./.stack.nix/canonical-json.nix;
};
compiler.version = "8.6.2";
compiler.nix-name = "ghc862";
};
resolver = "lts-13.2";
compiler = "ghc-8.6.2";
}
58 changes: 58 additions & 0 deletions nix/.stack.nix/canonical-json.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, ... }:
{
flags = {};
package = {
specVersion = "1.10";
identifier = {
name = "canonical-json";
version = "0.5.0.2";
};
license = "BSD-3-Clause";
copyright = "Copyright 2015-2017 Well-Typed LLP";
maintainer = "[email protected], [email protected]";
author = "Duncan Coutts, Edsko de Vries";
homepage = "https://github.com/well-typed/canonical-json";
url = "";
synopsis = "Canonical JSON for signing and hashing JSON values";
description = "An implementation of Canonical JSON.\n\n<http://wiki.laptop.org/go/Canonical_JSON>\n\nThe \\\"canonical JSON\\\" format is designed to provide\nrepeatable hashes of JSON-encoded data. It is designed\nfor applications that need to hash, sign or authenitcate\nJSON data structures, including embedded signatures.\n\nCanonical JSON is parsable with any full JSON parser, and\nit allows whitespace for pretty-printed human readable\npresentation, but it can be put into a canonical form\nwhich then has a stable serialised representation and\nthus a stable hash.";
buildType = "Simple";
};
components = {
"library" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.containers)
(hsPkgs.parsec)
(hsPkgs.pretty)
];
};
tests = {
"tests" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.canonical-json)
(hsPkgs.aeson)
(hsPkgs.vector)
(hsPkgs.unordered-containers)
(hsPkgs.QuickCheck)
(hsPkgs.tasty)
(hsPkgs.tasty-quickcheck)
];
};
};
};
} // {
src = pkgs.fetchgit {
url = "http://github.com/nc6/canonical-json";
rev = "a9dc9b893649bc2e2a770ab22d278a780f7e3a3c";
sha256 = "0alwbi9xqaj6fmwzs6lr2drqrnhlnp13d9k2qkl5ga7h4grz9zcr";
};
}
88 changes: 88 additions & 0 deletions nix/.stack.nix/cardano-crypto.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = { golden-tests = false; golden-tests-exe = false; };
package = {
specVersion = "1.10";
identifier = { name = "cardano-crypto"; version = "1.1.0"; };
license = "MIT";
copyright = "2016-2017 IOHK";
maintainer = "[email protected]";
author = "Vincent Hanquez";
homepage = "https://github.com/input-output-hk/cardano-crypto#readme";
url = "";
synopsis = "Cryptography primitives for cardano";
description = "";
buildType = "Simple";
};
components = {
"library" = {
depends = [
(hsPkgs.base)
(hsPkgs.memory)
(hsPkgs.deepseq)
(hsPkgs.bytestring)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.cryptonite)
(hsPkgs.cryptonite-openssl)
(hsPkgs.hashable)
(hsPkgs.integer-gmp)
];
};
exes = {
"golden-tests" = {
depends = [
(hsPkgs.base)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.memory)
(hsPkgs.bytestring)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
] ++ (pkgs.lib).optional (flags.golden-tests-exe) (hsPkgs.inspector);
};
};
tests = {
"cardano-crypto-test" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.memory)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
(hsPkgs.basement)
(hsPkgs.foundation)
];
};
"cardano-crypto-golden-tests" = {
depends = [
(hsPkgs.base)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.memory)
(hsPkgs.bytestring)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
] ++ (pkgs.lib).optional (flags.golden-tests) (hsPkgs.inspector);
};
};
benchmarks = {
"cardano-crypto-bench" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.memory)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
(hsPkgs.gauge)
];
};
};
};
} // {
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
url = "https://github.com/input-output-hk/cardano-crypto";
rev = "3c707936ba0a665375acf5bd240dc4b6eaa6c0bc";
sha256 = "0g8ln8k8wx4csdv92bz09pr7v9dp4lcyv1334b09c9rgwdwhqg1b";
});
}
47 changes: 47 additions & 0 deletions nix/.stack.nix/cardano-prelude-test.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = { development = false; };
package = {
specVersion = "1.10";
identifier = { name = "cardano-prelude-test"; version = "0.1.0.0"; };
license = "MIT";
copyright = "2018 IOHK";
maintainer = "[email protected]";
author = "IOHK";
homepage = "";
url = "";
synopsis = "Utility types and functions for testing Cardano";
description = "Utility types and functions for testing Cardano";
buildType = "Simple";
};
components = {
"library" = {
depends = [
(hsPkgs.base)
(hsPkgs.aeson)
(hsPkgs.aeson-pretty)
(hsPkgs.attoparsec)
(hsPkgs.base16-bytestring)
(hsPkgs.bytestring)
(hsPkgs.canonical-json)
(hsPkgs.cardano-prelude)
(hsPkgs.cryptonite)
(hsPkgs.formatting)
(hsPkgs.hedgehog)
(hsPkgs.hspec)
(hsPkgs.pretty-show)
(hsPkgs.QuickCheck)
(hsPkgs.quickcheck-instances)
(hsPkgs.text)
(hsPkgs.time)
];
};
};
} // {
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
url = "https://github.com/input-output-hk/cardano-prelude";
rev = "7f8544ae9e162b6664f07093227edb148f1c8a5b";
sha256 = "0yywq1m77k2f95pi59pdsk7rq7zlq140d1lsk6gl5qsjrxvyzkb5";
});
postUnpack = "sourceRoot+=/test; echo source root reset to \$sourceRoot";
}
Loading