Skip to content

Commit c2660a7

Browse files
committed
flake: remove disfunctional devShell
The shell alias looks dubious and the shellHook also doesn't work: bash: /nix/store/b010ibix7i333qhv5smcb129yly1dmfj-cargo-setup-hook.sh: Is a directory This devShell is actually not needed. nix develop will just fallback to the package, which has already all dependencies. on the upside we can now use just callPackage which also work better with cross-compilation than the current approach.
1 parent 6c918eb commit c2660a7

File tree

2 files changed

+29
-50
lines changed

2 files changed

+29
-50
lines changed

codex-rs/default.nix

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,31 @@
1-
{ pkgs, ... }:
2-
let
1+
{
2+
openssl,
3+
rustPlatform,
4+
pkg-config,
5+
lib,
6+
...
7+
}:
8+
rustPlatform.buildRustPackage (finalAttrs: {
39
env = {
4-
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH";
10+
PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH";
511
};
6-
in
7-
rec {
8-
package = pkgs.rustPlatform.buildRustPackage {
9-
inherit env;
10-
pname = "codex-rs";
11-
version = "0.1.0";
12-
cargoLock.lockFile = ./Cargo.lock;
13-
doCheck = false;
14-
src = ./.;
15-
nativeBuildInputs = with pkgs; [
16-
pkg-config
17-
openssl
18-
];
19-
cargoLock.outputHashes = {
20-
"ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho=";
21-
};
22-
meta = with pkgs.lib; {
23-
description = "OpenAI Codex command‑line interface rust implementation";
24-
license = licenses.asl20;
25-
homepage = "https://github.com/openai/codex";
26-
};
12+
pname = "codex-rs";
13+
version = "0.1.0";
14+
cargoLock.lockFile = ./Cargo.lock;
15+
doCheck = false;
16+
src = ./.;
17+
nativeBuildInputs = [
18+
pkg-config
19+
openssl
20+
];
21+
22+
cargoLock.outputHashes = {
23+
"ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho=";
2724
};
28-
devShell = pkgs.mkShell {
29-
inherit env;
30-
name = "codex-rs-dev";
31-
packages = [
32-
pkgs.cargo
33-
package
34-
];
35-
shellHook = ''
36-
echo "Entering development shell for codex-rs"
37-
alias codex="cd ${package.src}/tui; cargo run; cd -"
38-
${pkgs.rustPlatform.cargoSetupHook}
39-
'';
25+
26+
meta = with lib; {
27+
description = "OpenAI Codex command‑line interface rust implementation";
28+
license = licenses.asl20;
29+
homepage = "https://github.com/openai/codex";
4030
};
41-
}
31+
})

flake.nix

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,8 @@
2020
codex-rs = pkgs.callPackage ./codex-rs { };
2121
in
2222
{
23-
codex-rs = codex-rs.package;
24-
default = codex-rs.package;
25-
}
26-
);
27-
28-
devShells = forAllSystems (system:
29-
let
30-
pkgs = nixpkgs.legacyPackages.${system};
31-
codex-rs = pkgs.callPackage ./codex-rs { };
32-
in
33-
{
34-
codex-rs = codex-rs.devShell;
35-
default = codex-rs.devShell;
23+
codex-rs = codex-rs;
24+
default = codex-rs;
3625
}
3726
);
3827
};

0 commit comments

Comments
 (0)