aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-04 13:55:15 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-03-04 13:56:17 +0100
commitd37dc71e3cf077fa5d24a9bf8395deae21cc4410 (patch)
tree258c5c7d6e090f8453d727b71bb7c7576735f2a3 /src/nix-build
parent887030f211dcd062a73021b1cc289992502b35e4 (diff)
nix-build: Fix !<output> handling
This was broken by 22a754c091f765061f59bef5ce091268493bb138. https://hydra.nixos.org/eval/1573669
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index ff95ad787..27ec7d0fe 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -295,7 +295,8 @@ static void _main(int argc, char * * argv)
try {
absolute = canonPath(absPath(i), true);
} catch (Error & e) {};
- if (store->isStorePath(absolute) && std::regex_match(absolute, std::regex(".*\\.drv(!.*)?")))
+ auto [path, outputNames] = parsePathWithOutputs(absolute);
+ if (store->isStorePath(path) && hasSuffix(path, ".drv"))
drvs.push_back(DrvInfo(*state, store, absolute));
else
/* If we're in a #! script, interpret filenames