Plutonomicon / pluto

An untyped Plutus Core assembler
32 stars 8 forks source link

"pluto/nixpkgs follows a non-existent input 'haskellNix/nixpkgs-unstable'" error upon adding pluto as flake input #22

Closed TotallyNotChase closed 2 years ago

TotallyNotChase commented 2 years ago

For this basic flake file, just to add the pluto binary to the shell-

{
  description = "A very basic flake";

  inputs.pluto =  {
    type = "github";
    owner = "Plutonomicon";
    repo = "pluto";
    rev = "339c05396190ba09ad3ec4a3efd609ed1c4c21e0";
  };

  outputs = { self, nixpkgs, pluto }:
    let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in {

      packages.x86_64-linux.hello = pkgs.hello;

      defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;

      devShell.x86_64-linux =
        pkgs.mkShell { buildInputs = [ self.packages.x86_64-linux.hello pluto.defaultPackage.x86_64-linux ]; };
    };
}

I get the error-

error: input 'pluto/nixpkgs' follows a non-existent input 'haskellNix/nixpkgs-unstable'

       … while updating the lock file of flake 'path:/...'

Interestingly, the error goes away if I'm not specifying the commit-

{
  description = "A very basic flake";

  inputs.pluto =  {
    type = "github";
    owner = "Plutonomicon";
    repo = "pluto";
  };

  outputs = { self, nixpkgs, pluto }:
    let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in {

      packages.x86_64-linux.hello = pkgs.hello;

      defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;

      devShell.x86_64-linux =
        pkgs.mkShell { buildInputs = [ self.packages.x86_64-linux.hello pluto.defaultPackage.x86_64-linux ]; };
    };
}

This works fine.

ursi commented 2 years ago

Your example flake built for me just fine, starting with no lock file. I run into this a lot, and one of two things has always fixed it for me.

TotallyNotChase commented 2 years ago

Oh wow it was an issue with the lock file. That's quite weird. Starting with a fresh lock file does work. So does manual --update-input pluto. Thanks for the suggestions!