-
Notifications
You must be signed in to change notification settings - Fork 5.5k
add a github action to test the nix flake works and doesn't break #2527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6bf5be2
57ca18c
d34e962
c44ce17
b3f958c
421247e
7c2b25f
966c387
da1b4d1
ce683b1
5772c1f
c1dbef4
26a77c3
8dde25f
3327434
3a5e774
cd40751
af44fce
e7059fa
49ba7c6
e532151
a25cadf
59613cc
bc97ddf
50fdbf9
d256560
2020b9d
1b7c84c
ecbd7fa
5ba0f7b
b50e3f5
35cdc65
e45427b
c76330c
c445e53
4ac625c
ef8756a
d6658f6
f98ca67
e0b44d8
18aabb1
6bba56c
85bb19e
6018468
d88a9b8
b101fbe
0e9ddd7
1d0008b
e841bf5
d0d6483
c720581
7f8dd7f
bfc3deb
ab6411f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Test Nix Flake | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jessfraz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
jobs: | ||
nix-flake-check: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix flake check for all platforms | ||
run: | | ||
nix flake check --all-systems | ||
nix-build-linux: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix build . for x86_64-linux | ||
run: nix build . | ||
nix-build-macos: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix build for x86_64-darwin | ||
run: nix build . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,53 @@ | ||
{ pkgs, monorep-deps ? [], ... }: | ||
let | ||
{ | ||
pkgs, | ||
monorepo-deps ? [], | ||
... | ||
}: let | ||
lib = pkgs.lib; | ||
|
||
env = { | ||
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH"; | ||
}; | ||
in | ||
rec { | ||
in rec { | ||
package = pkgs.rustPlatform.buildRustPackage { | ||
inherit env; | ||
pname = "codex-rs"; | ||
version = "0.1.0"; | ||
cargoLock.lockFile = ./Cargo.lock; | ||
doCheck = false; | ||
src = ./.; | ||
|
||
cargoLock = { | ||
lockFile = ./Cargo.lock; | ||
# ratatui is patched via git, so we must whitelist its fixed-output hash | ||
outputHashes = { | ||
"ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho="; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm afraid this cannot be managed by dependabot or any automated system. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah its super unfortunate, and according to our mutual friend, o3, this seems like the lesser of evils... I presume you all plan on getting your changes merged to ratatui upstream, that would definitely clean it up. But I'm also happy to help, this flake is a part of my dotfiles now, so you all can ping me whenever the action breaks, honestly I'd much prefer being pinged than the flake not work :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Pls excuse the drive-by commenting) If you do want to maintain this long term, you can write a small script that does something to the effect of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ya that seems like a lot of extra work for something where there hasnt been changes in 3 weeks: https://github.com/nornagon/ratatui/tree/nornagon-v0.29.0-patch I'd like to better understand the plans to upstream |
||
}; | ||
}; | ||
|
||
doCheck = false; | ||
|
||
nativeBuildInputs = with pkgs; [ | ||
pkg-config | ||
openssl | ||
]; | ||
meta = with pkgs.lib; { | ||
description = "OpenAI Codex command‑line interface rust implementation"; | ||
|
||
meta = with lib; { | ||
description = "OpenAI Codex command line interface rust implementation"; | ||
license = licenses.asl20; | ||
homepage = "https://github.com/openai/codex"; | ||
}; | ||
}; | ||
|
||
devShell = pkgs.mkShell { | ||
inherit env; | ||
name = "codex-rs-dev"; | ||
packages = monorep-deps ++ [ | ||
pkgs.cargo | ||
package | ||
]; | ||
packages = monorepo-deps ++ [package]; | ||
shellHook = '' | ||
echo "Entering development shell for codex-rs" | ||
alias codex="cd ${package.src}/tui; cargo run; cd -" | ||
${pkgs.rustPlatform.cargoSetupHook} | ||
''; | ||
}; | ||
|
||
app = { | ||
type = "app"; | ||
program = "${package}/bin/codex"; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.