mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 06:23:36 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "3proxy";
|
|
version = "0.9.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "3proxy";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc=";
|
|
};
|
|
|
|
# They use 'install -s', that calls the native strip instead of the cross.
|
|
# Don't strip binary on install, we strip it on fixup phase anyway.
|
|
postPatch = ''
|
|
substituteInPlace Makefile.Linux \
|
|
--replace "(INSTALL_BIN) -s" "(INSTALL_BIN)" \
|
|
--replace "/usr" ""
|
|
'';
|
|
|
|
makeFlags = [
|
|
"-f Makefile.Linux"
|
|
"INSTALL=install"
|
|
"DESTDIR=${placeholder "out"}"
|
|
"CC:=$(CC)"
|
|
];
|
|
|
|
postInstall = ''
|
|
rm -fr $out/var
|
|
'';
|
|
|
|
passthru.tests = {
|
|
smoke-test = nixosTests._3proxy;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tiny free proxy server";
|
|
homepage = "https://github.com/3proxy/3proxy";
|
|
license = licenses.bsd2;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ misuzu ];
|
|
};
|
|
}
|