diff options
author | Artturin <Artturin@artturin.com> | 2021-10-13 17:03:31 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2021-10-13 17:07:50 +0300 |
commit | 80dd267525b5a59828548d933574018c2adcce71 (patch) | |
tree | 0f854c7c85dc080fe56cb56f652443395985c5d5 /pkgs/tools/compression | |
parent | 0d0182ff7e0b55029619c4791c8aa7033316a083 (diff) |
ncompress: modernize build and switch to a github source
install only core tools move uncompress to uncompress-ncompress
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r-- | pkgs/tools/compression/ncompress/builder.sh | 15 | ||||
-rw-r--r-- | pkgs/tools/compression/ncompress/default.nix | 25 |
2 files changed, 16 insertions, 24 deletions
diff --git a/pkgs/tools/compression/ncompress/builder.sh b/pkgs/tools/compression/ncompress/builder.sh deleted file mode 100644 index 7a3f34aae4691..0000000000000 --- a/pkgs/tools/compression/ncompress/builder.sh +++ /dev/null @@ -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 diff --git a/pkgs/tools/compression/ncompress/default.nix b/pkgs/tools/compression/ncompress/default.nix index f580709495ed9..c4678cd960210 100644 --- a/pkgs/tools/compression/ncompress/default.nix +++ b/pkgs/tools/compression/ncompress/default.nix @@ -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; }; } |