mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "f-prot";
|
|
version = "6.2.1";
|
|
|
|
src = fetchurl {
|
|
url = "http://files.f-prot.com/files/unix-trial/fp-Linux.x86.32-ws.tar.gz";
|
|
sha256 = "0qlsrkanf0inplwv1i6hqbimdg91syf5ggd1vahsm9lhivmnr0v5";
|
|
};
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp fpscan $out/bin
|
|
|
|
mkdir -p $out/opt/f-prot
|
|
cp fpupdate $out/opt/f-prot
|
|
cp product.data.default $out/opt/f-prot/product.data
|
|
cp license.key $out/opt/f-prot/
|
|
cp f-prot.conf.default $out/opt/f-prot/f-prot.conf
|
|
ln -s $out/opt/f-prot/fpupdate $out/bin/fpupdate
|
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate
|
|
|
|
mkdir -p $out/share/man/
|
|
mkdir -p $out/share/man/man1
|
|
cp doc/man/fpscan.1 $out/share/man/man1
|
|
mkdir -p $out/share/man/man5
|
|
cp doc/man/f-prot.conf.5 $out/share/man/man5
|
|
mkdir -p $out/share/man/man8
|
|
cp doc/man/fpupdate.8 $out/share/man/man8
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.f-prot.com";
|
|
description = "A popular proprietary antivirus program";
|
|
license = licenses.unfree;
|
|
maintainers = [ maintainers.phreedom ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|