mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Merge pull request #141509 from Artturin/ncompressmodernise
ncompress: modernize build and switch to a github source
This commit is contained in:
commit
2138b27b18
|
@ -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 ];
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue