-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpackage.nix
75 lines (65 loc) · 1.41 KB
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
lib,
pkgs,
callPackage,
buildPythonApplication,
fetchPypi,
pyctr,
pycryptodomex,
pypng,
tkinter,
setuptools,
mfusepy,
haccrypto,
stdenv,
withGUI ? true,
# this should probably be an option within python
mountAliases ? true,
}:
buildPythonApplication rec {
pname = "ninfs";
version = "2.0";
src = builtins.path {
path = ./.;
name = "ninfs";
filter =
path: type:
!(builtins.elem (baseNameOf path) [
"build"
"dist"
"localtest"
"__pycache__"
"v"
".git"
"_build"
"ninfs.egg-info"
]);
};
doCheck = false;
propagatedBuildInputs =
[
pyctr
pycryptodomex
pypng
setuptools
haccrypto
]
++ lib.optionals (withGUI) [
tkinter
];
makeWrapperArgs = [ "--prefix PYTHONPATH : ${mfusepy}/${mfusepy.pythonModule.sitePackages}" ];
preFixup = lib.optionalString (!mountAliases) ''
rm $out/bin/mount_*
'';
postInstall = lib.optionalString (!stdenv.isDarwin) ''
mkdir -p $out/share/{applications,icons}
NINFS_USE_NINFS_EXECUTABLE_IN_DESKTOP=1 $out/bin/ninfs --install-desktop-entry $out/share
'';
meta = with lib; {
description = "FUSE filesystem Python scripts for Nintendo console files";
homepage = "https://github.com/ihaveamac/ninfs";
license = licenses.mit;
platforms = platforms.unix;
mainProgram = "ninfs";
};
}