tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
darwin.xattr: init at 61.60.1
sternenseemann
4 years ago
283d6223
caa9f451
+75
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
darwin
xattr
default.nix
top-level
darwin-packages.nix
+73
pkgs/os-specific/darwin/xattr/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchzip
4
+
, buildPythonPackage
5
+
, python
6
+
, ed
7
+
, unifdef
8
+
}:
9
+
10
+
buildPythonPackage rec {
11
+
pname = "xattr";
12
+
version = "61.60.1";
13
+
14
+
src = fetchzip rec {
15
+
url = "https://opensource.apple.com/tarballs/python_modules/python_modules-${version}.tar.gz";
16
+
sha256 = "19kydl7w4vpdi7zmfd5z9vjkq24jfk2cv4j0pppw69j06czhdwwi";
17
+
};
18
+
19
+
sourceRoot = "${src.name}/Modules/xattr-0.6.4";
20
+
format = "other";
21
+
22
+
nativeBuildInputs = [
23
+
ed
24
+
unifdef
25
+
];
26
+
27
+
makeFlags = [
28
+
"OBJROOT=$(PWD)"
29
+
"DSTROOT=${placeholder "out"}"
30
+
"OSL=${placeholder "doc"}/share/xattr/OpenSourceLicenses"
31
+
"OSV=${placeholder "doc"}/share/xattr/OpenSourceVersions"
32
+
];
33
+
34
+
# need to use `out` instead of `bin` since buildPythonPackage ignores the latter
35
+
outputs = [ "out" "doc" "python" ];
36
+
37
+
# We need to patch a reference to gnutar in an included Makefile
38
+
postUnpack = ''
39
+
chmod u+w $sourceRoot/..
40
+
'';
41
+
42
+
postPatch = ''
43
+
substituteInPlace ../Makefile.inc --replace gnutar tar
44
+
substituteInPlace Makefile --replace "/usr" ""
45
+
'';
46
+
47
+
preInstall = ''
48
+
# prevent setup.py from trying to download setuptools
49
+
sed -i xattr-*/setup.py -e '/ez_setup/d'
50
+
51
+
# create our custom target dirs we patch in
52
+
mkdir -p "$doc/share/xattr/"OpenSource{Licenses,Versions}
53
+
mkdir -p "$python/lib/${python.libPrefix}"
54
+
'';
55
+
56
+
# move python package to its own output to reduce clutter
57
+
postInstall = ''
58
+
mv "$out/lib/python" "$python/${python.sitePackages}"
59
+
rmdir "$out/lib"
60
+
'';
61
+
62
+
makeWrapperArgs = [
63
+
"--prefix" "PYTHONPATH" ":" "${placeholder "python"}/${python.sitePackages}"
64
+
];
65
+
66
+
meta = with lib; {
67
+
description = "Display and manipulate extended attributes";
68
+
license = [ licenses.psfl licenses.mit ]; # see $doc/share/xattr/OpenSourceLicenses
69
+
maintainers = [ maintainers.sternenseemann ];
70
+
homepage = "https://opensource.apple.com/source/python_modules/";
71
+
platforms = lib.platforms.darwin;
72
+
};
73
+
}
+2
pkgs/top-level/darwin-packages.nix
···
156
157
usr-include = callPackage ../os-specific/darwin/usr-include { };
158
0
0
159
inherit (pkgs.callPackages ../os-specific/darwin/xcode { })
160
xcode_8_1 xcode_8_2
161
xcode_9_1 xcode_9_2 xcode_9_4 xcode_9_4_1
···
156
157
usr-include = callPackage ../os-specific/darwin/usr-include { };
158
159
+
xattr = pkgs.python3Packages.callPackage ../os-specific/darwin/xattr { };
160
+
161
inherit (pkgs.callPackages ../os-specific/darwin/xcode { })
162
xcode_8_1 xcode_8_2
163
xcode_9_1 xcode_9_2 xcode_9_4 xcode_9_4_1