babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
367 stars 27 forks source link

Error when running `neil dep upgrade` #134

Closed Camsbury closed 1 year ago

Camsbury commented 1 year ago

upgrade still hasn't been pushed to nixpkgs, so I overrode it with the latest sha from github:

  neil = super.neil.overrideAttrs (oldAttrs: rec {
    src = super.fetchFromGitHub {
      owner = "babashka";
      repo = "neil";
      rev = "3b61436e3";
      hash = "sha256-mrvxfSHI1nIQyhiMLgFUh8dnzgOv16DYEKwjIoQsQo8=";
    };
  });

When I run neil dep upgrade from a nix shell with the above overlay, I receive the following error:

----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Could not resolve symbol: fs/windows?
Location: /nix/store/x4k2binyymh02qwgisgmhziypiiknl2b-neil-0.0.13/bin/.neil-wrapped:34:29
Phase:    analysis

----- Context ------------------------------------------------------------------
30: (def dev-github-token (System/getenv "BABASHKA_NEIL_DEV_GITHUB_TOKEN"))
31: 
32: (def curl-opts
33:   (merge {:throw false
34:           :compressed (not (fs/windows?))}
                                ^--- Could not resolve symbol: fs/windows?
35:          (when (and dev-github-user dev-github-token)
36:            {:basic-auth [dev-github-user dev-github-token]})))
37: 
38: (defn curl-get-json [url]
39:   (-> (curl/get url curl-opts)

Operating System: NixOS 22.05 (Quokka)
Kernel: Linux 5.15.72 Architecture: x86-64

borkdude commented 1 year ago

@Camsbury You're like running with an old bb version.

Camsbury commented 1 year ago

I thought I had updated it when I saw this issue the first time, but I'll try it out again!

Camsbury commented 1 year ago

@borkdude okay looks good! - latest babashka should maybe be a propagatedBuildInput for the default.nix? Then it could be used as in the readme. Or maybe it is already passing through but is just outdated. When I was using nix-shell --pure I was still getting the older version.