Skip to content

Commit 041af52

Browse files
author
nix
committed
nix testing
1 parent 5b04901 commit 041af52

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

flake.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,26 @@
6565
pkgs.python39.override { inherit packageOverrides; self = customPythonPackages; };
6666
in
6767
{
68-
packages.${system}.mtfg = pkgs.python39Packages.buildPythonPackage {
68+
packages.${system}.mtfg = pkgs.stdenv.mkDerivation {
6969
pname = "MTFG";
7070
version = "0.5.3";
7171
src = pkgs.fetchgit {
7272
url = "https://github.com/michael-mueller-git/Python-Funscript-Editor.git";
73-
rev = "7cb898de9fec72c7e7b0ce2c3f25ad52f1d3a24e";
74-
sha256 = "sha256-SMHaGIMkoVdc2gENR1ILV/H+BZ7yHB4yxcpVxJaY9oo=";
73+
rev = "5b049018f20f8d3e90413d663e47c7120dec99a7";
74+
sha256 = "sha256-q2ew4rmZV7G5HgoQq4ZAuEf+GRMVuq+K+yc/WBEWsPM=";
7575
};
7676
buildInputs = mtfgDependencies;
77+
nativeBuildInputs = with pkgs; [
78+
makeWrapper
79+
python39Packages.wrapPython
80+
];
7781
QT_QPA_PLATFORM = "xcb";
7882
postInstall = ''
7983
mkdir -p "$out/bin"
80-
cp -rfv "$src" "$out/bin/"
84+
cp -rfv "$src/." "$out"
85+
cp -rfv "$out/main.py" "$out/bin/MTFG"
86+
chmod +x "$out/bin/MTFG"
87+
wrapPythonPrograms $out
8188
'';
8289

8390
};

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/env python3
22
import multiprocessing
3+
import os
4+
import sys
5+
6+
if not os.path.exists("funscript_editor"):
7+
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
8+
39
from funscript_editor.__main__ import main
410

511
if __name__ == '__main__':

0 commit comments

Comments
 (0)