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

attribute self.lastModifiedDate missing #13

Closed
RolfNic opened this issue Dec 14, 2021 · 1 comment · Fixed by #20
Closed

attribute self.lastModifiedDate missing #13

RolfNic opened this issue Dec 14, 2021 · 1 comment · Fixed by #20

Comments

@RolfNic
Copy link

RolfNic commented Dec 14, 2021

Context

Several templates in this repository have a reference to the attribute "self.lastModifiedDate", in each of these cases it appears that this property cant be read properly. Ive tested this with the bash-hello and the rust-web-server templates both of which give an error because of the missing attribute. The same holds for the attributes "self.lastModified" and "self.shortRev".

Steps to reproduce

Init one of the flakes in this repository, then build it.

$ nix flake init -t templates#bash-hello
$ nix build
error: attribute 'lastModifiedDate' missing

       at /nix/store/xhqq97pf0v5bd7nk1gwsirr4v621c2il-source/flake.nix:11:40:

           10|       # Generate a user-friendly version number.
           11|       version = builtins.substring 0 8 self.lastModifiedDate;
             |                                        ^
           12|
(use '--show-trace' to show detailed location information)

Possible solutions

  1. Make the flakes work as they are.
  2. Add a workaround into the templates.

Expected behaviour

Nix builds the flake without any problems.

Additional information

  • The nixpkgs flake.nix uses a workaround with a default value.
  • This commit message, which fixes the same issue, suggests that something about the path fetcher is broken.
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

Successfully merging a pull request may close this issue.

2 participants