From 0484748735b70e731b7a79a6eeaae36f6f064c6d Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Fri, 17 Jan 2020 12:09:33 -0800 Subject: [PATCH] [INF-585] Enable fully static builds (#266) * fully static dfx * Make dfx standalone on all platforms --- dfx.nix | 4 +++- nix/overlays/dfinity-sdk.nix | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dfx.nix b/dfx.nix index 1874ae4a2b..f9ef03bffc 100644 --- a/dfx.nix +++ b/dfx.nix @@ -23,6 +23,7 @@ let ".*Cargo\.lock$" "^.cargo/config$" ]; + static = pkgs.stdenv.isLinux; }; workspace' = ( workspace // { @@ -35,7 +36,8 @@ let postDoc = oldAttrs.postDoc + '' pushd src/dfx - cargo graph | dot -Tsvg > ../../target/doc/dfx/cargo-graph.svg + cargo graph | dot -Tsvg > \ + ../../target/$CARGO_BUILD_TARGET/doc/dfx/cargo-graph.svg popd ''; diff --git a/nix/overlays/dfinity-sdk.nix b/nix/overlays/dfinity-sdk.nix index 540ec0d4c9..f30b9ed6ee 100644 --- a/nix/overlays/dfinity-sdk.nix +++ b/nix/overlays/dfinity-sdk.nix @@ -3,8 +3,7 @@ let mkRelease = super.callPackage ./mk-release.nix {}; rust-package' = import ../../dfx.nix { pkgs = self; }; # remove some stuff leftover by callPackage - rust-package = removeAttrs rust-package' - [ "override" "overrideDerivation" ]; + rust-package = removeAttrs rust-package' [ "override" "overrideDerivation" ]; rust-workspace = rust-package.build; public = import ../../public { pkgs = self; }; in @@ -22,6 +21,7 @@ in { drv = rust-workspace; exename = "dfx"; + usePackager = false; }; e2e-tests = super.callPackage ../../e2e {};