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

feat: add sppl #5

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ jobs:
with:
nix_path: nixpkgs=channel:nixos-23.11
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: |
- name: build sppl
run: |
nix build \
-L \
-o ./sppl \
'.#sppl'
- name: build base image (not pushed)
run: |
nix build \
-L \
-o ./imgBase \
'.#ociImgBase'
- run: |
- name: build Gensql Query image
run: |
nix build \
-L \
-o ./imgGensqlQuery \
'.#ociImgGensqlQuery'
- run: |
- name: build Loom image
run: |
nix build \
-L \
-o ./imgLoom \
Expand Down
30 changes: 12 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# apps, and devshells are per system.
perSystem = { config, self', inputs', pkgs, system, ... }:
let
sppl = pkgs.callPackage ./pkgs/sppl {};

ociImgBase = pkgs.callPackage ./pkgs/oci/base {
inherit nixpkgs;
basicTools = self.lib.basicTools;
Expand All @@ -46,14 +48,16 @@
packages = loom.more_packages // {
inherit
loom
sppl

ociImgBase
ociImgGensqlQuery
ociImgLoom
;
};
in {
devShells.default = pkgs.mkShell {
buildInputs = [] ++ toolkit;
packages = [] ++ toolkit;
};

inherit packages;
Expand Down
46 changes: 46 additions & 0 deletions pkgs/sppl/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{ 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 = "35a74aa665a681b60d68e3d3400fcaa11690ee50";
sha256 = "sha256-6qjgWliwYtFsEUl4/SjlUaUF9hSSfVoaRZzN6MCgslg=";
}) {inherit system;};
pypkgs = nixpkgs-sppl.python39Packages;

sppl = pypkgs.buildPythonPackage rec { # not in nixpkgs
pname = "sppl";
version = "2.0.4";

src = pypkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-QAp77L8RpN86V4O8F1zNA8O/szm9hNa4wWFT13av6BE=";
};

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 ]);
};

in sppl
Loading