diff --git a/modules/rules_nixpkgs_core/0.10.0/patches/debug.patch b/modules/rules_nixpkgs_core/0.10.0/patches/debug.patch new file mode 100644 index 00000000000..70510591ebf --- /dev/null +++ b/modules/rules_nixpkgs_core/0.10.0/patches/debug.patch @@ -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): diff --git a/modules/rules_nixpkgs_core/0.10.0/source.json b/modules/rules_nixpkgs_core/0.10.0/source.json index e864281a8de..59bdfed1606 100644 --- a/modules/rules_nixpkgs_core/0.10.0/source.json +++ b/modules/rules_nixpkgs_core/0.10.0/source.json @@ -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 }