![D Anzorge](/assets/img/avatar_default.png)
Members of the [package] table in Cargo.toml can be either subtables, or values like strings and bools. Python is happy to check for membership of "workspace" in a string, since Python strings are iterables, but if the value is a bool, Python will throw an exception.
21 lines
951 B
Nix
21 lines
951 B
Nix
{ callPackage, writers, python3Packages }:
|
|
|
|
# Build like this from nixpkgs root:
|
|
# $ nix-build -A tests.importCargoLock
|
|
{
|
|
basic = callPackage ./basic { };
|
|
basicDynamic = callPackage ./basic-dynamic { };
|
|
gitDependency = callPackage ./git-dependency { };
|
|
gitDependencyRev = callPackage ./git-dependency-rev { };
|
|
gitDependencyRevNonWorkspaceNestedCrate = callPackage ./git-dependency-rev-non-workspace-nested-crate { };
|
|
gitDependencyTag = callPackage ./git-dependency-tag { };
|
|
gitDependencyBranch = callPackage ./git-dependency-branch { };
|
|
maturin = callPackage ./maturin { };
|
|
v1 = callPackage ./v1 { };
|
|
gitDependencyWorkspaceInheritance = callPackage ./git-dependency-workspace-inheritance {
|
|
replaceWorkspaceValues = writers.writePython3 "replace-workspace-values"
|
|
{ libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" "W503" ]; }
|
|
(builtins.readFile ../../replace-workspace-values.py);
|
|
};
|
|
}
|