name paths for purity, preventing double-hash store paths
Some checks failed
/ check-pre-commit (pull_request) Failing after 9s
/ check-peertube (pull_request) Successful in 17s
/ check-panel (pull_request) Failing after 10s
/ check-deployment-basic (pull_request) Failing after 39s
/ check-deployment-cli (pull_request) Failing after 37s

https://github.com/NixOS/nix/issues/10627
This commit is contained in:
Kiara Grouwstra 2025-05-30 16:58:41 +02:00
parent ee5c2b90b7
commit 196d4e1540
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
8 changed files with 41 additions and 13 deletions

View file

@ -18,7 +18,10 @@ let
};
}).run
{
src = ./.;
src = builtins.path {
path = ./.;
name = "root";
};
hooks =
let
## Add a directory here if pre-commit hooks shouldn't apply to it.

View file

@ -13,7 +13,10 @@ let
"cowsay"
];
pathToRoot = /. + (builtins.unsafeDiscardStringContext self);
pathFromRoot = ./.;
pathFromRoot = builtins.path {
path = ./.;
name = "basic";
};
in
{

View file

@ -15,7 +15,10 @@ let
"pixelfed"
];
pathToRoot = /. + (builtins.unsafeDiscardStringContext self);
pathFromRoot = ./.;
pathFromRoot = builtins.path {
path = ./.;
name = "cli";
};
enableAcme = true;
in
@ -57,7 +60,12 @@ in
## function calls.
makeTestDeployment =
args:
(import ../..)
(import (
builtins.path {
path = ../..;
name = "deployment";
}
))
{
inherit lib;
inherit (inputs) nixops4 nixops4-nixos;

View file

@ -3,11 +3,11 @@
pkgs,
...
}:
let
inherit (builtins) toString;
in
{
REPO_DIR = toString ../.;
REPO_DIR = builtins.path {
path = ../.;
name = "root";
};
# explicitly use nix, as e.g. lix does not have configurable-impure-env
BIN_PATH = lib.makeBinPath [
# explicitly use nix, as e.g. lix does not have configurable-impure-env

View file

@ -12,9 +12,14 @@ let
with lib.fileset;
toSource {
root = ../src;
fileset = intersection (gitTracked ../../.) ../src;
fileset = intersection (gitTracked (
builtins.path {
path = ../../.;
name = "root";
}
)) ../src;
};
pyproject = with lib; fromTOML pyproject-toml;
pyproject = fromTOML pyproject-toml;
# TODO: define this globally
name = "panel";
# TODO: we may want this in a file so it's easier to read statically

View file

@ -19,7 +19,10 @@ let
extraPython3Packages =
let
dir = toString ./.;
dir = builtins.path {
path = ./.;
name = "python-packages";
};
in
with builtins;
listToAttrs (

View file

@ -1 +1,4 @@
(import ./. { }).shell
(import (builtins.path {
path = ./.;
name = "panel";
}) { }).shell

View file

@ -1 +1,4 @@
(import ./. { }).shell
(import (builtins.path {
path = ./.;
name = "root";
}) { }).shell