smb3-foundry: clean up installPhase, move to pkgs/by-name

This commit is contained in:
TomaSajt 2024-02-07 20:48:14 +01:00
parent 4798085581
commit 3cbc0a7859
No known key found for this signature in database
GPG key ID: F011163C050122A1
2 changed files with 6 additions and 13 deletions

View file

@ -2,11 +2,10 @@
, stdenv
, fetchFromGitHub
, python3
, makeWrapper
}:
let
pythonEnv = (python3.withPackages (ps: with ps; [
python = (python3.withPackages (ps: with ps; [
pyside6
py65
qdarkstyle
@ -23,18 +22,16 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-8cf7VhvC372Cqi94n2FSHcoCGblpZoZvBXcXq5jU6CY=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python ];
installPhase = ''
runHook preInstall
mkdir -p $out/app
cp -R smb3parse foundry scribe data doc VERSION smb3-foundry.py smb3-scribe.py $out/app
mkdir -p $out/share/smb3-foundry $out/bin
cp -r smb3parse foundry scribe data doc VERSION smb3-foundry.py smb3-scribe.py $out/share/smb3-foundry
makeWrapper ${pythonEnv}/bin/python $out/bin/smb3-foundry \
--add-flags "$out/app/smb3-foundry.py"
makeWrapper ${pythonEnv}/bin/python $out/bin/smb3-scribe \
--add-flags "$out/app/smb3-scribe.py"
ln -s $out/share/smb3-foundry/smb3-foundry.py $out/bin/smb3-foundry
ln -s $out/share/smb3-foundry/smb3-scribe.py $out/bin/smb3-scribe
runHook postInstall
'';

View file

@ -2050,10 +2050,6 @@ with pkgs;
sorted-grep = callPackage ../tools/text/sorted-grep { };
smb3-foundry = callPackage ../applications/misc/smb3-foundry {
python3 = python311;
};
smbmap = callPackage ../tools/security/smbmap { };
smbscan = callPackage ../tools/security/smbscan { };