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
agda-packages: add functional-linear-algebra library at v0.1 #100466
agda-packages: add functional-linear-algebra library at v0.1 #100466
Conversation
pkgs/top-level/agda-packages.nix
Outdated
@@ -26,5 +26,8 @@ let | |||
cubical = callPackage ../development/libraries/agda/cubical { }; | |||
|
|||
generic = callPackage ../development/libraries/agda/generic { }; | |||
|
|||
fla = callPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not call it functional-linear-algebra
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes more sense; I had been using FLA.*
as imports inside the library because the name was too long but that doesn't really matter as much here since the name won't be part of a long identifier.
@@ -0,0 +1,14 @@ | |||
fetchFromGitHub: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a similar format to the other Agda libraries? Starting with { pkgs,
usually. You can then inherit (pkgs) fetchFromGitHub
I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
sha256 = "09ri3jmgp9jjwi1mzv4c3w6rvcmyx6spa2qxpwlcn0f4bmfva6wm"; | ||
}; | ||
|
||
in import src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alas that doesn't work in nixpkgs
as far as I know :( I think it's not possible to import nix files from other repos. You will have to copy the agda derivation from there.
Probably that's what the build error is complaining about.
The good news is that once this is merged, you can probably import agda.packages.functional-linear-algebra
and override its src
to the local source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot, I was hoping!
I copied over the default file from the repository and updated the src
field.
Also reran the test with the new name:
nix-build -E "with import ./. {}; pkgs.agda.withPackages (p: with p; [ functional-linear-algebra ])"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI passes, I guess that means it's much happier about the inlined definition. Just a minor whitespace fix. Also, can you rebase and squash your commits at the end?
Builds for me.
pkgs/top-level/agda-packages.nix
Outdated
generic = callPackage ../development/libraries/agda/generic { }; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that extra line is accidental 😅 can you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha whoops! Fixed.
Adds the functional-linear-algebra library to the agda package set.
Rebased and squashed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Adds the functional-linear-algebra library to the agda package set.
Tested using the following command from the root of the nixpkgs repo:
Addresses issue ryanorendorff/functional-linear-algebra#16 from the
fla
repository.@turion Ready for your review!
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
./result/bin/
)nix path-info -S
before and after)