mirror of
https://github.com/nix-community/naersk
synced 2024-11-15 00:17:10 +00:00
Merge pull request #11 from basvandijk/cargolock-cargotoml-via-file
Pass cargolock/cargotoml via file instead of via env var
This commit is contained in:
commit
95cf3bb609
2 changed files with 5 additions and 5 deletions
|
@ -122,7 +122,7 @@ with rec
|
|||
then
|
||||
echo "WARNING: replacing existing Cargo.lock"
|
||||
fi
|
||||
echo "$cargolock" > Cargo.lock
|
||||
install -m 644 "$cargolock" Cargo.lock
|
||||
fi
|
||||
|
||||
if [ -n "$cargotoml" ]
|
||||
|
@ -132,7 +132,7 @@ with rec
|
|||
then
|
||||
echo "WARNING: replacing existing Cargo.toml"
|
||||
fi
|
||||
echo "$cargotoml" > Cargo.toml
|
||||
install -m 644 "$cargotoml" Cargo.toml
|
||||
fi
|
||||
|
||||
mkdir -p target
|
||||
|
@ -245,9 +245,9 @@ with rec
|
|||
'';
|
||||
} //
|
||||
lib.optionalAttrs (! isNull cargolock )
|
||||
{ cargolock = builtinz.toTOML cargolock; } //
|
||||
{ cargolock = builtinz.writeTOML "Cargo.lock" cargolock; } //
|
||||
lib.optionalAttrs (! isNull cargotoml )
|
||||
{ cargotoml = builtinz.toTOML cargotoml; }
|
||||
{ cargotoml = builtinz.writeTOML "Cargo.toml" cargotoml; }
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
rec
|
||||
{
|
||||
toTOML = import ./to-toml.nix { inherit lib; };
|
||||
writeTOML = attrs: writeText "write-toml" (toTOML attrs);
|
||||
writeTOML = name: attrs: writeText name (toTOML attrs);
|
||||
|
||||
readTOML = usePure: f:
|
||||
if usePure then
|
||||
|
|
Loading…
Reference in a new issue