aboutsummaryrefslogtreecommitdiff
path: root/nix2
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-11-29 13:51:02 +0100
committerAlex Auvolat <alex@adnab.me>2022-11-29 13:51:02 +0100
commitd13a77952cd6404fa535b3863fca0a5bf8501af5 (patch)
tree7e0d2af6fbd10a55a71e826bf4d86c330a32c0ee /nix2
parentc0af0b632dc80cfe6817dcd021f842fce70d8345 (diff)
downloadnomad-driver-nix2-d13a77952cd6404fa535b3863fca0a5bf8501af5.tar.gz
nomad-driver-nix2-d13a77952cd6404fa535b3863fca0a5bf8501af5.zip
Don't add <nixpkgs># if package already contains /
Diffstat (limited to 'nix2')
-rw-r--r--nix2/driver.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix2/driver.go b/nix2/driver.go
index b5650d6..3fe052f 100644
--- a/nix2/driver.go
+++ b/nix2/driver.go
@@ -510,7 +510,7 @@ 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], "#") {
+ if !strings.Contains(driverConfig.Packages[i], "#") && !strings.Contains(driverConfig.Packages[i], "/") {
driverConfig.Packages[i] = nixpkgs + "#" + driverConfig.Packages[i]
}
}