nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "ripmime";
9 version = "1.4.0.10";
10 src = fetchurl {
11 url = "https://pldaniels.com/${pname}/${pname}-${version}.tar.gz";
12 sha256 = "0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9";
13 };
14
15 preInstall = ''
16 sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" -e "s@man/man1@share/&@"
17 mkdir -p "$out/bin" "$out/share/man/man1"
18 '';
19
20 env = {
21 NIX_CFLAGS_COMPILE = " -Wno-error ";
22 }
23 // lib.optionalAttrs stdenv.hostPlatform.isDarwin {
24 NIX_LDFLAGS = "-liconv";
25 };
26
27 meta = with lib; {
28 description = "Attachment extractor for MIME messages";
29 maintainers = with maintainers; [ raskin ];
30 homepage = "https://pldaniels.com/ripmime/";
31 platforms = platforms.all;
32 mainProgram = "ripmime";
33 };
34
35 passthru = {
36 updateInfo = {
37 downloadPage = "https://pldaniels.com/ripmime/";
38 };
39 };
40}