diff --git a/default.nix b/default.nix index 4c71ec49..c7d2d21b 100644 --- a/default.nix +++ b/default.nix @@ -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. diff --git a/deployment/check/basic/flake-part.nix b/deployment/check/basic/flake-part.nix index 24d23c40..76c4fec7 100644 --- a/deployment/check/basic/flake-part.nix +++ b/deployment/check/basic/flake-part.nix @@ -13,7 +13,10 @@ let "cowsay" ]; pathToRoot = /. + (builtins.unsafeDiscardStringContext self); - pathFromRoot = ./.; + pathFromRoot = builtins.path { + path = ./.; + name = "basic"; + }; in { diff --git a/deployment/check/cli/flake-part.nix b/deployment/check/cli/flake-part.nix index 7d71526b..2c2b5a4c 100644 --- a/deployment/check/cli/flake-part.nix +++ b/deployment/check/cli/flake-part.nix @@ -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; diff --git a/panel/env.nix b/panel/env.nix index 07ce4193..af1f4096 100644 --- a/panel/env.nix +++ b/panel/env.nix @@ -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 diff --git a/panel/nix/package.nix b/panel/nix/package.nix index e13e015a..7b87a4f1 100644 --- a/panel/nix/package.nix +++ b/panel/nix/package.nix @@ -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 diff --git a/panel/nix/python-packages/default.nix b/panel/nix/python-packages/default.nix index 40d9dcb0..d3481398 100644 --- a/panel/nix/python-packages/default.nix +++ b/panel/nix/python-packages/default.nix @@ -19,7 +19,10 @@ let extraPython3Packages = let - dir = toString ./.; + dir = builtins.path { + path = ./.; + name = "python-packages"; + }; in with builtins; listToAttrs ( diff --git a/panel/shell.nix b/panel/shell.nix index a6bdf202..85db36d2 100644 --- a/panel/shell.nix +++ b/panel/shell.nix @@ -1 +1,4 @@ -(import ./. { }).shell +(import (builtins.path { + path = ./.; + name = "panel"; +}) { }).shell diff --git a/shell.nix b/shell.nix index a6bdf202..0cec318c 100644 --- a/shell.nix +++ b/shell.nix @@ -1 +1,4 @@ -(import ./. { }).shell +(import (builtins.path { + path = ./.; + name = "root"; +}) { }).shell