Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
aherrmann committed Oct 19, 2023
1 parent 71896a4 commit 007596e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions modules/rules_nixpkgs_core/0.10.0/patches/debug.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/core/util.bzl b/core/util.bzl
index 804892a..52ab5c4 100644
--- a/core/util.bzl
+++ b/core/util.bzl
@@ -23,7 +23,17 @@ def fail_on_err(return_value, prefix = None):

return result

+def _ls(repository_ctx, path):
+ result = repository_ctx.execute(["ls", path])
+ print(path, "\nSTDOUT\n", result.stdout, "\nSTDERR\n", result.stderr, "\nCODE\n", result.return_code)
+
def is_supported_platform(repository_ctx):
+ print("PATH", repository_ctx.os.environ.get("PATH", ""))
+ print("HOME", repository_ctx.os.environ.get("HOME", ""))
+ home = repository_ctx.os.environ.get("HOME", "")
+ _ls(repository_ctx, home + "/.nix-profile/bin")
+ _ls(repository_ctx, "/nix/var/nix/profiles/default/bin")
+ _ls(repository_ctx, "/nix/var/nix/profiles")
return repository_ctx.which("nix-build") != None

def _is_executable(repository_ctx, path):
6 changes: 5 additions & 1 deletion modules/rules_nixpkgs_core/0.10.0/source.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"integrity": "sha256-mA7fzu8uWeESLZvmxSQTvCmENfCj1FJTK4pI11Yv/Wc=",
"strip_prefix": "rules_nixpkgs-0.10.0/core",
"url": "https://github.com/tweag/rules_nixpkgs/releases/download/v0.10.0/rules_nixpkgs-0.10.0.tar.gz"
"url": "https://github.com/tweag/rules_nixpkgs/releases/download/v0.10.0/rules_nixpkgs-0.10.0.tar.gz",
"patches": {
"debug.patch": "sha256-v6i0t42xSAMuNNYWXwbloChIrlsu9/nIva+NSKVsC2c="
},
"patch_strip": 2
}

0 comments on commit 007596e

Please sign in to comment.