Skip to content

Commit

Permalink
holonix 0.0.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Jul 9, 2019
1 parent 9e58f07 commit b759e5f
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 11 deletions.
43 changes: 43 additions & 0 deletions config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
release = {
# the commit hash that the release process should target
# this will always be behind what ends up being deployed
# the release process needs to add some commits for changelog etc.
commit = "0095ae8451d954ca4fef76aac76c4aa40add0dad";

# the semver for prev and current releases
# the previous version will be scanned/bumped by release scripts
# the current version is what the release scripts bump *to*
version = {
current = "0.0.2";
previous = "0.0.1-alpha2";
};

github = {
# markdown to inject into github releases
# there is some basic string substitution {{ xxx }}
# - {{ changelog }} will inject the changelog as at the target commit
template = ''
{{ changelog }}
# Installation
Use Holonix to work with this repository.
See:
- https://github.com/holochain/holonix
- https://nixos.org/
'';

# owner of the github repository that release are deployed to
owner = "holochain";

# repository name on github that release are deployed to
repo = "holochain-serialization";

# canonical local upstream name as per `git remote -v`
upstream = "origin";
};
};
}
68 changes: 57 additions & 11 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,66 @@
# This is an example of what downstream consumers of holonix should do
# This is also used to dogfood as many commands as possible for holonix
# For example the release process for holonix uses this file
let
holonix-release-tag = "0.0.4";
holonix-release-sha256 = "04xbhr0w0fc911vjd4f42shmy3vlnvwpicjnsk0q8gr4prkpz74h";

holonix = import (fetchTarball {
url = "https://github.com/holochain/holonix/tarball/${holonix-release-tag}";
sha256 = "${holonix-release-sha256}";
});
# uncomment to work locally
# holonix = import ../holonix;
# point this to your local config.nix file for this project
# example.config.nix shows and documents a lot of the options
project-config = import ./config.nix;

config = {

# true = use a github repository as the holonix base (recommended)
# false = use a local copy of holonix (useful for debugging)
use-github = true;

# configure the remote holonix github when use-github = true
github = {

# can be any github ref
# branch, tag, commit, etc.
ref = "0.0.12";

# the sha of what is downloaded from the above ref
# note: even if you change the above ref it will not be redownloaded until
# the sha here changes (the sha is the cache key for downloads)
# note: to get a new sha, get nix to try and download a bad sha
# it will complain and tell you the right sha
sha256 = "1hlfd2vr8x0faa8d8zhrnkqadvn6wmvwnl9zl920vb1p08qg24ka";

# the github owner of the holonix repo
owner = "holochain";

# the name of the holonix repo
repo = "holonix";
};

# configuration for when use-github = false
local = {
# the path to the local holonix copy
path = ./.;
};

};

# START HOLONIX IMPORT BOILERPLATE
holonix = import (
if ! config.use-github
then config.local.path
else fetchTarball {
url = "https://github.com/${config.github.owner}/${config.github.repo}/tarball/${config.github.ref}";
sha256 = config.github.sha256;
}
) { config = project-config; };
# END HOLONIX IMPORT BOILERPLATE

# holonix = callPackage ../holonix { config = (import ./config.nix) };
in
with holonix.pkgs;
{
core-shell = stdenv.mkDerivation (holonix.shell // {
name = "holochain-serialization-shell";
dev-shell = stdenv.mkDerivation (holonix.shell // {
name = "dev-shell";

buildInputs = []
buildInputs = [ ]
++ holonix.shell.buildInputs
++ (holonix.pkgs.callPackage ./test {
pkgs = holonix.pkgs;
Expand Down

0 comments on commit b759e5f

Please sign in to comment.