Skip to content

Commit

Permalink
arj: fix build (NixOS#369014)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada authored Dec 29, 2024
2 parents 4b7712c + 60f796c commit 0ca8b3b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 165 deletions.
68 changes: 68 additions & 0 deletions pkgs/by-name/ar/arj/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
gccStdenv,
lib,
fetchurl,
fetchzip,
fetchpatch,

Check failure on line 6 in pkgs/by-name/ar/arj/package.nix

View workflow job for this annotation

GitHub Actions / exp-nixf-tidy-check

sema-unused-def-lambda-noarg-formal

attribute `fetchpatch` of argument is not used
autoreconfHook,
}:

gccStdenv.mkDerivation (finalAttrs: {
pname = "arj";
version = "3.10.22";
debianrev = "28";

src = fetchurl {
url = "http://deb.debian.org/debian/pool/main/a/arj/arj_${finalAttrs.version}.orig.tar.gz";
hash = "sha256-WJ5Mm8zIZp57bY1vzWTgH2osIf4QqtVqgzBOzDuWp9s=";
};

versionPatch = fetchzip {
url = "http://deb.debian.org/debian/pool/main/a/arj/arj_${finalAttrs.version}-${finalAttrs.debianrev}.debian.tar.xz";
hash = "sha256-rmu5RSZ6OHGT093PShzkvC3ktm/U6smta6pmn9D7Jfw=";
};

nativeBuildInputs = [ autoreconfHook ];

postPatch =
lib.optionalString gccStdenv.hostPlatform.isDarwin ''
substituteInPlace environ.c \
--replace-fail " #include <sys/statfs.h>" " #include <sys/mount.h>"
''
+ ''
cp -r ${finalAttrs.versionPatch} ./debian
chmod +w debian/patches/gnu_build_cross.patch
chmod +w debian/patches
mv debian/patches/gnu_build_cross.patch debian/patches/zz_for_last_gnu_build_cross.patch # This patch should be applied at last
for fname in debian/patches/*.patch
do
patch -p1 < "$fname"
done
'';

env = {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-function-declaration"
];
};

preAutoreconf = ''
cd gnu
'';

postConfigure = ''
cd ..
'';

meta = {
description = "Open-source implementation of the world-famous ARJ archiver";
longDescription = ''
This version of ARJ has been created with an intent to preserve maximum
compatibility and retain the feature set of the original ARJ archiver as
provided by ARJ Software, Inc.
'';
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.unix;
};
})
161 changes: 0 additions & 161 deletions pkgs/tools/archivers/arj/default.nix

This file was deleted.

4 changes: 0 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1645,10 +1645,6 @@ with pkgs;

apitrace = libsForQt5.callPackage ../applications/graphics/apitrace { };

arj = callPackage ../tools/archivers/arj {
stdenv = gccStdenv;
};

arpack-mpi = arpack.override { useMpi = true; };

inherit (callPackages ../data/fonts/arphic {})
Expand Down

0 comments on commit 0ca8b3b

Please sign in to comment.