hledger icon indicating copy to clipboard operation
hledger copied to clipboard

Nix install fails with attribute not found error.

Open jeremy-j-ackso opened this issue 2 years ago • 6 comments

I'm attempting to install using nix, though I'm on Debian oldstable, so that could be a related issue. At this time I'm not clear if the problem is with my OS, nix, or with the archive.

$ nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA hledger_1_24_1 hledger-ui_1_24_1 hledger-web_1_24_1 
error: attribute 'hledger_1_24_1' in selection path 'hledger_1_24_1' not found

jeremy-j-ackso avatar Jan 12 '22 03:01 jeremy-j-ackso

Which channel are you using? Are you on nixpkgs-unstable? Nevermind, I see you're using a pinned nix.

Xitian9 avatar Jan 12 '22 07:01 Xitian9

Nix does not have top-level bound names for most Haskell packages. Try the following command and see if it works:

$ nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA haskellPackages.hledger_1_24_1 haskellPackages.hledger-ui_1_24_1 haskellPackages.hledger-web_1_24_1 

Xitian9 avatar Jan 12 '22 08:01 Xitian9

That command has worked in the past, eg with 1.24 I believe. Perhaps top-level names don't exist for the minor releases, or I spelled them wrong.

I really need a hledger-in-nix overseer to supervise and update this nix command on https://hledger.org/install.

simonmichael avatar Jan 12 '22 18:01 simonmichael

Sorry wasn't able to return sooner. I ended up building from source so that I could get going.

Should that nix command that @Xitian9 posted still work without messing up what I installed from source?

jeremy-j-ackso avatar Jan 13 '22 04:01 jeremy-j-ackso

I don't know nix that well, but surely it's worth a try FOR SCIENCE. Nix rollback, etc. Could you recheck:

nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA hledger_1_24_1 hledger-ui_1_24_1 hledger-web_1_24_1   # install page command

nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA haskellPackages.hledger_1_24_1 haskellPackages.hledger-ui_1_24_1 haskellPackages.hledger-web_1_24_1   # Xitian9's command

simonmichael avatar Jan 26 '22 18:01 simonmichael

nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA hledger_1_24_1
error: attribute 'hledger_1_24_1' in selection path 'hledger_1_24_1' not found

and

nix-env -f https://github.com/NixOS/nixpkgs/archive/e1225076.tar.gz -iA haskellPackages.hledger_1_24_1

proceeds to downloading and building hledger.

ShrykeWindgrace avatar Mar 02 '22 13:03 ShrykeWindgrace