mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 23:41:42 +03:00
feat: add pillow
This commit is contained in:
parent
9b8df26237
commit
b1c8c49015
10
v1/nix/modules/drvs/pillow/cache-x86_64-linux.json
Normal file
10
v1/nix/modules/drvs/pillow/cache-x86_64-linux.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"content": {
|
||||
"mach-nix": {
|
||||
"dists": {
|
||||
"pillow": "9.3.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"invalidationHash": "fdc99ee4445b96e19a326eb1a028ee5783d5fc74cb0111c64739e930585e761e"
|
||||
}
|
50
v1/nix/modules/drvs/pillow/default.nix
Normal file
50
v1/nix/modules/drvs/pillow/default.nix
Normal file
@ -0,0 +1,50 @@
|
||||
# Build Pillow from source, without a wheel, and rather
|
||||
# minimal features - only zlib and libjpeg as dependencies.
|
||||
{config, lib, ...}: let
|
||||
l = lib // builtins;
|
||||
python = config.deps.python;
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
../../drv-parts/mach-nix-xs
|
||||
];
|
||||
|
||||
deps = {nixpkgs, ...}: {
|
||||
python = nixpkgs.python39;
|
||||
inherit (nixpkgs)
|
||||
pkg-config
|
||||
zlib
|
||||
libjpeg;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
config.deps.pkg-config
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
config.deps.zlib config.deps.libjpeg
|
||||
];
|
||||
|
||||
pname = "pillow";
|
||||
version = "9.3.0";
|
||||
env.format = "setuptools";
|
||||
|
||||
env.pythonImportsCheck = [
|
||||
"PIL"
|
||||
];
|
||||
|
||||
preUnpack = ''
|
||||
export src=$(ls ${config.mach-nix.pythonSources}/names/${config.pname}/*);
|
||||
'';
|
||||
|
||||
mach-nix.pythonSources = config.deps.fetchPythonRequirements {
|
||||
inherit python;
|
||||
name = config.pname;
|
||||
requirementsList = ["${config.pname}==${config.version}"];
|
||||
hash = "sha256-/7MQ/hi+G3Q+xiDpEIw76chcwFmhKpipAq/4pkSvlm4=";
|
||||
maxDate = "2023-01-01";
|
||||
pipFlags = [
|
||||
"--no-binary" ":all:"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user