Skip to content

Commit

Permalink
new breakthroughs in nix technology
Browse files Browse the repository at this point in the history
  • Loading branch information
float3 committed Apr 11, 2024
1 parent 249d5a0 commit 66d90da
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
rustup.sh
lint.sh
rustup.sh
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ pkgs.mkShell {
pkg-config
rustup
gcc
openimagedenoise
];

shellHook = ''
export OIDN_DIR="${pkgs.openimagedenoise}/lib";
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH";
export LD_LIBRARY_PATH=./oidn/oidn/lib:$LD_LIBRARY_PATH
export OPENSSL_DIR=${pkgs.openssl.dev}
Expand Down
11 changes: 11 additions & 0 deletions lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p cargo rustup openimagedenoise

cargo update --workspace
cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features --workspace -- -D warnings
cargo fix --allow-dirty --allow-staged --all-targets --all-features --workspace
cargo fmt --all
cargo check --all-targets --all-features --workspace --release
cargo test --all-targets --all-features --workspace --release
cargo build --all-targets --all-features --workspace --release
cargo run --release
4 changes: 3 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ pkgs.mkShell {
pkg-config
rustup
gcc
openimagedenoise
];

shellHook = ''
export OIDN_DIR="${pkgs.openimagedenoise}/lib";
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH";
export LD_LIBRARY_PATH=./oidn/oidn/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="${pkgs.openimagedenoise}/lib:$LD_LIBRARY_PATH";
export OPENSSL_DIR=${pkgs.openssl.dev}
export OPENSSL_LIB_DIR=${pkgs.openssl.out}/lib
export OPENSSL_INCLUDE_DIR=${pkgs.openssl.dev}/include
Expand Down

0 comments on commit 66d90da

Please sign in to comment.