fix(nix): allow deleting store paths with a dot in them
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
5688547cb5
commit
2b25db0fb6
2 changed files with 20 additions and 0 deletions
|
@ -30,6 +30,14 @@
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
# Allow deleting store files with '.' in the name
|
||||||
|
package = pkgs.nixUnstable.overrideAttrs (oldAttrs: {
|
||||||
|
patches =
|
||||||
|
(oldAttrs.patches or [])
|
||||||
|
++ [
|
||||||
|
./overlays/nix/patch
|
||||||
|
];
|
||||||
|
});
|
||||||
# Edit nix.conf
|
# Edit nix.conf
|
||||||
settings = {
|
settings = {
|
||||||
# Store
|
# Store
|
||||||
|
|
12
common/overlays/nix/patch
Normal file
12
common/overlays/nix/patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/src/libstore/path.cc b/src/libstore/path.cc
|
||||||
|
index e642abcd5..0e584ef33 100644
|
||||||
|
--- a/src/libstore/path.cc
|
||||||
|
+++ b/src/libstore/path.cc
|
||||||
|
@@ -12,7 +12,7 @@ static void checkName(std::string_view path, std::string_view name)
|
||||||
|
if (!((c >= '0' && c <= '9')
|
||||||
|
|| (c >= 'a' && c <= 'z')
|
||||||
|
|| (c >= 'A' && c <= 'Z')
|
||||||
|
- || c == '+' || c == '-' || c == '.' || c == '_' || c == '?' || c == '='))
|
||||||
|
+ || c == '+' || c == '-' || c == '.' || c == '_' || c == '?' || c == '=' || c == '!'))
|
||||||
|
throw BadStorePath("store path '%s' contains illegal character '%s'", path, c);
|
||||||
|
}
|
Loading…
Reference in a new issue