summary refs log tree commit diff
path: root/pkgs/applications/misc/extract_url
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2018-08-30 17:10:00 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-30 17:10:00 +0200
commit7b4c7c4b592a95b10bfb3903e911dd58b702335b (patch)
treeba9b11f6d7ae54eca3f292a4245b35b76ac84561 /pkgs/applications/misc/extract_url
parent3f61866ea6a29326de16451949ccd7e4eedbb381 (diff)
downloadnixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar.gz
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar.bz2
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar.lz
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar.xz
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.tar.zst
nixlib-7b4c7c4b592a95b10bfb3903e911dd58b702335b.zip
extract_url: init at 1.6.2 (#45624)
Squashed from:
* extract_url: init at 1.6.2
* extract_url: purify build
* extract_url: move src to more conventional place
* extract_url: don't unnecessarily propagate
* extract_url: use installFlags instead of patch
* extract_url: use URL literal instead of string
* extract_url: fix make flags style
* extract_url: remove PodChecker dependency
Diffstat (limited to 'pkgs/applications/misc/extract_url')
-rw-r--r--pkgs/applications/misc/extract_url/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/applications/misc/extract_url/default.nix b/pkgs/applications/misc/extract_url/default.nix
new file mode 100644
index 000000000000..389ac7dfb1fc
--- /dev/null
+++ b/pkgs/applications/misc/extract_url/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, perl
+, MIMEtools, HTMLParser
+, cursesSupport ? true, CursesUI
+, uriFindSupport ? true, URIFind
+}:
+
+let
+  perlDeps =
+    [ MIMEtools HTMLParser ]
+    ++ lib.optional cursesSupport CursesUI
+    ++ lib.optional uriFindSupport URIFind;
+
+in stdenv.mkDerivation rec {
+  name = "extract_url-${version}";
+  version = "1.6.2";
+
+  src = fetchFromGitHub {
+    owner = "m3m0ryh0l3";
+    repo = "extracturl";
+    rev = "v${version}";
+    sha256 = "05589lp15jmcpbj4y9a3hmf6n2gsqrm4ybcyh3hd4j6pc7hmnhny";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ perl ] ++ perlDeps;
+
+  makeFlags = [ "prefix=$(out)" ];
+  installFlags = [ "INSTALL=install" ];
+
+  postFixup = ''
+    wrapProgram "$out/bin/extract_url" \
+      --set PERL5LIB "${lib.makeFullPerlPath perlDeps}"
+  '';
+
+  meta = with lib; {
+    homepage = https://www.memoryhole.net/~kyle/extract_url/;
+    description = "Extracts URLs from MIME messages or plain text";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.qyliss ];
+    platforms = platforms.unix;
+  };
+}