@@ -13,7 +13,6 @@ import (
1313 "go.jetpack.io/devbox/internal/debug"
1414 "go.jetpack.io/devbox/internal/redact"
1515 "go.jetpack.io/devbox/nix"
16- "go.jetpack.io/devbox/nix/flake"
1716 "golang.org/x/exp/maps"
1817)
1918
@@ -29,20 +28,8 @@ func StorePathFromHashPart(ctx context.Context, hash, storeAddr string) (string,
2928func StorePathsFromInstallable (ctx context.Context , installable string , allowInsecure bool ) ([]string , error ) {
3029 defer debug .FunctionTimer ().End ()
3130
32- // Some older versions of Nix have a bug where specifying a narHash
33- // without a lastModifiedDate query parameter results in an error. I'm
34- // not sure when it was fixed, but I know it works in 2.25+.
35- if ! nix .AtLeast (nix .Version2_25 ) {
36- parsed , err := flake .ParseInstallable (installable )
37- if err == nil {
38- parsed .Ref .NARHash = ""
39- parsed .Ref .LastModified = 0
40- installable = parsed .String ()
41- }
42- }
43-
4431 // --impure for NIXPKGS_ALLOW_UNFREE
45- cmd := command ("path-info" , installable , "--json" , "--impure" )
32+ cmd := command ("path-info" , fixInstallableArg ( installable ) , "--json" , "--impure" )
4633 cmd .Env = allowUnfreeEnv (os .Environ ())
4734
4835 if allowInsecure {
0 commit comments