Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import without niv #184

Open
cduret opened this issue Mar 17, 2023 · 1 comment
Open

import without niv #184

cduret opened this issue Mar 17, 2023 · 1 comment

Comments

@cduret
Copy link

cduret commented Mar 17, 2023

Hello I try to import npmlock2nix directly from nix and I have an error :

In test.nix :

let  npmlock2nix = builtins.fetchTarball {
       sha256 = "1ddfby72fsnpn4yw43g4zxvg6jzlk5hi5cfnnccg9jgw53ckr4xh";
       url = "https://github.com/nix-community/npmlock2nix/archive/9197bbf397d76059a76310523d45df10d2e4ca81.tar.gz";
     };
     npmlock2nix-drv = import npmlock2nix {};
in
npmlock2nix-drv

In nix repl :

nix-repl> import ./test.nix
{ build = trace: warning: [npmlock2nix] You are using the unversion prefix for builders. This is fine for now. In the future we will move to a versioned interface (old versions remain as they are). The currently used functions are availabe as `npmlock2nix.v1` for example `npmlock2nix.v1.build`.
error: attempt to call something which is not a function but a string

       at «none»:0: (source not available)
@a-h
Copy link

a-h commented Aug 8, 2023

I think the error you're seeing is just that npmlock2nix-drv doesn't have a root thing, you have to use v1 or v2 next to it. I have a working example here: #159 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants