[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
pull/1048/head
pre-commit-ci[bot] 2022-10-31 13:58:38 +00:00
rodzic 8edfa530bf
commit 54c193fafd
2 zmienionych plików z 11 dodań i 16 usunięć

Wyświetl plik

@ -718,4 +718,3 @@ class BaseImage(BuildPack):
# the only path evaluated at container start time rather than build time # the only path evaluated at container start time rather than build time
return os.path.join("${REPO_DIR}", start) return os.path.join("${REPO_DIR}", start)
return None return None

Wyświetl plik

@ -9,9 +9,7 @@ class GuixBuildPack(BaseImage):
def get_build_env(self): def get_build_env(self):
"""""" """"""
env = super().get_build_env() + [ env = super().get_build_env() + [("GUIX_DIR", "${APP_BASE}/guix")]
("GUIX_DIR", "${APP_BASE}/guix")
]
return env return env
def get_path(self): def get_path(self):
@ -20,8 +18,6 @@ class GuixBuildPack(BaseImage):
path.insert(0, "${GUIX_DIR}/bin") path.insert(0, "${GUIX_DIR}/bin")
return path return path
def get_build_scripts(self): def get_build_scripts(self):
""" """
Install a pinned version of Guix package manager, Install a pinned version of Guix package manager,
@ -34,15 +30,13 @@ class GuixBuildPack(BaseImage):
bash /tmp/.local/bin/guix-install.bash bash /tmp/.local/bin/guix-install.bash
""", """,
), ),
] ]
def get_build_script_files(self): def get_build_script_files(self):
"""Copying guix installation script on the image""" """Copying guix installation script on the image"""
return { return {
"guix/guix-install.bash": "guix/guix-install.bash": "/tmp/.local/bin/guix-install.bash",
"/tmp/.local/bin/guix-install.bash",
} }
def get_assemble_scripts(self): def get_assemble_scripts(self):
@ -64,15 +58,18 @@ class GuixBuildPack(BaseImage):
if os.path.exists(self.binder_path("channels.scm")): if os.path.exists(self.binder_path("channels.scm")):
assemble_script = assemble_script.format( assemble_script = assemble_script.format(
"guix time-machine -C " + self.binder_path("channels.scm") + "guix time-machine -C "
" -- package -m " + self.binder_path("manifest.scm") + self.binder_path("channels.scm")
+ " -- package -m "
+ self.binder_path("manifest.scm")
) )
else: else:
assemble_script = assemble_script.format( assemble_script = assemble_script.format(
"guix package -m " + self.binder_path("manifest.scm") "guix package -m " + self.binder_path("manifest.scm")
) )
return super().get_assemble_scripts() + [ return super().get_assemble_scripts() + [
( "root", (
"root",
assemble_script, assemble_script,
) )
] ]
@ -80,4 +77,3 @@ class GuixBuildPack(BaseImage):
def detect(self): def detect(self):
"""Check if current repo should be built with the guix BuildPack""" """Check if current repo should be built with the guix BuildPack"""
return os.path.exists(self.binder_path("manifest.scm")) return os.path.exists(self.binder_path("manifest.scm"))