From 4b9b5427f5b18454bc2173f21a1aaa21a3ca10ce Mon Sep 17 00:00:00 2001 From: D3vil0p3r Date: Thu, 25 Apr 2024 12:35:35 +0200 Subject: [PATCH] libguytools: init at 2.1.0 --- pkgs/by-name/gu/guymager/package.nix | 56 +++++++++++++++++-------- pkgs/by-name/li/libguytools/package.nix | 56 +++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 pkgs/by-name/li/libguytools/package.nix diff --git a/pkgs/by-name/gu/guymager/package.nix b/pkgs/by-name/gu/guymager/package.nix index f0ffd42b9afe0..a007a4c2eb29d 100644 --- a/pkgs/by-name/gu/guymager/package.nix +++ b/pkgs/by-name/gu/guymager/package.nix @@ -1,13 +1,14 @@ -{ lib -, stdenv -, fetchurl -, libsForQt5 -, dpkg -, parted -, udev -, libewf-legacy -, libbfio -, libguytools +{ + lib, + stdenv, + fetchurl, + libsForQt5, + dpkg, + parted, + udev, + libewf-legacy, + libbfio, + libguytools, }: stdenv.mkDerivation (finalAttrs: { @@ -21,8 +22,20 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - nativeBuildInputs = [ dpkg libsForQt5.qmake libsForQt5.qttools libsForQt5.wrapQtAppsHook ]; - buildInputs = [ libsForQt5.qtbase libewf-legacy libbfio libguytools parted udev ]; + nativeBuildInputs = [ + dpkg + libsForQt5.qmake + libsForQt5.qttools + libsForQt5.wrapQtAppsHook + ]; + buildInputs = [ + libsForQt5.qtbase + libewf-legacy + libbfio + libguytools + parted + udev + ]; postPatch = '' patchShebangs compileinfo.sh @@ -35,7 +48,14 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "dpkg-parsechangelog" "dpkg-parsechangelog -l changelog" substituteInPlace threadscan.cpp \ - --replace-fail '/lib,/usr/lib,/usr/lib64,/usr/local/lib' '${builtins.replaceStrings [":"] [","] (lib.makeLibraryPath [ udev parted ])}' + --replace-fail '/lib,/usr/lib,/usr/lib64,/usr/local/lib' '${ + builtins.replaceStrings [ ":" ] [ "," ] ( + lib.makeLibraryPath [ + udev + parted + ] + ) + }' substituteInPlace org.freedesktop.guymager.policy guymager.pro main.cpp guymager.cfg \ --replace-fail /usr $out @@ -51,13 +71,13 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - meta = with lib; { + meta = { description = "Forensic imager for media acquisition"; mainProgram = "guymager"; homepage = "https://guymager.sourceforge.io"; - maintainers = with maintainers; [ d3vil0p3r ]; - platforms = platforms.unix; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.gpl2Only; + maintainers = with lib.maintainers; [ d3vil0p3r ]; + platforms = lib.platforms.linux; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + license = lib.licenses.gpl2Only; }; }) diff --git a/pkgs/by-name/li/libguytools/package.nix b/pkgs/by-name/li/libguytools/package.nix new file mode 100644 index 0000000000000..b882a1eb2ab07 --- /dev/null +++ b/pkgs/by-name/li/libguytools/package.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchurl, + libsForQt5, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libguytools"; + version = "2.1.0"; + + src = fetchurl { + url = "mirror://sourceforge/project/libguytools/libguytools/LatestSource/tools-${finalAttrs.version}.tar.gz"; + hash = "sha256-eVYvjo2wKW2g9/9hL9nbQa1FRWDMMqMHok0V/adPHVY="; + }; + + qmakeFlags = [ + "trunk.pro" + "toolsstatic.pro" + ]; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + libsForQt5.qmake + libsForQt5.wrapQtAppsHook + ]; + dontWrapQtApps = true; + buildInputs = [ libsForQt5.qtbase ]; + + postPatch = '' + sed -i "/dpkg-buildflags/d" tools.pro + patchShebangs create_version_file.sh + ''; + + preConfigure = '' + ./create_version_file.sh + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r lib $out/ + cp -r include $out/ + runHook postInstall + ''; + + meta = { + description = "Small programming toolbox"; + mainProgram = "libguytools"; + homepage = "https://libguytools.sourceforge.io"; + maintainers = with lib.maintainers; [ d3vil0p3r ]; + platforms = lib.platforms.linux; + license = lib.licenses.gpl2Plus; + }; +})