aboutsummaryrefslogtreecommitdiff
path: root/nix2/driver.go
diff options
context:
space:
mode:
Diffstat (limited to 'nix2/driver.go')
-rw-r--r--nix2/driver.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/nix2/driver.go b/nix2/driver.go
index 96bbf42..cba3bee 100644
--- a/nix2/driver.go
+++ b/nix2/driver.go
@@ -510,8 +510,8 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive
}
// Use that repo for all packages not specified from a flake already.
for i := range driverConfig.Packages {
- if !strings.Contains(driverConfig.Packages[i], "#") && !strings.Contains(driverConfig.Packages[i], "/") {
- driverConfig.Packages[i] = nixpkgs + "#" + driverConfig.Packages[i]
+ if strings.HasPrefix(driverConfig.Packages[i], "#") {
+ driverConfig.Packages[i] = nixpkgs + driverConfig.Packages[i]
}
}