nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
712 stars 80 forks source link

problem with install trough flakes #117

Closed brothermechanic closed 2 years ago

brothermechanic commented 2 years ago

Hello. Thank you for repository! Help me to install it trough flakes This is an error

$ nix profile install github:guibou/nixGL#nixGLNvidia
error: attribute 'currentTime' missing

       at /nix/store/vadnrinka7qsa6qn69g98hgvybgh6g2v-source/nixGL.nix:216:18:

          215|           # Add an impure parameter to force the rebuild on each access.
          216|           time = builtins.currentTime;
             |                  ^
          217|           preferLocalBuild = true;
(use '--show-trace' to show detailed location information)
guibou commented 2 years ago

could you try with nix build --impure github:guibou/nixGL#nixGLNvidia ?

ryanswrt commented 2 years ago

Here's the line I use NIXPKGS_ALLOW_UNFREE=1 nix profile install github:guibou/nixGL --impure ; for some reason nix profile doesn't read my local nix conf to allow unfree flakes to be installed

brothermechanic commented 2 years ago

could you try with nix build --impure github:guibou/nixGL#nixGLNvidia ?

that's builds fine

$ nix build --impure github:guibou/nixGL#nixGLNvidia
$ ls result/bin/nixGLNvidia-515.65.01
brothermechanic commented 2 years ago

Here's the line I use NIXPKGS_ALLOW_UNFREE=1 nix profile install github:guibou/nixGL --impure ; for some reason nix profile doesn't read my local nix conf to allow unfree flakes to be installed

Works!

$ nix profile install github:guibou/nixGL#nixGLNvidia --impure

Thank you!

brothermechanic commented 2 years ago

For final understanding...

--impure Allow access to mutable paths and repositories.

https://github.com/guibou/nixGL - is mutable repo?

guibou commented 2 years ago

@brothermechanic yes, the nixGLNvidia package does some impure stuffs in order to auto detect nvidia version.

guibou commented 2 years ago

I'm closing.

However, we should keep in mind that defining a solution to fix all theses impurity could be awesome.