nixbld: fix nixops deprecated pipes module
This commit was merged in pull request #89.
This commit is contained in:
@@ -933,7 +933,10 @@ in
|
||||
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
|
||||
nix = super.nix.appendPatches [ ./nix-networked-derivations.patch ];
|
||||
nixops_unstable_minimal = super.nixops_unstable_minimal.overrideAttrs (oa: {
|
||||
patches = oa.patches or [] ++ [ ./nixops-skip-unreachable-host.patch ];
|
||||
patches = oa.patches or [] ++ [
|
||||
./nixops-skip-unreachable-host.patch
|
||||
./nixops-fix-deprecated-pipes.patch
|
||||
];
|
||||
});
|
||||
hydra = super.hydra.overrideAttrs(oa: {
|
||||
patches = oa.patches or [] ++ [
|
||||
|
||||
22
nixbld-etc-nixos/nixops-fix-deprecated-pipes.patch
Normal file
22
nixbld-etc-nixos/nixops-fix-deprecated-pipes.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff --git a/nixops/script_defs.py b/nixops/script_defs.py
|
||||
index 2f75e943..7268ca3a 100644
|
||||
--- a/nixops/script_defs.py
|
||||
+++ b/nixops/script_defs.py
|
||||
@@ -22,7 +22,7 @@ import logging
|
||||
import logging.handlers
|
||||
import json
|
||||
from tempfile import TemporaryDirectory
|
||||
-import pipes
|
||||
+import shlex
|
||||
from typing import Tuple, List, Optional, Union, Generator, Type, Set, Sequence
|
||||
import nixops.ansi
|
||||
|
||||
@@ -1117,7 +1117,7 @@ def op_edit(args: Namespace) -> None:
|
||||
if not editor:
|
||||
raise Exception("the $EDITOR environment variable is not set")
|
||||
os.system(
|
||||
- "$EDITOR " + " ".join([pipes.quote(x) for x in depl.network_expr.network])
|
||||
+ "$EDITOR " + " ".join([shlex.quote(x) for x in depl.network_expr.network])
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user