|
1 | 1 | diff --git a/snapcraft_legacy/internal/common.py b/snapcraft_legacy/internal/common.py |
2 | | -index 6017b405..aacd99a5 100644 |
| 2 | +index b3d40c265..c68c24d53 100644 |
3 | 3 | --- a/snapcraft_legacy/internal/common.py |
4 | 4 | +++ b/snapcraft_legacy/internal/common.py |
5 | | -@@ -34,14 +34,17 @@ from snaphelpers import SnapConfigOptions, SnapCtlError |
| 5 | +@@ -36,7 +36,10 @@ from snapcraft_legacy.internal import errors |
6 | 6 |
|
7 | | - from snapcraft_legacy.internal import errors |
| 7 | + SNAPCRAFT_FILES = ["parts", "stage", "prime"] |
8 | 8 |
|
| 9 | +-_DEFAULT_PLUGINDIR = os.path.join(sys.prefix, "share", "snapcraft", "plugins") |
9 | 10 | +# Get the path to the Nix store entry for Snapcraft at runtime |
10 | 11 | +drv = os.path.realpath(__file__).split("/")[3] |
11 | 12 | + |
12 | | - SNAPCRAFT_FILES = ["parts", "stage", "prime"] |
13 | | --_DEFAULT_PLUGINDIR = os.path.join(sys.prefix, "share", "snapcraft", "plugins") |
14 | 13 | +_DEFAULT_PLUGINDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "plugins") |
15 | 14 | _plugindir = _DEFAULT_PLUGINDIR |
16 | | --_DEFAULT_SCHEMADIR = os.path.join(sys.prefix, "share", "snapcraft", "schema") |
17 | | -+_DEFAULT_SCHEMADIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "schema") |
18 | | - _schemadir = _DEFAULT_SCHEMADIR |
19 | | --_DEFAULT_EXTENSIONSDIR = os.path.join(sys.prefix, "share", "snapcraft", "extensions") |
20 | | -+_DEFAULT_EXTENSIONSDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "extensions") |
21 | | - _extensionsdir = _DEFAULT_EXTENSIONSDIR |
22 | | --_DEFAULT_KEYRINGSDIR = os.path.join(sys.prefix, "share", "snapcraft", "keyrings") |
23 | | -+_DEFAULT_KEYRINGSDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "keyrings") |
24 | | - _keyringsdir = _DEFAULT_KEYRINGSDIR |
25 | 15 |
|
26 | | - _DOCKERENV_FILE = "/.dockerenv" |
| 16 | + _BASE_DIR = Path(__file__).parents[2] |
0 commit comments