From d6c88eaeb8aa13172e1d503ac62522fed3db9ea2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Feb 2015 10:40:56 +0100 Subject: [PATCH] Apply upstream fix for Nix on XFS Fixes #6424. --- pkgs/tools/package-management/nix/default.nix | 2 ++ pkgs/tools/package-management/nix/xfs.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/tools/package-management/nix/xfs.patch diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index f1dad6379dc5..2d1051131336 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "a30a5e801bc1cb1019cbc3456d961a307c45c9c588b8692cf1293ea6588ef01c"; }; + patches = [ ./xfs.patch ]; + nativeBuildInputs = [ perl pkgconfig ]; buildInputs = [ curl openssl sqlite ]; diff --git a/pkgs/tools/package-management/nix/xfs.patch b/pkgs/tools/package-management/nix/xfs.patch new file mode 100644 index 000000000000..62ee9189ac1a --- /dev/null +++ b/pkgs/tools/package-management/nix/xfs.patch @@ -0,0 +1,13 @@ +diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc +index 119e71a..422ec97 100644 +--- a/src/libexpr/primops.cc ++++ b/src/libexpr/primops.cc +@@ -796,7 +796,7 @@ static void prim_readDir(EvalState & state, const Pos & pos, Value * * args, Val + for (auto & ent : entries) { + Value * ent_val = state.allocAttr(v, state.symbols.create(ent.name)); + if (ent.type == DT_UNKNOWN) +- ent.type = getFileType(path); ++ ent.type = getFileType(path + "/" + ent.name); + mkStringNoCopy(*ent_val, + ent.type == DT_REG ? "regular" : + ent.type == DT_DIR ? "directory" :