Skip to content

Cannot nixpkgs.callPackage the default.nix #32

Open
@Quoteme

Description

I put

(import
  (
    let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
    fetchTarball {
      url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
      sha256 = lock.nodes.flake-compat.locked.narHash;
    }
  )
  { src = ./.; }
).defaultNix

in my default.nix and also

inputs.flake-compat = {
  url = github:edolstra/flake-compat;
  flake = false;
};

in my flake.nix. But when I try putting this in my configuration.nix

neovim-luca = (pkgs.callPackage (pkgs.fetchFromGitHub {
    owner = "quoteme";
    repo = "neovim-luca";
    rev = "d85f02952e35d0fd2afa783adb3e93d08fdd03d9";
    sha256 = "sha256-sPX1RaR3H4Hs2YEetdjI7b4UxBC4UxIkvOl1LIYSZuM=";
  }) {});

and doing sudo nixos-rebuild switch I get the following error:

building Nix...
building the system configuration...
error: attempt to call something which is not a function but a set

       at /nix/store/34br6qh4x4hjj15jjnbiivwgdhz4ci5a-nixos/nixos/lib/customisation.nix:69:16:

           68|     let
           69|       result = f origArgs;
             |                ^
           70|
(use '--show-trace' to show detailed location information)

nix-build works fine. But callPackage does not work. How can I fix this?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions