3
0
Fork 0
forked from mirrors/nixpkgs

netselect: 0.3 -> 0.4

and fetch from GH repo since http://alumnit.ca/~apenwarr/netselect/ is gone
This commit is contained in:
Renaud 2018-11-12 22:04:36 +01:00 committed by GitHub
parent c618667bd3
commit a8ac1ef6a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,19 +1,28 @@
{stdenv, fetchurl}:
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
name = "netselect-0.3";
stdenv.mkDerivation rec {
name = "netselect-${version}";
version = "0.4";
src = fetchurl {
url = http://alumnit.ca/~apenwarr/netselect/netselect-0.3.tar.gz;
sha256 = "0y69z59vylj9x9nk5jqn6ihx7dkzg09gpv2w1q1rs8fmi4jr90gy";
src = fetchFromGitHub {
owner = "apenwarr";
repo = "netselect";
rev = name;
sha256 = "1zncyvjzllrjbdvz7c50d1xjyhs9mwqfy92ndpfc5b3mxqslw4kx";
};
preBuild = ''
makeFlagsArray=(PREFIX=$out)
substituteInPlace Makefile \
--replace "-o root" "" \
--replace "-g root" "" \
--replace "4755" "0755"
postPatch = ''
substituteInPlace netselect-apt \
--replace "/usr/bin/" ""
'';
makeFlags = [ "PREFIX=$(out)" ];
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin netselect netselect-apt
install -Dm444 -t $out/share/man/man1 *.1
runHook postInstall
'';
meta = with stdenv.lib; {