-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add sppl package * fix: use nixpkgs-compatible versions of numpy etc The GitHub (rather than PyPi) pinned source can be removed once it is released as 2.0.5 or greater on Pypi.
- Loading branch information
Showing
4 changed files
with
87 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ pkgs, | ||
system, | ||
... | ||
}: let | ||
|
||
# relies on specific versions of deps that are no longer present in | ||
# nixpkgs stable; we must checkout a specific SHA | ||
nixpkgs-sppl = import (pkgs.fetchFromGitHub { | ||
owner = "nixos"; | ||
repo = "nixpkgs"; | ||
rev = "994df04c3c700fe9edb1b69b82ba3c627e5e04ff"; | ||
sha256 = "sha256-60hLkFqLRI+5XEeacXaVPHdl6m/P8rN2L4luLGxklqs="; | ||
}) {inherit system;}; | ||
pypkgs = nixpkgs-sppl.python39Packages; | ||
|
||
sppl = pypkgs.buildPythonPackage rec { # not in nixpkgs | ||
pname = "sppl"; | ||
version = "2.0.4"; | ||
|
||
# Use a version of sppl that has Nixpkgs-compatible versions of some packages | ||
src = pkgs.fetchFromGitHub { | ||
owner = "probsys"; | ||
repo = "sppl"; | ||
rev = "ab6435648e56df1603c4d8d27029605c247cb9f5"; | ||
sha256 = "sha256-hFIR073wDRXyt8EqFkLZNDdGUjPTyWYOfDg5eGTjvz0="; | ||
}; | ||
|
||
propagatedBuildInputs = with pypkgs; [ | ||
astunparse | ||
numpy | ||
scipy | ||
sympy | ||
]; | ||
|
||
checkInputs = with pypkgs; [ | ||
coverage | ||
pytest | ||
pytestCheckHook | ||
pytest-timeout | ||
]; | ||
|
||
pytestFlagsArray = [ "--pyargs" "sppl" ]; | ||
|
||
pipInstallFlags = [ "--no-deps" ]; | ||
|
||
passthru.runtimePython = nixpkgs-sppl.python39.withPackages (p: [ sppl ]); | ||
passthru.checkInputs = checkInputs; | ||
}; | ||
|
||
in sppl |