Loading pkgs/build-support/rust/import-cargo-lock.nix +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ let # Replaces values inherited by workspace members. replaceWorkspaceValues = writers.writePython3 "replace-workspace-values" { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" ]; } { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" "W503" ]; } (builtins.readFile ./replace-workspace-values.py); # Fetch and unpack a crate. Loading pkgs/build-support/rust/replace-workspace-values.py +5 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ def load_file(path: str) -> dict[str, Any]: def replace_key( workspace_manifest: dict[str, Any], table: dict[str, Any], section: str, key: str ) -> bool: if "workspace" in table[key] and table[key]["workspace"] is True: if ( isinstance(table[key], dict) and "workspace" in table[key] and table[key]["workspace"] is True ): print("replacing " + key) replaced = table[key] Loading pkgs/build-support/rust/test/import-cargo-lock/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ v1 = callPackage ./v1 { }; gitDependencyWorkspaceInheritance = callPackage ./git-dependency-workspace-inheritance { replaceWorkspaceValues = writers.writePython3 "replace-workspace-values" { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" ]; } { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" "W503" ]; } (builtins.readFile ../../replace-workspace-values.py); }; } pkgs/build-support/rust/test/import-cargo-lock/git-dependency-workspace-inheritance/crate.toml +7 −0 Original line number Diff line number Diff line [package] name = "im_using_workspaces" version = { workspace = true } publish = false keywords = [ "workspace", "other_thing", "third_thing", ] [dependencies] foo = { workspace = true, features = ["cat"] } Loading pkgs/build-support/rust/test/import-cargo-lock/git-dependency-workspace-inheritance/want.toml +7 −0 Original line number Diff line number Diff line [package] name = "im_using_workspaces" version = "1.0.0" publish = false keywords = [ "workspace", "other_thing", "third_thing", ] [dependencies] bar = "1.0.0" Loading Loading
pkgs/build-support/rust/import-cargo-lock.nix +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ let # Replaces values inherited by workspace members. replaceWorkspaceValues = writers.writePython3 "replace-workspace-values" { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" ]; } { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" "W503" ]; } (builtins.readFile ./replace-workspace-values.py); # Fetch and unpack a crate. Loading
pkgs/build-support/rust/replace-workspace-values.py +5 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ def load_file(path: str) -> dict[str, Any]: def replace_key( workspace_manifest: dict[str, Any], table: dict[str, Any], section: str, key: str ) -> bool: if "workspace" in table[key] and table[key]["workspace"] is True: if ( isinstance(table[key], dict) and "workspace" in table[key] and table[key]["workspace"] is True ): print("replacing " + key) replaced = table[key] Loading
pkgs/build-support/rust/test/import-cargo-lock/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ v1 = callPackage ./v1 { }; gitDependencyWorkspaceInheritance = callPackage ./git-dependency-workspace-inheritance { replaceWorkspaceValues = writers.writePython3 "replace-workspace-values" { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" ]; } { libraries = with python3Packages; [ tomli tomli-w ]; flakeIgnore = [ "E501" "W503" ]; } (builtins.readFile ../../replace-workspace-values.py); }; }
pkgs/build-support/rust/test/import-cargo-lock/git-dependency-workspace-inheritance/crate.toml +7 −0 Original line number Diff line number Diff line [package] name = "im_using_workspaces" version = { workspace = true } publish = false keywords = [ "workspace", "other_thing", "third_thing", ] [dependencies] foo = { workspace = true, features = ["cat"] } Loading
pkgs/build-support/rust/test/import-cargo-lock/git-dependency-workspace-inheritance/want.toml +7 −0 Original line number Diff line number Diff line [package] name = "im_using_workspaces" version = "1.0.0" publish = false keywords = [ "workspace", "other_thing", "third_thing", ] [dependencies] bar = "1.0.0" Loading