ezKEa / aagl-gtk-on-nix

Run an-anime-game-launcher GTK version on Nix/NixOS!
GNU General Public License v3.0
72 stars 10 forks source link

Import from derivation #113

Closed Guanran928 closed 4 months ago

Guanran928 commented 4 months ago

programs.anime-game-launcher.enable = true; does not work when allow-import-from-derivation is false.

see: https://nix.dev/manual/nix/2.22/language/import-from-derivation

flake on  master [$!⇡]
❯ nix build .#nixosConfigurations.aristotle.config.system.build.toplevel --option allow-import-from-derivation false
warning: Git tree '/home/guanranwang/Documents/Projects/git-repos/github.com/Guanran928/flake' is dirty
error:
       … while calling the 'head' builtin

         at /nix/store/2yb39wmx10a5lsm4d2jj7c6h94h36spi-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/2yb39wmx10a5lsm4d2jj7c6h94h36spi-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: cannot build '/nix/store/q4vy8cgh3lp12rgghh2s3mfc0jy4nkk8-source.drv^out' during evaluation because the option 'allow-import-from-derivation' is disabled

flake on  master [$!⇡] took 20s
❯ nix derivation show /nix/store/q4vy8cgh3lp12rgghh2s3mfc0jy4nkk8-source.drv | nix run nixpkgs#jq -- '."/nix/store/q4vy8cgh3lp12rgghh2s3mfc0jy4nkk8-source.drv".env.url' -r
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/q4vy8cgh3lp12rgghh2s3mfc0jy4nkk8-source.drv^*'
https://github.com/an-anime-team/an-anime-game-launcher.git