Giter Club home page Giter Club logo

Comments (5)

alerque avatar alerque commented on June 10, 2024

In score+=1 for debugging, I can at least reproduce this in NixOS!

$ docker run -it nixos/nix:latest
$ nix run --extra-experimental-features 'nix-command flakes' github:sile-typesetter/sile -- --version
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'

I don't understand why it works for me locally (Arch Linux w/ nix).

from sile-typesetter.github.io.

alerque avatar alerque commented on June 10, 2024

Adding the app name #sile to the command works both for me locally and in NixOS.

$ nix run --extra-experimental-features 'nix-command flakes' github:sile-typesetter/sile#sile -- --version
SILE v0.12.5-72b25f3-flake (Lua 5.3)

I will push that through as a fix to get the website updating, but I don't pretend to understand why.

from sile-typesetter.github.io.

doronbehar avatar doronbehar commented on June 10, 2024

I read this: NixOS/nix#6448 and I think your solution is:

diff --git i/flake.nix w/flake.nix
index dd0da117..b32ba0fc 100644
--- i/flake.nix
+++ w/flake.nix
@@ -139,9 +139,12 @@
       };
       packages.sile = sile;
       defaultPackage = sile;
-      apps.sile = {
-        type = "app";
-        program = "${sile}/bin/sile";
+      apps = rec {
+        default = sile;
+        sile = {
+          type = "app";
+          program = "${sile}/bin/sile";
+        };
       };
       defaultApp = apps.sile;
     }

from sile-typesetter.github.io.

doronbehar avatar doronbehar commented on June 10, 2024

The change done in the newer nix version is the fact that nix run now searches for app.default attribute and not defaultPackage, so it seems.

from sile-typesetter.github.io.

alerque avatar alerque commented on June 10, 2024

Thanks! That wasn't quite the right syntax because ${sile} isn't set there and needed to be ${self.defaultPackage.${system}} instead, but it was close enough to get on the right track. I agree with that issue you linked, this error is too cryptic and points completely the wrong direction—at least for this specific cause.

from sile-typesetter.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.