Skip to content

Commit

Permalink
fixing typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Nov 9, 2023
1 parent cc1bc7a commit 15bcfe1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions derivation.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ naersk, src, lib, pkg-config, cmake, zlib, openssl }:
{ naersk, src, lib, pkg-config, cmake, zlib, openssl, glibc}:

naersk.buildPackage {
pname = "lingo";
Expand All @@ -8,8 +8,8 @@ naersk.buildPackage {

cargoSha256 = lib.fakeSha256;

nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ zlib openssl ];
nativeBuildInputs = [ pkg-config cmake zlib openssl glibc];
buildInputs = [ ];

meta = with lib; {
description = "Simple package manager for lingua franca";
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/backends/cmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::backends::{
pub struct Cmake;

fn gen_cmake_files(app: &App, options: &BuildCommandOptions) -> BuildResult {
println!("ERROR: {:?}", app.src_dir_path());
let build_dir = app.output_root.join("build");
fs::create_dir_all(&build_dir)?;

Expand Down Expand Up @@ -84,6 +85,7 @@ fn do_cmake_build(results: &mut BatchBuildResults, options: &BuildCommandOptions
let cmake_binary_name = app.main_reactor.file_stem().unwrap();
// cleanup: rename executable to match the app name
let bin_dir = app.output_root.join("bin");
println!("moving {:?} to {:?}", bin_dir.join(cmake_binary_name), app.executable_path());
fs::rename(bin_dir.join(cmake_binary_name), app.executable_path())?;
Ok(())
});
Expand Down
2 changes: 1 addition & 1 deletion src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl App {

pub fn src_dir_path(&self) -> Option<PathBuf> {
for path in self.main_reactor.ancestors() {
if path.ends_with("sec") {
if path.ends_with("src") {
return Some(path.clone().to_path_buf());

Check warning on line 123 in src/package/mod.rs

View workflow job for this annotation

GitHub Actions / Check

call to `.clone()` on a reference in this situation does nothing

Check warning on line 123 in src/package/mod.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

call to `.clone()` on a reference in this situation does nothing

warning: call to `.clone()` on a reference in this situation does nothing --> src/package/mod.rs:123:33 | 123 | return Some(path.clone().to_path_buf()); | ^^^^^^^^ help: remove this redundant call | = note: the type `std::path::Path` does not implement `Clone`, so calling `clone` on `&std::path::Path` copies the reference, which does not do anything and can be removed
}
}
Expand Down

0 comments on commit 15bcfe1

Please sign in to comment.