Skip to content

Instantly share code, notes, and snippets.

@samrose
Created February 27, 2019 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samrose/ca46942afb6c2f6ea2e6bfb26fd5be7e to your computer and use it in GitHub Desktop.
Save samrose/ca46942afb6c2f6ea2e6bfb26fd5be7e to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
rustOverlayRepo = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
rev = "e37160aaf4de5c4968378e7ce6fe5212f4be239f";
sha256 = "013hapfp76s87wiwyc02mzq1mbva2akqxyh37p27ngqiz0kq5f2n";
};
rustOverlay = import "${rustOverlayRepo}/rust-overlay.nix";
nixpkgs = import <nixpkgs> { overlays = [ rustOverlay ]; };
holoRust = rec {
channels = (nixpkgs.rustChannelOfTargets
"nightly"
"2019-01-24"
[ "x86_64-unknown-linux-gnu" "wasm32-unknown-unknown" ]
);
};
rustc = holoRust.channels;
cargo = holoRust.channels;
rust = makeRustPlatform {rustc = rustc; cargo = cargo;};
release = "v0.0.4-alpha";
archiveName = "conductor-v0.0.4-alpha-x86_64-ubuntu.tar.gz";
fileDir = "conductor-v0.0.4-alpha-x86_64-unknown-linux-gnu";
in
stdenv.mkDerivation {
name = "holochain-conductor";
src = fetchurl {
url = https://github.com/holochain/holochain-rust/releases/download/v0.0.4-alpha/conductor-v0.0.4-alpha-x86_64-ubuntu.tar.gz;
sha256 = "0kxp52726dwhjxjhx7h14rav9vwbm6zkp4i49caq1p3gggja287q";
};
installPhase = ''
mkdir -p $out/bin
ls ${rustc}
#ls -la
#ls -la $out/bin
cp holochain $out/bin
ls -la $out/bin
patchelf --set-interpreter \
${rustc} $out/bin/holochain
patchelf --set-rpath ${rustc} $out/bin/holochain
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment