diff options
author | Alex Auvolat <alex@adnab.me> | 2022-11-29 16:19:19 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-11-29 16:19:19 +0100 |
commit | 59aba7607507193587be7c24229dc71066e3ae87 (patch) | |
tree | be6910b86fa2bf5eb346359c06d85b50a7162b0e /nix2/driver.go | |
parent | 8b424e195058dd1825c4a03304487860a3f73502 (diff) | |
download | nomad-driver-nix2-59aba7607507193587be7c24229dc71066e3ae87.tar.gz nomad-driver-nix2-59aba7607507193587be7c24229dc71066e3ae87.zip |
Ability to use taskdir as flake; change nixpkgs syntax
Diffstat (limited to 'nix2/driver.go')
-rw-r--r-- | nix2/driver.go | 4 |
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] } } |