blob: 959232a0e7eb737e7ec595318eb5199d4fab71ed [file] [log] [blame]
Skyler Greyf4c2e672022-10-31 00:29:45 +00001{ stdenv, p7zip, zip, python3, qt5 }: stdenv.mkDerivation {
2 pname = "sfs-select";
3 version = "0.5.0";
4
5 src = builtins.fetchurl {
6 url = "https://www.unix-ag.uni-kl.de/~t_schmid/sfs-select/sfs-select-0.5.0-full.7z";
7 sha256 = "sha256:130ks9vc33r9aycbbz3i8agcy7gjijmfvv94pd4ndxmwl2ndmrh2";
8 };
9 unpackPhase = ''
10 runHook preUnpack
11
12 ${p7zip}/bin/7z x $src -o. -y
13
14 runHook postUnpack
15 '';
16
17 buildPhase = ''
18 runHook preBuild
19
20 mv ./sfs-select/python/sfs-select.py ./sfs-select/python/__main__.py
21 ${zip}/bin/zip -rj sfs-select.zip ./sfs-select/python/*
22
23 runHook postBuild
24 '';
25
26 installPhase = ''
27 runHook preBuild
28
29 mkdir -p $out/bin
30
31 echo '#!/usr/bin/env python' | cat - sfs-select.zip > $out/bin/sfs-select
32
33 chmod +x $out/bin/sfs-select
34
35 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
36 wrapQtApp $out/bin/sfs-select $makeWrapperArgs
37
38 runHook postBuild
39 '';
40
41 nativeBuildInputs = [ p7zip zip qt5.wrapQtAppsHook ];
42 buildInputs = [
43 (python3.withPackages (pythonPackages: with pythonPackages; [
44 psutil
45 pyqt5
46 ]))
47 ];
48 dontWrapQtApps = true;
49}