-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before #300, our `builtinz.toTOML` used to return a string representing the serialized document which was later redirected into a file: https://github.com/nix-community/naersk/pull/300/files#diff-b6b537316f2d29c8faf178a110366796811d1bc72f694262c7d2efad79aa984bL238 Over that merge request, this was changed to return a path, to make it consistent with how nixpkgs' formatters work - but I haven't noticed one place that still _read_ the file instead of returning a path (which was fine before, since the code did `echo ... > ...`, but is not a correct thing to do for `cp`). Closes #305.
- Loading branch information
Showing
7 changed files
with
46 additions
and
1 deletion.
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,20 @@ | ||
{ sources, pkgs, ... }: | ||
|
||
let | ||
fenix = import sources.fenix { }; | ||
|
||
# Support for custom environmental variables was introduced in Cargo 1.56 and | ||
# our tests use nixpkgs-21.05 which contains an older version of Cargo, making | ||
# this test fail otherwise. | ||
toolchain = fenix.latest; | ||
|
||
naersk = pkgs.callPackage ../../../default.nix { | ||
cargo = toolchain.cargo; | ||
rustc = toolchain.rustc; | ||
}; | ||
|
||
in | ||
naersk.buildPackage { | ||
src = ./fixtures; | ||
doCheck = true; | ||
} |
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,2 @@ | ||
[env] | ||
ENV_HELLO_WORLD="Hello, World!" |
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,4 @@ | ||
[package] | ||
name = "cargo-config" | ||
version = "0.1.0" | ||
edition = "2018" |
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,11 @@ | ||
fn main() { | ||
println!("{}", env!("ENV_HELLO_WORLD")); | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
#[test] | ||
fn test() { | ||
assert_eq!("Hello, World!", env!("ENV_HELLO_WORLD")); | ||
} | ||
} |
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