2021-01-11 08:54:33 +01:00
|
|
|
{lib, stdenv, fetchurl, zlib}:
|
2007-03-24 13:01:50 +01:00
|
|
|
|
2020-07-31 18:01:40 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cramfsswap";
|
2021-08-21 11:45:44 +02:00
|
|
|
version = "1.4.2";
|
2020-07-31 18:01:40 +02:00
|
|
|
|
2007-03-24 13:01:50 +01:00
|
|
|
src = fetchurl {
|
2021-08-21 11:45:44 +02:00
|
|
|
url = "mirror://debian/pool/main/c/cramfsswap/${pname}_${version}.tar.xz";
|
|
|
|
sha256 = "10mj45zx71inaa3l1d81g64f7yn1xcprvq4v4yzpdwbxqmqaikw1";
|
2007-03-24 13:01:50 +01:00
|
|
|
};
|
2021-10-21 19:19:09 +02:00
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996964
|
|
|
|
patches = [ ./parallel-make.patch ];
|
2007-03-24 13:01:50 +01:00
|
|
|
|
2021-08-21 11:45:44 +02:00
|
|
|
# Needed for cross-compilation
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace 'strip ' '$(STRIP) '
|
|
|
|
'';
|
|
|
|
|
2007-03-24 13:01:50 +01:00
|
|
|
buildInputs = [zlib];
|
2016-08-02 18:06:29 +02:00
|
|
|
|
2020-07-31 18:01:40 +02:00
|
|
|
installPhase = ''
|
|
|
|
install --target $out/bin -D cramfsswap
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-07-31 18:01:40 +02:00
|
|
|
description = "Swap endianess of a cram filesystem (cramfs)";
|
2018-08-15 20:19:36 +02:00
|
|
|
homepage = "https://packages.debian.org/sid/utils/cramfsswap";
|
2021-08-21 11:45:44 +02:00
|
|
|
license = licenses.gpl2Only;
|
2018-08-15 20:19:36 +02:00
|
|
|
platforms = platforms.linux;
|
2016-08-02 18:06:29 +02:00
|
|
|
};
|
2007-03-24 13:01:50 +01:00
|
|
|
}
|