-
-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes #1695 where the wrong hash (unpacked vs .tar.gz-file-hash) was used.
- Loading branch information
1 parent
304f823
commit 51f5d09
Showing
6 changed files
with
198 additions
and
1 deletion.
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
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,18 @@ | ||
{ lib, poetry2nix, python3, stdenv }: | ||
let | ||
args = { | ||
python = python3; | ||
projectDir = ./.; | ||
preferWheels = true; | ||
}; | ||
py = poetry2nix.mkPoetryPackages args; | ||
app = poetry2nix.mkPoetryApplication args; | ||
url_nix_store = py.python.pkgs.requests.src; | ||
url_is_wheel = url_nix_store.isWheel or false; | ||
is_wheel_attr_test = x: lib.warnIf (!stdenv.isLinux && url_is_wheel) | ||
"url should resolve to a not wheel" | ||
x; | ||
is_wheel_test = x: assert lib.strings.hasSuffix "tar.gz" url_nix_store; x; | ||
app_builds = x: assert lib.isDerivation app; x; | ||
in | ||
lib.pipe app [ is_wheel_attr_test is_wheel_test app_builds ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[tool.poetry] | ||
name = "use-url-src" | ||
version = "0.1.0" | ||
description = "asserts that .tar.gz via .url works" | ||
authors = [ | ||
"tyberius prime <tyberius_prime@coonabibba.de>" | ||
] | ||
license = "MIT" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
requests = {url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz"} | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
|
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,6 @@ | ||
import requests | ||
import sys | ||
|
||
|
||
def main(): | ||
pass |