tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nile: init at 1.0.0
Aidan Gauland
2 years ago
4d5658d7
5a29bee7
+86
2 changed files
expand all
collapse all
unified
split
pkgs
games
nile
default.nix
top-level
all-packages.nix
+84
pkgs/games/nile/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
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, writeScript
3
+
, buildPythonApplication
4
+
, fetchFromGitHub
5
+
, pythonOlder
6
+
, setuptools
7
+
, requests
8
+
, protobuf
9
+
, pycryptodome
10
+
, zstandard
11
+
, json5
12
+
, platformdirs
13
+
, cacert
14
+
}:
15
+
16
+
buildPythonApplication rec {
17
+
pname = "nile";
18
+
version = "1.0.0";
19
+
format = "pyproject";
20
+
21
+
src = fetchFromGitHub {
22
+
owner = "imLinguin";
23
+
repo = "nile";
24
+
rev = "f5f3b96f6483c59cfc646afbda6e97cb0bd94778";
25
+
hash = "sha256-HibY3U9/MibEDwHY+YiErW/pz6qwtps8wwjhznTISgA=";
26
+
};
27
+
28
+
disabled = pythonOlder "3.8";
29
+
30
+
propagatedBuildInputs = [
31
+
setuptools
32
+
requests
33
+
protobuf
34
+
pycryptodome
35
+
zstandard
36
+
json5
37
+
platformdirs
38
+
];
39
+
40
+
pyprojectAppendix = ''
41
+
[tool.setuptools.packages.find]
42
+
include = ["nile*"]
43
+
'';
44
+
45
+
postPatch = ''
46
+
echo "$pyprojectAppendix" >> pyproject.toml
47
+
'';
48
+
49
+
pythonImportsCheck = [ "nile" ];
50
+
51
+
meta = with lib; {
52
+
description = "Unofficial Amazon Games client";
53
+
homepage = "https://github.com/imLinguin/nile";
54
+
license = with licenses; [ gpl3 ];
55
+
maintainers = with maintainers; [ aidalgol ];
56
+
};
57
+
58
+
# Upstream does not create git tags when bumping the version, so we have to
59
+
# extract it from the source code on the main branch.
60
+
passthru.updateScript = writeScript "gogdl-update-script" ''
61
+
#!/usr/bin/env nix-shell
62
+
#!nix-shell -i bash -p curl gnused jq common-updater-scripts
63
+
set -eou pipefail;
64
+
65
+
owner=imLinguin
66
+
repo=nile
67
+
path='nile/__init__.py'
68
+
69
+
version=$(
70
+
curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
71
+
https://raw.githubusercontent.com/$owner/$repo/main/$path |
72
+
sed -n 's/^\s*version\s*=\s*"\([0-9]\.[0-9]\.[0-9]\)"\s*$/\1/p')
73
+
74
+
commit=$(curl --cacert "${cacert}/etc/ssl/certs/ca-bundle.crt" \
75
+
https://api.github.com/repos/$owner/$repo/commits?path=$path |
76
+
jq -r '.[0].sha')
77
+
78
+
update-source-version \
79
+
${pname} \
80
+
"$version" \
81
+
--file=./pkgs/games/nile/default.nix \
82
+
--rev=$commit
83
+
'';
84
+
}
+2
pkgs/top-level/all-packages.nix
···
37600
37601
nexuiz = callPackage ../games/nexuiz { };
37602
0
0
37603
ninvaders = callPackage ../games/ninvaders { };
37604
37605
njam = callPackage ../games/njam { };
···
37600
37601
nexuiz = callPackage ../games/nexuiz { };
37602
37603
+
nile = python3Packages.callPackage ../games/nile { };
37604
+
37605
ninvaders = callPackage ../games/ninvaders { };
37606
37607
njam = callPackage ../games/njam { };