Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guymager: init at 0.8.13 #278529

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions pkgs/by-name/gu/guymager/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchurl,
libsForQt5,
dpkg,
parted,
udev,
libewf-legacy,
libbfio,
libguytools,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "guymager";
version = "0.8.13";

src = fetchurl {
url = "mirror://sourceforge/project/guymager/guymager/LatestSource/guymager-${finalAttrs.version}.tar.gz";
hash = "sha256-xDsQ/d6fyfLOr4uXpdoqMljfFrVgQTUu0t2e5opcaRg=";
};

enableParallelBuilding = true;

nativeBuildInputs = [
dpkg
libsForQt5.qmake
libsForQt5.qttools
libsForQt5.wrapQtAppsHook
];
buildInputs = [
libsForQt5.qtbase
libewf-legacy
libbfio
libguytools
parted
udev
];

postPatch = ''
patchShebangs compileinfo.sh
substituteInPlace manuals/guymager_body.1 config.cpp \
--replace-fail "/etc/guymager/guymager.cfg" "$out/share/guymager/guymager.cfg"
substituteInPlace compileinfo.sh \
--replace-fail " debian/changelog" "" \
--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
]
)
}'
substituteInPlace org.freedesktop.guymager.policy guymager.pro main.cpp guymager.cfg \
--replace-fail /usr $out
'';

installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share}
make clean
rm -rf *.cpp *.h *.pro
cp -aR . "$out/share/guymager/"
makeWrapper $out/share/guymager/guymager $out/bin/guymager
runHook postInstall
'';

meta = {
description = "Forensic imager for media acquisition";
mainProgram = "guymager";
homepage = "https://guymager.sourceforge.io";
maintainers = with lib.maintainers; [ d3vil0p3r ];
platforms = lib.platforms.linux;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.gpl2Only;
};
})
56 changes: 56 additions & 0 deletions pkgs/by-name/li/libguytools/package.nix
Original file line number Diff line number Diff line change
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eclairevoyant If I remove that, I get the following error:

Running phase: qtPreHook
Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set.
error: builder for '/nix/store/fncpc8jyf7b1h08yipf25pkmls71pxhn-libguytools-2.1.0.drv' failed with exit code 1;
       last 10 log lines:
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/qqzz17mjs51kpfx9faw98f35r7ffwqng-xcb-util-renderutil-0.3.10-dev
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/7rd4b08axmpg5nnys8kkjbmj7cxlkdlc-xcb-util-renderutil-0.3.10
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/x3l69111mbfd38dd8q59hqv94vz6d6jn-xcb-util-wm-0.4.2-dev
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/fiwwkqgfgb4g2f63iycpsx2h5amk2jdv-xcb-util-wm-0.4.2
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/h5j6ggf0g230bavqarsvyi23zw789fv3-libglvnd-1.7.0-dev
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/d6gvgzzifggrb7fh1v0yi8bvrdlwhpqa-libglvnd-1.7.0
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/hjspqdvym6v553582mxp2a3f84p4aqyr-qtbase-5.15.14-bin
       > calling 'envTargetTargetHook' function hook 'make_glib_find_gsettings_schemas' /nix/store/9wba9diw8b199hfzcv8w99wzma66dzm1-qtbase-5.15.14
       > Running phase: qtPreHook
       > Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set.
       For full logs, run 'nix log /nix/store/fncpc8jyf7b1h08yipf25pkmls71pxhn-libguytools-2.1.0.drv'.

I can also use only:

nativeBuildInputs = [ libsForQt5.qmake libsForQt5.wrapQtAppsHook ];

and remove dontWrapQtApps. What should I use?

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;
};
})