This a quick and dirty demo of how Futhark could potentially use Nix as its future package manager. Due to time constraints, I cannot implement any better demo than this right now.
Movitaion for it was this recent Futhark blog entry on creating a package manager (Reddit discussion). This is an artificion packagification of https://github.com/diku-dk/futhark-benchmarks/tree/master/misc/heston.
Note that I had to package Futhark for Nix first. The pull request to add it to Nixpkgs is NixOS/nixpkgs#43865
Also see the comments in the filse
See the package repository at https://github.com/Infinisil/futharkPackages
$ nix-build
$ nix-shell
[nix-shell:~]$ installpath
[nix-shell:~]$ futhark-c heston64.fut
[nix-shell:~]$ uninstallpath
This is needed because Futhark can't include other paths, so we need to set up some symlinks to have access to the dependencies in the current directory.
- [hard] Use propagatedBuildInputs to decrease the number of derivations
- [easy] Support docs, tests, etc.
- [hard] Better filtering (fetchGit/filterSource/custom derivation?)