1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 poetry-core,
7}:
8
9buildPythonPackage rec {
10 pname = "memory-tempfile";
11 version = "2.2.3";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "mbello";
16 repo = "memory-tempfile";
17 rev = "v${version}";
18 hash = "sha256-4fz2CLkZdy2e1GwGw/afG54LkUVJ4cza70jcbX3rVlQ=";
19 };
20
21 patches = [
22 (fetchpatch2 {
23 # Migrate to poetry-core build backend
24 # https://github.com/mbello/memory-tempfile/pull/13
25 name = "poetry-core.patch";
26 url = "https://github.com/mbello/memory-tempfile/commit/938a3a3abf01756b1629eca6c69e970021bbc7c0.patch";
27 hash = "sha256-q3027MwKXtX09MH7T2UrX19BImK1FJo+YxADfxcdTME=";
28 })
29 ];
30
31 build-system = [ poetry-core ];
32
33 doCheck = false; # constrained selection of memory backed filesystems due to build sandbox
34
35 pythonImportsCheck = [ "memory_tempfile" ];
36
37 meta = with lib; {
38 description = "Create temporary files and temporary dirs in memory-based filesystems on Linux";
39 homepage = "https://github.com/mbello/memory-tempfile";
40 license = licenses.mit;
41 maintainers = with maintainers; [ hexa ];
42 };
43}