Merge pull request #141509 from Artturin/ncompressmodernise

ncompress: modernize build and switch to a github source
This commit is contained in:
Michael Raskin 2021-10-15 04:57:44 +00:00 committed by GitHub
commit 2138b27b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 26 deletions

View File

@ -4,7 +4,6 @@
, stdenv
, zlib
, xz
, ncompress
, gzip
, bzip2
, gnutar
@ -31,7 +30,7 @@ buildPythonPackage rec {
sha256 = "sha256-lfHXutAp06Xr/TSBpDwBUBC/mWI9XuyImoKwA3inqgU=";
};
propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract squashfsTools xz pycrypto ]
propagatedBuildInputs = [ zlib xz gzip bzip2 gnutar p7zip cabextract squashfsTools xz pycrypto ]
++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];

View File

@ -1,15 +0,0 @@
source $stdenv/setup
installFlags="PREFIX=$out"
preBuild() {
cp Makefile.def Makefile
sed -i GNUmakefile -e 's/compress %/%/g'
}
postInstall() {
rm $out/bin/uncompress* $out/bin/zcat*
ln -s compress $out/bin/uncompress
ln -s compress $out/bin/zcat
}
genericBuild

View File

@ -1,20 +1,27 @@
{lib, stdenv, fetchurl}:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "ncompress";
version = "5.0";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://sourceforge/project/ncompress/${pname}-${version}.tar.gz";
sha256 = "004r086c11sw9vg2j3srgxpz98w8pycjl33bk3pgqnd0s92igrn4";
src = fetchFromGitHub {
owner = "vapier";
repo = "ncompress";
rev = "v${version}";
sha256 = "sha256-Yhs3C5/kR7Ve56E84usYJprxIMAIwXVahLi1N9TIfj0=";
};
meta = {
makeFlags = [ "PREFIX=$(out)" ];
installTargets = "install_core";
postInstall = ''
mv $out/bin/uncompress $out/bin/uncompress-ncompress
'';
meta = with lib; {
homepage = "http://ncompress.sourceforge.net/";
license = lib.licenses.publicDomain;
license = licenses.publicDomain;
description = "A fast, simple LZW file compressor";
platforms = lib.platforms.unix;
platforms = platforms.unix;
};
}