Created
May 10, 2024 09:32
-
-
Save rgoulter/c9536efea5a76dd30fd64c3daa5765d5 to your computer and use it in GitHub Desktop.
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
{ buildPythonPackage | |
, foo | |
}: | |
buildPythonPackage { | |
pname = "bar"; | |
version = "1.0.0"; | |
src = ./bar; | |
doCheck = false; | |
pythonImportsCheck = ["bar"]; | |
nativeBuildInputs = [foo]; | |
} |
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
from foo import foo | |
def bar(name): | |
return f"bar {foo(name)}" |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
packageOverrides = self: super: { | |
foo = self.callPackage ./foo.nix {}; | |
bar = self.callPackage ./bar.nix {}; | |
}; | |
pythonWithMyPackages = (pkgs.python3.override { inherit packageOverrides; }).withPackages (ps: | |
[ | |
ps.foo | |
ps.bar | |
] | |
); | |
in | |
pythonWithMyPackages |
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
{ buildPythonPackage | |
}: | |
buildPythonPackage { | |
pname = "foo"; | |
version = "1.0.0"; | |
src = ./foo; | |
pythonImportsCheck = ["foo"]; | |
doCheck = false; | |
} |
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
def foo(name): | |
return f"foo {name}" |
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
from setuptools import setup | |
setup( | |
name="bar", | |
version="1.0.0", | |
py_modules=["bar"], | |
install_requires=[ | |
"foo>=1.0.0", | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
e.g.