Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add nix dev environment (#86)
* WIP attempt at running nix flake * add git to fix issue with openssl 3 linking * node setup * Nix flakes for stump * fix github actions * fix github actions * add comment * nix flake in ci * comments * hopefully fix nix ci build * oups * comments * Update build_nix.yml * Update build_nix.yml * Update build_nix.yml * Update build_nix.yml
- Loading branch information
Showing
14 changed files
with
978 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: "Build legacy Nix package on Ubuntu" | ||
|
||
on: | ||
push: | ||
paths: | ||
- flake.nix | ||
- flake.lock | ||
- .github/workflows/build_nix.yml | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: cachix/install-nix-action@v17 | ||
- name: test | ||
run: nix develop --command "pkg-config" "--libs" "--cflags" "gdk-3.0" "gdk-3.0 >= 3.22" | ||
# - name: Building package | ||
# run: nix develop --command pnpm core run setup && cargo check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,8 @@ core/integration-tests/.* | |
_next | ||
|
||
docker-compose.yaml | ||
server_old | ||
server_old | ||
|
||
# nix | ||
.envrc | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "nixpkgs"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
|
||
libraries = with pkgs;[ | ||
webkitgtk | ||
gtk3 | ||
cairo | ||
gdk-pixbuf | ||
glib | ||
dbus | ||
openssl_3 | ||
]; | ||
|
||
packages = with pkgs; [ | ||
# node | ||
nodePackages.pnpm | ||
nodejs | ||
|
||
# rust | ||
rustfmt | ||
clippy | ||
rustc | ||
cargo | ||
cargo-deny | ||
cargo-edit | ||
cargo-watch | ||
|
||
# Tauri deps | ||
curl | ||
wget | ||
pkg-config | ||
dbus | ||
openssl_3 | ||
glib | ||
gtk3 | ||
libsoup | ||
webkitgtk | ||
|
||
# avoid openssl linking error when local git version isn't compatible with openssl_3 | ||
git | ||
]; | ||
in | ||
{ | ||
devShell = pkgs.mkShell { | ||
|
||
buildInputs = packages ++ [( | ||
# Needed for rust-analyzer | ||
pkgs.rust-bin.stable.latest.default.override { | ||
extensions = [ "rust-src" ]; | ||
} | ||
)]; | ||
|
||
# Needed for rust-analyzer | ||
RUST_SRC_PATH = "${pkgs.rust-bin.stable.latest.default.override { | ||
extensions = [ "rust-src" ]; | ||
}}/lib/rustlib/src/rust/library"; | ||
|
||
shellHook = | ||
'' | ||
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH | ||
''; | ||
}; | ||
}); | ||
} |
Oops, something went wrong.