Skip to content

Commit

Permalink
Merge pull request #798 from adamcstephens/nixos/releases
Browse files Browse the repository at this point in the history
nixos-http: support versioned releases
  • Loading branch information
stgraber authored Dec 15, 2023
2 parents 7007498 + 7f14626 commit 69c177e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sources/nixos-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ type nixos struct {
}

func (s *nixos) Run() error {
tarballURL := fmt.Sprintf("https://hydra.nixos.org/job/nixos/trunk-combined/nixos.lxdContainerImage.%s-linux/latest/download-by-type/file/system-tarball", s.definition.Image.ArchitectureMapped)
hydraRelease := fmt.Sprintf("release-%s", s.definition.Image.Release)

if s.definition.Image.Release == "unstable" {
hydraRelease = "trunk-combined"
}

tarballURL := fmt.Sprintf("https://hydra.nixos.org/job/nixos/%s/nixos.lxdContainerImage.%s-linux/latest/download-by-type/file/system-tarball", hydraRelease, s.definition.Image.ArchitectureMapped)

fpath, err := s.DownloadHash(s.definition.Image, tarballURL, "", nil)
if err != nil {
Expand Down

0 comments on commit 69c177e

Please sign in to comment.