Skip to content

Commit 48bf5d0

Browse files
doronbeharschromp
authored andcommitted
deadlock-modmanager: init at 0.9.2
Co-authored-by: schromp <[email protected]>
2 parents 5bd9d73 + a1e0137 commit 48bf5d0

File tree

19 files changed

+861
-634
lines changed

19 files changed

+861
-634
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
python3,
3+
}:
4+
5+
python3.pkgs.toPythonApplication python3.pkgs.beets-minimal

pkgs/by-name/be/beets/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
python3,
3+
}:
4+
5+
python3.pkgs.toPythonApplication python3.pkgs.beets
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json
2+
index ed05fce..e1649e0 100644
3+
--- a/apps/desktop/src-tauri/tauri.conf.json
4+
+++ b/apps/desktop/src-tauri/tauri.conf.json
5+
@@ -31,7 +31,6 @@
6+
}
7+
},
8+
"active": true,
9+
- "createUpdaterArtifacts": true,
10+
"targets": "all",
11+
"icon": [
12+
"icons/32x32.png",
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
rustPlatform,
5+
cargo-tauri,
6+
nodejs,
7+
pnpm_9,
8+
pkg-config,
9+
wrapGAppsHook3,
10+
desktop-file-utils,
11+
webkitgtk_4_1,
12+
cairo,
13+
gdk-pixbuf,
14+
glib,
15+
glib-networking,
16+
gtk3,
17+
libsoup_3,
18+
pango,
19+
openssl,
20+
bzip2,
21+
gst_all_1,
22+
makeDesktopItem,
23+
fontconfig,
24+
}:
25+
26+
rustPlatform.buildRustPackage rec {
27+
pname = "deadlock-modmanager";
28+
version = "0.9.2";
29+
30+
src = fetchFromGitHub {
31+
owner = "Stormix";
32+
repo = "deadlock-modmanager";
33+
tag = "v${version}";
34+
hash = "sha256-meCwpdnRYwNiOB8QzdhDC24CtRiMClimCDlv0EvHHgI=";
35+
};
36+
37+
cargoRoot = "apps/desktop";
38+
39+
cargoHash = "sha256-cLdsR9ZCkUKZQDAxsvZpau7c9LxeLt4kUI21ObiY7dA=";
40+
41+
nativeBuildInputs = [
42+
rustPlatform.cargoSetupHook
43+
cargo-tauri
44+
nodejs
45+
pnpm_9.configHook
46+
pkg-config
47+
wrapGAppsHook3
48+
];
49+
50+
buildInputs = [
51+
webkitgtk_4_1
52+
cairo
53+
gdk-pixbuf
54+
glib
55+
glib-networking
56+
gtk3
57+
libsoup_3
58+
pango
59+
openssl
60+
bzip2
61+
desktop-file-utils
62+
gst_all_1.gstreamer
63+
gst_all_1.gst-plugins-base
64+
gst_all_1.gst-plugins-good
65+
gst_all_1.gst-plugins-bad
66+
];
67+
68+
pnpmRoot = ".";
69+
pnpmDeps = pnpm_9.fetchDeps {
70+
inherit
71+
pname
72+
version
73+
src
74+
;
75+
fetcherVersion = 2;
76+
sourceRoot = "source";
77+
hash = "sha256-ZnVUQjPXphwk7J5jd04WQdUYQF0t5veqRVr/m4guuEU=";
78+
};
79+
80+
patches = [
81+
./no-updater-artifacts.patch
82+
];
83+
84+
VITE_API_URL = "https://api.deadlockmods.app";
85+
86+
buildPhase = ''
87+
runHook preBuild
88+
89+
cd apps/desktop
90+
export CARGO_TARGET_DIR=target
91+
92+
cargo tauri build --no-bundle -- --frozen
93+
94+
runHook postBuild
95+
'';
96+
97+
installPhase = ''
98+
runHook preInstall
99+
100+
install -Dm755 src-tauri/target/release/deadlock-mod-manager $out/bin/deadlock-modmanager
101+
102+
install -Dm644 src-tauri/icons/32x32.png $out/share/icons/hicolor/32x32/apps/deadlock-modmanager.png
103+
install -Dm644 src-tauri/icons/128x128.png $out/share/icons/hicolor/128x128/apps/deadlock-modmanager.png
104+
install -Dm644 src-tauri/icons/[email protected] $out/share/icons/hicolor/256x256/apps/deadlock-modmanager.png
105+
106+
mkdir -p $out/share/deadlock-modmanager
107+
cp -r dist $out/share/deadlock-modmanager/
108+
109+
runHook postInstall
110+
'';
111+
112+
preFixup = ''
113+
gappsWrapperArgs+=(
114+
--set FONTCONFIG_FILE "${fontconfig.out}/etc/fonts/fonts.conf"
115+
--set TAURI_DIST_DIR "$out/share/deadlock-modmanager/dist
116+
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
117+
--set WEBKIT_DISABLE_DMABUF_RENDERER 1
118+
--set DISABLE_UPDATE_DESKTOP_DATABASE 1
119+
--prefix PATH : ${lib.makeBinPath [ desktop-file-utils ]}
120+
)
121+
'';
122+
123+
desktopItems = [
124+
(makeDesktopItem {
125+
desktopName = "Deadlock Mod Manager";
126+
name = "Deadlock Mod Manager";
127+
exec = "deadlock-modmanager %u";
128+
terminal = false;
129+
type = "Application";
130+
icon = pname;
131+
mimeTypes = [ "x-scheme-handler/deadlock-mod-manager" ];
132+
categories = [
133+
"Utility"
134+
"Game"
135+
];
136+
})
137+
];
138+
139+
meta = {
140+
description = "Mod manager for the Valve game Deadlock";
141+
homepage = "https://github.com/Stormix/deadlock-modmanager";
142+
license = lib.licenses.gpl3Plus;
143+
maintainers = with lib.maintainers; [ mistyttm schromp ];
144+
platforms = lib.platforms.linux;
145+
mainProgram = pname;
146+
};
147+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
fetchpatch,
5+
buildPythonPackage,
6+
7+
# build-system
8+
poetry-core,
9+
10+
# nativeBuildInputs
11+
beets-minimal,
12+
13+
# tests
14+
pytestCheckHook,
15+
pytest-cov-stub,
16+
mock,
17+
pillow,
18+
tomli,
19+
typeguard,
20+
writableTmpDirAsHomeHook,
21+
}:
22+
23+
buildPythonPackage rec {
24+
pname = "beets-alternatives";
25+
version = "0.13.4";
26+
pyproject = true;
27+
28+
src = fetchFromGitHub {
29+
repo = "beets-alternatives";
30+
owner = "geigerzaehler";
31+
tag = "v${version}";
32+
hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ=";
33+
};
34+
35+
patches = [
36+
# Fixes build failure by ignoring DeprecationWarning during tests.
37+
(fetchpatch {
38+
url = "https://github.com/geigerzaehler/beets-alternatives/commit/3c15515edfe62d5d6c8f3fb729bf3dcef41c1ffa.patch";
39+
hash = "sha256-gZXftDI5PXJ0c65Z1HLABJ2SlDnXU78xxIEt7IGp8RQ=";
40+
excludes = [
41+
"poetry.lock"
42+
];
43+
})
44+
];
45+
46+
build-system = [
47+
poetry-core
48+
];
49+
50+
nativeBuildInputs = [
51+
beets-minimal
52+
];
53+
54+
nativeCheckInputs = [
55+
pytestCheckHook
56+
pytest-cov-stub
57+
mock
58+
pillow
59+
tomli
60+
typeguard
61+
writableTmpDirAsHomeHook
62+
];
63+
64+
meta = {
65+
description = "Beets plugin to manage external files";
66+
homepage = "https://github.com/geigerzaehler/beets-alternatives";
67+
changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md";
68+
maintainers = with lib.maintainers; [
69+
aszlig
70+
lovesegfault
71+
];
72+
license = lib.licenses.mit;
73+
};
74+
}

pkgs/tools/audio/beets/plugins/audible.nix renamed to pkgs/development/python-modules/beets-audible/default.nix

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
{
2-
beets,
3-
fetchFromGitHub,
42
lib,
3+
fetchFromGitHub,
4+
buildPythonPackage,
5+
6+
# build-system
7+
hatchling,
8+
9+
# native
10+
beets,
11+
12+
# dependencies
13+
markdownify,
14+
natsort,
15+
tldextract,
16+
17+
# passthru
518
nix-update-script,
6-
python3Packages,
719
}:
8-
python3Packages.buildPythonApplication rec {
20+
21+
buildPythonPackage rec {
922
pname = "beets-audible";
1023
version = "1.0.2";
1124
pyproject = true;
@@ -17,17 +30,17 @@ python3Packages.buildPythonApplication rec {
1730
hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs=";
1831
};
1932

33+
build-system = [
34+
hatchling
35+
];
36+
2037
nativeBuildInputs = [
2138
beets
2239
];
2340

2441
pythonRelaxDeps = true;
2542

26-
build-system = with python3Packages; [
27-
hatchling
28-
];
29-
30-
dependencies = with python3Packages; [
43+
dependencies = [
3144
markdownify
3245
natsort
3346
tldextract

pkgs/tools/audio/beets/plugins/copyartifacts.nix renamed to pkgs/development/python-modules/beets-copyartifacts/default.nix

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
{
22
lib,
3-
beets,
43
fetchFromGitHub,
5-
python3Packages,
4+
buildPythonPackage,
5+
6+
# build-system
7+
setuptools,
8+
9+
# nativeBuildInputs
10+
beets-minimal,
11+
12+
# dependencies
13+
six,
14+
15+
# tests
16+
pytestCheckHook,
617
writableTmpDirAsHomeHook,
718
}:
819

9-
python3Packages.buildPythonApplication rec {
20+
buildPythonPackage rec {
1021
pname = "beets-copyartifacts";
1122
version = "0.1.5";
1223
pyproject = true;
@@ -27,20 +38,20 @@ python3Packages.buildPythonApplication rec {
2738
sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py
2839
'';
2940

30-
nativeBuildInputs = [
31-
beets
41+
build-system = [
42+
setuptools
3243
];
3344

34-
build-system = with python3Packages; [
35-
setuptools
45+
nativeBuildInputs = [
46+
beets-minimal
3647
];
3748

38-
dependencies = with python3Packages; [
49+
dependencies = [
3950
six
4051
];
4152

4253
nativeCheckInputs = [
43-
python3Packages.pytestCheckHook
54+
pytestCheckHook
4455
writableTmpDirAsHomeHook
4556
];
4657

@@ -55,7 +66,7 @@ python3Packages.buildPythonApplication rec {
5566
homepage = "https://github.com/adammillerio/beets-copyartifacts";
5667
changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}";
5768
license = lib.licenses.mit;
58-
inherit (beets.meta) platforms;
69+
inherit (beets-minimal.meta) platforms;
5970
# Isn't compatible with beets >= 2.3
6071
broken = true;
6172
};

0 commit comments

Comments
 (0)