Skip to content

Commit

Permalink
meta: add nix shell to build on Linux
Browse files Browse the repository at this point in the history
As noted in [1] on Linux systems, it is not possible to build phoenixd due to a mismatch in the libc version.

A possible solution is to use Nix and build phoenixd inside the shell with all the dependencies. This way, the host machine can use the binary directly without downgrading libc, which can be dangerous.

[1] #1 (comment)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Mar 28, 2024
1 parent 75247e4 commit 0740166
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .nix/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
buildInputs = [
pkgs.sqlite
pkgs.curl
pkgs.openjdk17

(pkgs.glibc.overrideAttrs (old: {
version = "2.19";
}))
];
}

0 comments on commit 0740166

Please sign in to comment.