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

Commit

Permalink
Simplify dependency on local source files
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen committed Jan 19, 2024
1 parent 03d853f commit 049c62e
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions nix/rollup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,30 @@
let
rollup-guest-src = nixpkgs.stdenv.mkDerivation {
name = "rollup-guest-src";
src = ../.;
src = ../crates;
dontBuild = true;

installPhase = ''
mkdir -p $out
cp -r crates $out/
cp Cargo.toml constants.json $out/
mkdir -p $out/crates
cp -r . $out/crates
cp ${../Cargo.toml} $out/Cargo.toml
cp ${../constants.json} $out/constants.json
'';
};

rollup-src = nixpkgs.stdenv.mkDerivation {
name = "rollup-guest-src";
src = ../crates;
dontBuild = true;

installPhase = ''
mkdir -p $out/crates
cp -r . $out/crates
cp ${../Cargo.toml} $out/Cargo.toml
cp ${../Cargo.lock} $out/Cargo.lock
cp ${../constants.json} $out/constants.json
'';
};
rollup-guest-mock = nixpkgs.rustPlatform.buildRustPackage {
name = "rollup-guest-mock";

Expand Down Expand Up @@ -98,7 +112,7 @@ let
rollup = nixpkgs.rustPlatform.buildRustPackage {
name = "sov-rollup-starter";

src = ../.;
src = rollup-src;

cargoLock = {
lockFile = ../Cargo.lock;
Expand All @@ -119,7 +133,7 @@ let
PKG_CONFIG_PATH = "${nixpkgs.openssl.dev}/lib/pkgconfig";

ROLLUP_ELF_PATH = "${rollup-guest-celestia}/rollup";
CONSTANTS_MANIFEST = ../.;
CONSTANTS_MANIFEST = rollup-src;

nativeBuildInputs = [
nixpkgs.pkg-config
Expand Down

0 comments on commit 049c62e

Please sign in to comment.