Skip to content

Commit

Permalink
Merge pull request #1367 from cpcloud/awsume
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Oct 26, 2023
2 parents 3b6124e + 53c8bef commit 670e70c
Show file tree
Hide file tree
Showing 8 changed files with 350 additions and 0 deletions.
12 changes: 12 additions & 0 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ lib.composeManyExtensions [
dontUseCmakeConfigure = true;
}
);

awsume = super.awsume.overridePythonAttrs (_: {
preBuild = ''
HOME="$(mktemp -d)"
export HOME
'';
});

bcrypt =
let
getCargoHash = version: {
Expand Down Expand Up @@ -1980,6 +1988,10 @@ lib.composeManyExtensions [
}
);

plyvel = super.plyvel.overridePythonAttrs (old: {
buildInputs = old.buildInputs or [ ] ++ [ pkgs.leveldb ];
});

poetry-plugin-export = super.poetry-plugin-export.overridePythonAttrs (_old: {
dontUsePythonImportsCheck = true;
pipInstallFlags = [
Expand Down
10 changes: 10 additions & 0 deletions tests/awsume/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ lib, poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
projectDir = ./.;
};
in
runCommand "awsume-test" { } ''
"${lib.getExe env}" -c 'import awsume; print(awsume.__VERSION__)' > $out
''
269 changes: 269 additions & 0 deletions tests/awsume/poetry.lock

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions tests/awsume/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tool.poetry]
name = "awsume-test"
version = "0.1.0"
description = "Test of awsume package"
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
awsume = "^4.5.3"

[build-system]
requires = ["poetry-core>=1"]
build-backend = "poetry.core.masonry.api"
2 changes: 2 additions & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ in
pytesseract = callTest ./pytesseract { };
sphinx5 = callTest ./sphinx5 { };
subdirectory = callTest ./subdirectory { };
plyvel = callTest ./plyvel { };
awsume = callTest ./awsume { };
} // lib.optionalAttrs (!stdenv.isDarwin) {
# Test deadlocks on darwin, sandboxing issue?
dependency-environment = callTest ./dependency-environment { };
Expand Down
10 changes: 10 additions & 0 deletions tests/plyvel/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ lib, poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
projectDir = ./.;
};
in
runCommand "plyvel-test" { } ''
"${lib.getExe env}" -c 'import plyvel; print(plyvel.__version__)' > $out
''
21 changes: 21 additions & 0 deletions tests/plyvel/poetry.lock

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

13 changes: 13 additions & 0 deletions tests/plyvel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tool.poetry]
name = "plyvel-test"
version = "0.1.0"
description = "Test of plyvel package"
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
plyvel = "^1.5.0"

[build-system]
requires = ["poetry-core>=1"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 670e70c

Please sign in to comment.