Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Bump holo-nixpkgs and improve shell derivation building (fixes darwin issues) #216

Merged
merged 7 commits into from
May 21, 2021
Merged
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
5 changes: 4 additions & 1 deletion CHANGELOG-UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
#### RSM binaries for Linux
* holochain: 0.0.1
* hc: 0.1.0
* lair-keystore: 0.0.1-alpha.10
* lair-keystore: 0.0.1-alpha.12
* kitsune-p2p-proxy: 0.0.1

Binaries are available for Darwin and Linux on `x86_64-linux` and `arm64`.
Expand Down Expand Up @@ -45,6 +45,9 @@ Binaries are available for Darwin and Linux on `x86_64-linux` and `arm64`.

### Changed
* perf: 4.19 -> 5.4
* perf: 5.4 -> 5.10
* rust: 1.48 -> 1.52
* clippy: 0.0.212 -> 0.1.51
* Removed the `HC_TARGET_PREFIX` env var in favor of the `NIX_ENV_PREFIX` env var

### Deprecated
Expand Down
4 changes: 2 additions & 2 deletions config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ echo "<your publishing script here>"
github = rec {
# can be any github ref
# branch, tag, commit, etc.
ref = "b6397dc43496ad95eab169bcdf0ab73731a7133d";
ref = "9087a5475208794482ce326c09951e9cd658ea87";

# 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 = "1hmafym5sk0kk3vhl5b05kmfd8jrpflp3qqc9r7lcd9l9xakkmfv";
sha256 = "049pl17ijdfjm1x7xgm959x8iafyy986nxddczl36ci6zjv2pbv7";

# the github owner of the holonix repo
owner = "Holo-Host";
Expand Down
10 changes: 4 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ let
hnRustFmtFmt = builtins.elemAt (self.callPackage ./rust/fmt/fmt {}).buildInputs 0;
inherit holochainVersionId;
holochainBinaries =
if !includeHolochainBinaries then {} else
if holochainVersionId == "custom" then
holo-nixpkgs.mkHolochainAllBinariesWithDeps (holochainVersion // {
otherDeps =
Expand All @@ -54,7 +53,6 @@ let
;
};

darwin = pkgs.callPackage ./darwin { };
rust = pkgs.callPackage ./rust {
inherit config;
};
Expand All @@ -78,7 +76,6 @@ let
holonix-shell = pkgs.callPackage ./nix-shell {
inherit
pkgs
darwin
docs
git
linux
Expand All @@ -92,7 +89,9 @@ let
extraBuildInputs = [
pkgs.holonixIntrospect
]
++ (builtins.attrValues pkgs.holochainBinaries)
++ (if !includeHolochainBinaries then [] else
(builtins.attrValues pkgs.holochainBinaries)
)
;
};

Expand All @@ -106,12 +105,11 @@ in rec
pkgs
# expose other things
rust
darwin
;

# export the set used to build shell alongside the main derivation
# downstream devs can extend/override the shell as needed
# holonix-shell provides canonical dev shell for generic work
shell = derivation-safe-holonix-shell;
main = pkgs.mkShell derivation-safe-holonix-shell;
main = derivation-safe-holonix-shell;
}
1 change: 0 additions & 1 deletion docker/.#push

This file was deleted.

14 changes: 9 additions & 5 deletions nix-shell/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
pkgs,
stdenv,
darwin,
docs,
git,
Expand All @@ -12,7 +13,7 @@
happs
, extraBuildInputs
}:
{
pkgs.mkShell {
name = "holonix-shell";

# non-nixos OS can have a "dirty" setup with rustup installed for the current
Expand Down Expand Up @@ -60,7 +61,6 @@
export CARGO_TARGET_DIR="$NIX_ENV_PREFIX/target"
export CARGO_CACHE_RUSTC_INFO=1
export PATH="$CARGO_INSTALL_ROOT/bin:$PATH"
export NIX_LDFLAGS="${darwin.ld-flags}$NIX_LDFLAGS"
export NIX_BUILD_SHELL=${pkgs.bashInteractive}/bin/bash

# https://github.com/holochain/holonix/issues/12
Expand All @@ -74,9 +74,9 @@

#flame graph dep
pkgs.flamegraph
] ++ builtins.foldl' (sum: elem: sum ++ elem.buildInputs) [] [
]
++ (builtins.foldl' (sum: elem: sum ++ elem.buildInputs) [] [
(pkgs.callPackage ./flush { })
darwin
docs
git
linux
Expand All @@ -86,5 +86,9 @@
rust
test
happs
] ++ extraBuildInputs;
])
++ extraBuildInputs
;

inputsFrom = builtins.attrValues pkgs.holochainBinaries;
}
2 changes: 1 addition & 1 deletion test/clippy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@test "clippy version" {
result="$( cargo clippy --version )"
echo $result
[[ "$result" == *0.0.212* ]]
[[ "$result" == *0.1.51* ]]
}

@test "clippy smoke test" {
Expand Down
2 changes: 1 addition & 1 deletion test/holochain-binaries.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@test "expected lair-keystore version available" {
result="$(lair-keystore --version)"
echo $result
[[ "$result" == *" 0.0.1-alpha.10" ]]
[[ "$result" == *" 0.0.1-alpha.12" ]]
}

@test "expected kitsune-p2p-proxy version available" {
Expand Down
2 changes: 1 addition & 1 deletion test/perf.bats
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
@test "perf version" {
result="$( perf --version )"
echo $result
[[ "$result" == "perf version 5.4"* ]]
[[ "$result" == "perf version 5.10"* ]]
}
4 changes: 2 additions & 2 deletions test/rust.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
@test "rustc version" {
result="$( rustc --version )"
echo $result
[[ "$result" == *1.48.0* ]]
[[ "$result" == *1.52.0* ]]
}

# the rust fmt version should be roughly the rustc version
# most importantly fmt should exist
@test "fmt version" {
result="$( cargo fmt --version )"
echo $result
[[ "$result" == *1.4.24-stable* ]]
[[ "$result" == *1.4.36-stable* ]]
}

# RUSTFLAGS should be set correctly
Expand Down