From 3cbc0a7859f9362bd014a8020600bcf7f8c1bd2a Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:48:14 +0100 Subject: [PATCH] smb3-foundry: clean up installPhase, move to pkgs/by-name --- .../sm/smb3-foundry/package.nix} | 15 ++++++--------- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 6 insertions(+), 13 deletions(-) rename pkgs/{applications/misc/smb3-foundry/default.nix => by-name/sm/smb3-foundry/package.nix} (65%) diff --git a/pkgs/applications/misc/smb3-foundry/default.nix b/pkgs/by-name/sm/smb3-foundry/package.nix similarity index 65% rename from pkgs/applications/misc/smb3-foundry/default.nix rename to pkgs/by-name/sm/smb3-foundry/package.nix index c1a896d88e4f..475bab58ddba 100644 --- a/pkgs/applications/misc/smb3-foundry/default.nix +++ b/pkgs/by-name/sm/smb3-foundry/package.nix @@ -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 ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 701ca27a7e13..ca79a30f4f57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };