mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 00:04:14 +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.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ stdenv, lib, fetchFromGitHub, makeWrapper, perlPackages
|
|
, cursesSupport ? true
|
|
, uriFindSupport ? true
|
|
}:
|
|
|
|
let
|
|
perlDeps =
|
|
[ perlPackages.MIMETools perlPackages.HTMLParser ]
|
|
++ lib.optional cursesSupport perlPackages.CursesUI
|
|
++ lib.optional uriFindSupport perlPackages.URIFind;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "extract_url";
|
|
version = "1.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "m3m0ryh0l3";
|
|
repo = "extracturl";
|
|
rev = "v${version}";
|
|
sha256 = "05589lp15jmcpbj4y9a3hmf6n2gsqrm4ybcyh3hd4j6pc7hmnhny";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ perlPackages.perl ] ++ perlDeps;
|
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
|
installFlags = [ "INSTALL=install" ];
|
|
|
|
postFixup = ''
|
|
wrapProgram "$out/bin/extract_url" \
|
|
--set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.memoryhole.net/~kyle/extract_url/";
|
|
description = "Extracts URLs from MIME messages or plain text";
|
|
mainProgram = "extract_url";
|
|
license = licenses.bsd2;
|
|
maintainers = [ maintainers.qyliss ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|