Skip to content

Commit

Permalink
fix(packages): Fix last remaining issues reported by nix flake check
Browse files Browse the repository at this point in the history
* Add `autoPatchelfHook` to `nativeBuildInputs` only when compiling for Linux
* Correctly specify the list of supported platforms for `rapidsnark-server`
  • Loading branch information
PetarKirov committed Apr 13, 2023
1 parent 4cf6138 commit a889c91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/rapidsnark-server/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
lib,
stdenv,
pistache,
ffiasm,
Expand All @@ -9,7 +10,12 @@
in
stdenv.mkDerivation rec {
pname = "rapidsnark-server";
inherit (rapidsnark) version src nativeBuildInputs doCheck meta;
inherit (rapidsnark) version src nativeBuildInputs doCheck;
meta =
rapidsnark.meta
// {
platforms = with lib.platforms; linux;
};
buildInputs = rapidsnark.buildInputs ++ [pistache];

buildPhase = ''
Expand Down
2 changes: 1 addition & 1 deletion packages/solana-bpf-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ with pkgs;
};

# TODO autoPatchElf is Linux-specific. We need a cross-platform solution.
nativeBuildInputs = [autoPatchelfHook];
nativeBuildInputs = lib.optionals stdenv.isLinux [autoPatchelfHook];

buildInputs = with pkgs; [
zlib
Expand Down
2 changes: 1 addition & 1 deletion packages/wasmd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ in

subPackages = ["cmd/wasmd"];

buildInputs = [autoPatchelfHook];
nativeBuildInputs = lib.optionals stdenv.isLinux [autoPatchelfHook];

postBuild = ''
mkdir -p "$out/lib"
Expand Down

0 comments on commit a889c91

Please sign in to comment.