mirror of
https://github.com/openai/codex.git
synced 2026-03-05 21:45:28 +03:00
fix(nix): include libcap dependency on linux builds (#12415)
commit 923f931121 introduced a dependency
on `libcap`. This PR fixes the nix build by including `libcap` in nix's
build inputs
issue number: #12102. @etraut-openai gave me permission to open pr
Testing:
running `nix run .#codex-rs` works on both macos (aarch64) and nixos
(x86-64)
This commit is contained in:
@@ -2,16 +2,18 @@
|
||||
cmake,
|
||||
llvmPackages,
|
||||
openssl,
|
||||
libcap ? null,
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
lib,
|
||||
stdenv,
|
||||
version ? "0.0.0",
|
||||
...
|
||||
}:
|
||||
rustPlatform.buildRustPackage (_: {
|
||||
env = {
|
||||
PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH";
|
||||
};
|
||||
env.PKG_CONFIG_PATH = lib.makeSearchPathOutput "dev" "lib/pkgconfig" (
|
||||
[ openssl ] ++ lib.optionals stdenv.isLinux [ libcap ]
|
||||
);
|
||||
pname = "codex-rs";
|
||||
inherit version;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
@@ -31,6 +33,8 @@ rustPlatform.buildRustPackage (_: {
|
||||
llvmPackages.libclang.lib
|
||||
openssl
|
||||
pkg-config
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
libcap
|
||||
];
|
||||
|
||||
cargoLock.outputHashes = {
|
||||
@@ -47,5 +51,6 @@ rustPlatform.buildRustPackage (_: {
|
||||
description = "OpenAI Codex command‑line interface rust implementation";
|
||||
license = licenses.asl20;
|
||||
homepage = "https://github.com/openai/codex";
|
||||
mainProgram = "codex";
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user